summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>2022-04-21 17:09:51 (GMT)
committerGitHub <noreply@github.com>2022-04-21 17:09:51 (GMT)
commit2f86cba3ec7b9f46b84e8cd239a1fee242c15049 (patch)
tree491c1f08a68d92e400d939d96fefdc7bfef57ddc
parentff7fe9e9af404591d3d50f3b33d190679529bb10 (diff)
parentec14985c8555bda02021568ea20295384a2cef7e (diff)
downloadhdf5-2f86cba3ec7b9f46b84e8cd239a1fee242c15049.zip
hdf5-2f86cba3ec7b9f46b84e8cd239a1fee242c15049.tar.gz
hdf5-2f86cba3ec7b9f46b84e8cd239a1fee242c15049.tar.bz2
Merge pull request #61 from HDFGroup/feature/vfd_swmr
VFD SWMR: Merges from develop (#1670)
-rw-r--r--.clang-format32
-rw-r--r--.github/workflows/clang-format-check.yml4
-rw-r--r--.github/workflows/clang-format-fix.yml4
-rw-r--r--.github/workflows/codespell.yml2
-rw-r--r--.github/workflows/main.yml3
-rw-r--r--.github/workflows/pr-check.yml11
-rwxr-xr-xautogen.sh136
-rw-r--r--bin/README2
-rwxr-xr-xbin/format_source2
-rwxr-xr-xbin/format_source_patch2
-rw-r--r--bin/h5cc.in2
-rwxr-xr-xbin/make_vers2
-rwxr-xr-xbin/restore.sh3
-rw-r--r--c++/src/H5Attribute.cpp1
-rw-r--r--c++/src/H5DataSet.cpp1
-rw-r--r--c++/src/H5DataType.cpp1
-rw-r--r--c++/src/H5FaccProp.cpp4
-rw-r--r--c++/src/H5Library.cpp2
-rw-r--r--c++/src/H5Location.cpp2
-rw-r--r--c++/src/H5PropList.cpp1
-rw-r--r--c++/test/dsets.cpp1
-rw-r--r--config/cmake/ConfigureChecks.cmake4
-rw-r--r--config/cmake/ConversionTests.c53
-rw-r--r--config/cmake/H5pubconf.h.in3
-rw-r--r--config/cmake/HDF5_Examples.cmake.in3
-rw-r--r--config/cmake/HDFFortranCompilerFlags.cmake6
-rw-r--r--config/cmake_ext_mod/runTest.cmake6
-rw-r--r--config/conclude.am4
-rw-r--r--config/intel-warnings/ifort-general2
-rw-r--r--config/intel-warnings/win-ifort-general1
-rw-r--r--configure.ac19
-rw-r--r--doc/img/release-schedule.plantuml45
-rwxr-xr-xdoc/img/release-schedule.pngbin0 -> 16991 bytes
-rw-r--r--doxygen/examples/H5.format.1.0.html2
-rw-r--r--doxygen/examples/H5.format.1.1.html2
-rw-r--r--fortran/examples/h5_extend.f902
-rw-r--r--fortran/src/H5_f.c12
-rw-r--r--fortran/src/H5_ff.F9011
-rw-r--r--fortran/test/fortranlib_test.F9020
-rw-r--r--fortran/test/tH5A.F902
-rw-r--r--fortran/test/tH5A_1_8.F9012
-rw-r--r--fortran/test/tH5D.F902
-rw-r--r--fortran/test/tH5F.F9099
-rw-r--r--fortran/test/tH5G_1_8.F902
-rw-r--r--fortran/test/tH5P.F904
-rw-r--r--fortran/test/tHDF5.F902
-rw-r--r--fortran/test/tHDF5_F03.F902
-rw-r--r--hl/src/H5DS.c172
-rw-r--r--hl/src/H5IM.c56
-rw-r--r--hl/src/H5LT.c81
-rw-r--r--hl/src/H5LTprivate.h17
-rw-r--r--hl/src/H5TB.c14
-rw-r--r--java/examples/datasets/CMakeLists.txt7
-rw-r--r--java/examples/datasets/H5Ex_D_Alloc.java66
-rw-r--r--java/examples/datasets/H5Ex_D_Checksum.java100
-rw-r--r--java/examples/datasets/H5Ex_D_Chunk.java101
-rw-r--r--java/examples/datasets/H5Ex_D_Compact.java66
-rw-r--r--java/examples/datasets/H5Ex_D_External.java51
-rw-r--r--java/examples/datasets/H5Ex_D_FillValue.java73
-rw-r--r--java/examples/datasets/H5Ex_D_Gzip.java105
-rw-r--r--java/examples/datasets/H5Ex_D_Hyperslab.java70
-rw-r--r--java/examples/datasets/H5Ex_D_Nbit.java113
-rw-r--r--java/examples/datasets/H5Ex_D_ReadWrite.java41
-rw-r--r--java/examples/datasets/H5Ex_D_Shuffle.java112
-rw-r--r--java/examples/datasets/H5Ex_D_Sofloat.java114
-rw-r--r--java/examples/datasets/H5Ex_D_Soint.java110
-rw-r--r--java/examples/datasets/H5Ex_D_Szip.java107
-rw-r--r--java/examples/datasets/H5Ex_D_Transform.java55
-rw-r--r--java/examples/datasets/H5Ex_D_UnlimitedAdd.java85
-rw-r--r--java/examples/datasets/H5Ex_D_UnlimitedGzip.java138
-rw-r--r--java/examples/datasets/H5Ex_D_UnlimitedMod.java81
-rw-r--r--java/examples/datatypes/CMakeLists.txt7
-rw-r--r--java/examples/datatypes/H5Ex_T_Array.java63
-rw-r--r--java/examples/datatypes/H5Ex_T_ArrayAttribute.java67
-rw-r--r--java/examples/datatypes/H5Ex_T_Bit.java51
-rw-r--r--java/examples/datatypes/H5Ex_T_BitAttribute.java52
-rw-r--r--java/examples/datatypes/H5Ex_T_Commit.java100
-rw-r--r--java/examples/datatypes/H5Ex_T_Compound.java152
-rw-r--r--java/examples/datatypes/H5Ex_T_CompoundAttribute.java154
-rw-r--r--java/examples/datatypes/H5Ex_T_Float.java51
-rw-r--r--java/examples/datatypes/H5Ex_T_FloatAttribute.java54
-rw-r--r--java/examples/datatypes/H5Ex_T_Integer.java47
-rw-r--r--java/examples/datatypes/H5Ex_T_IntegerAttribute.java48
-rw-r--r--java/examples/datatypes/H5Ex_T_ObjectReference.java144
-rw-r--r--java/examples/datatypes/H5Ex_T_ObjectReferenceAttribute.java160
-rw-r--r--java/examples/datatypes/H5Ex_T_Opaque.java59
-rw-r--r--java/examples/datatypes/H5Ex_T_OpaqueAttribute.java59
-rw-r--r--java/examples/datatypes/H5Ex_T_String.java71
-rw-r--r--java/examples/datatypes/H5Ex_T_StringAttribute.java73
-rw-r--r--java/examples/datatypes/H5Ex_T_VLString.java50
-rw-r--r--java/examples/groups/CMakeLists.txt7
-rw-r--r--java/examples/groups/H5Ex_G_Compact.java52
-rw-r--r--java/examples/groups/H5Ex_G_Corder.java56
-rw-r--r--java/examples/groups/H5Ex_G_Create.java19
-rw-r--r--java/examples/groups/H5Ex_G_Intermediate.java42
-rw-r--r--java/examples/groups/H5Ex_G_Iterate.java52
-rw-r--r--java/examples/groups/H5Ex_G_Phase.java73
-rw-r--r--java/examples/groups/H5Ex_G_Traverse.java45
-rw-r--r--java/examples/groups/H5Ex_G_Visit.java53
-rw-r--r--java/examples/intro/CMakeLists.txt7
-rw-r--r--java/examples/intro/H5_CreateAttribute.java38
-rw-r--r--java/examples/intro/H5_CreateDataset.java28
-rw-r--r--java/examples/intro/H5_CreateFile.java11
-rw-r--r--java/examples/intro/H5_CreateGroup.java19
-rw-r--r--java/examples/intro/H5_CreateGroupAbsoluteRelative.java27
-rw-r--r--java/examples/intro/H5_CreateGroupDataset.java68
-rw-r--r--java/examples/intro/H5_ReadWrite.java35
-rw-r--r--java/src/hdf/hdf5lib/CMakeLists.txt3
-rw-r--r--java/src/hdf/hdf5lib/H5.java5633
-rw-r--r--java/src/hdf/hdf5lib/HDF5Constants.java84
-rw-r--r--java/src/hdf/hdf5lib/HDF5GroupInfo.java116
-rw-r--r--java/src/hdf/hdf5lib/HDFArray.java467
-rw-r--r--java/src/hdf/hdf5lib/HDFNativeData.java95
-rw-r--r--java/src/hdf/hdf5lib/callbacks/Callbacks.java4
-rw-r--r--java/src/hdf/hdf5lib/callbacks/H5A_iterate_t.java7
-rw-r--r--java/src/hdf/hdf5lib/callbacks/H5D_append_t.java7
-rw-r--r--java/src/hdf/hdf5lib/callbacks/H5D_iterate_t.java7
-rw-r--r--java/src/hdf/hdf5lib/callbacks/H5E_walk_t.java7
-rw-r--r--java/src/hdf/hdf5lib/callbacks/H5L_iterate_opdata_t.java1
-rw-r--r--java/src/hdf/hdf5lib/callbacks/H5O_iterate_opdata_t.java1
-rw-r--r--java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_t.java7
-rw-r--r--java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_t.java7
-rw-r--r--java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_t.java7
-rw-r--r--java/src/hdf/hdf5lib/callbacks/H5P_iterate_t.java7
-rw-r--r--java/src/hdf/hdf5lib/callbacks/package-info.java3
-rw-r--r--java/src/hdf/hdf5lib/exceptions/HDF5AttributeException.java8
-rw-r--r--java/src/hdf/hdf5lib/exceptions/HDF5BtreeException.java8
-rw-r--r--java/src/hdf/hdf5lib/exceptions/HDF5DataFiltersException.java8
-rw-r--r--java/src/hdf/hdf5lib/exceptions/HDF5DataStorageException.java8
-rw-r--r--java/src/hdf/hdf5lib/exceptions/HDF5DatasetInterfaceException.java8
-rw-r--r--java/src/hdf/hdf5lib/exceptions/HDF5DataspaceInterfaceException.java8
-rw-r--r--java/src/hdf/hdf5lib/exceptions/HDF5DatatypeInterfaceException.java8
-rw-r--r--java/src/hdf/hdf5lib/exceptions/HDF5Exception.java10
-rw-r--r--java/src/hdf/hdf5lib/exceptions/HDF5ExternalFileListException.java8
-rw-r--r--java/src/hdf/hdf5lib/exceptions/HDF5FileInterfaceException.java8
-rw-r--r--java/src/hdf/hdf5lib/exceptions/HDF5FunctionArgumentException.java8
-rw-r--r--java/src/hdf/hdf5lib/exceptions/HDF5FunctionEntryExitException.java8
-rw-r--r--java/src/hdf/hdf5lib/exceptions/HDF5HeapException.java8
-rw-r--r--java/src/hdf/hdf5lib/exceptions/HDF5IdException.java9
-rw-r--r--java/src/hdf/hdf5lib/exceptions/HDF5InternalErrorException.java8
-rw-r--r--java/src/hdf/hdf5lib/exceptions/HDF5JavaException.java8
-rw-r--r--java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java35
-rw-r--r--java/src/hdf/hdf5lib/exceptions/HDF5LowLevelIOException.java8
-rw-r--r--java/src/hdf/hdf5lib/exceptions/HDF5MetaDataCacheException.java8
-rw-r--r--java/src/hdf/hdf5lib/exceptions/HDF5ObjectHeaderException.java8
-rw-r--r--java/src/hdf/hdf5lib/exceptions/HDF5PropertyListInterfaceException.java8
-rw-r--r--java/src/hdf/hdf5lib/exceptions/HDF5ReferenceException.java8
-rw-r--r--java/src/hdf/hdf5lib/exceptions/HDF5ResourceUnavailableException.java8
-rw-r--r--java/src/hdf/hdf5lib/exceptions/HDF5SymbolTableException.java8
-rw-r--r--java/src/hdf/hdf5lib/package-info.java99
-rw-r--r--java/src/hdf/hdf5lib/structs/H5AC_cache_config_t.java144
-rw-r--r--java/src/hdf/hdf5lib/structs/H5A_info_t.java11
-rw-r--r--java/src/hdf/hdf5lib/structs/H5E_error2_t.java24
-rw-r--r--java/src/hdf/hdf5lib/structs/H5FD_hdfs_fapl_t.java48
-rw-r--r--java/src/hdf/hdf5lib/structs/H5FD_ros3_fapl_t.java35
-rw-r--r--java/src/hdf/hdf5lib/structs/H5F_info2_t.java36
-rw-r--r--java/src/hdf/hdf5lib/structs/H5G_info_t.java2
-rw-r--r--java/src/hdf/hdf5lib/structs/H5L_info_t.java36
-rw-r--r--java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java28
-rw-r--r--java/src/hdf/hdf5lib/structs/H5O_info_t.java39
-rw-r--r--java/src/hdf/hdf5lib/structs/H5O_native_info_t.java19
-rw-r--r--java/src/hdf/hdf5lib/structs/H5O_token_t.java13
-rw-r--r--java/src/hdf/hdf5lib/structs/H5_ih_info_t.java13
-rw-r--r--java/src/hdf/hdf5lib/structs/package-info.java3
-rw-r--r--java/test/CMakeLists.txt7
-rw-r--r--java/test/TestAll.java26
-rw-r--r--java/test/TestH5.java397
-rw-r--r--java/test/TestH5A.java1028
-rw-r--r--java/test/TestH5Arw.java169
-rw-r--r--java/test/TestH5D.java555
-rw-r--r--java/test/TestH5Dparams.java69
-rw-r--r--java/test/TestH5Dplist.java268
-rw-r--r--java/test/TestH5Drw.java161
-rw-r--r--java/test/TestH5E.java125
-rw-r--r--java/test/TestH5Edefault.java161
-rw-r--r--java/test/TestH5Eparams.java71
-rw-r--r--java/test/TestH5Eregister.java27
-rw-r--r--java/test/TestH5F.java173
-rw-r--r--java/test/TestH5Fbasic.java110
-rw-r--r--java/test/TestH5Fparams.java112
-rw-r--r--java/test/TestH5Fswmr.java49
-rw-r--r--java/test/TestH5G.java317
-rw-r--r--java/test/TestH5Gbasic.java311
-rw-r--r--java/test/TestH5Giterate.java71
-rw-r--r--java/test/TestH5Lbasic.java234
-rw-r--r--java/test/TestH5Lcreate.java550
-rw-r--r--java/test/TestH5Lparams.java129
-rw-r--r--java/test/TestH5Obasic.java480
-rw-r--r--java/test/TestH5Ocopy.java352
-rw-r--r--java/test/TestH5OcopyOld.java391
-rw-r--r--java/test/TestH5Ocreate.java329
-rw-r--r--java/test/TestH5Oparams.java111
-rw-r--r--java/test/TestH5P.java694
-rw-r--r--java/test/TestH5PData.java151
-rw-r--r--java/test/TestH5PL.java142
-rw-r--r--java/test/TestH5Pfapl.java790
-rw-r--r--java/test/TestH5Pfaplhdfs.java64
-rw-r--r--java/test/TestH5Pfapls3.java67
-rw-r--r--java/test/TestH5Plist.java752
-rw-r--r--java/test/TestH5Pvirtual.java364
-rw-r--r--java/test/TestH5R.java414
-rw-r--r--java/test/TestH5Rref.java797
-rw-r--r--java/test/TestH5S.java313
-rw-r--r--java/test/TestH5Sbasic.java279
-rw-r--r--java/test/TestH5T.java429
-rw-r--r--java/test/TestH5Tbasic.java99
-rw-r--r--java/test/TestH5Tparams.java231
-rw-r--r--java/test/TestH5VL.java70
-rw-r--r--java/test/TestH5Z.java58
-rw-r--r--release_docs/HISTORY-1_0-1_8_0_rc3.txt2
-rw-r--r--release_docs/HISTORY-1_13.txt8
-rw-r--r--release_docs/HISTORY-1_8_0-1_10_0.txt2
-rw-r--r--release_docs/RELEASE.txt7
-rw-r--r--src/H5.c2
-rw-r--r--src/H5A.c30
-rw-r--r--src/H5AC.c6
-rw-r--r--src/H5ACmodule.h5
-rw-r--r--src/H5ACmpio.c32
-rw-r--r--src/H5ACproxy_entry.c12
-rw-r--r--src/H5Abtree2.c22
-rw-r--r--src/H5Adense.c16
-rw-r--r--src/H5Aint.c22
-rw-r--r--src/H5Amodule.h5
-rw-r--r--src/H5B.c14
-rw-r--r--src/H5B2cache.c42
-rw-r--r--src/H5B2int.c2
-rw-r--r--src/H5B2internal.c4
-rw-r--r--src/H5B2leaf.c4
-rw-r--r--src/H5B2module.h5
-rw-r--r--src/H5B2test.c24
-rw-r--r--src/H5Bcache.c10
-rw-r--r--src/H5Bmodule.h5
-rw-r--r--src/H5C.c72
-rw-r--r--src/H5CS.c2
-rw-r--r--src/H5CX.c8
-rw-r--r--src/H5CXmodule.h5
-rw-r--r--src/H5Cepoch.c20
-rw-r--r--src/H5Cimage.c38
-rw-r--r--src/H5Clog_json.c48
-rw-r--r--src/H5Clog_trace.c38
-rw-r--r--src/H5Cmodule.h5
-rw-r--r--src/H5Cmpio.c6
-rw-r--r--src/H5Cprefetched.c20
-rw-r--r--src/H5Ctag.c12
-rw-r--r--src/H5Ctest.c2
-rw-r--r--src/H5D.c12
-rw-r--r--src/H5Dbtree.c56
-rw-r--r--src/H5Dbtree2.c60
-rw-r--r--src/H5Dchunk.c96
-rw-r--r--src/H5Dcompact.c16
-rw-r--r--src/H5Dcontig.c22
-rw-r--r--src/H5Dearray.c62
-rw-r--r--src/H5Defl.c16
-rw-r--r--src/H5Dfarray.c60
-rw-r--r--src/H5Dfill.c2
-rw-r--r--src/H5Dint.c36
-rw-r--r--src/H5Dio.c8
-rw-r--r--src/H5Dmodule.h5
-rw-r--r--src/H5Dmpio.c62
-rw-r--r--src/H5Dnone.c20
-rw-r--r--src/H5Doh.c16
-rw-r--r--src/H5Dscatgath.c8
-rw-r--r--src/H5Dselect.c2
-rw-r--r--src/H5Dsingle.c24
-rw-r--r--src/H5Dvirtual.c30
-rw-r--r--src/H5E.c28
-rw-r--r--src/H5EA.c4
-rw-r--r--src/H5EAcache.c70
-rw-r--r--src/H5EAmodule.h5
-rw-r--r--src/H5EAtest.c16
-rw-r--r--src/H5ESint.c16
-rw-r--r--src/H5ESmodule.h5
-rw-r--r--src/H5Eint.c6
-rw-r--r--src/H5Emodule.h5
-rw-r--r--src/H5F.c14
-rw-r--r--src/H5FA.c2
-rw-r--r--src/H5FAcache.c44
-rw-r--r--src/H5FAmodule.h5
-rw-r--r--src/H5FAtest.c14
-rw-r--r--src/H5FD.c6
-rw-r--r--src/H5FDcore.c40
-rw-r--r--src/H5FDdirect.c36
-rw-r--r--src/H5FDdrvr_module.h6
-rw-r--r--src/H5FDfamily.c48
-rw-r--r--src/H5FDhdfs.c40
-rw-r--r--src/H5FDint.c2
-rw-r--r--src/H5FDlog.c40
-rw-r--r--src/H5FDmirror.c32
-rw-r--r--src/H5FDmodule.h5
-rw-r--r--src/H5FDmpio.c28
-rw-r--r--src/H5FDros3.c36
-rw-r--r--src/H5FDs3comms.c2
-rw-r--r--src/H5FDsec2.c32
-rw-r--r--src/H5FDspace.c2
-rw-r--r--src/H5FDsplitter.c60
-rw-r--r--src/H5FDvfd_swmr.c36
-rw-r--r--src/H5FL.c34
-rw-r--r--src/H5FLmodule.h5
-rw-r--r--src/H5FS.c4
-rw-r--r--src/H5FScache.c30
-rw-r--r--src/H5FSmodule.h5
-rw-r--r--src/H5FSsection.c32
-rw-r--r--src/H5Faccum.c2
-rw-r--r--src/H5Fefc.c8
-rw-r--r--src/H5Fint.c24
-rw-r--r--src/H5Fmodule.h5
-rw-r--r--src/H5Fmount.c4
-rw-r--r--src/H5Fsuper.c4
-rw-r--r--src/H5Fsuper_cache.c32
-rw-r--r--src/H5Ftest.c2
-rw-r--r--src/H5Fvfd_swmr.c20
-rw-r--r--src/H5G.c10
-rw-r--r--src/H5Gbtree2.c22
-rw-r--r--src/H5Gcache.c10
-rw-r--r--src/H5Gcompact.c8
-rw-r--r--src/H5Gdense.c24
-rw-r--r--src/H5Gdeprec.c2
-rw-r--r--src/H5Gint.c10
-rw-r--r--src/H5Glink.c8
-rw-r--r--src/H5Gloc.c16
-rw-r--r--src/H5Gmodule.h5
-rw-r--r--src/H5Gname.c10
-rw-r--r--src/H5Gnode.c20
-rw-r--r--src/H5Gobj.c6
-rw-r--r--src/H5Goh.c14
-rw-r--r--src/H5Gstab.c6
-rw-r--r--src/H5Gtest.c2
-rw-r--r--src/H5Gtraverse.c8
-rw-r--r--src/H5HFbtree2.c44
-rw-r--r--src/H5HFcache.c64
-rw-r--r--src/H5HFdbg.c2
-rw-r--r--src/H5HFhdr.c2
-rw-r--r--src/H5HFhuge.c6
-rw-r--r--src/H5HFiblock.c8
-rw-r--r--src/H5HFman.c2
-rw-r--r--src/H5HFmodule.h5
-rw-r--r--src/H5HFsection.c104
-rw-r--r--src/H5HFspace.c4
-rw-r--r--src/H5HFtiny.c2
-rw-r--r--src/H5HG.c4
-rw-r--r--src/H5HGcache.c14
-rw-r--r--src/H5HGmodule.h5
-rw-r--r--src/H5HL.c6
-rw-r--r--src/H5HLcache.c30
-rw-r--r--src/H5HLmodule.h5
-rw-r--r--src/H5HLpkg.h5
-rw-r--r--src/H5I.c4
-rw-r--r--src/H5Idbg.c2
-rw-r--r--src/H5Iint.c22
-rw-r--r--src/H5Imodule.h5
-rw-r--r--src/H5L.c12
-rw-r--r--src/H5Ldeprec.c2
-rw-r--r--src/H5Lexternal.c4
-rw-r--r--src/H5Lint.c30
-rw-r--r--src/H5Lmodule.h5
-rw-r--r--src/H5M.c10
-rw-r--r--src/H5MF.c32
-rw-r--r--src/H5MFaggr.c8
-rw-r--r--src/H5MFdbg.c2
-rw-r--r--src/H5MFmodule.h5
-rw-r--r--src/H5MFsection.c28
-rw-r--r--src/H5MVmodule.h13
-rw-r--r--src/H5MVsection.c12
-rw-r--r--src/H5Mmodule.h5
-rw-r--r--src/H5O.c14
-rw-r--r--src/H5Oainfo.c20
-rw-r--r--src/H5Oalloc.c24
-rw-r--r--src/H5Oattr.c22
-rw-r--r--src/H5Oattribute.c20
-rw-r--r--src/H5Obogus.c8
-rw-r--r--src/H5Obtreek.c10
-rw-r--r--src/H5Ocache.c38
-rw-r--r--src/H5Ocache_image.c14
-rw-r--r--src/H5Ocont.c12
-rw-r--r--src/H5Ocopy.c22
-rw-r--r--src/H5Ocopy_ref.c8
-rw-r--r--src/H5Odeprec.c6
-rw-r--r--src/H5Odrvinfo.c12
-rw-r--r--src/H5Odtype.c28
-rw-r--r--src/H5Oefl.c14
-rw-r--r--src/H5Ofill.c22
-rw-r--r--src/H5Oflush.c4
-rw-r--r--src/H5Ofsinfo.c12
-rw-r--r--src/H5Oginfo.c12
-rw-r--r--src/H5Oint.c16
-rw-r--r--src/H5Olayout.c20
-rw-r--r--src/H5Olinfo.c20
-rw-r--r--src/H5Olink.c20
-rw-r--r--src/H5Omessage.c6
-rw-r--r--src/H5Omodule.h5
-rw-r--r--src/H5Omtime.c18
-rw-r--r--src/H5Oname.c12
-rw-r--r--src/H5Opline.c16
-rw-r--r--src/H5Opublic.h4
-rw-r--r--src/H5Orefcount.c14
-rw-r--r--src/H5Osdspace.c16
-rw-r--r--src/H5Oshared.c4
-rw-r--r--src/H5Oshared.h6
-rw-r--r--src/H5Oshmesg.c10
-rw-r--r--src/H5Ostab.c18
-rw-r--r--src/H5Ounknown.c2
-rw-r--r--src/H5P.c2
-rw-r--r--src/H5PB.c24
-rw-r--r--src/H5PBmodule.h5
-rw-r--r--src/H5PLmodule.h5
-rw-r--r--src/H5PLpath.c16
-rw-r--r--src/H5PLplugin_cache.c2
-rw-r--r--src/H5Pdapl.c46
-rw-r--r--src/H5Pdcpl.c52
-rw-r--r--src/H5Pdxpl.c48
-rw-r--r--src/H5Pencdec.c2
-rw-r--r--src/H5Pfapl.c120
-rw-r--r--src/H5Pfcpl.c18
-rw-r--r--src/H5Pfmpl.c2
-rw-r--r--src/H5Pgcpl.c10
-rw-r--r--src/H5Pint.c50
-rw-r--r--src/H5Plapl.c34
-rw-r--r--src/H5Plcpl.c2
-rw-r--r--src/H5Pmapl.c2
-rw-r--r--src/H5Pmcpl.c2
-rw-r--r--src/H5Pmodule.h5
-rw-r--r--src/H5Pocpl.c20
-rw-r--r--src/H5Pocpypl.c22
-rw-r--r--src/H5Pstrcpl.c6
-rw-r--r--src/H5R.c6
-rw-r--r--src/H5RS.c6
-rw-r--r--src/H5RSmodule.h5
-rw-r--r--src/H5Rdeprec.c4
-rw-r--r--src/H5Rint.c12
-rw-r--r--src/H5Rmodule.h5
-rw-r--r--src/H5S.c4
-rw-r--r--src/H5SL.c8
-rw-r--r--src/H5SLmodule.h5
-rw-r--r--src/H5SM.c34
-rw-r--r--src/H5SMbtree2.c8
-rw-r--r--src/H5SMcache.c24
-rw-r--r--src/H5SMmessage.c4
-rw-r--r--src/H5SMmodule.h5
-rw-r--r--src/H5Sall.c54
-rw-r--r--src/H5Shyper.c168
-rw-r--r--src/H5Smodule.h5
-rw-r--r--src/H5Smpio.c18
-rw-r--r--src/H5Snone.c54
-rw-r--r--src/H5Spoint.c64
-rw-r--r--src/H5Sselect.c6
-rw-r--r--src/H5Stest.c6
-rw-r--r--src/H5T.c30
-rw-r--r--src/H5TS.c4
-rw-r--r--src/H5Tcommit.c6
-rw-r--r--src/H5Tcompound.c6
-rw-r--r--src/H5Tconv.c8
-rw-r--r--src/H5Tenum.c4
-rw-r--r--src/H5Tmodule.h5
-rw-r--r--src/H5Tnative.c10
-rw-r--r--src/H5Toffset.c2
-rw-r--r--src/H5Toh.c8
-rw-r--r--src/H5Torder.c2
-rw-r--r--src/H5Tprecis.c2
-rw-r--r--src/H5Tref.c34
-rw-r--r--src/H5Tvlen.c130
-rw-r--r--src/H5VLcallback.c126
-rw-r--r--src/H5VLdyn_ops.c4
-rw-r--r--src/H5VLint.c12
-rw-r--r--src/H5VLmodule.h5
-rw-r--r--src/H5VLnative.c2
-rw-r--r--src/H5VLnative_dataset.c2
-rw-r--r--src/H5VM.c6
-rw-r--r--src/H5Z.c14
-rw-r--r--src/H5Zdeflate.c2
-rw-r--r--src/H5Zfletcher32.c2
-rw-r--r--src/H5Zmodule.h5
-rw-r--r--src/H5Znbit.c24
-rw-r--r--src/H5Zscaleoffset.c14
-rw-r--r--src/H5Zshuffle.c4
-rw-r--r--src/H5Zszip.c6
-rw-r--r--src/H5Ztrans.c30
-rw-r--r--src/H5checksum.c4
-rw-r--r--src/H5module.h5
-rw-r--r--src/H5private.h29
-rw-r--r--src/H5system.c2
-rw-r--r--test/test_swmr.sh.in89
-rw-r--r--test/test_vfd_swmr.sh.in1623
-rw-r--r--testpar/t_2Gio.c2
-rw-r--r--testpar/t_cache.c23
-rw-r--r--testpar/t_dset.c2
-rw-r--r--testpar/t_mpi.c38
-rw-r--r--testpar/t_prop.c14
487 files changed, 17058 insertions, 13870 deletions
diff --git a/.clang-format b/.clang-format
index 62dc6b5..b51da2a 100644
--- a/.clang-format
+++ b/.clang-format
@@ -1,7 +1,20 @@
---
-Language: Cpp
BasedOnStyle: LLVM
AlignConsecutiveAssignments: true
+BraceWrapping:
+ AfterFunction: true
+ #llvm10-11: AfterControlStatement: false - Never
+ BeforeCatch: true
+ BeforeElse: true
+ #llvm11: BeforeLambdaBody: false
+ #llvm11: BeforeWhile: false
+BreakBeforeBraces: Stroustrup
+BreakAfterJavaFieldAnnotations: true
+BreakStringLiterals: true
+ColumnLimit: 110 # Update $max_trace_macro_line_len in bin/trace also
+IndentWidth: 4
+---
+Language: Cpp
#llvm11: AlignConsecutiveBitFields: false
AlignConsecutiveDeclarations: true
AlignConsecutiveMacros: true
@@ -22,17 +35,6 @@ AlwaysBreakAfterReturnType: AllDefinitions
# - H5_ATTR_CONST
# - H5_ATTR_PURE
# - H5_ATTR_FALLTHROUGH
-BraceWrapping:
- AfterFunction: true
- #llvm10-11: AfterControlStatement: false - Never
- BeforeCatch: true
- BeforeElse: true
- #llvm11: BeforeLambdaBody: false
- #llvm11: BeforeWhile: false
-BreakBeforeBraces: Stroustrup
-BreakAfterJavaFieldAnnotations: true
-BreakStringLiterals: true
-ColumnLimit: 110 # Update $max_trace_macro_line_len in bin/trace also
ForEachMacros: ['ALL_MEMBERS', 'UNIQUE_MEMBERS']
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
@@ -55,7 +57,6 @@ IndentCaseLabels: true
#llvm11: IndentCaseBlocks: false
IndentGotoLabels: false
#llvm11: IndentExternBlock: AfterExternBlock
-IndentWidth: 4
#llvm11: InsertTrailingCommas: None
MacroBlockBegin: "^BEGIN_FUNC"
MacroBlockEnd: "^END_FUNC"
@@ -92,5 +93,8 @@ StatementMacros:
#llvm11: WhitespaceSensitiveMacros:
#llvm11: - STRINGIZE
#llvm11: - PP_STRINGIZE
+---
+Language: Java
+BreakAfterJavaFieldAnnotations: true
+JavaImportGroups: ['java', 'hdf', 'hdf.hdf5lib', 'org']
...
-
diff --git a/.github/workflows/clang-format-check.yml b/.github/workflows/clang-format-check.yml
index 4f696e7..0343f4b 100644
--- a/.github/workflows/clang-format-check.yml
+++ b/.github/workflows/clang-format-check.yml
@@ -8,11 +8,11 @@ jobs:
if: "!contains(github.event.head_commit.message, 'skip-ci')"
steps:
- uses: actions/checkout@v2
- - name: Run clang-format style check for C programs.
+ - name: Run clang-format style check for C and java programs.
uses: DoozyX/clang-format-lint-action@v0.11
with:
source: '.'
- extensions: 'c,h,cpp,hpp'
+ extensions: 'c,h,cpp,hpp,java'
clangFormatVersion: 10
style: file
exclude: './config ./hl/src/H5LTanalyze.c ./hl/src/H5LTparse.c ./hl/src/H5LTparse.h ./src/H5Epubgen.h ./src/H5Einit.h ./src/H5Eterm.h ./src/H5Edefin.h ./src/H5version.h ./src/H5overflow.h'
diff --git a/.github/workflows/clang-format-fix.yml b/.github/workflows/clang-format-fix.yml
index 082d617..abdd069 100644
--- a/.github/workflows/clang-format-fix.yml
+++ b/.github/workflows/clang-format-fix.yml
@@ -9,11 +9,11 @@ jobs:
if: "!contains(github.event.head_commit.message, 'skip-ci')"
steps:
- uses: actions/checkout@v2
- - name: Run clang-format style check for C programs.
+ - name: Run clang-format style check for C and Java programs.
uses: DoozyX/clang-format-lint-action@v0.11
with:
source: '.'
- extensions: 'c,h,cpp,hpp'
+ extensions: 'c,h,cpp,hpp,java'
clangFormatVersion: 10
inplace: True
style: file
diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml
index 163353e..78c1a4f 100644
--- a/.github/workflows/codespell.yml
+++ b/.github/workflows/codespell.yml
@@ -12,4 +12,4 @@ jobs:
- uses: codespell-project/actions-codespell@master
with:
skip: ./bin/trace,./hl/tools/h5watch/h5watch.c,./tools/test/h5jam/tellub.c
- ignore_words_list: isnt,inout,nd,parms,parm,ba,offsetP,ser,ois,had,fiter,fo,clude,refere,minnum,offsetp,creat,ans:,eiter,lastr,ans,isn't,ifset,sur,trun,dne,tthe,hda,filname,te,htmp,minnum
+ ignore_words_list: isnt,inout,nd,parms,parm,ba,offsetP,ser,ois,had,fiter,fo,clude,refere,minnum,offsetp,creat,ans:,eiter,lastr,ans,isn't,ifset,sur,trun,dne,tthe,hda,filname,te,htmp,minnum,ro,oce
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index dc31de6..3558460 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -9,6 +9,9 @@ on:
- '.github/**'
- 'doc/**'
- 'release_docs/**'
+ - 'ACKNOWLEDGEMENTS'
+ - 'COPYING**'
+ - '**.md'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml
index 6fc2f48..65e0ffd 100644
--- a/.github/workflows/pr-check.yml
+++ b/.github/workflows/pr-check.yml
@@ -1,10 +1,17 @@
-name: hdf5 dev CI
+name: PR 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, feature/vfd_swmr ]
-
+ paths-ignore:
+ - '.github/**'
+ - 'doc/**'
+ - 'release_docs/**'
+ - 'ACKNOWLEDGEMENTS'
+ - 'COPYING**'
+ - '**.md'
+
# 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"
diff --git a/autogen.sh b/autogen.sh
index c4fdf36..4676ee0 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -50,17 +50,7 @@
# Note that aclocal will attempt to include libtool's share/aclocal
# directory.
#
-# This script takes two potential options:
-#
-# -p
-#
-# When this is selected, the autotools versions are set to the paths
-# and versions used by The HDF Group to produce the released versions
-# of the library.
-#
-# NOTE: This is probably temporary. Once we update our dev machines
-# to have recent versions of the autotools this option will probably
-# be removed.
+# Aside from -h for help, this script takes one potential option:
#
# -v
#
@@ -72,9 +62,6 @@ echo "* HDF5 autogen.sh script *"
echo "**************************"
echo
-# Default is not production
-production=false
-
# Default is not verbose output
verbose=false
@@ -86,10 +73,6 @@ while getopts "$optspec" optchar; do
echo
echo " -h Print this help message."
echo
- echo " -p Used by THG to use hard-codes autotools"
- echo " paths on THG machines. Not for non-HDF-Group"
- echo " users!"
- echo
echo " -v Show more verbose output."
echo
echo " NOTE: Each tool can be set via an environment variable."
@@ -97,11 +80,6 @@ while getopts "$optspec" optchar; do
echo
exit 0
;;
- p)
- echo "Setting THG production mode..."
- echo
- production=true
- ;;
v)
echo "Setting verbosity: high"
echo
@@ -117,84 +95,52 @@ while getopts "$optspec" optchar; do
esac
done
-if [ "$production" = true ] ; then
-
- # Production mode
- #
- # Hard-code canonical HDF Group tool locations.
-
- # If paths to tools are not specified, assume they are
- # located in /usr/hdf/bin/AUTOTOOLS and set paths accordingly.
- if test -z ${HDF5_AUTOCONF}; then
- HDF5_AUTOCONF=/usr/hdf/bin/AUTOTOOLS/autoconf
- fi
- if test -z ${HDF5_AUTOMAKE}; then
- HDF5_AUTOMAKE=/usr/hdf/bin/AUTOTOOLS/automake
- fi
- if test -z ${HDF5_AUTOHEADER}; then
- HDF5_AUTOHEADER=/usr/hdf/bin/AUTOTOOLS/autoheader
- fi
- if test -z ${HDF5_ACLOCAL}; then
- HDF5_ACLOCAL=/usr/hdf/bin/AUTOTOOLS/aclocal
- fi
- if test -z ${HDF5_LIBTOOL}; then
- HDF5_LIBTOOL=/usr/hdf/bin/AUTOTOOLS/libtool
- fi
- if test -z ${HDF5_M4}; then
- HDF5_M4=/usr/hdf/bin/AUTOTOOLS/m4
- fi
-
-else
-
- # Not in production mode
- #
- # If paths to autotools are not specified, use whatever the system
- # has installed as the default. We use 'which <tool>' to
- # show exactly what's being used.
- if test -z ${HDF5_AUTOCONF}; then
- HDF5_AUTOCONF=$(which autoconf)
- fi
- if test -z ${HDF5_AUTOMAKE}; then
- HDF5_AUTOMAKE=$(which automake)
- fi
- if test -z ${HDF5_AUTOHEADER}; then
- HDF5_AUTOHEADER=$(which autoheader)
- fi
- if test -z ${HDF5_ACLOCAL}; then
- HDF5_ACLOCAL=$(which aclocal)
- fi
- if test -z ${HDF5_LIBTOOL}; then
- case "`uname`" in
- Darwin*)
- # libtool on OS-X is non-gnu
- HDF5_LIBTOOL=$(which glibtool)
- ;;
- *)
- HDF5_LIBTOOL=$(which libtool)
- ;;
- esac
- fi
- if test -z ${HDF5_M4}; then
- HDF5_M4=$(which m4)
- fi
-
-fi # production
+# If paths to autotools are not specified, use whatever the system
+# has installed as the default. We use 'command -v <tool>' to
+# show exactly what's being used (shellcheck complains that 'which'
+# is non-standard and deprecated).
+if test -z "${HDF5_AUTOCONF}"; then
+ HDF5_AUTOCONF="$(command -v autoconf)"
+fi
+if test -z "${HDF5_AUTOMAKE}"; then
+ HDF5_AUTOMAKE="$(command -v automake)"
+fi
+if test -z "${HDF5_AUTOHEADER}"; then
+ HDF5_AUTOHEADER="$(command -v autoheader)"
+fi
+if test -z "${HDF5_ACLOCAL}"; then
+ HDF5_ACLOCAL="$(command -v aclocal)"
+fi
+if test -z "${HDF5_LIBTOOL}"; then
+ case "$(uname)" in
+ Darwin*)
+ # libtool on OS-X is non-gnu
+ HDF5_LIBTOOL="$(command -v glibtool)"
+ ;;
+ *)
+ HDF5_LIBTOOL="$(command -v libtool)"
+ ;;
+ esac
+fi
+if test -z "${HDF5_M4}"; then
+ HDF5_M4="$(command -v m4)"
+fi
# Make sure that these versions of the autotools are in the path
-AUTOCONF_DIR=`dirname ${HDF5_AUTOCONF}`
-LIBTOOL_DIR=`dirname ${HDF5_LIBTOOL}`
-M4_DIR=`dirname ${HDF5_M4}`
+AUTOCONF_DIR=$(dirname "${HDF5_AUTOCONF}")
+LIBTOOL_DIR=$(dirname "${HDF5_LIBTOOL}")
+M4_DIR=$(dirname "${HDF5_M4}")
PATH=${AUTOCONF_DIR}:${LIBTOOL_DIR}:${M4_DIR}:$PATH
# Make libtoolize match the specified libtool
-case "`uname`" in
+case "$(uname)" in
Darwin*)
# On OS X, libtoolize could be named glibtoolize or
# libtoolize. Try the former first, then fall back
# to the latter if it's not found.
HDF5_LIBTOOLIZE="${LIBTOOL_DIR}/glibtoolize"
- if [ ! -f $HDF5_LIBTOOLIZE ] ; then
+ if [ ! -f "$HDF5_LIBTOOLIZE" ] ; then
HDF5_LIBTOOLIZE="${LIBTOOL_DIR}/libtoolize"
fi
;;
@@ -249,7 +195,7 @@ echo
# LIBTOOLIZE
libtoolize_cmd="${HDF5_LIBTOOLIZE} --copy --force"
-echo ${libtoolize_cmd}
+echo "${libtoolize_cmd}"
if [ "$verbose" = true ] ; then
${HDF5_LIBTOOLIZE} --version
fi
@@ -264,7 +210,7 @@ if test -e "${LIBTOOL_DIR}/../share/aclocal" ; then
aclocal_include="-I ${LIBTOOL_DIR}/../share/aclocal"
fi
aclocal_cmd="${HDF5_ACLOCAL} --force -I m4 ${aclocal_include}"
-echo ${aclocal_cmd}
+echo "${aclocal_cmd}"
if [ "$verbose" = true ] ; then
${HDF5_ACLOCAL} --version
fi
@@ -273,7 +219,7 @@ echo
# AUTOHEADER
autoheader_cmd="${HDF5_AUTOHEADER} --force"
-echo ${autoheader_cmd}
+echo "${autoheader_cmd}"
if [ "$verbose" = true ] ; then
${HDF5_AUTOHEADER} --version
fi
@@ -282,7 +228,7 @@ echo
# AUTOMAKE
automake_cmd="${HDF5_AUTOMAKE} --copy --add-missing --force-missing"
-echo ${automake_cmd}
+echo "${automake_cmd}"
if [ "$verbose" = true ] ; then
${HDF5_AUTOMAKE} --version
fi
@@ -291,7 +237,7 @@ echo
# AUTOCONF
autoconf_cmd="${HDF5_AUTOCONF} --force"
-echo ${autoconf_cmd}
+echo "${autoconf_cmd}"
if [ "$verbose" = true ] ; then
${HDF5_AUTOCONF} --version
fi
diff --git a/bin/README b/bin/README
deleted file mode 100644
index 1c77043..0000000
--- a/bin/README
+++ /dev/null
@@ -1,2 +0,0 @@
-The daily tests run copies of some of the scripts in this directory from another repository, notably snapshot and runtest. The copies in this directory should work, but are not used in daily tests, though they should be tested occasionally.
-
diff --git a/bin/format_source b/bin/format_source
index dce34e5..227d22a 100755
--- a/bin/format_source
+++ b/bin/format_source
@@ -20,7 +20,7 @@ find . \( -type d -path ./config -prune -and -not -path ./config \) \
-or -name H5version.h \
-or -name H5overflow.h \
\) \) \
- -and \( -iname *.h -or -iname *.c -or -iname *.cpp -or -iname *.hpp \) \) \
+ -and \( -iname *.h -or -iname *.c -or -iname *.cpp -or -iname *.hpp -or -iname *.java \) \) \
| xargs clang-format -style=file -i -fallback-style=none
exit 0
diff --git a/bin/format_source_patch b/bin/format_source_patch
index 439baf2..2e01455 100755
--- a/bin/format_source_patch
+++ b/bin/format_source_patch
@@ -20,7 +20,7 @@ find . \( -type d -path ./config -prune -and -not -path ./config \) \
-or -name H5version.h \
-or -name H5overflow.h \
\) \) \
- -and \( -iname *.h -or -iname *.c -or -iname *.cpp -or -iname *.hpp \) \) \
+ -and \( -iname *.h -or -iname *.c -or -iname *.cpp -or -iname *.hpp -or -iname *.java \) \) \
| xargs clang-format -style=file -i -fallback-style=none
git diff > clang_format.patch
diff --git a/bin/h5cc.in b/bin/h5cc.in
index 6835b79..966bb40 100644
--- a/bin/h5cc.in
+++ b/bin/h5cc.in
@@ -40,7 +40,7 @@ HL="@HL@"
## $CLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CFLAGS $CFLAGS $LDFLAGS ##
## $LIBS $clibpath $link_objs $link_args $shared_link ##
## ##
-## These settings can be overridden by setting HDF5_CFLAGS, ##
+## These settings can be overridden by setting HDF5_CFLAGS, ##
## HDF5_CPPFLAGS, HDF5_LDFLAGS, or HDF5_LIBS in the environment. ##
## ##
############################################################################
diff --git a/bin/make_vers b/bin/make_vers
index 3631d3c..f1399a4 100755
--- a/bin/make_vers
+++ b/bin/make_vers
@@ -6,7 +6,7 @@ use warnings;
# (The max_idx parameter is the only thing that needs to be changed when adding
# support for a new major release. If support for a prior major release
# is added (like support for 1.4, etc), the min_sup_idx parameter will
-# need to be decremented. - QAK)
+# need to be decremented.)
# Max. library "index" (0 = v1.0, 1 = 1.2, 2 = 1.4, 3 = 1.6, 4 = 1.8, 5 = 1.10, 6 = 1.12, 7 = 1.14, etc)
$max_idx = 7;
diff --git a/bin/restore.sh b/bin/restore.sh
index 47dde11..0597572 100755
--- a/bin/restore.sh
+++ b/bin/restore.sh
@@ -48,6 +48,9 @@ rm -f bin/missing
rm -f bin/test-driver
rm -f bin/depcomp
+echo "Remove files generated by autoheader"
+rm -f src/H5config.h.in
+
echo "Remove files generated by bin/make_err"
rm -f src/H5Epubgen.h
rm -f src/H5Einit.h
diff --git a/c++/src/H5Attribute.cpp b/c++/src/H5Attribute.cpp
index 520a4f6..a0aa33f 100644
--- a/c++/src/H5Attribute.cpp
+++ b/c++/src/H5Attribute.cpp
@@ -11,6 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+#include <cstdlib>
#include <iostream>
#include <string>
diff --git a/c++/src/H5DataSet.cpp b/c++/src/H5DataSet.cpp
index 627d81b..68ddefa 100644
--- a/c++/src/H5DataSet.cpp
+++ b/c++/src/H5DataSet.cpp
@@ -11,6 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+#include <cstdlib>
#include <iostream>
#include <string>
diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp
index ff8f6dc..d889f13 100644
--- a/c++/src/H5DataType.cpp
+++ b/c++/src/H5DataType.cpp
@@ -11,6 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+#include <cstdlib>
#include <iostream>
#include <string>
diff --git a/c++/src/H5FaccProp.cpp b/c++/src/H5FaccProp.cpp
index a79ada3..68a130e 100644
--- a/c++/src/H5FaccProp.cpp
+++ b/c++/src/H5FaccProp.cpp
@@ -17,8 +17,6 @@
using std::cerr;
using std::endl;
-//#include <string>
-
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
@@ -156,7 +154,7 @@ FileAccPropList::getDriver() const
// Function: FileAccPropList::setDriver
///\brief Set file driver for this property list.
///\param new_driver_id - IN: File driver
-///\param new_driver_info - IN: Struct containing the driver-specific properites
+///\param new_driver_info - IN: Struct containing the driver-specific properties
///\exception H5::PropListIException
///\par Description
/// For information, please refer to the H5Pset_driver API in
diff --git a/c++/src/H5Library.cpp b/c++/src/H5Library.cpp
index 37516be..19c7ee7 100644
--- a/c++/src/H5Library.cpp
+++ b/c++/src/H5Library.cpp
@@ -11,8 +11,8 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <string>
#include <cstdlib>
+#include <string>
#include "H5CppDoc.h" // included only for Doxygen to generate part of RM
#include "H5Include.h"
diff --git a/c++/src/H5Location.cpp b/c++/src/H5Location.cpp
index 13a89aa..915f2a9 100644
--- a/c++/src/H5Location.cpp
+++ b/c++/src/H5Location.cpp
@@ -11,8 +11,8 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <string>
#include <iostream>
+#include <string>
using namespace std;
#include "H5Include.h"
diff --git a/c++/src/H5PropList.cpp b/c++/src/H5PropList.cpp
index e7a83af..d4e7b39 100644
--- a/c++/src/H5PropList.cpp
+++ b/c++/src/H5PropList.cpp
@@ -12,7 +12,6 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <iostream>
-
#include <string>
#include "H5Include.h"
diff --git a/c++/test/dsets.cpp b/c++/test/dsets.cpp
index 53b56fc..55ffd67 100644
--- a/c++/test/dsets.cpp
+++ b/c++/test/dsets.cpp
@@ -412,7 +412,6 @@ const H5Z_class2_t H5Z_BOGUS[1] = {{
static size_t
filter_bogus(unsigned int flags, size_t cd_nelmts, const unsigned int cd_values[], size_t nbytes,
size_t *buf_size, void **buf)
-// H5_ATTR_UNUSED variables caused warning, but taking them out caused failure.
{
// Unused
(void)flags;
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index 43aa243..9c91d34 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -416,7 +416,3 @@ H5ConversionTests (${HDF_PREFIX}_LLONG_TO_LDOUBLE_CORRECT "Checking IF correctly
# some long double values
#-----------------------------------------------------------------------------
H5ConversionTests (${HDF_PREFIX}_DISABLE_SOME_LDOUBLE_CONV "Checking IF the cpu is power9 and cannot correctly converting long double values")
-# ----------------------------------------------------------------------
-# Check if pointer alignments are enforced
-#-----------------------------------------------------------------------------
-H5ConversionTests (${HDF_PREFIX}_NO_ALIGNMENT_RESTRICTIONS "Checking IF alignment restrictions are strictly enforced")
diff --git a/config/cmake/ConversionTests.c b/config/cmake/ConversionTests.c
index f80959f..f100dd8 100644
--- a/config/cmake/ConversionTests.c
+++ b/config/cmake/ConversionTests.c
@@ -234,59 +234,6 @@ done:
}
#endif
-#ifdef H5_NO_ALIGNMENT_RESTRICTIONS_TEST
-
-#include <stdlib.h>
-#include <string.h>
-
-typedef struct {
- size_t len;
- void *p;
-} hvl_t;
-
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-# ifdef __cplusplus
-extern "C"
-# endif
-int FC_DUMMY_MAIN()
-{ return 1;}
-#endif
-#endif
-int HDF_NO_UBSAN
-main ()
-{
-
- char *chp = "beefs";
- char **chpp = malloc (2 * sizeof (char *));
- char **chpp2;
- hvl_t vl = { 12345, (void *) chp };
- hvl_t *vlp;
- hvl_t *vlp2;
-
- memcpy ((void *) ((char *) chpp + 1), &chp, sizeof (char *));
- chpp2 = (char **) ((char *) chpp + 1);
- if (strcmp (*chpp2, chp)) {
- free (chpp);
- return 1;
- }
- free (chpp);
-
- vlp = malloc (2 * sizeof (hvl_t));
- memcpy ((void *) ((char *) vlp + 1), &vl, sizeof (hvl_t));
- vlp2 = (hvl_t *) ((char *) vlp + 1);
- if (vlp2->len != vl.len || vlp2->p != vl.p) {
- free (vlp);
- return 1;
- }
- free (vlp);
-
- ;
- return 0;
-}
-
-#endif
-
#ifdef H5_DISABLE_SOME_LDOUBLE_CONV_TEST
#include <stdio.h>
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index 1eaeabe..289ce6f 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -440,9 +440,6 @@
/* Define to enable internal memory allocation sanity checking. */
#cmakedefine H5_MEMORY_ALLOC_SANITY_CHECK @H5_MEMORY_ALLOC_SANITY_CHECK@
-/* Define if we can violate pointer alignment restrictions */
-#cmakedefine H5_NO_ALIGNMENT_RESTRICTIONS @H5_NO_ALIGNMENT_RESTRICTIONS@
-
/* Define if deprecated public API symbols are disabled */
#cmakedefine H5_NO_DEPRECATED_SYMBOLS @H5_NO_DEPRECATED_SYMBOLS@
diff --git a/config/cmake/HDF5_Examples.cmake.in b/config/cmake/HDF5_Examples.cmake.in
index 9ff9b6f..795399e 100644
--- a/config/cmake/HDF5_Examples.cmake.in
+++ b/config/cmake/HDF5_Examples.cmake.in
@@ -81,14 +81,13 @@ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDN
#endif()
###############################################################################################################
+set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ROOT:PATH=${INSTALLDIR}")
if(WIN32)
set(SITE_OS_NAME "Windows")
- set(ENV{HDF5_ROOT} "${INSTALLDIR}")
set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}\\build)
set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}")
set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}")
else()
- set(ENV{HDF5_ROOT} "${INSTALLDIR}")
set(ENV{LD_LIBRARY_PATH} "${INSTALLDIR}/lib")
set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build)
set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}")
diff --git a/config/cmake/HDFFortranCompilerFlags.cmake b/config/cmake/HDFFortranCompilerFlags.cmake
index 754259e..84b3ebe 100644
--- a/config/cmake/HDFFortranCompilerFlags.cmake
+++ b/config/cmake/HDFFortranCompilerFlags.cmake
@@ -62,7 +62,7 @@ if (NOT MSVC AND NOT MINGW)
# General flags
if (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/ifort-general")
- list (APPEND HDF5_CMAKE_Fortran_FLAGS "-stand:f03" "-free")
+ list (APPEND HDF5_CMAKE_Fortran_FLAGS "-stand f03" "-free")
elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-general")
list (APPEND HDF5_CMAKE_Fortran_FLAGS "-ffree-form" "-fimplicit-none")
@@ -118,8 +118,8 @@ if (NOT MSVC AND NOT MINGW)
endif ()
else ()
if (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
- #ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/win-ifort-general")
- list (APPEND HDF5_CMAKE_Fortran_FLAGS "/warn:all" "/stand:f03" "/free")
+ ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/win-ifort-general")
+ list (APPEND HDF5_CMAKE_Fortran_FLAGS "/stand:f03" "/free")
endif ()
endif ()
diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake
index 05f4473..b373fe4 100644
--- a/config/cmake_ext_mod/runTest.cmake
+++ b/config/cmake_ext_mod/runTest.cmake
@@ -128,7 +128,7 @@ message (STATUS "COMMAND Error: ${TEST_ERROR}")
# remove special output
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
-string (FIND "${TEST_STREAM}" "_pmi_alps" TEST_FIND_RESULT)
+string (FIND TEST_STREAM "_pmi_alps" TEST_FIND_RESULT)
if (TEST_FIND_RESULT GREATER -1)
string (REGEX REPLACE "^.*_pmi_alps[^\n]+\n" "" TEST_STREAM "${TEST_STREAM}")
file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_STREAM})
@@ -142,7 +142,7 @@ else ()
# the error stack remains in the .err file
file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
endif ()
-string (FIND "${TEST_STREAM}" "no version information available" TEST_FIND_RESULT)
+string (FIND TEST_STREAM "no version information available" TEST_FIND_RESULT)
if (TEST_FIND_RESULT GREATER -1)
string (REGEX REPLACE "^.*no version information available[^\n]+\n" "" TEST_STREAM "${TEST_STREAM}")
# write back the changes to the original files
@@ -233,7 +233,7 @@ if (NOT TEST_SKIP_COMPARE)
list (SORT v1)
list (SORT v2)
if (NOT v1 STREQUAL v2)
- set(TEST_COMPARE_RESULT 1)
+ set (TEST_COMPARE_RESULT 1)
endif ()
endif ()
diff --git a/config/conclude.am b/config/conclude.am
index e798d8d..bfbe1ec 100644
--- a/config/conclude.am
+++ b/config/conclude.am
@@ -283,7 +283,9 @@ if BUILD_PARALLEL_CONDITIONAL
# VFD_LIST += mpio
endif
if MIRROR_VFD_CONDITIONAL
- VFD_LIST += mirror
+ # Mirror VFD needs network configuration, etc. and isn't easy to set
+ # reasonable defaults for that info.
+ # VFD_LIST += mirror
endif
if ROS3_VFD_CONDITIONAL
VFD_LIST += ros3
diff --git a/config/intel-warnings/ifort-general b/config/intel-warnings/ifort-general
index a9da0e5..1644c7c 100644
--- a/config/intel-warnings/ifort-general
+++ b/config/intel-warnings/ifort-general
@@ -1 +1 @@
--warn:all
+-warn all
diff --git a/config/intel-warnings/win-ifort-general b/config/intel-warnings/win-ifort-general
new file mode 100644
index 0000000..a335959
--- /dev/null
+++ b/config/intel-warnings/win-ifort-general
@@ -0,0 +1 @@
+/warn:all
diff --git a/configure.ac b/configure.ac
index 66fc225..3a1aa69 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4039,25 +4039,6 @@ AC_ARG_ENABLE([embedded-libinfo],
## ----------------------------------------------------------------------
-## Check if pointer alignments are enforced
-##
-AC_MSG_CHECKING([if alignment restrictions are strictly enforced])
-
-TEST_SRC="`(echo \"#define H5_NO_ALIGNMENT_RESTRICTIONS_TEST 1\"; cat $srcdir/config/cmake/ConversionTests.c)`"
-
-AC_RUN_IFELSE([
- AC_LANG_SOURCE([$TEST_SRC])
- ], [
- AC_DEFINE([NO_ALIGNMENT_RESTRICTIONS], [1], [Define if we can violate pointer alignment restrictions])
- AC_MSG_RESULT([no])
- ], [
- AC_MSG_RESULT([yes])
- ], [
- AC_MSG_RESULT([unknown, assuming yes])
- ])
-
-
-## ----------------------------------------------------------------------
## Restore user's CFLAGS.
CFLAGS="$saved_user_CFLAGS"
FCFLAGS="$saved_user_FCFLAGS"
diff --git a/doc/img/release-schedule.plantuml b/doc/img/release-schedule.plantuml
new file mode 100644
index 0000000..f5aa62a
--- /dev/null
+++ b/doc/img/release-schedule.plantuml
@@ -0,0 +1,45 @@
+The release timeline was generated on PlantUML (https://plantuml.com)
+
+The current script:
+
+@startuml
+title HDF5 Release Schedule
+
+projectscale monthly
+Project starts 2021-01-01
+
+[1.8] starts 2021-01-01 and lasts 114 weeks
+[1.8.22] happens 2021-02-05
+[1.8.23] happens 2022-12-31
+[1.8.23] displays on same row as [1.8.22]
+[1.8] is colored in #CC6677
+
+[1.10] starts 2021-01-01 and lasts 114 weeks
+[1.10.8] happens 2021-10-22
+[1.10.9] happens 2022-05-31
+[1.10.9] displays on same row as [1.10.8]
+[1.10] is colored in #DDCC77
+
+[1.12] starts 2021-01-01 and lasts 114 weeks
+[1.12.1] happens 2021-07-01
+[1.12.2] happens 2022-04-30
+[1.12.2] displays on same row as [1.12.1]
+[1.12] is colored in #88CCEE
+
+[1.13] starts 2021-01-01 and lasts 104 weeks
+[1.13.0] happens 2021-12-01
+[1.13.1] happens 2022-03-02
+[1.13.2] happens 2022-06-31
+[1.13.3] happens 2022-08-31
+[1.13.4] happens 2022-10-31
+[1.13.1] displays on same row as [1.13.0]
+[1.13.2] displays on same row as [1.13.0]
+[1.13.3] displays on same row as [1.13.0]
+[1.13.4] displays on same row as [1.13.0]
+[1.13] is colored in #44AA99
+
+[1.14] starts at 2022-12-31 and lasts 10 weeks
+[1.14.0] happens at 2022-12-31
+[1.14] is colored in #AA4499
+@enduml
+
diff --git a/doc/img/release-schedule.png b/doc/img/release-schedule.png
new file mode 100755
index 0000000..c2ed241
--- /dev/null
+++ b/doc/img/release-schedule.png
Binary files differ
diff --git a/doxygen/examples/H5.format.1.0.html b/doxygen/examples/H5.format.1.0.html
index d2b6610..ff21315 100644
--- a/doxygen/examples/H5.format.1.0.html
+++ b/doxygen/examples/H5.format.1.0.html
@@ -732,7 +732,7 @@ Elena> "Free-space object"
only does the level indicate whether child pointers
point to sub-trees or to data, but it can also be used
to help file consistency checking utilities reconstruct
- damanged trees.</td>
+ damaged trees.</td>
</tr>
<tr valign=top>
diff --git a/doxygen/examples/H5.format.1.1.html b/doxygen/examples/H5.format.1.1.html
index b91ac90..0ae31df 100644
--- a/doxygen/examples/H5.format.1.1.html
+++ b/doxygen/examples/H5.format.1.1.html
@@ -1059,7 +1059,7 @@ TABLE.list TD { border:none; }
only does the level indicate whether child pointers
point to sub-trees or to data, but it can also be used
to help file consistency checking utilities reconstruct
- damanged trees.
+ damaged trees.
</P>
</td>
</tr>
diff --git a/fortran/examples/h5_extend.f90 b/fortran/examples/h5_extend.f90
index 193f33e..86cc3c6 100644
--- a/fortran/examples/h5_extend.f90
+++ b/fortran/examples/h5_extend.f90
@@ -110,7 +110,7 @@ PROGRAM H5_EXTEND
CALL h5pset_chunk_f(crp_list, RANK, dimsc, error)
!
- !Create a dataset with 3X3 dimensions using cparms creation properties .
+ !Create a dataset with 3X3 dimensions using cparms creation properties.
!
CALL h5dcreate_f(file_id, dsetname, H5T_NATIVE_INTEGER, dataspace, &
dset_id, error, crp_list )
diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c
index 0277e5c..468debe 100644
--- a/fortran/src/H5_f.c
+++ b/fortran/src/H5_f.c
@@ -65,12 +65,6 @@ h5init_types_c(hid_t_f *types, hid_t_f *floatingtypes, hid_t_f *integertypes)
* Find the HDF5 type of the Fortran Integer KIND.
*/
- /* Initialized INTEGER KIND types to default to native integer */
- for (i = 0; i < 5; i++) {
- if ((types[i] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0)
- return ret_value;
- }
-
for (i = 0; i < H5_FORTRAN_NUM_INTEGER_KINDS; i++) {
if (IntKinds_SizeOf[i] == sizeof(char)) {
if ((types[i] = (hid_t_f)H5Tcopy(H5T_NATIVE_CHAR)) < 0)
@@ -96,6 +90,12 @@ h5init_types_c(hid_t_f *types, hid_t_f *floatingtypes, hid_t_f *integertypes)
} /*end else */
}
+ /* Initialized missing INTEGER KIND types to default to native integer */
+ for (i = H5_FORTRAN_NUM_INTEGER_KINDS; i < 5; i++) {
+ if ((types[i] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0)
+ return ret_value;
+ }
+
if (sizeof(int_f) == sizeof(int)) {
if ((types[5] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0)
return ret_value;
diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90
index 350d978..0aa4b04 100644
--- a/fortran/src/H5_ff.F90
+++ b/fortran/src/H5_ff.F90
@@ -250,6 +250,9 @@ CONTAINS
END INTERFACE
+ ! Check if H5open_f has already been called. If so, skip doing it again.
+ IF(H5OPEN_NUM_OBJ .NE. 0) RETURN
+
error = h5init_types_c(predef_types, floating_types, integer_types)
H5T_NATIVE_INTEGER_KIND(1:5) = predef_types(1:5)
@@ -668,6 +671,7 @@ CONTAINS
! October 13, 2011
! Fortran90 Interface:
SUBROUTINE h5close_f(error)
+ USE H5F, ONLY : h5fget_obj_count_f, H5OPEN_NUM_OBJ
IMPLICIT NONE
INTEGER, INTENT(OUT) :: error
!*****
@@ -685,10 +689,17 @@ CONTAINS
INTEGER(HID_T), DIMENSION(1:I_TYPES_LEN) :: i_types
END FUNCTION h5close_types_c
END INTERFACE
+
+ ! Check if h5close_f has already been called. Skip doing it again.
+ IF(H5OPEN_NUM_OBJ .EQ. 0) RETURN
+
error = h5close_types_c(predef_types, PREDEF_TYPES_LEN, &
floating_types, FLOATING_TYPES_LEN, &
integer_types, INTEGER_TYPES_LEN )
+ ! Reset the number of open objects from h5open_f to zero
+ CALL h5fget_obj_count_f(INT(H5F_OBJ_ALL_F,HID_T), H5F_OBJ_ALL_F, H5OPEN_NUM_OBJ, error)
+
END SUBROUTINE h5close_f
!****s* H5LIB/h5get_libversion_f
diff --git a/fortran/test/fortranlib_test.F90 b/fortran/test/fortranlib_test.F90
index 1640a8f..998b481 100644
--- a/fortran/test/fortranlib_test.F90
+++ b/fortran/test/fortranlib_test.F90
@@ -37,19 +37,27 @@ PROGRAM fortranlibtest
INTEGER :: ret_total_error
LOGICAL :: cleanup, status
+ WRITE(*,*) ' ========================== '
+ WRITE(*,*) ' FORTRAN tests '
+ WRITE(*,*) ' ========================== '
+
+ ret_total_error = 0
+ CALL h5openclose(ret_total_error)
+ CALL write_test_status(ret_total_error, ' h5open/h5close test', total_error)
+
CALL h5open_f(error)
+ CALL check("h5open_f",error,total_error)
cleanup = .TRUE.
CALL h5_env_nocleanup_f(status)
IF(status) cleanup=.FALSE.
- WRITE(*,*) ' ========================== '
- WRITE(*,*) ' FORTRAN tests '
- WRITE(*,*) ' ========================== '
- CALL h5get_libversion_f(majnum, minnum, relnum, total_error)
- IF(total_error .EQ. 0) THEN
- WRITE(*, '(" FORTRANLIB_TEST is linked with HDF5 Library version ")', advance="NO")
+ ret_total_error = 0
+ CALL h5get_libversion_f(majnum, minnum, relnum, ret_total_error)
+ IF(ret_total_error .EQ. 0) THEN
+
+ WRITE(*, '(/," FORTRANLIB_TEST is linked with HDF5 Library version ")', advance="NO")
WRITE(*, '(I0)', advance="NO") majnum
WRITE(*, '(".")', advance="NO")
WRITE(*, '(I0)', advance="NO") minnum
diff --git a/fortran/test/tH5A.F90 b/fortran/test/tH5A.F90
index 2e76dad..115ce70 100644
--- a/fortran/test/tH5A.F90
+++ b/fortran/test/tH5A.F90
@@ -376,7 +376,7 @@ CONTAINS
! Open file
!
CALL h5fopen_f(fix_filename, H5F_ACC_RDWR_F, file_id, error)
- CALL check("h5open_f",error,total_error)
+ CALL check("h5fopen_f",error,total_error)
!
! Reopen dataset
!
diff --git a/fortran/test/tH5A_1_8.F90 b/fortran/test/tH5A_1_8.F90
index cd8a981..a825f9d 100644
--- a/fortran/test/tH5A_1_8.F90
+++ b/fortran/test/tH5A_1_8.F90
@@ -317,7 +317,7 @@ SUBROUTINE test_attr_corder_create_compact(fcpl,fapl, total_error)
CALL check("h5pclose_f",error,total_error)
CALL h5fopen_f(FileName, H5F_ACC_RDWR_F, fid, error, fapl)
- CALL check("h5open_f",error,total_error)
+ CALL check("h5fopen_f",error,total_error)
CALL h5dopen_f(fid, DSET1_NAME, dset1, error)
CALL check("h5dopen_f",error,total_error)
@@ -432,7 +432,7 @@ SUBROUTINE test_attr_null_space(fcpl, fapl, total_error)
! Re-open file
CALL h5fopen_f(FileName, H5F_ACC_RDWR_F, fid, error)
- CALL check("h5open_f",error,total_error)
+ CALL check("h5fopen_f",error,total_error)
! Create dataspace for dataset attributes
CALL h5screate_f(H5S_SCALAR_F, sid, error)
CALL check("h5screate_f",error,total_error)
@@ -1163,7 +1163,7 @@ SUBROUTINE test_attr_shared_rename( fcpl, fapl, total_error)
! Re-open file
CALL h5fopen_f(FileName, H5F_ACC_RDWR_F, fid, error,fapl)
- CALL check("h5open_f",error,total_error)
+ CALL check("h5fopen_f",error,total_error)
! Commit datatype to file
IF(test_shared.EQ.2) THEN
@@ -1827,7 +1827,7 @@ SUBROUTINE test_attr_shared_delete(fcpl, fapl, total_error)
! Re-open file
CALL h5fopen_f(FileName, H5F_ACC_RDWR_F, fid, error,fapl)
- CALL check("h5open_f",error,total_error)
+ CALL check("h5fopen_f",error,total_error)
! Commit datatype to file
@@ -2048,7 +2048,7 @@ SUBROUTINE test_attr_dense_open( fcpl, fapl, total_error)
! Re-open file
CALL h5fopen_f(FileName, H5F_ACC_RDWR_F, fid, error, fapl)
- CALL check("h5open_f",error,total_error)
+ CALL check("h5fopen_f",error,total_error)
! Create dataspace for dataset
CALL h5screate_f(H5S_SCALAR_F, sid, error)
@@ -2325,7 +2325,7 @@ SUBROUTINE test_attr_corder_create_basic( fcpl, fapl, total_error )
! Re-open file
CALL h5fopen_f(FileName, H5F_ACC_RDWR_F, fid, error, fapl)
- CALL check("h5open_f",error,total_error)
+ CALL check("h5fopen_f",error,total_error)
! Open dataset created
CALL h5dopen_f(fid, DSET1_NAME, dataset, error, H5P_DEFAULT_F )
diff --git a/fortran/test/tH5D.F90 b/fortran/test/tH5D.F90
index eb9e831..5f8484e 100644
--- a/fortran/test/tH5D.F90
+++ b/fortran/test/tH5D.F90
@@ -347,7 +347,7 @@ CONTAINS
CALL check("h5pset_chunk_f",error,total_error)
!
- !Create a dataset with 3X3 dimensions using cparms creation properties .
+ !Create a dataset with 3X3 dimensions using cparms creation properties.
!
CALL h5dcreate_f(file_id, dsetname, H5T_NATIVE_INTEGER, dataspace, dset_id, error, crp_list )
CALL check("h5dcreate_f",error,total_error)
diff --git a/fortran/test/tH5F.F90 b/fortran/test/tH5F.F90
index 8d4845d..eb37016 100644
--- a/fortran/test/tH5F.F90
+++ b/fortran/test/tH5F.F90
@@ -22,7 +22,7 @@
!
! CONTAINS SUBROUTINES
! mountingtest, reopentest, get_name_test, plisttest,
-! file_close, file_space
+! file_close, file_space, h5openclose
!
!*****
!
@@ -35,6 +35,103 @@ MODULE TH5F
CONTAINS
+ SUBROUTINE h5openclose(total_error)
+ USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
+ IMPLICIT NONE
+ INTEGER, INTENT(INOUT) :: total_error
+
+ !
+ ! flag to check operation success
+ !
+ INTEGER :: error
+ INTEGER(SIZE_T) :: obj_count ! open object count
+ INTEGER, DIMENSION(1:5) :: obj_type ! open object type to check
+ INTEGER :: i, j
+
+ DO j = 1, 2
+ CALL h5open_f(error)
+ CALL check("h5open_f",error,total_error)
+
+ obj_type(1) = H5F_OBJ_ALL_F
+ obj_type(2) = H5F_OBJ_FILE_F
+ obj_type(3) = H5F_OBJ_GROUP_F
+ obj_type(4) = H5F_OBJ_DATASET_F
+ obj_type(5) = H5F_OBJ_DATATYPE_F
+
+ CALL h5close_f(error)
+ CALL check("h5close_f",error,total_error)
+ ! Check all the datatypes created during h5open_f are closed in h5close_f
+ DO i = 1, 5
+ CALL h5fget_obj_count_f(INT(H5F_OBJ_ALL_F,HID_T), obj_type(i), obj_count, error)
+ CALL check("h5fget_obj_count_f",error,total_error)
+ IF(obj_count.NE.0)THEN
+ total_error = total_error + 1
+ ENDIF
+ ENDDO
+ ENDDO
+
+ ! Test calling h5open_f multiple times without calling h5close_f
+ DO j = 1, 4
+ CALL h5open_f(error)
+ CALL check("h5open_f",error,total_error)
+ ENDDO
+
+ CALL h5close_f(error)
+ CALL check("h5close_f",error,total_error)
+ ! Check all the datatypes created during h5open_f are closed in h5close_f
+ DO i = 1, 5
+ CALL h5fget_obj_count_f(INT(H5F_OBJ_ALL_F,HID_T), obj_type(i), obj_count, error)
+ CALL check("h5fget_obj_count_f",error,total_error)
+ IF(obj_count.NE.0)THEN
+ total_error = total_error + 1
+ ENDIF
+ ENDDO
+
+ ! Test calling h5open_f multiple times with a h5close_f in the series of h5open_f
+ DO j = 1, 5
+ CALL h5open_f(error)
+ CALL check("h5open_f",error,total_error)
+ IF(j.EQ.3)THEN
+ CALL h5close_f(error)
+ CALL check("h5close_f",error,total_error)
+ ! Check all the datatypes created during h5open_f are closed in h5close_f
+ DO i = 1, 5
+ CALL h5fget_obj_count_f(INT(H5F_OBJ_ALL_F,HID_T), obj_type(i), obj_count, error)
+ CALL check("h5fget_obj_count_f",error,total_error)
+ IF(obj_count.NE.0)THEN
+ total_error = total_error + 1
+ ENDIF
+ ENDDO
+ ENDIF
+ ENDDO
+
+ CALL h5close_f(error)
+ CALL check("h5close_f",error,total_error)
+ ! Check all the datatypes created during h5open_f are closed in h5close_f
+ DO i = 1, 5
+ CALL h5fget_obj_count_f(INT(H5F_OBJ_ALL_F,HID_T), obj_type(i), obj_count, error)
+ CALL check("h5fget_obj_count_f",error,total_error)
+ IF(obj_count.NE.0)THEN
+ total_error = total_error + 1
+ ENDIF
+ ENDDO
+
+ ! Check calling h5close_f after already calling h5close_f
+ CALL h5close_f(error)
+ CALL check("h5close_f",error,total_error)
+ ! Check all the datatypes created during h5open_f are closed in h5close_f
+ DO i = 1, 5
+ CALL h5fget_obj_count_f(INT(H5F_OBJ_ALL_F,HID_T), obj_type(i), obj_count, error)
+ CALL check("h5fget_obj_count_f",error,total_error)
+ IF(obj_count.NE.0)THEN
+ total_error = total_error + 1
+ ENDIF
+ ENDDO
+
+ RETURN
+ END SUBROUTINE h5openclose
+
SUBROUTINE mountingtest(cleanup, total_error)
USE HDF5 ! This module contains all necessary modules
USE TH5_MISC
diff --git a/fortran/test/tH5G_1_8.F90 b/fortran/test/tH5G_1_8.F90
index 222ba9d..bdecd8d 100644
--- a/fortran/test/tH5G_1_8.F90
+++ b/fortran/test/tH5G_1_8.F90
@@ -1923,7 +1923,7 @@ SUBROUTINE lapl_nlinks( fapl, total_error)
! Open file
CALL h5fopen_f(FileName, H5F_ACC_RDWR_F, fid, error, fapl)
- CALL check("h5open_f",error,total_error)
+ CALL check("h5fopen_f",error,total_error)
! Create LAPL with higher-than-usual nlinks value
! Create a non-default lapl with udata set to point to the first group
diff --git a/fortran/test/tH5P.F90 b/fortran/test/tH5P.F90
index 75e4e72..d664dd7 100644
--- a/fortran/test/tH5P.F90
+++ b/fortran/test/tH5P.F90
@@ -541,7 +541,7 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
CALL H5Dclose_f(dsid, error)
CALL H5Oopen_f(fid, "dset", dsid, error, dapl1)
- ! Retrieve dapl from dataset, verfiy cache values are the same as on dapl1
+ ! Retrieve dapl from dataset, verify cache values are the same as on dapl1
!
! Note we rely on the knowledge that H5Pget_chunk_cache retrieves these
! values directly from the dataset structure, and not from a copy of the
@@ -563,7 +563,7 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
CALL H5Oopen_f(fid, "dset", dsid, error)
CALL check("H5Oopen_f", error, total_error)
- ! Retrieve dapl from dataset, verfiy cache values are the same as on fapl_local
+ ! Retrieve dapl from dataset, verify cache values are the same as on fapl_local
CALL H5Dget_access_plist_f(dsid, dapl2, error)
CALL check("H5Dget_access_plist_f", error, total_error)
diff --git a/fortran/test/tHDF5.F90 b/fortran/test/tHDF5.F90
index db829af..2bd373d 100644
--- a/fortran/test/tHDF5.F90
+++ b/fortran/test/tHDF5.F90
@@ -7,7 +7,7 @@
! src/fortran/test/tHDF5.f90
!
! PURPOSE
-! This is the test module used for testing the Fortran90 HDF library APIs.
+! This is the test module used for testing the Fortran90 HDF library APIs.
!
! COPYRIGHT
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
diff --git a/fortran/test/tHDF5_F03.F90 b/fortran/test/tHDF5_F03.F90
index 6d318ea..1194b1e 100644
--- a/fortran/test/tHDF5_F03.F90
+++ b/fortran/test/tHDF5_F03.F90
@@ -7,7 +7,7 @@
! src/fortran/test/tHDF5_F03.f90
!
! PURPOSE
-! This is the test module used for testing the Fortran2003 HDF
+! This is the test module used for testing the Fortran2003 HDF
! library APIS.
!
! COPYRIGHT
diff --git a/hl/src/H5DS.c b/hl/src/H5DS.c
index 387419b..d55512f 100644
--- a/hl/src/H5DS.c
+++ b/hl/src/H5DS.c
@@ -17,7 +17,7 @@
#include "H5TBprivate.h"
/* Local routines */
-static herr_t H5DS_is_reserved(hid_t did);
+static herr_t H5DS_is_reserved(hid_t did, hbool_t *is_reserved);
/*-------------------------------------------------------------------------
* Function: H5DSwith_new_ref
@@ -73,7 +73,7 @@ H5DSwith_new_ref(hid_t obj_id, hbool_t *with_new_ref)
herr_t
H5DSset_scale(hid_t dsid, const char *dimname)
{
- int has_dimlist;
+ htri_t has_dimlist;
H5I_type_t it;
/*-------------------------------------------------------------------------
@@ -92,11 +92,10 @@ H5DSset_scale(hid_t dsid, const char *dimname)
*-------------------------------------------------------------------------
*/
- /* try to find the attribute "DIMENSION_LIST" */
- if ((has_dimlist = H5LT_find_attribute(dsid, DIMENSION_LIST)) < 0)
+ /* Try to find the attribute "DIMENSION_LIST" */
+ if ((has_dimlist = H5Aexists(dsid, DIMENSION_LIST)) < 0)
return FAIL;
-
- if (has_dimlist == 1)
+ if (has_dimlist > 0)
return FAIL;
/*-------------------------------------------------------------------------
@@ -139,8 +138,8 @@ H5DSset_scale(hid_t dsid, const char *dimname)
herr_t
H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx)
{
- int has_dimlist;
- int has_reflist;
+ htri_t has_dimlist;
+ htri_t has_reflist;
int is_ds;
hssize_t nelmts;
hid_t sid, sid_w; /* space ID */
@@ -173,6 +172,7 @@ H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx)
size_t len;
int found_ds = 0;
htri_t is_scale;
+ hbool_t is_reserved;
/*-------------------------------------------------------------------------
* parameter checking
@@ -221,12 +221,14 @@ H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx)
if (H5I_DATASET != it1 || H5I_DATASET != it2)
return FAIL;
- /* the DS dataset cannot have dimension scales */
- if (H5LT_find_attribute(dsid, DIMENSION_LIST) == 1)
+ /* The DS dataset cannot have dimension scales */
+ if (H5Aexists(dsid, DIMENSION_LIST) > 0)
return FAIL;
- /* check if the dataset is a "reserved" dataset (image, table) */
- if (H5DS_is_reserved(did) == 1)
+ /* Check if the dataset is a "reserved" dataset (image, table) */
+ if (H5DS_is_reserved(did, &is_reserved) < 0)
+ return FAIL;
+ if (is_reserved == TRUE)
return FAIL;
/*-------------------------------------------------------------------------
@@ -279,8 +281,8 @@ H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx)
if (H5Rcreate(&dsl.ref, did, ".", H5R_OBJECT, (hid_t)-1) < 0)
return FAIL;
}
- /* try to find the attribute "DIMENSION_LIST" on the >>data<< dataset */
- if ((has_dimlist = H5LT_find_attribute(did, DIMENSION_LIST)) < 0)
+ /* Try to find the attribute "DIMENSION_LIST" on the >>data<< dataset */
+ if ((has_dimlist = H5Aexists(did, DIMENSION_LIST)) < 0)
return FAIL;
/*-------------------------------------------------------------------------
@@ -354,7 +356,7 @@ H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx)
* and insert the new reference
*-------------------------------------------------------------------------
*/
- else if (has_dimlist == 1) {
+ else if (has_dimlist > 0) {
if ((aid = H5Aopen(did, DIMENSION_LIST, H5P_DEFAULT)) < 0)
goto out;
@@ -469,7 +471,7 @@ H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx)
*/
/* try to find the attribute "REFERENCE_LIST" on the >>DS<< dataset */
- if ((has_reflist = H5LT_find_attribute(dsid, REFERENCE_LIST)) < 0)
+ if ((has_reflist = H5Aexists(dsid, REFERENCE_LIST)) < 0)
goto out;
/*-------------------------------------------------------------------------
@@ -530,7 +532,7 @@ H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx)
* the "REFERENCE_LIST" array already exists, open it and extend it
*-------------------------------------------------------------------------
*/
- else if (has_reflist == 1) {
+ else if (has_reflist > 0) {
hid_t tmp_id; /* Temporary DS dataset ID to recreate reference */
int j;
@@ -727,8 +729,8 @@ out:
herr_t
H5DSdetach_scale(hid_t did, hid_t dsid, unsigned int idx)
{
- int has_dimlist;
- int has_reflist;
+ htri_t has_dimlist;
+ htri_t has_reflist;
hssize_t nelmts;
hid_t dsid_j; /* DS dataset ID in DIMENSION_LIST */
hid_t did_i; /* dataset ID in REFERENCE_LIST */
@@ -804,10 +806,9 @@ H5DSdetach_scale(hid_t did, hid_t dsid, unsigned int idx)
*-------------------------------------------------------------------------
*/
- /* try to find the attribute "DIMENSION_LIST" on the >>data<< dataset */
- if ((has_dimlist = H5LT_find_attribute(did, DIMENSION_LIST)) < 0)
+ /* Try to find the attribute "DIMENSION_LIST" on the >>data<< dataset */
+ if ((has_dimlist = H5Aexists(did, DIMENSION_LIST)) < 0)
return FAIL;
-
if (has_dimlist == 0)
return FAIL;
@@ -833,9 +834,8 @@ H5DSdetach_scale(hid_t did, hid_t dsid, unsigned int idx)
*/
/* try to find the attribute "REFERENCE_LIST" on the >>DS<< dataset */
- if ((has_reflist = H5LT_find_attribute(dsid, REFERENCE_LIST)) < 0)
+ if ((has_reflist = H5Aexists(dsid, REFERENCE_LIST)) < 0)
return FAIL;
-
if (has_reflist == 0)
return FAIL;
@@ -1228,8 +1228,8 @@ out:
htri_t
H5DSis_attached(hid_t did, hid_t dsid, unsigned int idx)
{
- int has_dimlist;
- int has_reflist;
+ htri_t has_dimlist;
+ htri_t has_reflist;
hssize_t nelmts;
hid_t sid; /* space ID */
hid_t tid = H5I_INVALID_HID; /* attribute type ID */
@@ -1319,7 +1319,7 @@ H5DSis_attached(hid_t did, hid_t dsid, unsigned int idx)
return FAIL;
/* try to find the attribute "DIMENSION_LIST" on the >>data<< dataset */
- if ((has_dimlist = H5LT_find_attribute(did, DIMENSION_LIST)) < 0)
+ if ((has_dimlist = H5Aexists(did, DIMENSION_LIST)) < 0)
return FAIL;
/*-------------------------------------------------------------------------
@@ -1327,7 +1327,7 @@ H5DSis_attached(hid_t did, hid_t dsid, unsigned int idx)
*-------------------------------------------------------------------------
*/
- if (has_dimlist == 1) {
+ if (has_dimlist > 0) {
if ((aid = H5Aopen(did, DIMENSION_LIST, H5P_DEFAULT)) < 0)
goto out;
@@ -1407,7 +1407,7 @@ H5DSis_attached(hid_t did, hid_t dsid, unsigned int idx)
*/
/* try to find the attribute "REFERENCE_LIST" on the >>DS<< dataset */
- if ((has_reflist = H5LT_find_attribute(dsid, REFERENCE_LIST)) < 0)
+ if ((has_reflist = H5Aexists(dsid, REFERENCE_LIST)) < 0)
goto out;
/*-------------------------------------------------------------------------
@@ -1415,7 +1415,7 @@ H5DSis_attached(hid_t did, hid_t dsid, unsigned int idx)
*-------------------------------------------------------------------------
*/
- if (has_reflist == 1) {
+ if (has_reflist > 0) {
if ((aid = H5Aopen(dsid, REFERENCE_LIST, H5P_DEFAULT)) < 0)
goto out;
@@ -1610,7 +1610,7 @@ H5DSiterate_scales(hid_t did, unsigned int dim, int *ds_idx, H5DS_iterate_t visi
herr_t ret_value = 0;
int j_idx;
int nscales;
- int has_dimlist;
+ htri_t has_dimlist;
int i;
hbool_t is_new_ref;
@@ -1658,14 +1658,13 @@ H5DSiterate_scales(hid_t did, unsigned int dim, int *ds_idx, H5DS_iterate_t visi
if (dim >= (unsigned)rank)
return FAIL;
- /* try to find the attribute "DIMENSION_LIST" on the >>data<< dataset */
- if ((has_dimlist = H5LT_find_attribute(did, DIMENSION_LIST)) < 0)
+ /* Try to find the attribute "DIMENSION_LIST" on the >>data<< dataset */
+ if ((has_dimlist = H5Aexists(did, DIMENSION_LIST)) < 0)
return FAIL;
-
if (has_dimlist == 0)
return SUCCEED;
- else if (has_dimlist == 1) {
+ else if (has_dimlist > 0) {
if ((aid = H5Aopen(did, DIMENSION_LIST, H5P_DEFAULT)) < 0)
goto out;
if ((tid = H5Aget_type(aid)) < 0)
@@ -1788,7 +1787,7 @@ out:
herr_t
H5DSset_label(hid_t did, unsigned int idx, const char *label)
{
- int has_labels;
+ htri_t has_labels;
hid_t sid = H5I_INVALID_HID; /* space ID */
hid_t tid = H5I_INVALID_HID; /* attribute type ID */
hid_t aid = H5I_INVALID_HID; /* attribute ID */
@@ -1838,7 +1837,7 @@ H5DSset_label(hid_t did, unsigned int idx, const char *label)
*/
/* try to find the attribute "DIMENSION_LABELS" on the >>data<< dataset */
- if ((has_labels = H5LT_find_attribute(did, DIMENSION_LABELS)) < 0)
+ if ((has_labels = H5Aexists(did, DIMENSION_LABELS)) < 0)
return FAIL;
/*-------------------------------------------------------------------------
@@ -1991,7 +1990,7 @@ out:
ssize_t
H5DSget_label(hid_t did, unsigned int idx, char *label, size_t size)
{
- int has_labels;
+ htri_t has_labels;
hid_t sid = H5I_INVALID_HID; /* space ID */
hid_t tid = H5I_INVALID_HID; /* attribute type ID */
hid_t aid = H5I_INVALID_HID; /* attribute ID */
@@ -2033,11 +2032,11 @@ H5DSget_label(hid_t did, unsigned int idx, char *label, size_t size)
*-------------------------------------------------------------------------
*/
- /* try to find the attribute "DIMENSION_LABELS" on the >>data<< dataset */
- if ((has_labels = H5LT_find_attribute(did, DIMENSION_LABELS)) < 0)
+ /* Try to find the attribute "DIMENSION_LABELS" on the >>data<< dataset */
+ if ((has_labels = H5Aexists(did, DIMENSION_LABELS)) < 0)
return FAIL;
- /* return 0 and NULL for label if no label found */
+ /* Return 0 and NULL for label if no label found */
if (has_labels == 0) {
if (label)
label[0] = 0;
@@ -2049,7 +2048,6 @@ H5DSget_label(hid_t did, unsigned int idx, char *label, size_t size)
*-------------------------------------------------------------------------
*/
- assert(has_labels == 1);
if ((aid = H5Aopen(did, DIMENSION_LABELS, H5P_DEFAULT)) < 0)
goto out;
@@ -2146,7 +2144,7 @@ H5DSget_scale_name(hid_t did, char *name, size_t size)
H5I_type_t it; /* ID type */
size_t nbytes;
size_t copy_len;
- int has_name;
+ htri_t has_name;
char * buf = NULL;
/*-------------------------------------------------------------------------
@@ -2169,9 +2167,8 @@ H5DSget_scale_name(hid_t did, char *name, size_t size)
*/
/* try to find the attribute "NAME" on the >>DS<< dataset */
- if ((has_name = H5LT_find_attribute(did, "NAME")) < 0)
+ if ((has_name = H5Aexists(did, "NAME")) < 0)
return FAIL;
-
if (has_name == 0)
return 0;
@@ -2259,7 +2256,7 @@ H5DSis_scale(hid_t did)
{
hid_t tid = H5I_INVALID_HID; /* attribute type ID */
hid_t aid = H5I_INVALID_HID; /* attribute ID */
- herr_t attr_class; /* has the "CLASS" attribute */
+ htri_t attr_class; /* has the "CLASS" attribute */
htri_t is_ds = -1; /* set to "not a dimension scale" */
H5I_type_t it; /* type of identifier */
char * buf = NULL; /* buffer to read name of attribute */
@@ -2279,7 +2276,7 @@ H5DSis_scale(hid_t did)
goto out;
/* try to find the attribute "CLASS" on the dataset */
- if ((attr_class = H5LT_find_attribute(did, "CLASS")) < 0)
+ if ((attr_class = H5Aexists(did, "CLASS")) < 0)
goto out;
if (attr_class == 0) {
@@ -2370,7 +2367,7 @@ out:
int
H5DSget_num_scales(hid_t did, unsigned int idx)
{
- int has_dimlist;
+ htri_t has_dimlist;
hid_t sid; /* space ID */
hid_t tid = H5I_INVALID_HID; /* attribute type ID */
hid_t aid = H5I_INVALID_HID; /* attribute ID */
@@ -2410,11 +2407,11 @@ H5DSget_num_scales(hid_t did, unsigned int idx)
if (idx >= (unsigned int)rank)
return FAIL;
- /* try to find the attribute "DIMENSION_LIST" on the >>data<< dataset */
- if ((has_dimlist = H5LT_find_attribute(did, DIMENSION_LIST)) < 0)
+ /* Try to find the attribute "DIMENSION_LIST" on the >>data<< dataset */
+ if ((has_dimlist = H5Aexists(did, DIMENSION_LIST)) < 0)
return FAIL;
- /* it does not exist */
+ /* No scales */
if (has_dimlist == 0)
return 0;
@@ -2475,86 +2472,77 @@ out:
/*-------------------------------------------------------------------------
* Function: H5DS_is_reserved
*
- * Purpose: Verify that a dataset's CLASS is either an image, palette or table
- *
- * Return: true, false, fail
- *
- * Programmer: Pedro Vicente
- *
- * Date: March 19, 2005
+ * Purpose: Verify that a dataset's CLASS is either an image, palette or
+ * table
*
+ * Return: SUCCEED/FAIL
*-------------------------------------------------------------------------
*/
static herr_t
-H5DS_is_reserved(hid_t did)
+H5DS_is_reserved(hid_t did, hbool_t *is_reserved)
{
- int has_class;
+ htri_t has_class;
hid_t tid = H5I_INVALID_HID;
hid_t aid = H5I_INVALID_HID;
char * buf = NULL; /* Name of attribute */
size_t string_size; /* Size of storage for attribute */
- herr_t ret;
-
- /* try to find the attribute "CLASS" on the dataset */
- if ((has_class = H5LT_find_attribute(did, "CLASS")) < 0)
- return -1;
- if (has_class == 0)
- return 0;
+ /* Try to find the attribute "CLASS" on the dataset */
+ if ((has_class = H5Aexists(did, "CLASS")) < 0)
+ return FAIL;
+ if (has_class == 0) {
+ *is_reserved = FALSE;
+ return SUCCEED;
+ }
- assert(has_class == 1);
if ((aid = H5Aopen(did, "CLASS", H5P_DEFAULT)) < 0)
- goto out;
-
+ goto error;
if ((tid = H5Aget_type(aid)) < 0)
- goto out;
+ goto error;
- /* check to make sure attribute is a string */
+ /* Check to make sure attribute is a string */
if (H5T_STRING != H5Tget_class(tid))
- goto out;
+ goto error;
- /* check to make sure string is null-terminated */
+ /* Check to make sure string is null-terminated */
if (H5T_STR_NULLTERM != H5Tget_strpad(tid))
- goto out;
+ goto error;
- /* allocate buffer large enough to hold string */
+ /* Allocate buffer large enough to hold string */
if ((string_size = H5Tget_size(tid)) == 0)
- goto out;
-
- buf = (char *)HDmalloc((size_t)string_size * sizeof(char));
- if (buf == NULL)
- goto out;
+ goto error;
+ if (NULL == (buf = HDmalloc(string_size * sizeof(char))))
+ goto error;
/* Read the attribute */
if (H5Aread(aid, tid, buf) < 0)
- goto out;
+ goto error;
if (HDstrncmp(buf, IMAGE_CLASS, MIN(HDstrlen(IMAGE_CLASS), HDstrlen(buf))) == 0 ||
HDstrncmp(buf, PALETTE_CLASS, MIN(HDstrlen(PALETTE_CLASS), HDstrlen(buf))) == 0 ||
HDstrncmp(buf, TABLE_CLASS, MIN(HDstrlen(TABLE_CLASS), HDstrlen(buf))) == 0)
- ret = 1;
+ *is_reserved = TRUE;
else
- ret = 0;
+ *is_reserved = FALSE;
HDfree(buf);
if (H5Tclose(tid) < 0)
- goto out;
-
+ goto error;
if (H5Aclose(aid) < 0)
- goto out;
+ goto error;
- return ret;
+ return SUCCEED;
- /* error zone */
-out:
+error:
H5E_BEGIN_TRY
{
- if (buf)
- HDfree(buf);
H5Tclose(tid);
H5Aclose(aid);
}
H5E_END_TRY;
+
+ HDfree(buf);
+
return FAIL;
}
diff --git a/hl/src/H5IM.c b/hl/src/H5IM.c
index ff10d57..75f2e28 100644
--- a/hl/src/H5IM.c
+++ b/hl/src/H5IM.c
@@ -228,7 +228,6 @@ H5IM_find_palette(hid_t loc_id)
*
*-------------------------------------------------------------------------
*/
-
herr_t
H5IMget_image_info(hid_t loc_id, const char *dset_name, hsize_t *width, hsize_t *height, hsize_t *planes,
char *interlace, hssize_t *npals)
@@ -241,7 +240,7 @@ H5IMget_image_info(hid_t loc_id, const char *dset_name, hsize_t *width, hsize_t
hid_t atid = -1;
H5T_class_t aclass;
int has_pal;
- int has_attr;
+ hid_t has_attr;
/* check the arguments */
if (dset_name == NULL)
@@ -257,11 +256,11 @@ H5IMget_image_info(hid_t loc_id, const char *dset_name, hsize_t *width, hsize_t
return -1;
/* Try to find the attribute "INTERLACE_MODE" on the >>image<< dataset */
- if ((has_attr = H5LT_find_attribute(did, "INTERLACE_MODE")) < 0)
+ if ((has_attr = H5Aexists(did, "INTERLACE_MODE")) < 0)
goto out;
/* It exists, get it */
- if (has_attr == 1) {
+ if (has_attr > 0) {
if ((aid = H5Aopen(did, "INTERLACE_MODE", H5P_DEFAULT)) < 0)
goto out;
@@ -289,9 +288,8 @@ H5IMget_image_info(hid_t loc_id, const char *dset_name, hsize_t *width, hsize_t
/* Initialize the image dimensions */
- if (has_attr == 1)
- /* This is a 24 bit image */
- {
+ if (has_attr > 0) {
+ /* This is a 24 bit image */
if (HDstrncmp(interlace, "INTERLACE_PIXEL", 15) == 0) {
/* Number of color planes is defined as the third dimension */
@@ -308,9 +306,8 @@ H5IMget_image_info(hid_t loc_id, const char *dset_name, hsize_t *width, hsize_t
else
return -1;
}
- else
- /* This is a 8 bit image */
- {
+ else {
+ /* This is a 8 bit image */
*height = dims[0];
*width = dims[1];
*planes = 1;
@@ -512,7 +509,7 @@ H5IMlink_palette(hid_t loc_id, const char *image_name, const char *pal_name)
hobj_ref_t *refbuf; /* buffer to read references */
hssize_t n_refs;
hsize_t dim_ref;
- int ok_pal;
+ htri_t ok_pal;
/* check the arguments */
if (image_name == NULL)
@@ -531,7 +528,8 @@ H5IMlink_palette(hid_t loc_id, const char *image_name, const char *pal_name)
return -1;
/* Try to find the attribute "PALETTE" on the >>image<< dataset */
- ok_pal = H5LT_find_attribute(did, "PALETTE");
+ if ((ok_pal = H5Aexists(did, "PALETTE")) < 0)
+ goto out;
/*-------------------------------------------------------------------------
* It does not exist. We create the attribute and one reference
@@ -570,7 +568,7 @@ H5IMlink_palette(hid_t loc_id, const char *image_name, const char *pal_name)
* The attribute already exists, open it
*-------------------------------------------------------------------------
*/
- else if (ok_pal == 1) {
+ else if (ok_pal > 0) {
if ((aid = H5Aopen(did, "PALETTE", H5P_DEFAULT)) < 0)
goto out;
@@ -631,7 +629,7 @@ H5IMlink_palette(hid_t loc_id, const char *image_name, const char *pal_name)
HDfree(refbuf);
- } /* ok_pal == 1 */
+ } /* ok_pal > 0 */
/* Close the image dataset. */
if (H5Dclose(did) < 0)
@@ -673,7 +671,8 @@ H5IMunlink_palette(hid_t loc_id, const char *image_name, const char *pal_name)
hid_t atid;
hid_t aid;
H5T_class_t aclass;
- int ok_pal, has_pal;
+ htri_t ok_pal;
+ int has_pal;
/* check the arguments */
if (image_name == NULL)
@@ -699,14 +698,14 @@ H5IMunlink_palette(hid_t loc_id, const char *image_name, const char *pal_name)
return -1;
/* Try to find the attribute "PALETTE" on the >>image<< dataset */
- ok_pal = H5LT_find_attribute(did, "PALETTE");
+ if ((ok_pal = H5Aexists(did, "PALETTE")) < 0)
+ goto out;
/* It does not exist. Nothing to do */
if (ok_pal == 0)
- return -1;
-
- /* The attribute exists, open it */
- else if (ok_pal == 1) {
+ goto out;
+ else if (ok_pal > 0) {
+ /* The attribute exists, open it */
if ((aid = H5Aopen(did, "PALETTE", H5P_DEFAULT)) < 0)
goto out;
@@ -730,8 +729,7 @@ H5IMunlink_palette(hid_t loc_id, const char *image_name, const char *pal_name)
/* Close the attribute. */
if (H5Aclose(aid) < 0)
goto out;
-
- } /* ok_pal */
+ }
/* Close the image dataset. */
if (H5Dclose(did) < 0)
@@ -1063,7 +1061,7 @@ herr_t
H5IMis_image(hid_t loc_id, const char *dset_name)
{
hid_t did;
- int has_class;
+ htri_t has_class;
hid_t atid;
hid_t aid = -1;
char * attr_data; /* Name of attribute */
@@ -1082,13 +1080,14 @@ H5IMis_image(hid_t loc_id, const char *dset_name)
return -1;
/* Try to find the attribute "CLASS" on the dataset */
- has_class = H5LT_find_attribute(did, "CLASS");
+ if ((has_class = H5Aexists(did, "CLASS")) < 0)
+ goto out;
if (has_class == 0) {
H5Dclose(did);
return 0;
}
- else if (has_class == 1) {
+ else {
if ((aid = H5Aopen(did, "CLASS", H5P_DEFAULT)) < 0)
goto out;
@@ -1163,7 +1162,7 @@ herr_t
H5IMis_palette(hid_t loc_id, const char *dset_name)
{
hid_t did;
- int has_class;
+ htri_t has_class;
hid_t atid;
hid_t aid = -1;
char * attr_data; /* Name of attribute */
@@ -1182,13 +1181,14 @@ H5IMis_palette(hid_t loc_id, const char *dset_name)
return -1;
/* Try to find the attribute "CLASS" on the dataset */
- has_class = H5LT_find_attribute(did, "CLASS");
+ if ((has_class = H5Aexists(did, "CLASS")) < 0)
+ goto out;
if (has_class == 0) {
H5Dclose(did);
return 0;
}
- else if (has_class == 1) {
+ else {
if ((aid = H5Aopen(did, "CLASS", H5P_DEFAULT)) < 0)
goto out;
diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c
index 238bbf2..78cc301 100644
--- a/hl/src/H5LT.c
+++ b/hl/src/H5LT.c
@@ -1385,7 +1385,6 @@ H5_GCC_CLANG_DIAG_ON("cast-qual")
*
*-------------------------------------------------------------------------
*/
-
herr_t
H5LTset_attribute_string(hid_t loc_id, const char *obj_name, const char *attr_name, const char *attr_data)
{
@@ -1393,7 +1392,7 @@ H5LTset_attribute_string(hid_t loc_id, const char *obj_name, const char *attr_na
hid_t attr_space_id;
hid_t attr_id;
hid_t obj_id;
- int has_attr;
+ htri_t has_attr;
size_t attr_size;
/* check the arguments */
@@ -1423,11 +1422,10 @@ H5LTset_attribute_string(hid_t loc_id, const char *obj_name, const char *attr_na
if ((attr_space_id = H5Screate(H5S_SCALAR)) < 0)
goto out;
- /* Verify if the attribute already exists */
- has_attr = H5LT_find_attribute(obj_id, attr_name);
-
- /* The attribute already exists, delete it */
- if (has_attr == 1)
+ /* Delete the attribute if it already exists */
+ if ((has_attr = H5Aexists(obj_id, attr_name)) < 0)
+ goto out;
+ if (has_attr > 0)
if (H5Adelete(obj_id, attr_name) < 0)
goto out;
@@ -1483,7 +1481,7 @@ H5LT_set_attribute_numerical(hid_t loc_id, const char *obj_name, const char *att
hid_t obj_id, sid, attr_id;
hsize_t dim_size = size;
- int has_attr;
+ htri_t has_attr;
/* check the arguments */
if (obj_name == NULL)
@@ -1499,11 +1497,10 @@ H5LT_set_attribute_numerical(hid_t loc_id, const char *obj_name, const char *att
if ((sid = H5Screate_simple(1, &dim_size, NULL)) < 0)
goto out;
- /* Verify if the attribute already exists */
- has_attr = H5LT_find_attribute(obj_id, attr_name);
-
- /* The attribute already exists, delete it */
- if (has_attr == 1)
+ /* Delete the attribute if it already exists */
+ if ((has_attr = H5Aexists(obj_id, attr_name)) < 0)
+ goto out;
+ if (has_attr > 0)
if (H5Adelete(obj_id, attr_name) < 0)
goto out;
@@ -1858,49 +1855,24 @@ H5LTset_attribute_double(hid_t loc_id, const char *obj_name, const char *attr_na
/*-------------------------------------------------------------------------
* Function: H5LTfind_attribute
*
- * Purpose: Inquires if an attribute named attr_name exists attached to
- * the object loc_id.
- *
- * Programmer: Pedro Vicente
- *
- * Date: May 17, 2006
+ * Purpose: Checks if an attribute named attr_name exists attached to
+ * the object loc_id
*
- * Comments:
- * Calls the private version of the function
+ * TODO: Overloading herr_t is not a great idea. This function either
+ * needs to be rewritten to take a Boolean out parameter in
+ * HDF5 2.0 or possibly even eliminated entirely as it simply
+ * wraps H5Aexists.
*
+ * Return: An htri_t value cast to herr_t
+ * Exists: Positive
+ * Does not exist: 0
+ * Error: Negative
*-------------------------------------------------------------------------
*/
-
herr_t
H5LTfind_attribute(hid_t loc_id, const char *attr_name)
{
- return H5LT_find_attribute(loc_id, attr_name);
-}
-
-/*-------------------------------------------------------------------------
- * Function: H5LT_find_attribute
- *
- * Purpose: Inquires if an attribute named attr_name exists attached to the object loc_id.
- *
- * Programmer: Pedro Vicente
- *
- * Date: June 21, 2001
- *
- * Return:
- * Success: Positive if the attribute exists attached to the
- * object loc_id. Zero if the attribute does not
- * exist attached to the object loc_id.
- *
- * Failure: Negative if something goes wrong within the
- * library.
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5LT_find_attribute(hid_t loc_id, const char *attr_name)
-{
- htri_t attr_exists = H5Aexists(loc_id, attr_name);
- return (attr_exists < 0) ? (herr_t)-1 : (attr_exists) ? (herr_t)1 : (herr_t)0;
+ return (herr_t)H5Aexists(loc_id, attr_name);
}
/*-------------------------------------------------------------------------
@@ -3539,14 +3511,13 @@ H5LT_set_attribute_string(hid_t dset_id, const char *name, const char *buf)
hid_t tid;
hid_t sid = -1;
hid_t aid = -1;
- int has_attr;
+ htri_t has_attr;
size_t size;
- /* verify if the attribute already exists */
- has_attr = H5LT_find_attribute(dset_id, name);
-
- /* the attribute already exists, delete it */
- if (has_attr == 1)
+ /* Delete the attribute if it already exists */
+ if ((has_attr = H5Aexists(dset_id, name)) < 0)
+ return FAIL;
+ if (has_attr > 0)
if (H5Adelete(dset_id, name) < 0)
return FAIL;
diff --git a/hl/src/H5LTprivate.h b/hl/src/H5LTprivate.h
index 5a97d9c..e5c4e4e 100644
--- a/hl/src/H5LTprivate.h
+++ b/hl/src/H5LTprivate.h
@@ -20,23 +20,12 @@
/* public LT prototypes */
#include "H5LTpublic.h"
-/*-------------------------------------------------------------------------
- * Private functions
- *-------------------------------------------------------------------------
- */
-
H5_HLDLL herr_t H5LT_get_attribute_disk(hid_t obj_id, const char *attr_name, void *data);
-
H5_HLDLL herr_t H5LT_set_attribute_numerical(hid_t loc_id, const char *obj_name, const char *attr_name,
size_t size, hid_t type_id, const void *data);
-
H5_HLDLL herr_t H5LT_set_attribute_string(hid_t dset_id, const char *name, const char *buf);
-
-H5_HLDLL herr_t H5LT_find_attribute(hid_t loc_id, const char *name);
-
-H5_HLDLL char *H5LT_dtype_to_text(hid_t dtype, char *dt_str, H5LT_lang_t lang, size_t *slen,
- hbool_t no_user_buf);
-
-H5_HLDLL hid_t H5LTyyparse(void);
+H5_HLDLL char * H5LT_dtype_to_text(hid_t dtype, char *dt_str, H5LT_lang_t lang, size_t *slen,
+ hbool_t no_user_buf);
+H5_HLDLL hid_t H5LTyyparse(void);
#endif
diff --git a/hl/src/H5TB.c b/hl/src/H5TB.c
index efa61a3..eda3a35 100644
--- a/hl/src/H5TB.c
+++ b/hl/src/H5TB.c
@@ -2585,11 +2585,11 @@ H5TBdelete_field(hid_t loc_id, const char *dset_name, const char *field_name)
HDsnprintf(attr_name, sizeof(attr_name), "FIELD_%d_FILL", (int)i);
/* check if we have the _FILL attribute */
- if ((has_fill = H5LT_find_attribute(did_1, attr_name)) < 0)
+ if ((has_fill = H5Aexists(did_1, attr_name)) < 0)
goto out;
/* get it */
- if (has_fill)
+ if (has_fill > 0)
if (H5LT_get_attribute_disk(did_1, attr_name, tmp_fill_buf + curr_offset) < 0)
goto out;
@@ -2747,7 +2747,7 @@ H5TBdelete_field(hid_t loc_id, const char *dset_name, const char *field_name)
* attach the fill attributes from previous table
*-------------------------------------------------------------------------
*/
- if (has_fill) {
+ if (has_fill > 0) {
if ((sid_1 = H5Screate(H5S_SCALAR)) < 0)
goto out;
@@ -2918,15 +2918,15 @@ H5TBAget_fill(hid_t loc_id, const char *dset_name, hid_t dset_id, unsigned char
for (i = 0; i < nfields; i++) {
HDsnprintf(attr_name, sizeof(attr_name), "FIELD_%d_FILL", (int)i);
- /* check if we have the _FILL attribute */
- if ((has_fill = H5LT_find_attribute(dset_id, attr_name)) < 0)
+ /* Check if we have the _FILL attribute */
+ if ((has_fill = H5Aexists(dset_id, attr_name)) < 0)
goto out;
/* get it */
- if (has_fill)
+ if (has_fill > 0)
if (H5LT_get_attribute_disk(dset_id, attr_name, dst_buf + src_offset[i]) < 0)
goto out;
- } /* end for */
+ }
ret_val = has_fill;
diff --git a/java/examples/datasets/CMakeLists.txt b/java/examples/datasets/CMakeLists.txt
index 8198135..e63ead0 100644
--- a/java/examples/datasets/CMakeLists.txt
+++ b/java/examples/datasets/CMakeLists.txt
@@ -62,6 +62,13 @@ foreach (example ${HDF_JAVA_EXAMPLES})
# install_jar (${example} ${HJAVA_INSTALL_DATA_DIR}/examples examples)
get_target_property (${example}_CLASSPATH ${example} CLASSDIR)
add_dependencies (${example} ${HDF5_JAVA_HDF5_LIB_TARGET})
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_JAVA_${example}_SRC_FORMAT ${example}.java)
+ endif ()
endforeach ()
set (CMAKE_JAVA_INCLUDE_PATH "${HDF5_JAVA_JARS};${HDF5_JAVA_LOGGING_JAR};${HDF5_JAVA_LOGGING_NOP_JAR}")
diff --git a/java/examples/datasets/H5Ex_D_Alloc.java b/java/examples/datasets/H5Ex_D_Alloc.java
index 4e10c23..4853cc0 100644
--- a/java/examples/datasets/H5Ex_D_Alloc.java
+++ b/java/examples/datasets/H5Ex_D_Alloc.java
@@ -29,49 +29,47 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5Ex_D_Alloc {
- private static String FILENAME = "H5Ex_D_Alloc.h5";
+ private static String FILENAME = "H5Ex_D_Alloc.h5";
private static String DATASETNAME1 = "DS1";
private static String DATASETNAME2 = "DS2";
- private static final int DIM_X = 4;
- private static final int DIM_Y = 7;
- private static final int FILLVAL = 99;
- private static final int RANK = 2;
+ private static final int DIM_X = 4;
+ private static final int DIM_Y = 7;
+ private static final int FILLVAL = 99;
+ private static final int RANK = 2;
// Values for the status of space allocation
enum H5D_space_status {
- H5D_SPACE_STATUS_ERROR(-1), H5D_SPACE_STATUS_NOT_ALLOCATED(0), H5D_SPACE_STATUS_PART_ALLOCATED(1), H5D_SPACE_STATUS_ALLOCATED(
- 2);
+ H5D_SPACE_STATUS_ERROR(-1),
+ H5D_SPACE_STATUS_NOT_ALLOCATED(0),
+ H5D_SPACE_STATUS_PART_ALLOCATED(1),
+ H5D_SPACE_STATUS_ALLOCATED(2);
private static final Map<Integer, H5D_space_status> lookup = new HashMap<Integer, H5D_space_status>();
- static {
+ static
+ {
for (H5D_space_status s : EnumSet.allOf(H5D_space_status.class))
lookup.put(s.getCode(), s);
}
private int code;
- H5D_space_status(int space_status) {
- this.code = space_status;
- }
+ H5D_space_status(int space_status) { this.code = space_status; }
- public int getCode() {
- return this.code;
- }
+ public int getCode() { return this.code; }
- public static H5D_space_status get(int code) {
- return lookup.get(code);
- }
+ public static H5D_space_status get(int code) { return lookup.get(code); }
}
- private static void allocation() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void allocation()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id1 = HDF5Constants.H5I_INVALID_HID;
- long dataset_id2 = HDF5Constants.H5I_INVALID_HID;
- long dcpl_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM_X, DIM_Y };
+ long dataset_id1 = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id2 = HDF5Constants.H5I_INVALID_HID;
+ long dcpl_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM_X, DIM_Y};
int[][] dset_data = new int[DIM_X][DIM_Y];
- int space_status = 0;
+ int space_status = 0;
long storage_size = 0;
// Initialize the dataset.
@@ -82,7 +80,7 @@ public class H5Ex_D_Alloc {
// Create a file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -125,7 +123,8 @@ public class H5Ex_D_Alloc {
try {
if ((file_id >= 0) && (filespace_id >= 0))
dataset_id1 = H5.H5Dcreate(file_id, DATASETNAME1, HDF5Constants.H5T_NATIVE_INT, filespace_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -135,7 +134,7 @@ public class H5Ex_D_Alloc {
try {
if ((file_id >= 0) && (filespace_id >= 0) && (dcpl_id >= 0))
dataset_id2 = H5.H5Dcreate(file_id, DATASETNAME2, HDF5Constants.H5T_NATIVE_INT, filespace_id,
- HDF5Constants.H5P_DEFAULT, dcpl_id, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, dcpl_id, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -190,16 +189,16 @@ public class H5Ex_D_Alloc {
// Write the data to the datasets.
try {
if (dataset_id1 >= 0)
- H5.H5Dwrite(dataset_id1, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data[0]);
+ H5.H5Dwrite(dataset_id1, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data[0]);
}
catch (Exception e) {
e.printStackTrace();
}
try {
if (dataset_id2 >= 0)
- H5.H5Dwrite(dataset_id2, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data[0]);
+ H5.H5Dwrite(dataset_id2, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data[0]);
}
catch (Exception e) {
e.printStackTrace();
@@ -291,8 +290,5 @@ public class H5Ex_D_Alloc {
}
}
- public static void main(String[] args) {
- H5Ex_D_Alloc.allocation();
- }
-
+ public static void main(String[] args) { H5Ex_D_Alloc.allocation(); }
}
diff --git a/java/examples/datasets/H5Ex_D_Checksum.java b/java/examples/datasets/H5Ex_D_Checksum.java
index 781dd68..7b01176 100644
--- a/java/examples/datasets/H5Ex_D_Checksum.java
+++ b/java/examples/datasets/H5Ex_D_Checksum.java
@@ -30,42 +30,46 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5Ex_D_Checksum {
- private static String FILENAME = "H5Ex_D_Checksum.h5";
+ private static String FILENAME = "H5Ex_D_Checksum.h5";
private static String DATASETNAME = "DS1";
- private static final int DIM_X = 32;
- private static final int DIM_Y = 64;
- private static final int CHUNK_X = 4;
- private static final int CHUNK_Y = 8;
- private static final int RANK = 2;
- private static final int NDIMS = 2;
+ private static final int DIM_X = 32;
+ private static final int DIM_Y = 64;
+ private static final int CHUNK_X = 4;
+ private static final int CHUNK_Y = 8;
+ private static final int RANK = 2;
+ private static final int NDIMS = 2;
// Values for the status of space allocation
enum H5Z_filter {
- H5Z_FILTER_ERROR(-1), H5Z_FILTER_NONE(0), H5Z_FILTER_DEFLATE(1), H5Z_FILTER_SHUFFLE(2), H5Z_FILTER_FLETCHER32(3), H5Z_FILTER_SZIP(
- 4), H5Z_FILTER_NBIT(5), H5Z_FILTER_SCALEOFFSET(6), H5Z_FILTER_RESERVED(256), H5Z_FILTER_MAX(65535);
+ H5Z_FILTER_ERROR(-1),
+ H5Z_FILTER_NONE(0),
+ H5Z_FILTER_DEFLATE(1),
+ H5Z_FILTER_SHUFFLE(2),
+ H5Z_FILTER_FLETCHER32(3),
+ H5Z_FILTER_SZIP(4),
+ H5Z_FILTER_NBIT(5),
+ H5Z_FILTER_SCALEOFFSET(6),
+ H5Z_FILTER_RESERVED(256),
+ H5Z_FILTER_MAX(65535);
private static final Map<Integer, H5Z_filter> lookup = new HashMap<Integer, H5Z_filter>();
- static {
+ static
+ {
for (H5Z_filter s : EnumSet.allOf(H5Z_filter.class))
lookup.put(s.getCode(), s);
}
private int code;
- H5Z_filter(int layout_type) {
- this.code = layout_type;
- }
+ H5Z_filter(int layout_type) { this.code = layout_type; }
- public int getCode() {
- return this.code;
- }
+ public int getCode() { return this.code; }
- public static H5Z_filter get(int code) {
- return lookup.get(code);
- }
+ public static H5Z_filter get(int code) { return lookup.get(code); }
}
- private static boolean checkFletcher32Filter() {
+ private static boolean checkFletcher32Filter()
+ {
try {
int available = H5.H5Zfilter_avail(H5Z_filter.H5Z_FILTER_FLETCHER32.getCode());
if (available == 0) {
@@ -79,8 +83,8 @@ public class H5Ex_D_Checksum {
try {
int filter_info = H5.H5Zget_filter_info(HDF5Constants.H5Z_FILTER_FLETCHER32);
- if (((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0)
- || ((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0)) {
+ if (((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0) ||
+ ((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0)) {
System.out.println("N-Bit filter not available for encoding and decoding.");
return false;
}
@@ -91,13 +95,14 @@ public class H5Ex_D_Checksum {
return true;
}
- private static void writeChecksum() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void writeChecksum()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long dcpl_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM_X, DIM_Y };
- long[] chunk_dims = { CHUNK_X, CHUNK_Y };
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long dcpl_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM_X, DIM_Y};
+ long[] chunk_dims = {CHUNK_X, CHUNK_Y};
int[][] dset_data = new int[DIM_X][DIM_Y];
// Initialize data.
@@ -108,7 +113,7 @@ public class H5Ex_D_Checksum {
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -140,7 +145,7 @@ public class H5Ex_D_Checksum {
try {
if ((file_id >= 0) && (filespace_id >= 0) && (dcpl_id >= 0))
dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, filespace_id,
- HDF5Constants.H5P_DEFAULT, dcpl_id, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, dcpl_id, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -149,8 +154,8 @@ public class H5Ex_D_Checksum {
// Write the data to the dataset.
try {
if (dataset_id >= 0)
- H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -191,10 +196,11 @@ public class H5Ex_D_Checksum {
}
}
- private static void readChecksum() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long dcpl_id = HDF5Constants.H5I_INVALID_HID;
+ private static void readChecksum()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long dcpl_id = HDF5Constants.H5I_INVALID_HID;
int[][] dset_data = new int[DIM_X][DIM_Y];
// Open an existing file.
@@ -228,14 +234,14 @@ public class H5Ex_D_Checksum {
try {
if (dcpl_id >= 0) {
// Java lib requires a valid filter_name object and cd_values
- int[] flags = { 0 };
- long[] cd_nelmts = { 1 };
- int[] cd_values = { 0 };
- String[] filter_name = { "" };
- int[] filter_config = { 0 };
- int filter_type = -1;
- filter_type = H5
- .H5Pget_filter(dcpl_id, 0, flags, cd_nelmts, cd_values, 120, filter_name, filter_config);
+ int[] flags = {0};
+ long[] cd_nelmts = {1};
+ int[] cd_values = {0};
+ String[] filter_name = {""};
+ int[] filter_config = {0};
+ int filter_type = -1;
+ filter_type = H5.H5Pget_filter(dcpl_id, 0, flags, cd_nelmts, cd_values, 120, filter_name,
+ filter_config);
System.out.print("Filter type is: ");
switch (H5Z_filter.get(filter_type)) {
case H5Z_FILTER_DEFLATE:
@@ -264,7 +270,7 @@ public class H5Ex_D_Checksum {
try {
if (dataset_id >= 0) {
int status = H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
- HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
// Check if the read was successful. Normally we do not perform
// error checking in these examples for the sake of clarity, but in
// this case we will make an exception because this is how the
@@ -328,7 +334,8 @@ public class H5Ex_D_Checksum {
}
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
// Check if the Fletcher32 filter is available and can be used for
// both encoding and decoding. Normally we do not perform error
// checking in these examples for the sake of clarity, but in this
@@ -340,5 +347,4 @@ public class H5Ex_D_Checksum {
H5Ex_D_Checksum.readChecksum();
}
}
-
}
diff --git a/java/examples/datasets/H5Ex_D_Chunk.java b/java/examples/datasets/H5Ex_D_Chunk.java
index 2ddf293..fbfc148 100644
--- a/java/examples/datasets/H5Ex_D_Chunk.java
+++ b/java/examples/datasets/H5Ex_D_Chunk.java
@@ -30,47 +30,48 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5Ex_D_Chunk {
- private static String FILENAME = "H5Ex_D_Chunk.h5";
+ private static String FILENAME = "H5Ex_D_Chunk.h5";
private static String DATASETNAME = "DS1";
- private static final int DIM_X = 6;
- private static final int DIM_Y = 8;
- private static final int CHUNK_X = 4;
- private static final int CHUNK_Y = 4;
- private static final int RANK = 2;
- private static final int NDIMS = 2;
+ private static final int DIM_X = 6;
+ private static final int DIM_Y = 8;
+ private static final int CHUNK_X = 4;
+ private static final int CHUNK_Y = 4;
+ private static final int RANK = 2;
+ private static final int NDIMS = 2;
// Values for the status of space allocation
enum H5D_layout {
- H5D_LAYOUT_ERROR(-1), H5D_COMPACT(0), H5D_CONTIGUOUS(1), H5D_CHUNKED(2), H5D_VIRTUAL(3), H5D_NLAYOUTS(4);
+ H5D_LAYOUT_ERROR(-1),
+ H5D_COMPACT(0),
+ H5D_CONTIGUOUS(1),
+ H5D_CHUNKED(2),
+ H5D_VIRTUAL(3),
+ H5D_NLAYOUTS(4);
private static final Map<Integer, H5D_layout> lookup = new HashMap<Integer, H5D_layout>();
- static {
+ static
+ {
for (H5D_layout s : EnumSet.allOf(H5D_layout.class))
lookup.put(s.getCode(), s);
}
private int code;
- H5D_layout(int layout_type) {
- this.code = layout_type;
- }
+ H5D_layout(int layout_type) { this.code = layout_type; }
- public int getCode() {
- return this.code;
- }
+ public int getCode() { return this.code; }
- public static H5D_layout get(int code) {
- return lookup.get(code);
- }
+ public static H5D_layout get(int code) { return lookup.get(code); }
}
- private static void writeChunk() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void writeChunk()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long dcpl_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM_X, DIM_Y };
- long[] chunk_dims = { CHUNK_X, CHUNK_Y };
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long dcpl_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM_X, DIM_Y};
+ long[] chunk_dims = {CHUNK_X, CHUNK_Y};
int[][] dset_data = new int[DIM_X][DIM_Y];
// Initialize data to "1", to make it easier to see the selections.
@@ -91,7 +92,7 @@ public class H5Ex_D_Chunk {
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -127,20 +128,21 @@ public class H5Ex_D_Chunk {
try {
if ((file_id >= 0) && (filespace_id >= 0) && (dcpl_id >= 0))
dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, filespace_id,
- HDF5Constants.H5P_DEFAULT, dcpl_id, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, dcpl_id, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
}
// Define and select the first part of the hyperslab selection.
- long[] start = { 0, 0 };
- long[] stride = { 3, 3 };
- long[] count = { 2, 3 };
- long[] block = { 2, 2 };
+ long[] start = {0, 0};
+ long[] stride = {3, 3};
+ long[] count = {2, 3};
+ long[] block = {2, 2};
try {
if ((filespace_id >= 0))
- H5.H5Sselect_hyperslab(filespace_id, HDF5Constants.H5S_SELECT_SET, start, stride, count, block);
+ H5.H5Sselect_hyperslab(filespace_id, HDF5Constants.H5S_SELECT_SET, start, stride, count,
+ block);
}
catch (Exception e) {
e.printStackTrace();
@@ -152,12 +154,13 @@ public class H5Ex_D_Chunk {
block[1] = 1;
try {
if ((filespace_id >= 0)) {
- H5.H5Sselect_hyperslab(filespace_id, HDF5Constants.H5S_SELECT_NOTB, start, stride, count, block);
+ H5.H5Sselect_hyperslab(filespace_id, HDF5Constants.H5S_SELECT_NOTB, start, stride, count,
+ block);
// Write the data to the dataset.
if (dataset_id >= 0)
H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, filespace_id,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ HDF5Constants.H5P_DEFAULT, dset_data);
}
}
catch (Exception e) {
@@ -199,11 +202,12 @@ public class H5Ex_D_Chunk {
}
}
- private static void readChunk() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void readChunk()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long dcpl_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long dcpl_id = HDF5Constants.H5I_INVALID_HID;
int[][] dset_data = new int[DIM_X][DIM_Y];
// Open an existing file.
@@ -267,8 +271,8 @@ public class H5Ex_D_Chunk {
// Read the data using the default properties.
try {
if (dataset_id >= 0)
- H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -294,18 +298,19 @@ public class H5Ex_D_Chunk {
if (dataset_id >= 0) {
filespace_id = H5.H5Dget_space(dataset_id);
- long[] start = { 0, 1 };
- long[] stride = { 4, 4 };
- long[] count = { 2, 2 };
- long[] block = { 2, 3 };
+ long[] start = {0, 1};
+ long[] stride = {4, 4};
+ long[] count = {2, 2};
+ long[] block = {2, 3};
if (filespace_id >= 0) {
- H5.H5Sselect_hyperslab(filespace_id, HDF5Constants.H5S_SELECT_SET, start, stride, count, block);
+ H5.H5Sselect_hyperslab(filespace_id, HDF5Constants.H5S_SELECT_SET, start, stride, count,
+ block);
// Read the data using the previously defined hyperslab.
if ((dataset_id >= 0) && (filespace_id >= 0))
- H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, filespace_id,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ filespace_id, HDF5Constants.H5P_DEFAULT, dset_data);
}
}
}
@@ -358,9 +363,9 @@ public class H5Ex_D_Chunk {
}
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
H5Ex_D_Chunk.writeChunk();
H5Ex_D_Chunk.readChunk();
}
-
}
diff --git a/java/examples/datasets/H5Ex_D_Compact.java b/java/examples/datasets/H5Ex_D_Compact.java
index 0abf8da..3a60283 100644
--- a/java/examples/datasets/H5Ex_D_Compact.java
+++ b/java/examples/datasets/H5Ex_D_Compact.java
@@ -27,43 +27,44 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5Ex_D_Compact {
- private static String FILENAME = "H5Ex_D_Compact.h5";
+ private static String FILENAME = "H5Ex_D_Compact.h5";
private static String DATASETNAME = "DS1";
- private static final int DIM_X = 4;
- private static final int DIM_Y = 7;
- private static final int RANK = 2;
+ private static final int DIM_X = 4;
+ private static final int DIM_Y = 7;
+ private static final int RANK = 2;
// Values for the status of space allocation
enum H5D_layout {
- H5D_LAYOUT_ERROR(-1), H5D_COMPACT(0), H5D_CONTIGUOUS(1), H5D_CHUNKED(2), H5D_VIRTUAL(3), H5D_NLAYOUTS(4);
+ H5D_LAYOUT_ERROR(-1),
+ H5D_COMPACT(0),
+ H5D_CONTIGUOUS(1),
+ H5D_CHUNKED(2),
+ H5D_VIRTUAL(3),
+ H5D_NLAYOUTS(4);
private static final Map<Integer, H5D_layout> lookup = new HashMap<Integer, H5D_layout>();
- static {
+ static
+ {
for (H5D_layout s : EnumSet.allOf(H5D_layout.class))
lookup.put(s.getCode(), s);
}
private int code;
- H5D_layout(int layout_type) {
- this.code = layout_type;
- }
+ H5D_layout(int layout_type) { this.code = layout_type; }
- public int getCode() {
- return this.code;
- }
+ public int getCode() { return this.code; }
- public static H5D_layout get(int code) {
- return lookup.get(code);
- }
+ public static H5D_layout get(int code) { return lookup.get(code); }
}
- private static void writeCompact() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void writeCompact()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long dcpl_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM_X, DIM_Y };
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long dcpl_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM_X, DIM_Y};
int[][] dset_data = new int[DIM_X][DIM_Y];
// Initialize data.
@@ -74,7 +75,7 @@ public class H5Ex_D_Compact {
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -110,7 +111,7 @@ public class H5Ex_D_Compact {
try {
if ((file_id >= 0) && (filespace_id >= 0) && (dcpl_id >= 0))
dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, filespace_id,
- HDF5Constants.H5P_DEFAULT, dcpl_id, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, dcpl_id, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -119,8 +120,8 @@ public class H5Ex_D_Compact {
// Write the data to the dataset.
try {
if (dataset_id >= 0)
- H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -161,11 +162,12 @@ public class H5Ex_D_Compact {
}
}
- private static void readCompact() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void readCompact()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long dcpl_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long dcpl_id = HDF5Constants.H5I_INVALID_HID;
int[][] dset_data = new int[DIM_X][DIM_Y];
// Open file and dataset using the default properties.
@@ -229,8 +231,8 @@ public class H5Ex_D_Compact {
// Read the data using the default properties.
try {
if (dataset_id >= 0)
- H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -281,9 +283,9 @@ public class H5Ex_D_Compact {
}
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
H5Ex_D_Compact.writeCompact();
H5Ex_D_Compact.readCompact();
}
-
}
diff --git a/java/examples/datasets/H5Ex_D_External.java b/java/examples/datasets/H5Ex_D_External.java
index 9c3787f..d706fb7 100644
--- a/java/examples/datasets/H5Ex_D_External.java
+++ b/java/examples/datasets/H5Ex_D_External.java
@@ -24,20 +24,21 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5Ex_D_External {
- private static String FILENAME = "H5Ex_D_External.h5";
- private static String EXTERNALNAME = "H5Ex_D_External.data";
- private static String DATASETNAME = "DS1";
- private static final int DIM_X = 4;
- private static final int DIM_Y = 7;
- private static final int RANK = 2;
+ private static String FILENAME = "H5Ex_D_External.h5";
+ private static String EXTERNALNAME = "H5Ex_D_External.data";
+ private static String DATASETNAME = "DS1";
+ private static final int DIM_X = 4;
+ private static final int DIM_Y = 7;
+ private static final int RANK = 2;
private static final int NAME_BUF_SIZE = 32;
- private static void writeExternal() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long dcpl_id = HDF5Constants.H5I_INVALID_HID;
+ private static void writeExternal()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long dcpl_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM_X, DIM_Y };
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM_X, DIM_Y};
int[][] dset_data = new int[DIM_X][DIM_Y];
// Initialize the dataset.
@@ -48,7 +49,7 @@ public class H5Ex_D_External {
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -84,7 +85,7 @@ public class H5Ex_D_External {
try {
if ((file_id >= 0) && (filespace_id >= 0) && (dcpl_id >= 0))
dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, filespace_id,
- HDF5Constants.H5P_DEFAULT, dcpl_id, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, dcpl_id, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -92,8 +93,8 @@ public class H5Ex_D_External {
// Write the dataset.
try {
- H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -133,15 +134,15 @@ public class H5Ex_D_External {
catch (Exception e) {
e.printStackTrace();
}
-
}
- private static void readExternal() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long dcpl_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ private static void readExternal()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long dcpl_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
int[][] dset_data = new int[DIM_X][DIM_Y];
- String[] Xname = new String[1];
+ String[] Xname = new String[1];
// Open file using the default properties.
try {
@@ -183,8 +184,8 @@ public class H5Ex_D_External {
// Read the data using the default properties.
try {
if (dataset_id >= 0)
- H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -227,9 +228,9 @@ public class H5Ex_D_External {
}
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
H5Ex_D_External.writeExternal();
H5Ex_D_External.readExternal();
}
-
}
diff --git a/java/examples/datasets/H5Ex_D_FillValue.java b/java/examples/datasets/H5Ex_D_FillValue.java
index 3526993..db4dff7 100644
--- a/java/examples/datasets/H5Ex_D_FillValue.java
+++ b/java/examples/datasets/H5Ex_D_FillValue.java
@@ -26,29 +26,30 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5Ex_D_FillValue {
- private static String FILENAME = "H5Ex_D_FillValue.h5";
+ private static String FILENAME = "H5Ex_D_FillValue.h5";
private static String DATASETNAME = "ExtendibleArray";
- private static final int DIM_X = 4;
- private static final int DIM_Y = 7;
- private static final int EDIM_X = 6;
- private static final int EDIM_Y = 10;
- private static final int CHUNK_X = 4;
- private static final int CHUNK_Y = 4;
- private static final int RANK = 2;
- private static final int NDIMS = 2;
- private static final int FILLVAL = 99;
-
- private static void fillValue() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long dcpl_id = HDF5Constants.H5I_INVALID_HID;
- long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM_X, DIM_Y };
- long[] extdims = { EDIM_X, EDIM_Y };
- long[] chunk_dims = { CHUNK_X, CHUNK_Y };
- long[] maxdims = { HDF5Constants.H5S_UNLIMITED, HDF5Constants.H5S_UNLIMITED };
- int[][] write_dset_data = new int[DIM_X][DIM_Y];
- int[][] read_dset_data = new int[DIM_X][DIM_Y];
+ private static final int DIM_X = 4;
+ private static final int DIM_Y = 7;
+ private static final int EDIM_X = 6;
+ private static final int EDIM_Y = 10;
+ private static final int CHUNK_X = 4;
+ private static final int CHUNK_Y = 4;
+ private static final int RANK = 2;
+ private static final int NDIMS = 2;
+ private static final int FILLVAL = 99;
+
+ private static void fillValue()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long dcpl_id = HDF5Constants.H5I_INVALID_HID;
+ long dataspace_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM_X, DIM_Y};
+ long[] extdims = {EDIM_X, EDIM_Y};
+ long[] chunk_dims = {CHUNK_X, CHUNK_Y};
+ long[] maxdims = {HDF5Constants.H5S_UNLIMITED, HDF5Constants.H5S_UNLIMITED};
+ int[][] write_dset_data = new int[DIM_X][DIM_Y];
+ int[][] read_dset_data = new int[DIM_X][DIM_Y];
int[][] extend_dset_data = new int[EDIM_X][EDIM_Y];
// Initialize the dataset.
@@ -59,7 +60,7 @@ public class H5Ex_D_FillValue {
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -92,7 +93,7 @@ public class H5Ex_D_FillValue {
// Set the fill value for the dataset
try {
- int[] fill_value = { FILLVAL };
+ int[] fill_value = {FILLVAL};
if (dcpl_id >= 0)
H5.H5Pset_fill_value(dcpl_id, HDF5Constants.H5T_NATIVE_INT, fill_value);
}
@@ -115,7 +116,7 @@ public class H5Ex_D_FillValue {
try {
if ((file_id >= 0) && (dataspace_id >= 0) && (dcpl_id >= 0))
dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id,
- HDF5Constants.H5P_DEFAULT, dcpl_id, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, dcpl_id, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -124,8 +125,8 @@ public class H5Ex_D_FillValue {
// Read values from the dataset, which has not been written to yet.
try {
if (dataset_id >= 0)
- H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, read_dset_data);
+ H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, read_dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -144,8 +145,8 @@ public class H5Ex_D_FillValue {
// Write the data to the dataset.
try {
if (dataset_id >= 0)
- H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, write_dset_data);
+ H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, write_dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -154,8 +155,8 @@ public class H5Ex_D_FillValue {
// Read the data back.
try {
if (dataset_id >= 0)
- H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, read_dset_data);
+ H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, read_dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -183,8 +184,8 @@ public class H5Ex_D_FillValue {
// Read from the extended dataset.
try {
if (dataset_id >= 0)
- H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, extend_dset_data);
+ H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, extend_dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -233,11 +234,7 @@ public class H5Ex_D_FillValue {
catch (Exception e) {
e.printStackTrace();
}
-
- }
-
- public static void main(String[] args) {
- H5Ex_D_FillValue.fillValue();
}
+ public static void main(String[] args) { H5Ex_D_FillValue.fillValue(); }
}
diff --git a/java/examples/datasets/H5Ex_D_Gzip.java b/java/examples/datasets/H5Ex_D_Gzip.java
index 404ff05..0a94254 100644
--- a/java/examples/datasets/H5Ex_D_Gzip.java
+++ b/java/examples/datasets/H5Ex_D_Gzip.java
@@ -29,45 +29,46 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5Ex_D_Gzip {
- private static String FILENAME = "H5Ex_D_Gzip.h5";
+ private static String FILENAME = "H5Ex_D_Gzip.h5";
private static String DATASETNAME = "DS1";
- private static final int DIM_X = 32;
- private static final int DIM_Y = 64;
- private static final int CHUNK_X = 4;
- private static final int CHUNK_Y = 8;
- private static final int RANK = 2;
- private static final int NDIMS = 2;
+ private static final int DIM_X = 32;
+ private static final int DIM_Y = 64;
+ private static final int CHUNK_X = 4;
+ private static final int CHUNK_Y = 8;
+ private static final int RANK = 2;
+ private static final int NDIMS = 2;
// Values for the status of space allocation
enum H5Z_filter {
- H5Z_FILTER_ERROR(HDF5Constants.H5Z_FILTER_ERROR), H5Z_FILTER_NONE(HDF5Constants.H5Z_FILTER_NONE), H5Z_FILTER_DEFLATE(
- HDF5Constants.H5Z_FILTER_DEFLATE), H5Z_FILTER_SHUFFLE(HDF5Constants.H5Z_FILTER_SHUFFLE), H5Z_FILTER_FLETCHER32(
- HDF5Constants.H5Z_FILTER_FLETCHER32), H5Z_FILTER_SZIP(HDF5Constants.H5Z_FILTER_SZIP), H5Z_FILTER_NBIT(
- HDF5Constants.H5Z_FILTER_NBIT), H5Z_FILTER_SCALEOFFSET(HDF5Constants.H5Z_FILTER_SCALEOFFSET), H5Z_FILTER_RESERVED(
- HDF5Constants.H5Z_FILTER_RESERVED), H5Z_FILTER_MAX(HDF5Constants.H5Z_FILTER_MAX);
+ H5Z_FILTER_ERROR(HDF5Constants.H5Z_FILTER_ERROR),
+ H5Z_FILTER_NONE(HDF5Constants.H5Z_FILTER_NONE),
+ H5Z_FILTER_DEFLATE(HDF5Constants.H5Z_FILTER_DEFLATE),
+ H5Z_FILTER_SHUFFLE(HDF5Constants.H5Z_FILTER_SHUFFLE),
+ H5Z_FILTER_FLETCHER32(HDF5Constants.H5Z_FILTER_FLETCHER32),
+ H5Z_FILTER_SZIP(HDF5Constants.H5Z_FILTER_SZIP),
+ H5Z_FILTER_NBIT(HDF5Constants.H5Z_FILTER_NBIT),
+ H5Z_FILTER_SCALEOFFSET(HDF5Constants.H5Z_FILTER_SCALEOFFSET),
+ H5Z_FILTER_RESERVED(HDF5Constants.H5Z_FILTER_RESERVED),
+ H5Z_FILTER_MAX(HDF5Constants.H5Z_FILTER_MAX);
private static final Map<Integer, H5Z_filter> lookup = new HashMap<Integer, H5Z_filter>();
- static {
+ static
+ {
for (H5Z_filter s : EnumSet.allOf(H5Z_filter.class))
lookup.put(s.getCode(), s);
}
private int code;
- H5Z_filter(int layout_type) {
- this.code = layout_type;
- }
+ H5Z_filter(int layout_type) { this.code = layout_type; }
- public int getCode() {
- return this.code;
- }
+ public int getCode() { return this.code; }
- public static H5Z_filter get(int code) {
- return lookup.get(code);
- }
+ public static H5Z_filter get(int code) { return lookup.get(code); }
}
- private static boolean checkGzipFilter() {
+ private static boolean checkGzipFilter()
+ {
try {
int available = H5.H5Zfilter_avail(HDF5Constants.H5Z_FILTER_DEFLATE);
if (available == 0) {
@@ -81,8 +82,8 @@ public class H5Ex_D_Gzip {
try {
int filter_info = H5.H5Zget_filter_info(HDF5Constants.H5Z_FILTER_DEFLATE);
- if (((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0)
- || ((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0)) {
+ if (((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0) ||
+ ((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0)) {
System.out.println("gzip filter not available for encoding and decoding.");
return false;
}
@@ -93,13 +94,14 @@ public class H5Ex_D_Gzip {
return true;
}
- private static void writeGzip() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void writeGzip()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long dcpl_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM_X, DIM_Y };
- long[] chunk_dims = { CHUNK_X, CHUNK_Y };
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long dcpl_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM_X, DIM_Y};
+ long[] chunk_dims = {CHUNK_X, CHUNK_Y};
int[][] dset_data = new int[DIM_X][DIM_Y];
// Initialize data.
@@ -110,7 +112,7 @@ public class H5Ex_D_Gzip {
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -143,7 +145,7 @@ public class H5Ex_D_Gzip {
try {
if ((file_id >= 0) && (filespace_id >= 0) && (dcpl_id >= 0))
dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, filespace_id,
- HDF5Constants.H5P_DEFAULT, dcpl_id, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, dcpl_id, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -152,8 +154,8 @@ public class H5Ex_D_Gzip {
// Write the data to the dataset.
try {
if (dataset_id >= 0)
- H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -194,10 +196,11 @@ public class H5Ex_D_Gzip {
}
}
- private static void readGzip() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long dcpl_id = HDF5Constants.H5I_INVALID_HID;
+ private static void readGzip()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long dcpl_id = HDF5Constants.H5I_INVALID_HID;
int[][] dset_data = new int[DIM_X][DIM_Y];
// Open an existing file.
@@ -231,14 +234,14 @@ public class H5Ex_D_Gzip {
try {
if (dcpl_id >= 0) {
// Java lib requires a valid filter_name object and cd_values
- int[] flags = { 0 };
- long[] cd_nelmts = { 1 };
- int[] cd_values = { 0 };
- String[] filter_name = { "" };
- int[] filter_config = { 0 };
- int filter_type = -1;
- filter_type = H5
- .H5Pget_filter(dcpl_id, 0, flags, cd_nelmts, cd_values, 120, filter_name, filter_config);
+ int[] flags = {0};
+ long[] cd_nelmts = {1};
+ int[] cd_values = {0};
+ String[] filter_name = {""};
+ int[] filter_config = {0};
+ int filter_type = -1;
+ filter_type = H5.H5Pget_filter(dcpl_id, 0, flags, cd_nelmts, cd_values, 120, filter_name,
+ filter_config);
System.out.print("Filter type is: ");
switch (H5Z_filter.get(filter_type)) {
case H5Z_FILTER_DEFLATE:
@@ -272,8 +275,8 @@ public class H5Ex_D_Gzip {
// Read the data using the default properties.
try {
if (dataset_id >= 0) {
- H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
}
catch (Exception e) {
@@ -318,7 +321,8 @@ public class H5Ex_D_Gzip {
}
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
// Check if gzip compression is available and can be used for both
// compression and decompression. Normally we do not perform error
// checking in these examples for the sake of clarity, but in this
@@ -329,5 +333,4 @@ public class H5Ex_D_Gzip {
H5Ex_D_Gzip.readGzip();
}
}
-
}
diff --git a/java/examples/datasets/H5Ex_D_Hyperslab.java b/java/examples/datasets/H5Ex_D_Hyperslab.java
index fa3473f..0575d50 100644
--- a/java/examples/datasets/H5Ex_D_Hyperslab.java
+++ b/java/examples/datasets/H5Ex_D_Hyperslab.java
@@ -26,17 +26,18 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5Ex_D_Hyperslab {
- private static String FILENAME = "H5Ex_D_Hyperslab.h5";
+ private static String FILENAME = "H5Ex_D_Hyperslab.h5";
private static String DATASETNAME = "DS1";
- private static final int DIM_X = 6;
- private static final int DIM_Y = 8;
- private static final int RANK = 2;
+ private static final int DIM_X = 6;
+ private static final int DIM_Y = 8;
+ private static final int RANK = 2;
- private static void writeHyperslab() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void writeHyperslab()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM_X, DIM_Y };
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM_X, DIM_Y};
int[][] dset_data = new int[DIM_X][DIM_Y];
// Initialize data to "1", to make it easier to see the selections.
@@ -57,7 +58,7 @@ public class H5Ex_D_Hyperslab {
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -76,20 +77,22 @@ public class H5Ex_D_Hyperslab {
try {
if ((file_id >= 0) && (filespace_id >= 0))
dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, filespace_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
}
// Define and select the first part of the hyperslab selection.
- long[] start = { 0, 0 };
- long[] stride = { 3, 3 };
- long[] count = { 2, 3 };
- long[] block = { 2, 2 };
+ long[] start = {0, 0};
+ long[] stride = {3, 3};
+ long[] count = {2, 3};
+ long[] block = {2, 2};
try {
if ((filespace_id >= 0))
- H5.H5Sselect_hyperslab(filespace_id, HDF5Constants.H5S_SELECT_SET, start, stride, count, block);
+ H5.H5Sselect_hyperslab(filespace_id, HDF5Constants.H5S_SELECT_SET, start, stride, count,
+ block);
}
catch (Exception e) {
e.printStackTrace();
@@ -101,12 +104,13 @@ public class H5Ex_D_Hyperslab {
block[1] = 1;
try {
if ((filespace_id >= 0)) {
- H5.H5Sselect_hyperslab(filespace_id, HDF5Constants.H5S_SELECT_NOTB, start, stride, count, block);
+ H5.H5Sselect_hyperslab(filespace_id, HDF5Constants.H5S_SELECT_NOTB, start, stride, count,
+ block);
// Write the data to the dataset.
if (dataset_id >= 0)
H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, filespace_id,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ HDF5Constants.H5P_DEFAULT, dset_data);
}
}
catch (Exception e) {
@@ -140,11 +144,12 @@ public class H5Ex_D_Hyperslab {
}
}
- private static void readHyperslab() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void readHyperslab()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long dcpl_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long dcpl_id = HDF5Constants.H5I_INVALID_HID;
int[][] dset_data = new int[DIM_X][DIM_Y];
// Open an existing file.
@@ -167,8 +172,8 @@ public class H5Ex_D_Hyperslab {
// Read the data using the default properties.
try {
if (dataset_id >= 0)
- H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -194,18 +199,19 @@ public class H5Ex_D_Hyperslab {
if (dataset_id >= 0) {
filespace_id = H5.H5Dget_space(dataset_id);
- long[] start = { 0, 1 };
- long[] stride = { 4, 4 };
- long[] count = { 2, 2 };
- long[] block = { 2, 3 };
+ long[] start = {0, 1};
+ long[] stride = {4, 4};
+ long[] count = {2, 2};
+ long[] block = {2, 3};
if (filespace_id >= 0) {
- H5.H5Sselect_hyperslab(filespace_id, HDF5Constants.H5S_SELECT_SET, start, stride, count, block);
+ H5.H5Sselect_hyperslab(filespace_id, HDF5Constants.H5S_SELECT_SET, start, stride, count,
+ block);
// Read the data using the previously defined hyperslab.
if ((dataset_id >= 0) && (filespace_id >= 0))
- H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, filespace_id,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ filespace_id, HDF5Constants.H5P_DEFAULT, dset_data);
}
}
}
@@ -258,9 +264,9 @@ public class H5Ex_D_Hyperslab {
}
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
H5Ex_D_Hyperslab.writeHyperslab();
H5Ex_D_Hyperslab.readHyperslab();
}
-
}
diff --git a/java/examples/datasets/H5Ex_D_Nbit.java b/java/examples/datasets/H5Ex_D_Nbit.java
index 35d23a9..d54ce21 100644
--- a/java/examples/datasets/H5Ex_D_Nbit.java
+++ b/java/examples/datasets/H5Ex_D_Nbit.java
@@ -29,45 +29,46 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5Ex_D_Nbit {
- private static String FILENAME = "H5Ex_D_Nbit.h5";
+ private static String FILENAME = "H5Ex_D_Nbit.h5";
private static String DATASETNAME = "DS1";
- private static final int DIM_X = 32;
- private static final int DIM_Y = 64;
- private static final int CHUNK_X = 4;
- private static final int CHUNK_Y = 8;
- private static final int RANK = 2;
- private static final int NDIMS = 2;
+ private static final int DIM_X = 32;
+ private static final int DIM_Y = 64;
+ private static final int CHUNK_X = 4;
+ private static final int CHUNK_Y = 8;
+ private static final int RANK = 2;
+ private static final int NDIMS = 2;
// Values for the status of space allocation
enum H5Z_filter {
- H5Z_FILTER_ERROR(HDF5Constants.H5Z_FILTER_ERROR), H5Z_FILTER_NONE(HDF5Constants.H5Z_FILTER_NONE), H5Z_FILTER_DEFLATE(
- HDF5Constants.H5Z_FILTER_DEFLATE), H5Z_FILTER_SHUFFLE(HDF5Constants.H5Z_FILTER_SHUFFLE), H5Z_FILTER_FLETCHER32(
- HDF5Constants.H5Z_FILTER_FLETCHER32), H5Z_FILTER_SZIP(HDF5Constants.H5Z_FILTER_SZIP), H5Z_FILTER_NBIT(
- HDF5Constants.H5Z_FILTER_NBIT), H5Z_FILTER_SCALEOFFSET(HDF5Constants.H5Z_FILTER_SCALEOFFSET), H5Z_FILTER_RESERVED(
- HDF5Constants.H5Z_FILTER_RESERVED), H5Z_FILTER_MAX(HDF5Constants.H5Z_FILTER_MAX);
+ H5Z_FILTER_ERROR(HDF5Constants.H5Z_FILTER_ERROR),
+ H5Z_FILTER_NONE(HDF5Constants.H5Z_FILTER_NONE),
+ H5Z_FILTER_DEFLATE(HDF5Constants.H5Z_FILTER_DEFLATE),
+ H5Z_FILTER_SHUFFLE(HDF5Constants.H5Z_FILTER_SHUFFLE),
+ H5Z_FILTER_FLETCHER32(HDF5Constants.H5Z_FILTER_FLETCHER32),
+ H5Z_FILTER_SZIP(HDF5Constants.H5Z_FILTER_SZIP),
+ H5Z_FILTER_NBIT(HDF5Constants.H5Z_FILTER_NBIT),
+ H5Z_FILTER_SCALEOFFSET(HDF5Constants.H5Z_FILTER_SCALEOFFSET),
+ H5Z_FILTER_RESERVED(HDF5Constants.H5Z_FILTER_RESERVED),
+ H5Z_FILTER_MAX(HDF5Constants.H5Z_FILTER_MAX);
private static final Map<Integer, H5Z_filter> lookup = new HashMap<Integer, H5Z_filter>();
- static {
+ static
+ {
for (H5Z_filter s : EnumSet.allOf(H5Z_filter.class))
lookup.put(s.getCode(), s);
}
private int code;
- H5Z_filter(int layout_type) {
- this.code = layout_type;
- }
+ H5Z_filter(int layout_type) { this.code = layout_type; }
- public int getCode() {
- return this.code;
- }
+ public int getCode() { return this.code; }
- public static H5Z_filter get(int code) {
- return lookup.get(code);
- }
+ public static H5Z_filter get(int code) { return lookup.get(code); }
}
- private static boolean checkNbitFilter() {
+ private static boolean checkNbitFilter()
+ {
try {
// Check if N-Bit compression is available and can be used for both compression and decompression.
int available = H5.H5Zfilter_avail(HDF5Constants.H5Z_FILTER_NBIT);
@@ -82,8 +83,8 @@ public class H5Ex_D_Nbit {
try {
int filter_info = H5.H5Zget_filter_info(HDF5Constants.H5Z_FILTER_NBIT);
- if (((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0)
- || ((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0)) {
+ if (((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0) ||
+ ((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0)) {
System.out.println("N-Bit filter not available for encoding and decoding.");
return false;
}
@@ -94,14 +95,15 @@ public class H5Ex_D_Nbit {
return true;
}
- private static void writeData() throws Exception {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void writeData() throws Exception
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long dtype_id = HDF5Constants.H5I_INVALID_HID;
- long dcpl_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM_X, DIM_Y };
- long[] chunk_dims = { CHUNK_X, CHUNK_Y };
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long dtype_id = HDF5Constants.H5I_INVALID_HID;
+ long dcpl_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM_X, DIM_Y};
+ long[] chunk_dims = {CHUNK_X, CHUNK_Y};
int[][] dset_data = new int[DIM_X][DIM_Y];
// Initialize data.
@@ -112,7 +114,7 @@ public class H5Ex_D_Nbit {
try {
// Create a new file using the default properties.
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
// Create dataspace. Setting maximum size to NULL sets the maximum
// size to be the current size.
@@ -130,12 +132,12 @@ public class H5Ex_D_Nbit {
H5.H5Pset_chunk(dcpl_id, NDIMS, chunk_dims);
// Create the dataset.
- dataset_id = H5.H5Dcreate(file_id, DATASETNAME, dtype_id, filespace_id, HDF5Constants.H5P_DEFAULT, dcpl_id,
- HDF5Constants.H5P_DEFAULT);
+ dataset_id = H5.H5Dcreate(file_id, DATASETNAME, dtype_id, filespace_id, HDF5Constants.H5P_DEFAULT,
+ dcpl_id, HDF5Constants.H5P_DEFAULT);
// Write the data to the dataset.
- H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -155,10 +157,11 @@ public class H5Ex_D_Nbit {
}
}
- private static void readData() throws Exception {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long dcpl_id = HDF5Constants.H5I_INVALID_HID;
+ private static void readData() throws Exception
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long dcpl_id = HDF5Constants.H5I_INVALID_HID;
int[][] dset_data = new int[DIM_X][DIM_Y];
// Open an existing file.
@@ -192,14 +195,14 @@ public class H5Ex_D_Nbit {
try {
if (dcpl_id >= 0) {
// Java lib requires a valid filter_name object and cd_values
- int[] flags = { 0 };
- long[] cd_nelmts = { 1 };
- int[] cd_values = { 0 };
- String[] filter_name = { "" };
- int[] filter_config = { 0 };
- int filter_type = -1;
- filter_type = H5
- .H5Pget_filter(dcpl_id, 0, flags, cd_nelmts, cd_values, 120, filter_name, filter_config);
+ int[] flags = {0};
+ long[] cd_nelmts = {1};
+ int[] cd_values = {0};
+ String[] filter_name = {""};
+ int[] filter_config = {0};
+ int filter_type = -1;
+ filter_type = H5.H5Pget_filter(dcpl_id, 0, flags, cd_nelmts, cd_values, 120, filter_name,
+ filter_config);
System.out.print("Filter type is: ");
switch (H5Z_filter.get(filter_type)) {
case H5Z_FILTER_DEFLATE:
@@ -234,7 +237,7 @@ public class H5Ex_D_Nbit {
try {
if (dataset_id >= 0) {
int status = H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
- HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
// Check if the read was successful.
if (status < 0)
System.out.print("Dataset read failed!");
@@ -280,14 +283,14 @@ public class H5Ex_D_Nbit {
catch (Exception e) {
e.printStackTrace();
}
-
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
/*
- * Check if N-Bit compression is available and can be used for both compression and decompression. Normally we
- * do not perform error checking in these examples for the sake of clarity, but in this case we will make an
- * exception because this filter is an optional part of the hdf5 library.
+ * Check if N-Bit compression is available and can be used for both compression and decompression.
+ * Normally we do not perform error checking in these examples for the sake of clarity, but in this
+ * case we will make an exception because this filter is an optional part of the hdf5 library.
*/
try {
if (H5Ex_D_Nbit.checkNbitFilter()) {
diff --git a/java/examples/datasets/H5Ex_D_ReadWrite.java b/java/examples/datasets/H5Ex_D_ReadWrite.java
index db930d3..4b26a2c 100644
--- a/java/examples/datasets/H5Ex_D_ReadWrite.java
+++ b/java/examples/datasets/H5Ex_D_ReadWrite.java
@@ -24,17 +24,18 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5Ex_D_ReadWrite {
- private static String FILENAME = "H5Ex_D_ReadWrite.h5";
+ private static String FILENAME = "H5Ex_D_ReadWrite.h5";
private static String DATASETNAME = "DS1";
- private static final int DIM_X = 4;
- private static final int DIM_Y = 7;
- private static final int RANK = 2;
+ private static final int DIM_X = 4;
+ private static final int DIM_Y = 7;
+ private static final int RANK = 2;
- private static void WriteDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void WriteDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM_X, DIM_Y };
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM_X, DIM_Y};
int[][] dset_data = new int[DIM_X][DIM_Y];
// Initialize data.
@@ -45,7 +46,7 @@ public class H5Ex_D_ReadWrite {
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -64,7 +65,8 @@ public class H5Ex_D_ReadWrite {
try {
if ((file_id >= 0) && (filespace_id >= 0))
dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, filespace_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -73,8 +75,8 @@ public class H5Ex_D_ReadWrite {
// Write the data to the dataset.
try {
if (dataset_id >= 0)
- H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -107,9 +109,10 @@ public class H5Ex_D_ReadWrite {
}
}
- private static void ReadDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ private static void ReadDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
int[][] dset_data = new int[DIM_X][DIM_Y];
// Open file using the default properties.
@@ -132,8 +135,8 @@ public class H5Ex_D_ReadWrite {
// Read the data using the default properties.
try {
if (dataset_id >= 0)
- H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -168,9 +171,9 @@ public class H5Ex_D_ReadWrite {
}
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
H5Ex_D_ReadWrite.WriteDataset();
H5Ex_D_ReadWrite.ReadDataset();
}
-
}
diff --git a/java/examples/datasets/H5Ex_D_Shuffle.java b/java/examples/datasets/H5Ex_D_Shuffle.java
index 1dd7c6a..54a77c7 100644
--- a/java/examples/datasets/H5Ex_D_Shuffle.java
+++ b/java/examples/datasets/H5Ex_D_Shuffle.java
@@ -30,45 +30,46 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5Ex_D_Shuffle {
- private static String FILENAME = "H5Ex_D_Shuffle.h5";
+ private static String FILENAME = "H5Ex_D_Shuffle.h5";
private static String DATASETNAME = "DS1";
- private static final int DIM_X = 32;
- private static final int DIM_Y = 64;
- private static final int CHUNK_X = 4;
- private static final int CHUNK_Y = 8;
- private static final int RANK = 2;
- private static final int NDIMS = 2;
+ private static final int DIM_X = 32;
+ private static final int DIM_Y = 64;
+ private static final int CHUNK_X = 4;
+ private static final int CHUNK_Y = 8;
+ private static final int RANK = 2;
+ private static final int NDIMS = 2;
// Values for the status of space allocation
enum H5Z_filter {
- H5Z_FILTER_ERROR(HDF5Constants.H5Z_FILTER_ERROR), H5Z_FILTER_NONE(HDF5Constants.H5Z_FILTER_NONE), H5Z_FILTER_DEFLATE(
- HDF5Constants.H5Z_FILTER_DEFLATE), H5Z_FILTER_SHUFFLE(HDF5Constants.H5Z_FILTER_SHUFFLE), H5Z_FILTER_FLETCHER32(
- HDF5Constants.H5Z_FILTER_FLETCHER32), H5Z_FILTER_SZIP(HDF5Constants.H5Z_FILTER_SZIP), H5Z_FILTER_NBIT(
- HDF5Constants.H5Z_FILTER_NBIT), H5Z_FILTER_SCALEOFFSET(HDF5Constants.H5Z_FILTER_SCALEOFFSET), H5Z_FILTER_RESERVED(
- HDF5Constants.H5Z_FILTER_RESERVED), H5Z_FILTER_MAX(HDF5Constants.H5Z_FILTER_MAX);
+ H5Z_FILTER_ERROR(HDF5Constants.H5Z_FILTER_ERROR),
+ H5Z_FILTER_NONE(HDF5Constants.H5Z_FILTER_NONE),
+ H5Z_FILTER_DEFLATE(HDF5Constants.H5Z_FILTER_DEFLATE),
+ H5Z_FILTER_SHUFFLE(HDF5Constants.H5Z_FILTER_SHUFFLE),
+ H5Z_FILTER_FLETCHER32(HDF5Constants.H5Z_FILTER_FLETCHER32),
+ H5Z_FILTER_SZIP(HDF5Constants.H5Z_FILTER_SZIP),
+ H5Z_FILTER_NBIT(HDF5Constants.H5Z_FILTER_NBIT),
+ H5Z_FILTER_SCALEOFFSET(HDF5Constants.H5Z_FILTER_SCALEOFFSET),
+ H5Z_FILTER_RESERVED(HDF5Constants.H5Z_FILTER_RESERVED),
+ H5Z_FILTER_MAX(HDF5Constants.H5Z_FILTER_MAX);
private static final Map<Integer, H5Z_filter> lookup = new HashMap<Integer, H5Z_filter>();
- static {
+ static
+ {
for (H5Z_filter s : EnumSet.allOf(H5Z_filter.class))
lookup.put(s.getCode(), s);
}
private int code;
- H5Z_filter(int layout_type) {
- this.code = layout_type;
- }
+ H5Z_filter(int layout_type) { this.code = layout_type; }
- public int getCode() {
- return this.code;
- }
+ public int getCode() { return this.code; }
- public static H5Z_filter get(int code) {
- return lookup.get(code);
- }
+ public static H5Z_filter get(int code) { return lookup.get(code); }
}
- private static boolean checkGzipFilter() {
+ private static boolean checkGzipFilter()
+ {
try {
int available = H5.H5Zfilter_avail(HDF5Constants.H5Z_FILTER_DEFLATE);
if (available == 0) {
@@ -82,8 +83,8 @@ public class H5Ex_D_Shuffle {
try {
int filter_info = H5.H5Zget_filter_info(HDF5Constants.H5Z_FILTER_DEFLATE);
- if (((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0)
- || ((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0)) {
+ if (((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0) ||
+ ((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0)) {
System.out.println("gzip filter not available for encoding and decoding.");
return false;
}
@@ -94,7 +95,8 @@ public class H5Ex_D_Shuffle {
return true;
}
- private static boolean checkShuffleFilter() {
+ private static boolean checkShuffleFilter()
+ {
try {
int available = H5.H5Zfilter_avail(HDF5Constants.H5Z_FILTER_SHUFFLE);
if (available == 0) {
@@ -108,8 +110,8 @@ public class H5Ex_D_Shuffle {
try {
int filter_info = H5.H5Zget_filter_info(HDF5Constants.H5Z_FILTER_SHUFFLE);
- if (((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0)
- || ((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0)) {
+ if (((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0) ||
+ ((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0)) {
System.out.println("Shuffle filter not available for encoding and decoding.");
return false;
}
@@ -120,13 +122,14 @@ public class H5Ex_D_Shuffle {
return true;
}
- private static void writeShuffle() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void writeShuffle()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long dcpl_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM_X, DIM_Y };
- long[] chunk_dims = { CHUNK_X, CHUNK_Y };
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long dcpl_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM_X, DIM_Y};
+ long[] chunk_dims = {CHUNK_X, CHUNK_Y};
int[][] dset_data = new int[DIM_X][DIM_Y];
// Initialize data.
@@ -137,7 +140,7 @@ public class H5Ex_D_Shuffle {
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -176,7 +179,7 @@ public class H5Ex_D_Shuffle {
try {
if ((file_id >= 0) && (filespace_id >= 0) && (dcpl_id >= 0))
dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, filespace_id,
- HDF5Constants.H5P_DEFAULT, dcpl_id, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, dcpl_id, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -185,8 +188,8 @@ public class H5Ex_D_Shuffle {
// Write the data to the dataset.
try {
if (dataset_id >= 0)
- H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -227,10 +230,11 @@ public class H5Ex_D_Shuffle {
}
}
- private static void readShuffle() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long dcpl_id = HDF5Constants.H5I_INVALID_HID;
+ private static void readShuffle()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long dcpl_id = HDF5Constants.H5I_INVALID_HID;
int[][] dset_data = new int[DIM_X][DIM_Y];
// Open an existing file.
@@ -266,14 +270,14 @@ public class H5Ex_D_Shuffle {
int nfilters = H5.H5Pget_nfilters(dcpl_id);
for (int indx = 0; indx < nfilters; indx++) {
// Java lib requires a valid filter_name object and cd_values
- int[] flags = { 0 };
- long[] cd_nelmts = { 1 };
- int[] cd_values = { 0 };
- String[] filter_name = { "" };
- int[] filter_config = { 0 };
- int filter_type = -1;
- filter_type = H5.H5Pget_filter(dcpl_id, indx, flags, cd_nelmts, cd_values, 120, filter_name,
- filter_config);
+ int[] flags = {0};
+ long[] cd_nelmts = {1};
+ int[] cd_values = {0};
+ String[] filter_name = {""};
+ int[] filter_config = {0};
+ int filter_type = -1;
+ filter_type = H5.H5Pget_filter(dcpl_id, indx, flags, cd_nelmts, cd_values, 120,
+ filter_name, filter_config);
System.out.print("Filter " + indx + ": Type is: ");
switch (H5Z_filter.get(filter_type)) {
case H5Z_FILTER_DEFLATE:
@@ -308,8 +312,8 @@ public class H5Ex_D_Shuffle {
// Read the data using the default properties.
try {
if (dataset_id >= 0) {
- H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
}
catch (Exception e) {
@@ -354,7 +358,8 @@ public class H5Ex_D_Shuffle {
}
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
// Check if gzip compression is available and can be used for both
// compression and decompression. Normally we do not perform error
// checking in these examples for the sake of clarity, but in this
@@ -366,5 +371,4 @@ public class H5Ex_D_Shuffle {
H5Ex_D_Shuffle.readShuffle();
}
}
-
}
diff --git a/java/examples/datasets/H5Ex_D_Sofloat.java b/java/examples/datasets/H5Ex_D_Sofloat.java
index 8edde09..a5f5cd8 100644
--- a/java/examples/datasets/H5Ex_D_Sofloat.java
+++ b/java/examples/datasets/H5Ex_D_Sofloat.java
@@ -23,9 +23,9 @@ package examples.datasets;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
-import java.util.Locale;
import java.util.EnumSet;
import java.util.HashMap;
+import java.util.Locale;
import java.util.Map;
import hdf.hdf5lib.H5;
@@ -33,45 +33,46 @@ import hdf.hdf5lib.HDF5Constants;
public class H5Ex_D_Sofloat {
- private static String FILENAME = "H5Ex_D_Sofloat.h5";
+ private static String FILENAME = "H5Ex_D_Sofloat.h5";
private static String DATASETNAME = "DS1";
- private static final int DIM_X = 32;
- private static final int DIM_Y = 64;
- private static final int CHUNK_X = 4;
- private static final int CHUNK_Y = 8;
- private static final int RANK = 2;
- private static final int NDIMS = 2;
+ private static final int DIM_X = 32;
+ private static final int DIM_Y = 64;
+ private static final int CHUNK_X = 4;
+ private static final int CHUNK_Y = 8;
+ private static final int RANK = 2;
+ private static final int NDIMS = 2;
// Values for the status of space allocation
enum H5Z_filter {
- H5Z_FILTER_ERROR(HDF5Constants.H5Z_FILTER_ERROR), H5Z_FILTER_NONE(HDF5Constants.H5Z_FILTER_NONE), H5Z_FILTER_DEFLATE(
- HDF5Constants.H5Z_FILTER_DEFLATE), H5Z_FILTER_SHUFFLE(HDF5Constants.H5Z_FILTER_SHUFFLE), H5Z_FILTER_FLETCHER32(
- HDF5Constants.H5Z_FILTER_FLETCHER32), H5Z_FILTER_SZIP(HDF5Constants.H5Z_FILTER_SZIP), H5Z_FILTER_NBIT(
- HDF5Constants.H5Z_FILTER_NBIT), H5Z_FILTER_SCALEOFFSET(HDF5Constants.H5Z_FILTER_SCALEOFFSET), H5Z_FILTER_RESERVED(
- HDF5Constants.H5Z_FILTER_RESERVED), H5Z_FILTER_MAX(HDF5Constants.H5Z_FILTER_MAX);
+ H5Z_FILTER_ERROR(HDF5Constants.H5Z_FILTER_ERROR),
+ H5Z_FILTER_NONE(HDF5Constants.H5Z_FILTER_NONE),
+ H5Z_FILTER_DEFLATE(HDF5Constants.H5Z_FILTER_DEFLATE),
+ H5Z_FILTER_SHUFFLE(HDF5Constants.H5Z_FILTER_SHUFFLE),
+ H5Z_FILTER_FLETCHER32(HDF5Constants.H5Z_FILTER_FLETCHER32),
+ H5Z_FILTER_SZIP(HDF5Constants.H5Z_FILTER_SZIP),
+ H5Z_FILTER_NBIT(HDF5Constants.H5Z_FILTER_NBIT),
+ H5Z_FILTER_SCALEOFFSET(HDF5Constants.H5Z_FILTER_SCALEOFFSET),
+ H5Z_FILTER_RESERVED(HDF5Constants.H5Z_FILTER_RESERVED),
+ H5Z_FILTER_MAX(HDF5Constants.H5Z_FILTER_MAX);
private static final Map<Integer, H5Z_filter> lookup = new HashMap<Integer, H5Z_filter>();
- static {
+ static
+ {
for (H5Z_filter s : EnumSet.allOf(H5Z_filter.class))
lookup.put(s.getCode(), s);
}
private int code;
- H5Z_filter(int layout_type) {
- this.code = layout_type;
- }
+ H5Z_filter(int layout_type) { this.code = layout_type; }
- public int getCode() {
- return this.code;
- }
+ public int getCode() { return this.code; }
- public static H5Z_filter get(int code) {
- return lookup.get(code);
- }
+ public static H5Z_filter get(int code) { return lookup.get(code); }
}
- private static boolean checkScaleoffsetFilter() {
+ private static boolean checkScaleoffsetFilter()
+ {
try {
int available = H5.H5Zfilter_avail(HDF5Constants.H5Z_FILTER_SCALEOFFSET);
if (available == 0) {
@@ -85,8 +86,8 @@ public class H5Ex_D_Sofloat {
try {
int filter_info = H5.H5Zget_filter_info(HDF5Constants.H5Z_FILTER_SCALEOFFSET);
- if (((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0)
- || ((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0)) {
+ if (((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0) ||
+ ((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0)) {
System.out.println("Scale-Offset filter not available for encoding and decoding.");
return false;
}
@@ -97,20 +98,21 @@ public class H5Ex_D_Sofloat {
return true;
}
- private static void writeData() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long filespace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long dcpl_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM_X, DIM_Y };
- long[] chunk_dims = { CHUNK_X, CHUNK_Y };
+ private static void writeData()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long filespace_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long dcpl_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM_X, DIM_Y};
+ long[] chunk_dims = {CHUNK_X, CHUNK_Y};
double[][] dset_data = new double[DIM_X][DIM_Y];
// Initialize data.
for (int indx = 0; indx < DIM_X; indx++)
for (int jndx = 0; jndx < DIM_Y; jndx++) {
- double x = indx;
- double y = jndx;
+ double x = indx;
+ double y = jndx;
dset_data[indx][jndx] = (x + 1) / (y + 0.3) + y;
}
@@ -133,7 +135,7 @@ public class H5Ex_D_Sofloat {
// Create a new file using the default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -164,7 +166,7 @@ public class H5Ex_D_Sofloat {
try {
if ((file_id >= 0) && (filespace_id >= 0) && (dcpl_id >= 0))
dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_IEEE_F64LE, filespace_id,
- HDF5Constants.H5P_DEFAULT, dcpl_id, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, dcpl_id, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -173,8 +175,8 @@ public class H5Ex_D_Sofloat {
// Write the data to the dataset.
try {
if (dataset_id >= 0)
- H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_DOUBLE, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_DOUBLE, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -215,10 +217,11 @@ public class H5Ex_D_Sofloat {
}
}
- private static void readData() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long dcpl_id = HDF5Constants.H5I_INVALID_HID;
+ private static void readData()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long dcpl_id = HDF5Constants.H5I_INVALID_HID;
double[][] dset_data = new double[DIM_X][DIM_Y];
// Open file using the default properties.
@@ -251,15 +254,15 @@ public class H5Ex_D_Sofloat {
try {
if (dcpl_id >= 0) {
// Java lib requires a valid filter_name object and cd_values
- int[] flags = { 0 };
- long[] cd_nelmts = { 1 };
- int[] cd_values = { 0 };
- String[] filter_name = { "" };
- int[] filter_config = { 0 };
- int filter_type = -1;
-
- filter_type = H5
- .H5Pget_filter(dcpl_id, 0, flags, cd_nelmts, cd_values, 120, filter_name, filter_config);
+ int[] flags = {0};
+ long[] cd_nelmts = {1};
+ int[] cd_values = {0};
+ String[] filter_name = {""};
+ int[] filter_config = {0};
+ int filter_type = -1;
+
+ filter_type = H5.H5Pget_filter(dcpl_id, 0, flags, cd_nelmts, cd_values, 120, filter_name,
+ filter_config);
System.out.print("Filter type is: ");
switch (H5Z_filter.get(filter_type)) {
case H5Z_FILTER_DEFLATE:
@@ -293,8 +296,8 @@ public class H5Ex_D_Sofloat {
// Read the data using the default properties.
try {
if (dataset_id >= 0)
- H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_DOUBLE, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_DOUBLE, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -343,7 +346,8 @@ public class H5Ex_D_Sofloat {
}
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
// Check if Scale-Offset compression is available and can be used
// for both compression and decompression. Normally we do not
diff --git a/java/examples/datasets/H5Ex_D_Soint.java b/java/examples/datasets/H5Ex_D_Soint.java
index dd7664f..3eb8e37 100644
--- a/java/examples/datasets/H5Ex_D_Soint.java
+++ b/java/examples/datasets/H5Ex_D_Soint.java
@@ -30,45 +30,46 @@ import hdf.hdf5lib.HDF5Constants;
public class H5Ex_D_Soint {
- private static String FILENAME = "H5Ex_D_Soint.h5";
+ private static String FILENAME = "H5Ex_D_Soint.h5";
private static String DATASETNAME = "DS1";
- private static final int DIM_X = 32;
- private static final int DIM_Y = 64;
- private static final int CHUNK_X = 4;
- private static final int CHUNK_Y = 8;
- private static final int RANK = 2;
- private static final int NDIMS = 2;
+ private static final int DIM_X = 32;
+ private static final int DIM_Y = 64;
+ private static final int CHUNK_X = 4;
+ private static final int CHUNK_Y = 8;
+ private static final int RANK = 2;
+ private static final int NDIMS = 2;
// Values for the status of space allocation
enum H5Z_filter {
- H5Z_FILTER_ERROR(HDF5Constants.H5Z_FILTER_ERROR), H5Z_FILTER_NONE(HDF5Constants.H5Z_FILTER_NONE), H5Z_FILTER_DEFLATE(
- HDF5Constants.H5Z_FILTER_DEFLATE), H5Z_FILTER_SHUFFLE(HDF5Constants.H5Z_FILTER_SHUFFLE), H5Z_FILTER_FLETCHER32(
- HDF5Constants.H5Z_FILTER_FLETCHER32), H5Z_FILTER_SZIP(HDF5Constants.H5Z_FILTER_SZIP), H5Z_FILTER_NBIT(
- HDF5Constants.H5Z_FILTER_NBIT), H5Z_FILTER_SCALEOFFSET(HDF5Constants.H5Z_FILTER_SCALEOFFSET), H5Z_FILTER_RESERVED(
- HDF5Constants.H5Z_FILTER_RESERVED), H5Z_FILTER_MAX(HDF5Constants.H5Z_FILTER_MAX);
+ H5Z_FILTER_ERROR(HDF5Constants.H5Z_FILTER_ERROR),
+ H5Z_FILTER_NONE(HDF5Constants.H5Z_FILTER_NONE),
+ H5Z_FILTER_DEFLATE(HDF5Constants.H5Z_FILTER_DEFLATE),
+ H5Z_FILTER_SHUFFLE(HDF5Constants.H5Z_FILTER_SHUFFLE),
+ H5Z_FILTER_FLETCHER32(HDF5Constants.H5Z_FILTER_FLETCHER32),
+ H5Z_FILTER_SZIP(HDF5Constants.H5Z_FILTER_SZIP),
+ H5Z_FILTER_NBIT(HDF5Constants.H5Z_FILTER_NBIT),
+ H5Z_FILTER_SCALEOFFSET(HDF5Constants.H5Z_FILTER_SCALEOFFSET),
+ H5Z_FILTER_RESERVED(HDF5Constants.H5Z_FILTER_RESERVED),
+ H5Z_FILTER_MAX(HDF5Constants.H5Z_FILTER_MAX);
private static final Map<Integer, H5Z_filter> lookup = new HashMap<Integer, H5Z_filter>();
- static {
+ static
+ {
for (H5Z_filter s : EnumSet.allOf(H5Z_filter.class))
lookup.put(s.getCode(), s);
}
private int code;
- H5Z_filter(int layout_type) {
- this.code = layout_type;
- }
+ H5Z_filter(int layout_type) { this.code = layout_type; }
- public int getCode() {
- return this.code;
- }
+ public int getCode() { return this.code; }
- public static H5Z_filter get(int code) {
- return lookup.get(code);
- }
+ public static H5Z_filter get(int code) { return lookup.get(code); }
}
- private static boolean checkScaleoffsetFilter() {
+ private static boolean checkScaleoffsetFilter()
+ {
try {
int available = H5.H5Zfilter_avail(HDF5Constants.H5Z_FILTER_SCALEOFFSET);
if (available == 0) {
@@ -82,8 +83,8 @@ public class H5Ex_D_Soint {
try {
int filter_info = H5.H5Zget_filter_info(HDF5Constants.H5Z_FILTER_SCALEOFFSET);
- if (((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0)
- || ((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0)) {
+ if (((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0) ||
+ ((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0)) {
System.out.println("Scale-Offset filter not available for encoding and decoding.");
return false;
}
@@ -94,13 +95,14 @@ public class H5Ex_D_Soint {
return true;
}
- private static void writeData() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void writeData()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long dcpl_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM_X, DIM_Y };
- long[] chunk_dims = { CHUNK_X, CHUNK_Y };
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long dcpl_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM_X, DIM_Y};
+ long[] chunk_dims = {CHUNK_X, CHUNK_Y};
int[][] dset_data = new int[DIM_X][DIM_Y];
// Initialize data.
@@ -111,7 +113,7 @@ public class H5Ex_D_Soint {
// Create a new file using the default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -130,7 +132,8 @@ public class H5Ex_D_Soint {
try {
dcpl_id = H5.H5Pcreate(HDF5Constants.H5P_DATASET_CREATE);
if (dcpl_id >= 0) {
- H5.H5Pset_scaleoffset(dcpl_id, HDF5Constants.H5Z_SO_INT, HDF5Constants.H5Z_SO_INT_MINBITS_DEFAULT);
+ H5.H5Pset_scaleoffset(dcpl_id, HDF5Constants.H5Z_SO_INT,
+ HDF5Constants.H5Z_SO_INT_MINBITS_DEFAULT);
H5.H5Pset_chunk(dcpl_id, NDIMS, chunk_dims);
}
}
@@ -142,7 +145,7 @@ public class H5Ex_D_Soint {
try {
if ((file_id >= 0) && (filespace_id >= 0) && (dcpl_id >= 0))
dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, filespace_id,
- HDF5Constants.H5P_DEFAULT, dcpl_id, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, dcpl_id, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -151,8 +154,8 @@ public class H5Ex_D_Soint {
// Write the data to the dataset.
try {
if (dataset_id >= 0)
- H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -193,10 +196,11 @@ public class H5Ex_D_Soint {
}
}
- private static void readData() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long dcpl_id = HDF5Constants.H5I_INVALID_HID;
+ private static void readData()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long dcpl_id = HDF5Constants.H5I_INVALID_HID;
int[][] dset_data = new int[DIM_X][DIM_Y];
// Open file using the default properties.
@@ -229,15 +233,15 @@ public class H5Ex_D_Soint {
try {
if (dcpl_id >= 0) {
// Java lib requires a valid filter_name object and cd_values
- int[] flags = { 0 };
- long[] cd_nelmts = { 1 };
- int[] cd_values = { 0 };
- String[] filter_name = { "" };
- int[] filter_config = { 0 };
- int filter_type = -1;
-
- filter_type = H5
- .H5Pget_filter(dcpl_id, 0, flags, cd_nelmts, cd_values, 120, filter_name, filter_config);
+ int[] flags = {0};
+ long[] cd_nelmts = {1};
+ int[] cd_values = {0};
+ String[] filter_name = {""};
+ int[] filter_config = {0};
+ int filter_type = -1;
+
+ filter_type = H5.H5Pget_filter(dcpl_id, 0, flags, cd_nelmts, cd_values, 120, filter_name,
+ filter_config);
System.out.print("Filter type is: ");
switch (H5Z_filter.get(filter_type)) {
case H5Z_FILTER_DEFLATE:
@@ -271,8 +275,8 @@ public class H5Ex_D_Soint {
// Read the data using the default properties.
try {
if (dataset_id >= 0)
- H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -316,7 +320,8 @@ public class H5Ex_D_Soint {
}
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
// Check if Scale-Offset compression is available and can be used
// for both compression and decompression. Normally we do not
@@ -328,5 +333,4 @@ public class H5Ex_D_Soint {
H5Ex_D_Soint.readData();
}
}
-
}
diff --git a/java/examples/datasets/H5Ex_D_Szip.java b/java/examples/datasets/H5Ex_D_Szip.java
index 3fdc712..0426a87 100644
--- a/java/examples/datasets/H5Ex_D_Szip.java
+++ b/java/examples/datasets/H5Ex_D_Szip.java
@@ -29,45 +29,46 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5Ex_D_Szip {
- private static String FILENAME = "H5Ex_D_Szip.h5";
+ private static String FILENAME = "H5Ex_D_Szip.h5";
private static String DATASETNAME = "DS1";
- private static final int DIM_X = 32;
- private static final int DIM_Y = 64;
- private static final int CHUNK_X = 4;
- private static final int CHUNK_Y = 8;
- private static final int RANK = 2;
- private static final int NDIMS = 2;
+ private static final int DIM_X = 32;
+ private static final int DIM_Y = 64;
+ private static final int CHUNK_X = 4;
+ private static final int CHUNK_Y = 8;
+ private static final int RANK = 2;
+ private static final int NDIMS = 2;
// Values for the status of space allocation
enum H5Z_filter {
- H5Z_FILTER_ERROR(HDF5Constants.H5Z_FILTER_ERROR), H5Z_FILTER_NONE(HDF5Constants.H5Z_FILTER_NONE), H5Z_FILTER_DEFLATE(
- HDF5Constants.H5Z_FILTER_DEFLATE), H5Z_FILTER_SHUFFLE(HDF5Constants.H5Z_FILTER_SHUFFLE), H5Z_FILTER_FLETCHER32(
- HDF5Constants.H5Z_FILTER_FLETCHER32), H5Z_FILTER_SZIP(HDF5Constants.H5Z_FILTER_SZIP), H5Z_FILTER_NBIT(
- HDF5Constants.H5Z_FILTER_NBIT), H5Z_FILTER_SCALEOFFSET(HDF5Constants.H5Z_FILTER_SCALEOFFSET), H5Z_FILTER_RESERVED(
- HDF5Constants.H5Z_FILTER_RESERVED), H5Z_FILTER_MAX(HDF5Constants.H5Z_FILTER_MAX);
+ H5Z_FILTER_ERROR(HDF5Constants.H5Z_FILTER_ERROR),
+ H5Z_FILTER_NONE(HDF5Constants.H5Z_FILTER_NONE),
+ H5Z_FILTER_DEFLATE(HDF5Constants.H5Z_FILTER_DEFLATE),
+ H5Z_FILTER_SHUFFLE(HDF5Constants.H5Z_FILTER_SHUFFLE),
+ H5Z_FILTER_FLETCHER32(HDF5Constants.H5Z_FILTER_FLETCHER32),
+ H5Z_FILTER_SZIP(HDF5Constants.H5Z_FILTER_SZIP),
+ H5Z_FILTER_NBIT(HDF5Constants.H5Z_FILTER_NBIT),
+ H5Z_FILTER_SCALEOFFSET(HDF5Constants.H5Z_FILTER_SCALEOFFSET),
+ H5Z_FILTER_RESERVED(HDF5Constants.H5Z_FILTER_RESERVED),
+ H5Z_FILTER_MAX(HDF5Constants.H5Z_FILTER_MAX);
private static final Map<Integer, H5Z_filter> lookup = new HashMap<Integer, H5Z_filter>();
- static {
+ static
+ {
for (H5Z_filter s : EnumSet.allOf(H5Z_filter.class))
lookup.put(s.getCode(), s);
}
private int code;
- H5Z_filter(int layout_type) {
- this.code = layout_type;
- }
+ H5Z_filter(int layout_type) { this.code = layout_type; }
- public int getCode() {
- return this.code;
- }
+ public int getCode() { return this.code; }
- public static H5Z_filter get(int code) {
- return lookup.get(code);
- }
+ public static H5Z_filter get(int code) { return lookup.get(code); }
}
- private static boolean checkSzipFilter() {
+ private static boolean checkSzipFilter()
+ {
try {
int available = H5.H5Zfilter_avail(HDF5Constants.H5Z_FILTER_SZIP);
if (available == 0) {
@@ -81,8 +82,8 @@ public class H5Ex_D_Szip {
try {
int filter_info = H5.H5Zget_filter_info(HDF5Constants.H5Z_FILTER_SZIP);
- if (((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0)
- || ((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0)) {
+ if (((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0) ||
+ ((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0)) {
System.out.println("szip filter not available for encoding and decoding.");
return false;
}
@@ -93,13 +94,14 @@ public class H5Ex_D_Szip {
return true;
}
- private static void writeSzip() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void writeSzip()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long dcpl_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM_X, DIM_Y };
- long[] chunk_dims = { CHUNK_X, CHUNK_Y };
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long dcpl_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM_X, DIM_Y};
+ long[] chunk_dims = {CHUNK_X, CHUNK_Y};
int[][] dset_data = new int[DIM_X][DIM_Y];
// Initialize data.
@@ -110,7 +112,7 @@ public class H5Ex_D_Szip {
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -143,7 +145,7 @@ public class H5Ex_D_Szip {
try {
if ((file_id >= 0) && (filespace_id >= 0) && (dcpl_id >= 0))
dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, filespace_id,
- HDF5Constants.H5P_DEFAULT, dcpl_id, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, dcpl_id, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -152,8 +154,8 @@ public class H5Ex_D_Szip {
// Write the data to the dataset.
try {
if (dataset_id >= 0)
- H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -194,10 +196,11 @@ public class H5Ex_D_Szip {
}
}
- private static void readSzip() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long dcpl_id = HDF5Constants.H5I_INVALID_HID;
+ private static void readSzip()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long dcpl_id = HDF5Constants.H5I_INVALID_HID;
int[][] dset_data = new int[DIM_X][DIM_Y];
// Open an existing file.
@@ -231,15 +234,15 @@ public class H5Ex_D_Szip {
try {
if (dcpl_id >= 0) {
// Java lib requires a valid filter_name object and cd_values
- int[] flags = { 0 };
- long[] cd_nelmts = { 1 };
- int[] cd_values = { 0 };
- String[] filter_name = { "" };
- int[] filter_config = { 0 };
- int filter_type = -1;
-
- filter_type = H5
- .H5Pget_filter(dcpl_id, 0, flags, cd_nelmts, cd_values, 120, filter_name, filter_config);
+ int[] flags = {0};
+ long[] cd_nelmts = {1};
+ int[] cd_values = {0};
+ String[] filter_name = {""};
+ int[] filter_config = {0};
+ int filter_type = -1;
+
+ filter_type = H5.H5Pget_filter(dcpl_id, 0, flags, cd_nelmts, cd_values, 120, filter_name,
+ filter_config);
System.out.print("Filter type is: ");
switch (H5Z_filter.get(filter_type)) {
case H5Z_FILTER_DEFLATE:
@@ -273,8 +276,8 @@ public class H5Ex_D_Szip {
// Read the data using the default properties.
try {
if (dataset_id >= 0) {
- H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
}
catch (Exception e) {
@@ -319,7 +322,8 @@ public class H5Ex_D_Szip {
}
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
// Check if gzip compression is available and can be used for both
// compression and decompression. Normally we do not perform error
// checking in these examples for the sake of clarity, but in this
@@ -330,5 +334,4 @@ public class H5Ex_D_Szip {
H5Ex_D_Szip.readSzip();
}
}
-
}
diff --git a/java/examples/datasets/H5Ex_D_Transform.java b/java/examples/datasets/H5Ex_D_Transform.java
index 069e80b..16ab423 100644
--- a/java/examples/datasets/H5Ex_D_Transform.java
+++ b/java/examples/datasets/H5Ex_D_Transform.java
@@ -27,20 +27,21 @@ import hdf.hdf5lib.HDF5Constants;
public class H5Ex_D_Transform {
- private static String FILE = "H5Ex_D_Transform.h5";
- private static String DATASET = "DS1";
- private static final int DIM_X = 4;
- private static final int DIM_Y = 7;
- private static String TRANSFORM = "x+1";
+ private static String FILE = "H5Ex_D_Transform.h5";
+ private static String DATASET = "DS1";
+ private static final int DIM_X = 4;
+ private static final int DIM_Y = 7;
+ private static String TRANSFORM = "x+1";
private static String RTRANSFORM = "x-1";
- private static void writeData() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void writeData()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long dxpl_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long dxpl_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM_X, DIM_Y };
+ long[] dims = {DIM_X, DIM_Y};
int[][] dset_data = new int[DIM_X][DIM_Y];
// Initialize data.
@@ -60,7 +61,7 @@ public class H5Ex_D_Transform {
// Create a new file using the default properties.
try {
file_id = H5.H5Fcreate(FILE, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -90,7 +91,8 @@ public class H5Ex_D_Transform {
try {
if ((file_id >= 0) && (filespace_id >= 0))
dataset_id = H5.H5Dcreate(file_id, DATASET, HDF5Constants.H5T_NATIVE_INT, filespace_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -99,8 +101,8 @@ public class H5Ex_D_Transform {
// Write the data to the dataset using the dataset transfer property list.
try {
if ((dataset_id >= 0) && (dxpl_id >= 0))
- H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- dxpl_id, dset_data);
+ H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, dxpl_id, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -141,11 +143,12 @@ public class H5Ex_D_Transform {
}
}
- private static void readData() {
+ private static void readData()
+ {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long dxpl_id = HDF5Constants.H5I_INVALID_HID;
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long dxpl_id = HDF5Constants.H5I_INVALID_HID;
int[][] dset_data = new int[DIM_X][DIM_Y];
// Open an existing file using the default properties.
@@ -168,8 +171,8 @@ public class H5Ex_D_Transform {
// Read the data using the default properties.
try {
if (dataset_id >= 0)
- H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -197,8 +200,8 @@ public class H5Ex_D_Transform {
// Read the data using the dataset transfer property list.
try {
if ((dataset_id >= 0) && (dxpl_id >= 0))
- H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- dxpl_id, dset_data);
+ H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, dxpl_id, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -206,8 +209,8 @@ public class H5Ex_D_Transform {
// Output the data to the screen.
- System.out.println("Data as written with transform '" + TRANSFORM + "' and read with transform '"
- + RTRANSFORM + "'");
+ System.out.println("Data as written with transform '" + TRANSFORM + "' and read with transform '" +
+ RTRANSFORM + "'");
for (int i = 0; i < DIM_X; i++) {
System.out.print(" [");
for (int j = 0; j < DIM_Y; j++)
@@ -239,9 +242,9 @@ public class H5Ex_D_Transform {
}
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
H5Ex_D_Transform.writeData();
H5Ex_D_Transform.readData();
}
-
}
diff --git a/java/examples/datasets/H5Ex_D_UnlimitedAdd.java b/java/examples/datasets/H5Ex_D_UnlimitedAdd.java
index c82b2d6..4154cf3 100644
--- a/java/examples/datasets/H5Ex_D_UnlimitedAdd.java
+++ b/java/examples/datasets/H5Ex_D_UnlimitedAdd.java
@@ -26,25 +26,26 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5Ex_D_UnlimitedAdd {
- private static String FILENAME = "H5Ex_D_UnlimitedAdd.h5";
+ private static String FILENAME = "H5Ex_D_UnlimitedAdd.h5";
private static String DATASETNAME = "DS1";
- private static final int DIM_X = 4;
- private static final int DIM_Y = 7;
- private static final int EDIM_X = 6;
- private static final int EDIM_Y = 10;
- private static final int CHUNK_X = 4;
- private static final int CHUNK_Y = 4;
- private static final int RANK = 2;
- private static final int NDIMS = 2;
-
- private static void writeUnlimited() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long dcpl_id = HDF5Constants.H5I_INVALID_HID;
+ private static final int DIM_X = 4;
+ private static final int DIM_Y = 7;
+ private static final int EDIM_X = 6;
+ private static final int EDIM_Y = 10;
+ private static final int CHUNK_X = 4;
+ private static final int CHUNK_Y = 4;
+ private static final int RANK = 2;
+ private static final int NDIMS = 2;
+
+ private static void writeUnlimited()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long dcpl_id = HDF5Constants.H5I_INVALID_HID;
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM_X, DIM_Y };
- long[] chunk_dims = { CHUNK_X, CHUNK_Y };
- long[] maxdims = { HDF5Constants.H5S_UNLIMITED, HDF5Constants.H5S_UNLIMITED };
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM_X, DIM_Y};
+ long[] chunk_dims = {CHUNK_X, CHUNK_Y};
+ long[] maxdims = {HDF5Constants.H5S_UNLIMITED, HDF5Constants.H5S_UNLIMITED};
int[][] dset_data = new int[DIM_X][DIM_Y];
// Initialize the dataset.
@@ -55,7 +56,7 @@ public class H5Ex_D_UnlimitedAdd {
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -90,7 +91,7 @@ public class H5Ex_D_UnlimitedAdd {
try {
if ((file_id >= 0) && (dataspace_id >= 0) && (dcpl_id >= 0))
dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id,
- HDF5Constants.H5P_DEFAULT, dcpl_id, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, dcpl_id, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -99,8 +100,8 @@ public class H5Ex_D_UnlimitedAdd {
// Write the data to the dataset.
try {
if (dataset_id >= 0)
- H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -141,14 +142,15 @@ public class H5Ex_D_UnlimitedAdd {
}
}
- private static void extendUnlimited() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void extendUnlimited()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM_X, DIM_Y };
- long[] extdims = { EDIM_X, EDIM_Y };
- long[] start = { 0, 0 };
- long[] count = new long[2];
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM_X, DIM_Y};
+ long[] extdims = {EDIM_X, EDIM_Y};
+ long[] start = {0, 0};
+ long[] count = new long[2];
int[][] dset_data;
int[][] extend_dset_data = new int[EDIM_X][EDIM_Y];
@@ -189,13 +191,13 @@ public class H5Ex_D_UnlimitedAdd {
}
// Allocate array of pointers to rows.
- dset_data = new int[(int) dims[0]][(int) dims[1]];
+ dset_data = new int[(int)dims[0]][(int)dims[1]];
// Read the data using the default properties.
try {
if (dataset_id >= 0)
- H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -257,7 +259,7 @@ public class H5Ex_D_UnlimitedAdd {
// Write the data to the selected portion of the dataset.
if (dataset_id >= 0)
H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, dataspace_id,
- HDF5Constants.H5P_DEFAULT, extend_dset_data);
+ HDF5Constants.H5P_DEFAULT, extend_dset_data);
}
}
catch (Exception e) {
@@ -291,11 +293,12 @@ public class H5Ex_D_UnlimitedAdd {
}
}
- private static void readUnlimited() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void readUnlimited()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM_X, DIM_Y };
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM_X, DIM_Y};
int[][] dset_data;
// Open an existing file.
@@ -332,13 +335,13 @@ public class H5Ex_D_UnlimitedAdd {
e.printStackTrace();
}
// Allocate array of pointers to rows.
- dset_data = new int[(int) dims[0]][(int) dims[1]];
+ dset_data = new int[(int)dims[0]][(int)dims[1]];
// Read the data using the default properties.
try {
if (dataset_id >= 0)
- H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -381,10 +384,10 @@ public class H5Ex_D_UnlimitedAdd {
}
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
H5Ex_D_UnlimitedAdd.writeUnlimited();
H5Ex_D_UnlimitedAdd.extendUnlimited();
H5Ex_D_UnlimitedAdd.readUnlimited();
}
-
}
diff --git a/java/examples/datasets/H5Ex_D_UnlimitedGzip.java b/java/examples/datasets/H5Ex_D_UnlimitedGzip.java
index 675b1ba..e084641 100644
--- a/java/examples/datasets/H5Ex_D_UnlimitedGzip.java
+++ b/java/examples/datasets/H5Ex_D_UnlimitedGzip.java
@@ -31,47 +31,48 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5Ex_D_UnlimitedGzip {
- private static String FILENAME = "H5Ex_D_UnlimitedGzip.h5";
+ private static String FILENAME = "H5Ex_D_UnlimitedGzip.h5";
private static String DATASETNAME = "DS1";
- private static final int DIM_X = 4;
- private static final int DIM_Y = 7;
- private static final int EDIM_X = 6;
- private static final int EDIM_Y = 10;
- private static final int CHUNK_X = 4;
- private static final int CHUNK_Y = 4;
- private static final int RANK = 2;
- private static final int NDIMS = 2;
+ private static final int DIM_X = 4;
+ private static final int DIM_Y = 7;
+ private static final int EDIM_X = 6;
+ private static final int EDIM_Y = 10;
+ private static final int CHUNK_X = 4;
+ private static final int CHUNK_Y = 4;
+ private static final int RANK = 2;
+ private static final int NDIMS = 2;
// Values for the status of space allocation
enum H5Z_filter {
- H5Z_FILTER_ERROR(HDF5Constants.H5Z_FILTER_ERROR), H5Z_FILTER_NONE(HDF5Constants.H5Z_FILTER_NONE), H5Z_FILTER_DEFLATE(
- HDF5Constants.H5Z_FILTER_DEFLATE), H5Z_FILTER_SHUFFLE(HDF5Constants.H5Z_FILTER_SHUFFLE), H5Z_FILTER_FLETCHER32(
- HDF5Constants.H5Z_FILTER_FLETCHER32), H5Z_FILTER_SZIP(HDF5Constants.H5Z_FILTER_SZIP), H5Z_FILTER_NBIT(
- HDF5Constants.H5Z_FILTER_NBIT), H5Z_FILTER_SCALEOFFSET(HDF5Constants.H5Z_FILTER_SCALEOFFSET), H5Z_FILTER_RESERVED(
- HDF5Constants.H5Z_FILTER_RESERVED), H5Z_FILTER_MAX(HDF5Constants.H5Z_FILTER_MAX);
+ H5Z_FILTER_ERROR(HDF5Constants.H5Z_FILTER_ERROR),
+ H5Z_FILTER_NONE(HDF5Constants.H5Z_FILTER_NONE),
+ H5Z_FILTER_DEFLATE(HDF5Constants.H5Z_FILTER_DEFLATE),
+ H5Z_FILTER_SHUFFLE(HDF5Constants.H5Z_FILTER_SHUFFLE),
+ H5Z_FILTER_FLETCHER32(HDF5Constants.H5Z_FILTER_FLETCHER32),
+ H5Z_FILTER_SZIP(HDF5Constants.H5Z_FILTER_SZIP),
+ H5Z_FILTER_NBIT(HDF5Constants.H5Z_FILTER_NBIT),
+ H5Z_FILTER_SCALEOFFSET(HDF5Constants.H5Z_FILTER_SCALEOFFSET),
+ H5Z_FILTER_RESERVED(HDF5Constants.H5Z_FILTER_RESERVED),
+ H5Z_FILTER_MAX(HDF5Constants.H5Z_FILTER_MAX);
private static final Map<Integer, H5Z_filter> lookup = new HashMap<Integer, H5Z_filter>();
- static {
+ static
+ {
for (H5Z_filter s : EnumSet.allOf(H5Z_filter.class))
lookup.put(s.getCode(), s);
}
private int code;
- H5Z_filter(int layout_type) {
- this.code = layout_type;
- }
+ H5Z_filter(int layout_type) { this.code = layout_type; }
- public int getCode() {
- return this.code;
- }
+ public int getCode() { return this.code; }
- public static H5Z_filter get(int code) {
- return lookup.get(code);
- }
+ public static H5Z_filter get(int code) { return lookup.get(code); }
}
- private static boolean checkGzipFilter() {
+ private static boolean checkGzipFilter()
+ {
try {
int available = H5.H5Zfilter_avail(HDF5Constants.H5Z_FILTER_DEFLATE);
if (available == 0) {
@@ -85,8 +86,8 @@ public class H5Ex_D_UnlimitedGzip {
try {
int filter_info = H5.H5Zget_filter_info(HDF5Constants.H5Z_FILTER_DEFLATE);
- if (((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0)
- || ((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0)) {
+ if (((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0) ||
+ ((filter_info & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0)) {
System.out.println("gzip filter not available for encoding and decoding.");
return false;
}
@@ -97,14 +98,15 @@ public class H5Ex_D_UnlimitedGzip {
return true;
}
- private static void writeUnlimited() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long dcpl_id = HDF5Constants.H5I_INVALID_HID;
+ private static void writeUnlimited()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long dcpl_id = HDF5Constants.H5I_INVALID_HID;
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM_X, DIM_Y };
- long[] chunk_dims = { CHUNK_X, CHUNK_Y };
- long[] maxdims = { HDF5Constants.H5S_UNLIMITED, HDF5Constants.H5S_UNLIMITED };
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM_X, DIM_Y};
+ long[] chunk_dims = {CHUNK_X, CHUNK_Y};
+ long[] maxdims = {HDF5Constants.H5S_UNLIMITED, HDF5Constants.H5S_UNLIMITED};
int[][] dset_data = new int[DIM_X][DIM_Y];
// Initialize the dataset.
@@ -115,7 +117,7 @@ public class H5Ex_D_UnlimitedGzip {
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -147,7 +149,7 @@ public class H5Ex_D_UnlimitedGzip {
try {
if ((file_id >= 0) && (dataspace_id >= 0) && (dcpl_id >= 0))
dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id,
- HDF5Constants.H5P_DEFAULT, dcpl_id, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, dcpl_id, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -156,8 +158,8 @@ public class H5Ex_D_UnlimitedGzip {
// Write the data to the dataset.
try {
if (dataset_id >= 0)
- H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -198,14 +200,15 @@ public class H5Ex_D_UnlimitedGzip {
}
}
- private static void extendUnlimited() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void extendUnlimited()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM_X, DIM_Y };
- long[] extdims = { EDIM_X, EDIM_Y };
- long[] start = { 0, 0 };
- long[] count = new long[2];
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM_X, DIM_Y};
+ long[] extdims = {EDIM_X, EDIM_Y};
+ long[] start = {0, 0};
+ long[] count = new long[2];
int[][] dset_data;
int[][] extend_dset_data = new int[EDIM_X][EDIM_Y];
@@ -246,13 +249,13 @@ public class H5Ex_D_UnlimitedGzip {
}
// Allocate array of pointers to rows.
- dset_data = new int[(int) dims[0]][(int) dims[1]];
+ dset_data = new int[(int)dims[0]][(int)dims[1]];
// Read the data using the default properties.
try {
if (dataset_id >= 0)
- H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -314,7 +317,7 @@ public class H5Ex_D_UnlimitedGzip {
// Write the data to the selected portion of the dataset.
if (dataset_id >= 0)
H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, dataspace_id,
- HDF5Constants.H5P_DEFAULT, extend_dset_data);
+ HDF5Constants.H5P_DEFAULT, extend_dset_data);
}
}
catch (Exception e) {
@@ -348,12 +351,13 @@ public class H5Ex_D_UnlimitedGzip {
}
}
- private static void readUnlimited() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void readUnlimited()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long dcpl_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM_X, DIM_Y };
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long dcpl_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM_X, DIM_Y};
int[][] dset_data;
// Open an existing file.
@@ -387,14 +391,14 @@ public class H5Ex_D_UnlimitedGzip {
try {
if (dcpl_id >= 0) {
// Java lib requires a valid filter_name object and cd_values
- int[] flags = { 0 };
- long[] cd_nelmts = { 1 };
- int[] cd_values = { 0 };
- String[] filter_name = { "" };
- int[] filter_config = { 0 };
- int filter_type = -1;
- filter_type = H5
- .H5Pget_filter(dcpl_id, 0, flags, cd_nelmts, cd_values, 120, filter_name, filter_config);
+ int[] flags = {0};
+ long[] cd_nelmts = {1};
+ int[] cd_values = {0};
+ String[] filter_name = {""};
+ int[] filter_config = {0};
+ int filter_type = -1;
+ filter_type = H5.H5Pget_filter(dcpl_id, 0, flags, cd_nelmts, cd_values, 120, filter_name,
+ filter_config);
System.out.print("Filter type is: ");
switch (H5Z_filter.get(filter_type)) {
case H5Z_FILTER_DEFLATE:
@@ -436,13 +440,13 @@ public class H5Ex_D_UnlimitedGzip {
e.printStackTrace();
}
// Allocate array of pointers to rows.
- dset_data = new int[(int) dims[0]][(int) dims[1]];
+ dset_data = new int[(int)dims[0]][(int)dims[1]];
// Read the data using the default properties.
try {
if (dataset_id >= 0)
- H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -485,7 +489,8 @@ public class H5Ex_D_UnlimitedGzip {
}
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
// Check if gzip compression is available and can be used for both
// compression and decompression. Normally we do not perform error
// checking in these examples for the sake of clarity, but in this
@@ -497,5 +502,4 @@ public class H5Ex_D_UnlimitedGzip {
H5Ex_D_UnlimitedGzip.readUnlimited();
}
}
-
}
diff --git a/java/examples/datasets/H5Ex_D_UnlimitedMod.java b/java/examples/datasets/H5Ex_D_UnlimitedMod.java
index 0708898..ccabcdd 100644
--- a/java/examples/datasets/H5Ex_D_UnlimitedMod.java
+++ b/java/examples/datasets/H5Ex_D_UnlimitedMod.java
@@ -26,25 +26,26 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5Ex_D_UnlimitedMod {
- private static String FILENAME = "H5Ex_D_UnlimitedMod.h5";
+ private static String FILENAME = "H5Ex_D_UnlimitedMod.h5";
private static String DATASETNAME = "DS1";
- private static final int DIM_X = 4;
- private static final int DIM_Y = 7;
- private static final int EDIM_X = 6;
- private static final int EDIM_Y = 10;
- private static final int CHUNK_X = 4;
- private static final int CHUNK_Y = 4;
- private static final int RANK = 2;
- private static final int NDIMS = 2;
-
- private static void writeUnlimited() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long dcpl_id = HDF5Constants.H5I_INVALID_HID;
+ private static final int DIM_X = 4;
+ private static final int DIM_Y = 7;
+ private static final int EDIM_X = 6;
+ private static final int EDIM_Y = 10;
+ private static final int CHUNK_X = 4;
+ private static final int CHUNK_Y = 4;
+ private static final int RANK = 2;
+ private static final int NDIMS = 2;
+
+ private static void writeUnlimited()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long dcpl_id = HDF5Constants.H5I_INVALID_HID;
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM_X, DIM_Y };
- long[] chunk_dims = { CHUNK_X, CHUNK_Y };
- long[] maxdims = { HDF5Constants.H5S_UNLIMITED, HDF5Constants.H5S_UNLIMITED };
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM_X, DIM_Y};
+ long[] chunk_dims = {CHUNK_X, CHUNK_Y};
+ long[] maxdims = {HDF5Constants.H5S_UNLIMITED, HDF5Constants.H5S_UNLIMITED};
int[][] dset_data = new int[DIM_X][DIM_Y];
// Initialize the dataset.
@@ -55,7 +56,7 @@ public class H5Ex_D_UnlimitedMod {
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -90,7 +91,7 @@ public class H5Ex_D_UnlimitedMod {
try {
if ((file_id >= 0) && (dataspace_id >= 0) && (dcpl_id >= 0))
dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id,
- HDF5Constants.H5P_DEFAULT, dcpl_id, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, dcpl_id, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -99,8 +100,8 @@ public class H5Ex_D_UnlimitedMod {
// Write the data to the dataset.
try {
if (dataset_id >= 0)
- H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -141,12 +142,13 @@ public class H5Ex_D_UnlimitedMod {
}
}
- private static void extendUnlimited() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void extendUnlimited()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM_X, DIM_Y };
- long[] extdims = { EDIM_X, EDIM_Y };
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM_X, DIM_Y};
+ long[] extdims = {EDIM_X, EDIM_Y};
int[][] dset_data;
int[][] extend_dset_data = new int[EDIM_X][EDIM_Y];
@@ -187,13 +189,13 @@ public class H5Ex_D_UnlimitedMod {
}
// Allocate array of pointers to rows.
- dset_data = new int[(int) dims[0]][(int) dims[1]];
+ dset_data = new int[(int)dims[0]][(int)dims[1]];
// Read the data using the default properties.
try {
if (dataset_id >= 0)
- H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -244,7 +246,7 @@ public class H5Ex_D_UnlimitedMod {
try {
if ((dataspace_id >= 0) && (dataset_id >= 0))
H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, dataspace_id,
- HDF5Constants.H5P_DEFAULT, extend_dset_data);
+ HDF5Constants.H5P_DEFAULT, extend_dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -277,11 +279,12 @@ public class H5Ex_D_UnlimitedMod {
}
}
- private static void readUnlimited() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void readUnlimited()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM_X, DIM_Y };
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM_X, DIM_Y};
int[][] dset_data;
// Open an existing file.
@@ -318,13 +321,13 @@ public class H5Ex_D_UnlimitedMod {
e.printStackTrace();
}
// Allocate array of pointers to rows.
- dset_data = new int[(int) dims[0]][(int) dims[1]];
+ dset_data = new int[(int)dims[0]][(int)dims[1]];
// Read the data using the default properties.
try {
if (dataset_id >= 0)
- H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -367,10 +370,10 @@ public class H5Ex_D_UnlimitedMod {
}
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
H5Ex_D_UnlimitedMod.writeUnlimited();
H5Ex_D_UnlimitedMod.extendUnlimited();
H5Ex_D_UnlimitedMod.readUnlimited();
}
-
}
diff --git a/java/examples/datatypes/CMakeLists.txt b/java/examples/datatypes/CMakeLists.txt
index 6997b2e..4512221 100644
--- a/java/examples/datatypes/CMakeLists.txt
+++ b/java/examples/datatypes/CMakeLists.txt
@@ -47,6 +47,13 @@ foreach (example ${HDF_JAVA_EXAMPLES})
# install_jar (${example} ${HJAVA_INSTALL_DATA_DIR}/examples examples)
get_target_property (${example}_CLASSPATH ${example} CLASSDIR)
add_dependencies (${example} ${HDF5_JAVA_HDF5_LIB_TARGET})
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_JAVA_${example}_SRC_FORMAT ${example}.java)
+ endif ()
endforeach ()
set (CMAKE_JAVA_INCLUDE_PATH "${HDF5_JAVA_JARS};${HDF5_JAVA_LOGGING_JAR};${HDF5_JAVA_LOGGING_NOP_JAR}")
diff --git a/java/examples/datatypes/H5Ex_T_Array.java b/java/examples/datatypes/H5Ex_T_Array.java
index 3939b38..4e9de2a 100644
--- a/java/examples/datatypes/H5Ex_T_Array.java
+++ b/java/examples/datatypes/H5Ex_T_Array.java
@@ -24,22 +24,23 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5Ex_T_Array {
- private static String FILENAME = "H5Ex_T_Array.h5";
+ private static String FILENAME = "H5Ex_T_Array.h5";
private static String DATASETNAME = "DS1";
- private static final int DIM0 = 4;
- private static final int ADIM0 = 3;
- private static final int ADIM1 = 5;
- private static final int RANK = 1;
- private static final int NDIMS = 2;
-
- private static void CreateDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long filetype_id = HDF5Constants.H5I_INVALID_HID;
- long memtype_id = HDF5Constants.H5I_INVALID_HID;
- long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM0 };
- long[] adims = { ADIM0, ADIM1 };
+ private static final int DIM0 = 4;
+ private static final int ADIM0 = 3;
+ private static final int ADIM1 = 5;
+ private static final int RANK = 1;
+ private static final int NDIMS = 2;
+
+ private static void CreateDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long filetype_id = HDF5Constants.H5I_INVALID_HID;
+ long memtype_id = HDF5Constants.H5I_INVALID_HID;
+ long dataspace_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM0};
+ long[] adims = {ADIM0, ADIM1};
int[][][] dset_data = new int[DIM0][ADIM0][ADIM1];
// Initialize data. indx is the element in the dataspace, jndx and kndx the
@@ -52,7 +53,7 @@ public class H5Ex_T_Array {
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -86,8 +87,9 @@ public class H5Ex_T_Array {
// Create the dataset.
try {
if ((file_id >= 0) && (dataspace_id >= 0) && (filetype_id >= 0))
- dataset_id = H5.H5Dcreate(file_id, DATASETNAME, filetype_id, dataspace_id, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ dataset_id =
+ H5.H5Dcreate(file_id, DATASETNAME, filetype_id, dataspace_id, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -97,7 +99,7 @@ public class H5Ex_T_Array {
try {
if ((dataset_id >= 0) && (memtype_id >= 0))
H5.H5Dwrite(dataset_id, memtype_id, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -147,16 +149,16 @@ public class H5Ex_T_Array {
catch (Exception e) {
e.printStackTrace();
}
-
}
- private static void ReadDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void ReadDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long filetype_id = HDF5Constants.H5I_INVALID_HID;
- long memtype_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM0 };
- long[] adims = { ADIM0, ADIM1 };
+ long memtype_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM0};
+ long[] adims = {ADIM0, ADIM1};
int[][][] dset_data;
// Open an existing file.
@@ -196,7 +198,7 @@ public class H5Ex_T_Array {
// Allocate array of pointers to two-dimensional arrays (the
// elements of the dataset.
- dset_data = new int[(int) dims[0]][(int) (adims[0])][(int) (adims[1])];
+ dset_data = new int[(int)dims[0]][(int)(adims[0])][(int)(adims[1])];
// Create array datatypes for memory.
try {
@@ -210,7 +212,7 @@ public class H5Ex_T_Array {
try {
if ((dataset_id >= 0) && (memtype_id >= 0))
H5.H5Dread(dataset_id, memtype_id, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -264,10 +266,10 @@ public class H5Ex_T_Array {
catch (Exception e) {
e.printStackTrace();
}
-
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
H5Ex_T_Array.CreateDataset();
// Now we begin the read section of this example. Here we assume
// the dataset and array have the same name and rank, but can have
@@ -275,5 +277,4 @@ public class H5Ex_T_Array {
// data using malloc().
H5Ex_T_Array.ReadDataset();
}
-
}
diff --git a/java/examples/datatypes/H5Ex_T_ArrayAttribute.java b/java/examples/datatypes/H5Ex_T_ArrayAttribute.java
index c4c4bc4..45b44c1 100644
--- a/java/examples/datatypes/H5Ex_T_ArrayAttribute.java
+++ b/java/examples/datatypes/H5Ex_T_ArrayAttribute.java
@@ -24,24 +24,25 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5Ex_T_ArrayAttribute {
- private static String FILENAME = "H5Ex_T_ArrayAttribute.h5";
- private static String DATASETNAME = "DS1";
+ private static String FILENAME = "H5Ex_T_ArrayAttribute.h5";
+ private static String DATASETNAME = "DS1";
private static String ATTRIBUTENAME = "A1";
- private static final int DIM0 = 4;
- private static final int ADIM0 = 3;
- private static final int ADIM1 = 5;
- private static final int RANK = 1;
- private static final int NDIMS = 2;
-
- private static void CreateDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long filetype_id = HDF5Constants.H5I_INVALID_HID;
- long memtype_id = HDF5Constants.H5I_INVALID_HID;
- long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long attribute_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM0 };
- long[] adims = { ADIM0, ADIM1 };
+ private static final int DIM0 = 4;
+ private static final int ADIM0 = 3;
+ private static final int ADIM1 = 5;
+ private static final int RANK = 1;
+ private static final int NDIMS = 2;
+
+ private static void CreateDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long filetype_id = HDF5Constants.H5I_INVALID_HID;
+ long memtype_id = HDF5Constants.H5I_INVALID_HID;
+ long dataspace_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long attribute_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM0};
+ long[] adims = {ADIM0, ADIM1};
int[][][] dset_data = new int[DIM0][ADIM0][ADIM1];
// Initialize data. indx is the element in the dataspace, jndx and kndx the
@@ -54,7 +55,7 @@ public class H5Ex_T_ArrayAttribute {
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -81,7 +82,8 @@ public class H5Ex_T_ArrayAttribute {
dataspace_id = H5.H5Screate(HDF5Constants.H5S_SCALAR);
if (dataspace_id >= 0) {
dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
H5.H5Sclose(dataspace_id);
dataspace_id = HDF5Constants.H5I_INVALID_HID;
}
@@ -103,7 +105,7 @@ public class H5Ex_T_ArrayAttribute {
try {
if ((dataset_id >= 0) && (dataspace_id >= 0) && (filetype_id >= 0))
attribute_id = H5.H5Acreate(dataset_id, ATTRIBUTENAME, filetype_id, dataspace_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -170,17 +172,17 @@ public class H5Ex_T_ArrayAttribute {
catch (Exception e) {
e.printStackTrace();
}
-
}
- private static void ReadDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long filetype_id = HDF5Constants.H5I_INVALID_HID;
- long memtype_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ private static void ReadDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long filetype_id = HDF5Constants.H5I_INVALID_HID;
+ long memtype_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
long attribute_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM0 };
- long[] adims = { ADIM0, ADIM1 };
+ long[] dims = {DIM0};
+ long[] adims = {ADIM0, ADIM1};
int[][][] dset_data;
// Open an existing file.
@@ -203,7 +205,7 @@ public class H5Ex_T_ArrayAttribute {
try {
if (dataset_id >= 0)
attribute_id = H5.H5Aopen_by_name(dataset_id, ".", ATTRIBUTENAME, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -229,7 +231,7 @@ public class H5Ex_T_ArrayAttribute {
// Allocate array of pointers to two-dimensional arrays (the
// elements of the dataset.
- dset_data = new int[(int) dims[0]][(int) (adims[0])][(int) (adims[1])];
+ dset_data = new int[(int)dims[0]][(int)(adims[0])][(int)(adims[1])];
// Create array datatypes for memory.
try {
@@ -304,10 +306,10 @@ public class H5Ex_T_ArrayAttribute {
catch (Exception e) {
e.printStackTrace();
}
-
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
H5Ex_T_ArrayAttribute.CreateDataset();
// Now we begin the read section of this example. Here we assume
// the dataset and array have the same name and rank, but can have
@@ -315,5 +317,4 @@ public class H5Ex_T_ArrayAttribute {
// data using malloc().
H5Ex_T_ArrayAttribute.ReadDataset();
}
-
}
diff --git a/java/examples/datatypes/H5Ex_T_Bit.java b/java/examples/datatypes/H5Ex_T_Bit.java
index 45d4e8a..6d1a253 100644
--- a/java/examples/datatypes/H5Ex_T_Bit.java
+++ b/java/examples/datatypes/H5Ex_T_Bit.java
@@ -24,17 +24,18 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5Ex_T_Bit {
- private static String FILENAME = "H5Ex_T_Bit.h5";
+ private static String FILENAME = "H5Ex_T_Bit.h5";
private static String DATASETNAME = "DS1";
- private static final int DIM0 = 4;
- private static final int DIM1 = 7;
- private static final int RANK = 2;
+ private static final int DIM0 = 4;
+ private static final int DIM1 = 7;
+ private static final int RANK = 2;
- private static void CreateDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void CreateDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM0, DIM1 };
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM0, DIM1};
int[][] dset_data = new int[DIM0][DIM1];
// Initialize data.
@@ -42,15 +43,15 @@ public class H5Ex_T_Bit {
for (int jndx = 0; jndx < DIM1; jndx++) {
dset_data[indx][jndx] = 0;
dset_data[indx][jndx] |= (indx * jndx - jndx) & 0x03; /* Field "A" */
- dset_data[indx][jndx] |= (indx & 0x03) << 2; /* Field "B" */
- dset_data[indx][jndx] |= (jndx & 0x03) << 4; /* Field "C" */
+ dset_data[indx][jndx] |= (indx & 0x03) << 2; /* Field "B" */
+ dset_data[indx][jndx] |= (jndx & 0x03) << 4; /* Field "C" */
dset_data[indx][jndx] |= ((indx + jndx) & 0x03) << 6; /* Field "D" */
}
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -69,7 +70,8 @@ public class H5Ex_T_Bit {
try {
if ((file_id >= 0) && (dataspace_id >= 0))
dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_B8BE, dataspace_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -78,8 +80,8 @@ public class H5Ex_T_Bit {
// Write the bitfield data to the dataset.
try {
if (dataset_id >= 0)
- H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_B8, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_B8, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -111,14 +113,14 @@ public class H5Ex_T_Bit {
catch (Exception e) {
e.printStackTrace();
}
-
}
- private static void ReadDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void ReadDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM0, DIM1 };
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM0, DIM1};
int[][] dset_data;
// Open an existing file.
@@ -157,13 +159,13 @@ public class H5Ex_T_Bit {
// Allocate array of pointers to two-dimensional arrays (the
// elements of the dataset.
- dset_data = new int[(int) dims[0]][(int) (dims[1])];
+ dset_data = new int[(int)dims[0]][(int)(dims[1])];
// Read data.
try {
if (dataset_id >= 0)
- H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_B8, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_B8, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -209,10 +211,10 @@ public class H5Ex_T_Bit {
catch (Exception e) {
e.printStackTrace();
}
-
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
H5Ex_T_Bit.CreateDataset();
// Now we begin the read section of this example. Here we assume
// the dataset and array have the same name and rank, but can have
@@ -220,5 +222,4 @@ public class H5Ex_T_Bit {
// data using malloc().
H5Ex_T_Bit.ReadDataset();
}
-
}
diff --git a/java/examples/datatypes/H5Ex_T_BitAttribute.java b/java/examples/datatypes/H5Ex_T_BitAttribute.java
index 9b33ca5..3ad643a 100644
--- a/java/examples/datatypes/H5Ex_T_BitAttribute.java
+++ b/java/examples/datatypes/H5Ex_T_BitAttribute.java
@@ -24,19 +24,20 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5Ex_T_BitAttribute {
- private static String FILENAME = "H5Ex_T_BitAttribute.h5";
- private static String DATASETNAME = "DS1";
+ private static String FILENAME = "H5Ex_T_BitAttribute.h5";
+ private static String DATASETNAME = "DS1";
private static String ATTRIBUTENAME = "A1";
- private static final int DIM0 = 4;
- private static final int DIM1 = 7;
- private static final int RANK = 2;
+ private static final int DIM0 = 4;
+ private static final int DIM1 = 7;
+ private static final int RANK = 2;
- private static void CreateDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void CreateDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
long attribute_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM0, DIM1 };
+ long[] dims = {DIM0, DIM1};
int[][] dset_data = new int[DIM0][DIM1];
// Initialize data.
@@ -44,15 +45,15 @@ public class H5Ex_T_BitAttribute {
for (int jndx = 0; jndx < DIM1; jndx++) {
dset_data[indx][jndx] = 0;
dset_data[indx][jndx] |= (indx * jndx - jndx) & 0x03; /* Field "A" */
- dset_data[indx][jndx] |= (indx & 0x03) << 2; /* Field "B" */
- dset_data[indx][jndx] |= (jndx & 0x03) << 4; /* Field "C" */
+ dset_data[indx][jndx] |= (indx & 0x03) << 2; /* Field "B" */
+ dset_data[indx][jndx] |= (jndx & 0x03) << 4; /* Field "C" */
dset_data[indx][jndx] |= ((indx + jndx) & 0x03) << 6; /* Field "D" */
}
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -63,7 +64,8 @@ public class H5Ex_T_BitAttribute {
dataspace_id = H5.H5Screate(HDF5Constants.H5S_SCALAR);
if (dataspace_id >= 0) {
dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
H5.H5Sclose(dataspace_id);
dataspace_id = HDF5Constants.H5I_INVALID_HID;
}
@@ -84,8 +86,9 @@ public class H5Ex_T_BitAttribute {
// Create the attribute and write the array data to it.
try {
if ((dataset_id >= 0) && (dataspace_id >= 0))
- attribute_id = H5.H5Acreate(dataset_id, ATTRIBUTENAME, HDF5Constants.H5T_STD_B8BE, dataspace_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ attribute_id =
+ H5.H5Acreate(dataset_id, ATTRIBUTENAME, HDF5Constants.H5T_STD_B8BE, dataspace_id,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -134,15 +137,15 @@ public class H5Ex_T_BitAttribute {
catch (Exception e) {
e.printStackTrace();
}
-
}
- private static void ReadDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void ReadDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
long attribute_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM0, DIM1 };
+ long[] dims = {DIM0, DIM1};
int[][] dset_data;
// Open an existing file.
@@ -165,7 +168,7 @@ public class H5Ex_T_BitAttribute {
try {
if (dataset_id >= 0)
attribute_id = H5.H5Aopen_by_name(dataset_id, ".", ATTRIBUTENAME, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -190,7 +193,7 @@ public class H5Ex_T_BitAttribute {
// Allocate array of pointers to two-dimensional arrays (the
// elements of the dataset.
- dset_data = new int[(int) dims[0]][(int) (dims[1])];
+ dset_data = new int[(int)dims[0]][(int)(dims[1])];
// Read data.
try {
@@ -249,10 +252,10 @@ public class H5Ex_T_BitAttribute {
catch (Exception e) {
e.printStackTrace();
}
-
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
H5Ex_T_BitAttribute.CreateDataset();
// Now we begin the read section of this example. Here we assume
// the dataset and array have the same name and rank, but can have
@@ -260,5 +263,4 @@ public class H5Ex_T_BitAttribute {
// data using malloc().
H5Ex_T_BitAttribute.ReadDataset();
}
-
}
diff --git a/java/examples/datatypes/H5Ex_T_Commit.java b/java/examples/datatypes/H5Ex_T_Commit.java
index 62db5ea..44586ef 100644
--- a/java/examples/datatypes/H5Ex_T_Commit.java
+++ b/java/examples/datatypes/H5Ex_T_Commit.java
@@ -21,77 +21,74 @@
package examples.datatypes;
-import hdf.hdf5lib.H5;
-import hdf.hdf5lib.HDF5Constants;
-
import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;
+import hdf.hdf5lib.H5;
+import hdf.hdf5lib.HDF5Constants;
+
public class H5Ex_T_Commit {
- private static String FILENAME = "H5Ex_T_Commit.h5";
- private static String DATATYPENAME = "Sensor_Type";
- protected static final int INTEGERSIZE = 4;
- protected static final int DOUBLESIZE = 8;
+ private static String FILENAME = "H5Ex_T_Commit.h5";
+ private static String DATATYPENAME = "Sensor_Type";
+ protected static final int INTEGERSIZE = 4;
+ protected static final int DOUBLESIZE = 8;
protected final static int MAXSTRINGSIZE = 80;
// Values for the various classes of datatypes
enum H5T_class {
- H5T_NO_CLASS(HDF5Constants.H5T_NO_CLASS), // error
- H5T_INTEGER(HDF5Constants.H5T_INTEGER), // integer types
- H5T_FLOAT(HDF5Constants.H5T_FLOAT), // floating-point types
- H5T_TIME(HDF5Constants.H5T_TIME), // date and time types
- H5T_STRING(HDF5Constants.H5T_STRING), // character string types
- H5T_BITFIELD(HDF5Constants.H5T_BITFIELD), // bit field types
- H5T_OPAQUE(HDF5Constants.H5T_OPAQUE), // opaque types
- H5T_COMPOUND(HDF5Constants.H5T_COMPOUND), // compound types
+ H5T_NO_CLASS(HDF5Constants.H5T_NO_CLASS), // error
+ H5T_INTEGER(HDF5Constants.H5T_INTEGER), // integer types
+ H5T_FLOAT(HDF5Constants.H5T_FLOAT), // floating-point types
+ H5T_TIME(HDF5Constants.H5T_TIME), // date and time types
+ H5T_STRING(HDF5Constants.H5T_STRING), // character string types
+ H5T_BITFIELD(HDF5Constants.H5T_BITFIELD), // bit field types
+ H5T_OPAQUE(HDF5Constants.H5T_OPAQUE), // opaque types
+ H5T_COMPOUND(HDF5Constants.H5T_COMPOUND), // compound types
H5T_REFERENCE(HDF5Constants.H5T_REFERENCE), // reference types
- H5T_ENUM(HDF5Constants.H5T_ENUM), // enumeration types
- H5T_VLEN(HDF5Constants.H5T_VLEN), // Variable-Length types
- H5T_ARRAY(HDF5Constants.H5T_ARRAY), // Array types
- H5T_NCLASSES(11); // this must be last
+ H5T_ENUM(HDF5Constants.H5T_ENUM), // enumeration types
+ H5T_VLEN(HDF5Constants.H5T_VLEN), // Variable-Length types
+ H5T_ARRAY(HDF5Constants.H5T_ARRAY), // Array types
+ H5T_NCLASSES(11); // this must be last
private static final Map<Long, H5T_class> lookup = new HashMap<Long, H5T_class>();
- static {
+ static
+ {
for (H5T_class s : EnumSet.allOf(H5T_class.class))
lookup.put(s.getCode(), s);
}
private long code;
- H5T_class(long layout_type) {
- this.code = layout_type;
- }
+ H5T_class(long layout_type) { this.code = layout_type; }
- public long getCode() {
- return this.code;
- }
+ public long getCode() { return this.code; }
- public static H5T_class get(long typeclass_id) {
- return lookup.get(typeclass_id);
- }
+ public static H5T_class get(long typeclass_id) { return lookup.get(typeclass_id); }
}
// The supporting Sensor_Datatype class.
private static class Sensor_Datatype {
static int numberMembers = 4;
- static int[] memberDims = { 1, 1, 1, 1 };
+ static int[] memberDims = {1, 1, 1, 1};
- String[] memberNames = { "Serial number", "Location", "Temperature (F)", "Pressure (inHg)" };
- long[] memberFileTypes = { HDF5Constants.H5T_STD_I32BE, HDF5Constants.H5T_C_S1, HDF5Constants.H5T_IEEE_F64BE,
- HDF5Constants.H5T_IEEE_F64BE };
- static int[] memberStorage = { INTEGERSIZE, MAXSTRINGSIZE, DOUBLESIZE, DOUBLESIZE };
+ String[] memberNames = {"Serial number", "Location", "Temperature (F)", "Pressure (inHg)"};
+ long[] memberFileTypes = {HDF5Constants.H5T_STD_I32BE, HDF5Constants.H5T_C_S1,
+ HDF5Constants.H5T_IEEE_F64BE, HDF5Constants.H5T_IEEE_F64BE};
+ static int[] memberStorage = {INTEGERSIZE, MAXSTRINGSIZE, DOUBLESIZE, DOUBLESIZE};
// Data size is the storage size for the members not the object.
- static long getDataSize() {
+ static long getDataSize()
+ {
long data_size = 0;
for (int indx = 0; indx < numberMembers; indx++)
data_size += memberStorage[indx] * memberDims[indx];
return data_size;
}
- static int getOffset(int memberItem) {
+ static int getOffset(int memberItem)
+ {
int data_offset = 0;
for (int indx = 0; indx < memberItem; indx++)
data_offset += memberStorage[indx];
@@ -99,15 +96,16 @@ public class H5Ex_T_Commit {
}
}
- private static void CreateDataType() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long strtype_id = HDF5Constants.H5I_INVALID_HID;
- long filetype_id = HDF5Constants.H5I_INVALID_HID;
+ private static void CreateDataType()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long strtype_id = HDF5Constants.H5I_INVALID_HID;
+ long filetype_id = HDF5Constants.H5I_INVALID_HID;
Sensor_Datatype datatypes = new Sensor_Datatype();
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -134,7 +132,8 @@ public class H5Ex_T_Commit {
long type_id = datatypes.memberFileTypes[indx];
if (type_id == HDF5Constants.H5T_C_S1)
type_id = strtype_id;
- H5.H5Tinsert(filetype_id, datatypes.memberNames[indx], Sensor_Datatype.getOffset(indx), type_id);
+ H5.H5Tinsert(filetype_id, datatypes.memberNames[indx], Sensor_Datatype.getOffset(indx),
+ type_id);
}
}
}
@@ -145,8 +144,8 @@ public class H5Ex_T_Commit {
// Commit the compound datatype to the file, creating a named datatype.
try {
if ((file_id >= 0) && (filetype_id >= 0))
- H5.H5Tcommit(file_id, DATATYPENAME, filetype_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ H5.H5Tcommit(file_id, DATATYPENAME, filetype_id, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -178,13 +177,13 @@ public class H5Ex_T_Commit {
catch (Exception e) {
e.printStackTrace();
}
-
}
- private static void ReadDataType() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void ReadDataType()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long typeclass_id = HDF5Constants.H5I_INVALID_HID;
- long filetype_id = HDF5Constants.H5I_INVALID_HID;
+ long filetype_id = HDF5Constants.H5I_INVALID_HID;
// Open an existing file.
try {
@@ -247,10 +246,10 @@ public class H5Ex_T_Commit {
catch (Exception e) {
e.printStackTrace();
}
-
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
H5Ex_T_Commit.CreateDataType();
// Now we begin the read section of this example. Here we assume
// the dataset and array have the same name and rank, but can have
@@ -258,5 +257,4 @@ public class H5Ex_T_Commit {
// data using malloc().
H5Ex_T_Commit.ReadDataType();
}
-
}
diff --git a/java/examples/datatypes/H5Ex_T_Compound.java b/java/examples/datatypes/H5Ex_T_Compound.java
index 8c83ebb..a78d0e3 100644
--- a/java/examples/datatypes/H5Ex_T_Compound.java
+++ b/java/examples/datatypes/H5Ex_T_Compound.java
@@ -20,49 +20,52 @@
package examples.datatypes;
-import hdf.hdf5lib.H5;
-import hdf.hdf5lib.HDF5Constants;
-
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.charset.Charset;
+import hdf.hdf5lib.H5;
+import hdf.hdf5lib.HDF5Constants;
+
public class H5Ex_T_Compound {
- private static String FILENAME = "H5Ex_T_Compound.h5";
- private static String DATASETNAME = "DS1";
- private static final int DIM0 = 4;
- private static final int RANK = 1;
- protected static final int INTEGERSIZE = 4;
- protected static final int DOUBLESIZE = 8;
+ private static String FILENAME = "H5Ex_T_Compound.h5";
+ private static String DATASETNAME = "DS1";
+ private static final int DIM0 = 4;
+ private static final int RANK = 1;
+ protected static final int INTEGERSIZE = 4;
+ protected static final int DOUBLESIZE = 8;
protected final static int MAXSTRINGSIZE = 80;
static class Sensor_Datatype {
static int numberMembers = 4;
- static int[] memberDims = { 1, 1, 1, 1 };
+ static int[] memberDims = {1, 1, 1, 1};
- static String[] memberNames = { "Serial number", "Location", "Temperature (F)", "Pressure (inHg)" };
- static long[] memberMemTypes = { HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5T_C_S1,
- HDF5Constants.H5T_NATIVE_DOUBLE, HDF5Constants.H5T_NATIVE_DOUBLE };
- static long[] memberFileTypes = { HDF5Constants.H5T_STD_I32BE, HDF5Constants.H5T_C_S1,
- HDF5Constants.H5T_IEEE_F64BE, HDF5Constants.H5T_IEEE_F64BE };
- static int[] memberStorage = { INTEGERSIZE, MAXSTRINGSIZE, DOUBLESIZE, DOUBLESIZE };
+ static String[] memberNames = {"Serial number", "Location", "Temperature (F)", "Pressure (inHg)"};
+ static long[] memberMemTypes = {HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5T_C_S1,
+ HDF5Constants.H5T_NATIVE_DOUBLE, HDF5Constants.H5T_NATIVE_DOUBLE};
+ static long[] memberFileTypes = {HDF5Constants.H5T_STD_I32BE, HDF5Constants.H5T_C_S1,
+ HDF5Constants.H5T_IEEE_F64BE, HDF5Constants.H5T_IEEE_F64BE};
+ static int[] memberStorage = {INTEGERSIZE, MAXSTRINGSIZE, DOUBLESIZE, DOUBLESIZE};
// Data size is the storage size for the members.
- static long getTotalDataSize() {
+ static long getTotalDataSize()
+ {
long data_size = 0;
for (int indx = 0; indx < numberMembers; indx++)
data_size += memberStorage[indx] * memberDims[indx];
return DIM0 * data_size;
}
- static long getDataSize() {
+ static long getDataSize()
+ {
long data_size = 0;
for (int indx = 0; indx < numberMembers; indx++)
data_size += memberStorage[indx] * memberDims[indx];
return data_size;
}
- static int getOffset(int memberItem) {
+ static int getOffset(int memberItem)
+ {
int data_offset = 0;
for (int indx = 0; indx < memberItem; indx++)
data_offset += memberStorage[indx];
@@ -76,60 +79,63 @@ public class H5Ex_T_Compound {
public double temperature;
public double pressure;
- Sensor(int serial_no, String location, double temperature, double pressure) {
- this.serial_no = serial_no;
- this.location = location;
+ Sensor(int serial_no, String location, double temperature, double pressure)
+ {
+ this.serial_no = serial_no;
+ this.location = location;
this.temperature = temperature;
- this.pressure = pressure;
+ this.pressure = pressure;
}
- Sensor(ByteBuffer databuf, int dbposition) {
- readBuffer(databuf, dbposition);
- }
+ Sensor(ByteBuffer databuf, int dbposition) { readBuffer(databuf, dbposition); }
- void writeBuffer(ByteBuffer databuf, int dbposition) {
+ void writeBuffer(ByteBuffer databuf, int dbposition)
+ {
databuf.putInt(dbposition + Sensor_Datatype.getOffset(0), serial_no);
byte[] temp_str = location.getBytes(Charset.forName("UTF-8"));
- int arraylen = (temp_str.length > MAXSTRINGSIZE) ? MAXSTRINGSIZE : temp_str.length;
+ int arraylen = (temp_str.length > MAXSTRINGSIZE) ? MAXSTRINGSIZE : temp_str.length;
for (int ndx = 0; ndx < arraylen; ndx++)
databuf.put(dbposition + Sensor_Datatype.getOffset(1) + ndx, temp_str[ndx]);
for (int ndx = arraylen; ndx < MAXSTRINGSIZE; ndx++)
- databuf.put(dbposition + Sensor_Datatype.getOffset(1) + arraylen, (byte) 0);
+ databuf.put(dbposition + Sensor_Datatype.getOffset(1) + arraylen, (byte)0);
databuf.putDouble(dbposition + Sensor_Datatype.getOffset(2), temperature);
databuf.putDouble(dbposition + Sensor_Datatype.getOffset(3), pressure);
}
- void readBuffer(ByteBuffer databuf, int dbposition) {
- this.serial_no = databuf.getInt(dbposition + Sensor_Datatype.getOffset(0));
+ void readBuffer(ByteBuffer databuf, int dbposition)
+ {
+ this.serial_no = databuf.getInt(dbposition + Sensor_Datatype.getOffset(0));
ByteBuffer stringbuf = databuf.duplicate();
stringbuf.position(dbposition + Sensor_Datatype.getOffset(1));
stringbuf.limit(dbposition + Sensor_Datatype.getOffset(1) + MAXSTRINGSIZE);
byte[] bytearr = new byte[stringbuf.remaining()];
stringbuf.get(bytearr);
- this.location = new String(bytearr, Charset.forName("UTF-8")).trim();
+ this.location = new String(bytearr, Charset.forName("UTF-8")).trim();
this.temperature = databuf.getDouble(dbposition + Sensor_Datatype.getOffset(2));
- this.pressure = databuf.getDouble(dbposition + Sensor_Datatype.getOffset(3));
+ this.pressure = databuf.getDouble(dbposition + Sensor_Datatype.getOffset(3));
}
@Override
- public String toString() {
- return String.format("Serial number : " + serial_no + "%n" +
- "Location : " + location + "%n" +
- "Temperature (F) : " + temperature + "%n" +
- "Pressure (inHg) : " + pressure + "%n");
+ public String toString()
+ {
+ return String.format("Serial number : " + serial_no + "%n"
+ + "Location : " + location + "%n"
+ + "Temperature (F) : " + temperature + "%n"
+ + "Pressure (inHg) : " + pressure + "%n");
}
}
- private static void CreateDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long strtype_id = HDF5Constants.H5I_INVALID_HID;
- long memtype_id = HDF5Constants.H5I_INVALID_HID;
- long filetype_id = HDF5Constants.H5I_INVALID_HID;
- long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM0 };
+ private static void CreateDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long strtype_id = HDF5Constants.H5I_INVALID_HID;
+ long memtype_id = HDF5Constants.H5I_INVALID_HID;
+ long filetype_id = HDF5Constants.H5I_INVALID_HID;
+ long dataspace_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM0};
Sensor[] object_data = new Sensor[DIM0];
- byte[] dset_data = null;
+ byte[] dset_data = null;
// Initialize data.
object_data[0] = new Sensor(1153, new String("Exterior (static)"), 53.23, 24.57);
@@ -140,7 +146,7 @@ public class H5Ex_T_Compound {
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -164,8 +170,8 @@ public class H5Ex_T_Compound {
long type_id = Sensor_Datatype.memberMemTypes[indx];
if (type_id == HDF5Constants.H5T_C_S1)
type_id = strtype_id;
- H5.H5Tinsert(memtype_id, Sensor_Datatype.memberNames[indx], Sensor_Datatype.getOffset(indx),
- type_id);
+ H5.H5Tinsert(memtype_id, Sensor_Datatype.memberNames[indx],
+ Sensor_Datatype.getOffset(indx), type_id);
}
}
}
@@ -184,8 +190,8 @@ public class H5Ex_T_Compound {
long type_id = Sensor_Datatype.memberFileTypes[indx];
if (type_id == HDF5Constants.H5T_C_S1)
type_id = strtype_id;
- H5.H5Tinsert(filetype_id, Sensor_Datatype.memberNames[indx], Sensor_Datatype.getOffset(indx),
- type_id);
+ H5.H5Tinsert(filetype_id, Sensor_Datatype.memberNames[indx],
+ Sensor_Datatype.getOffset(indx), type_id);
}
}
}
@@ -205,8 +211,9 @@ public class H5Ex_T_Compound {
// Create the dataset.
try {
if ((file_id >= 0) && (dataspace_id >= 0) && (filetype_id >= 0))
- dataset_id = H5.H5Dcreate(file_id, DATASETNAME, filetype_id, dataspace_id, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ dataset_id =
+ H5.H5Dcreate(file_id, DATASETNAME, filetype_id, dataspace_id, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -214,16 +221,16 @@ public class H5Ex_T_Compound {
// Write the compound data to the dataset.
// allocate memory for read buffer.
- dset_data = new byte[(int)dims[0] * (int)Sensor_Datatype.getDataSize()];
+ dset_data = new byte[(int)dims[0] * (int)Sensor_Datatype.getDataSize()];
ByteBuffer outBuf = ByteBuffer.wrap(dset_data);
outBuf.order(ByteOrder.nativeOrder());
- for (int indx = 0; indx < (int) dims[0]; indx++) {
+ for (int indx = 0; indx < (int)dims[0]; indx++) {
object_data[indx].writeBuffer(outBuf, indx * (int)Sensor_Datatype.getDataSize());
}
try {
if ((dataset_id >= 0) && (memtype_id >= 0))
H5.H5Dwrite(dataset_id, memtype_id, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -281,16 +288,16 @@ public class H5Ex_T_Compound {
catch (Exception e) {
e.printStackTrace();
}
-
}
- private static void ReadDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long strtype_id = HDF5Constants.H5I_INVALID_HID;
- long memtype_id = HDF5Constants.H5I_INVALID_HID;
+ private static void ReadDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long strtype_id = HDF5Constants.H5I_INVALID_HID;
+ long memtype_id = HDF5Constants.H5I_INVALID_HID;
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM0 };
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM0};
Sensor[] object_data2;
byte[] dset_data;
@@ -346,8 +353,8 @@ public class H5Ex_T_Compound {
long type_id = Sensor_Datatype.memberMemTypes[indx];
if (type_id == HDF5Constants.H5T_C_S1)
type_id = strtype_id;
- H5.H5Tinsert(memtype_id, Sensor_Datatype.memberNames[indx], Sensor_Datatype.getOffset(indx),
- type_id);
+ H5.H5Tinsert(memtype_id, Sensor_Datatype.memberNames[indx],
+ Sensor_Datatype.getOffset(indx), type_id);
}
}
}
@@ -356,19 +363,19 @@ public class H5Ex_T_Compound {
}
// allocate memory for read buffer.
- dset_data = new byte[(int) dims[0] * (int)Sensor_Datatype.getDataSize()];
+ dset_data = new byte[(int)dims[0] * (int)Sensor_Datatype.getDataSize()];
- object_data2 = new Sensor[(int) dims[0]];
+ object_data2 = new Sensor[(int)dims[0]];
// Read data.
try {
if ((dataset_id >= 0) && (memtype_id >= 0))
H5.H5Dread(dataset_id, memtype_id, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ HDF5Constants.H5P_DEFAULT, dset_data);
ByteBuffer inBuf = ByteBuffer.wrap(dset_data);
inBuf.order(ByteOrder.nativeOrder());
- for (int indx = 0; indx < (int) dims[0]; indx++) {
+ for (int indx = 0; indx < (int)dims[0]; indx++) {
object_data2[indx] = new Sensor(inBuf, indx * (int)Sensor_Datatype.getDataSize());
}
}
@@ -425,10 +432,10 @@ public class H5Ex_T_Compound {
catch (Exception e) {
e.printStackTrace();
}
-
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
H5Ex_T_Compound.CreateDataset();
// Now we begin the read section of this example. Here we assume
// the dataset and array have the same name and rank, but can have
@@ -436,5 +443,4 @@ public class H5Ex_T_Compound {
// data using malloc().
H5Ex_T_Compound.ReadDataset();
}
-
}
diff --git a/java/examples/datatypes/H5Ex_T_CompoundAttribute.java b/java/examples/datatypes/H5Ex_T_CompoundAttribute.java
index 58d2fb7..f331a1e 100644
--- a/java/examples/datatypes/H5Ex_T_CompoundAttribute.java
+++ b/java/examples/datatypes/H5Ex_T_CompoundAttribute.java
@@ -20,52 +20,55 @@
package examples.datatypes;
-import hdf.hdf5lib.H5;
-import hdf.hdf5lib.HDF5Constants;
-
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.charset.Charset;
+import hdf.hdf5lib.H5;
+import hdf.hdf5lib.HDF5Constants;
+
public class H5Ex_T_CompoundAttribute {
- private static String FILENAME = "H5Ex_T_CompoundAttribute.h5";
- private static String DATASETNAME = "DS1";
- private static String ATTRIBUTENAME = "A1";
- private static final int DIM0 = 4;
- private static final int RANK = 1;
- protected static final int INTEGERSIZE = 4;
- protected static final int DOUBLESIZE = 8;
+ private static String FILENAME = "H5Ex_T_CompoundAttribute.h5";
+ private static String DATASETNAME = "DS1";
+ private static String ATTRIBUTENAME = "A1";
+ private static final int DIM0 = 4;
+ private static final int RANK = 1;
+ protected static final int INTEGERSIZE = 4;
+ protected static final int DOUBLESIZE = 8;
protected final static int MAXSTRINGSIZE = 80;
// Using Java Externalization will add a two-byte object header in
// the stream, which needs to be called out in the datatypes.
static class Sensor_Datatype {
static int numberMembers = 4;
- static int[] memberDims = { 1, 1, 1, 1 };
+ static int[] memberDims = {1, 1, 1, 1};
- static String[] memberNames = { "Serial number", "Location", "Temperature (F)", "Pressure (inHg)" };
- static long[] memberMemTypes = { HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5T_C_S1,
- HDF5Constants.H5T_NATIVE_DOUBLE, HDF5Constants.H5T_NATIVE_DOUBLE };
- static long[] memberFileTypes = { HDF5Constants.H5T_STD_I32BE, HDF5Constants.H5T_C_S1,
- HDF5Constants.H5T_IEEE_F64BE, HDF5Constants.H5T_IEEE_F64BE };
- static int[] memberStorage = { INTEGERSIZE, MAXSTRINGSIZE, DOUBLESIZE, DOUBLESIZE };
+ static String[] memberNames = {"Serial number", "Location", "Temperature (F)", "Pressure (inHg)"};
+ static long[] memberMemTypes = {HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5T_C_S1,
+ HDF5Constants.H5T_NATIVE_DOUBLE, HDF5Constants.H5T_NATIVE_DOUBLE};
+ static long[] memberFileTypes = {HDF5Constants.H5T_STD_I32BE, HDF5Constants.H5T_C_S1,
+ HDF5Constants.H5T_IEEE_F64BE, HDF5Constants.H5T_IEEE_F64BE};
+ static int[] memberStorage = {INTEGERSIZE, MAXSTRINGSIZE, DOUBLESIZE, DOUBLESIZE};
// Data size is the storage size for the members not the object.
- static long getTotalDataSize() {
+ static long getTotalDataSize()
+ {
long data_size = 0;
for (int indx = 0; indx < numberMembers; indx++)
data_size += memberStorage[indx] * memberDims[indx];
return DIM0 * data_size;
}
- static long getDataSize() {
+ static long getDataSize()
+ {
long data_size = 0;
for (int indx = 0; indx < numberMembers; indx++)
data_size += memberStorage[indx] * memberDims[indx];
return data_size;
}
- static int getOffset(int memberItem) {
+ static int getOffset(int memberItem)
+ {
int data_offset = 0;
for (int indx = 0; indx < memberItem; indx++)
data_offset += memberStorage[indx];
@@ -79,61 +82,64 @@ public class H5Ex_T_CompoundAttribute {
public double temperature;
public double pressure;
- Sensor(int serial_no, String location, double temperature, double pressure) {
- this.serial_no = serial_no;
- this.location = location;
+ Sensor(int serial_no, String location, double temperature, double pressure)
+ {
+ this.serial_no = serial_no;
+ this.location = location;
this.temperature = temperature;
- this.pressure = pressure;
+ this.pressure = pressure;
}
- Sensor(ByteBuffer databuf, int dbposition) {
- readBuffer(databuf, dbposition);
- }
+ Sensor(ByteBuffer databuf, int dbposition) { readBuffer(databuf, dbposition); }
- void writeBuffer(ByteBuffer databuf, int dbposition) {
+ void writeBuffer(ByteBuffer databuf, int dbposition)
+ {
databuf.putInt(dbposition + Sensor_Datatype.getOffset(0), serial_no);
byte[] temp_str = location.getBytes(Charset.forName("UTF-8"));
- int arraylen = (temp_str.length > MAXSTRINGSIZE) ? MAXSTRINGSIZE : temp_str.length;
+ int arraylen = (temp_str.length > MAXSTRINGSIZE) ? MAXSTRINGSIZE : temp_str.length;
for (int ndx = 0; ndx < arraylen; ndx++)
databuf.put(dbposition + Sensor_Datatype.getOffset(1) + ndx, temp_str[ndx]);
for (int ndx = arraylen; ndx < MAXSTRINGSIZE; ndx++)
- databuf.put(dbposition + Sensor_Datatype.getOffset(1) + arraylen, (byte) 0);
+ databuf.put(dbposition + Sensor_Datatype.getOffset(1) + arraylen, (byte)0);
databuf.putDouble(dbposition + Sensor_Datatype.getOffset(2), temperature);
databuf.putDouble(dbposition + Sensor_Datatype.getOffset(3), pressure);
}
- void readBuffer(ByteBuffer databuf, int dbposition) {
- this.serial_no = databuf.getInt(dbposition + Sensor_Datatype.getOffset(0));
+ void readBuffer(ByteBuffer databuf, int dbposition)
+ {
+ this.serial_no = databuf.getInt(dbposition + Sensor_Datatype.getOffset(0));
ByteBuffer stringbuf = databuf.duplicate();
stringbuf.position(dbposition + Sensor_Datatype.getOffset(1));
stringbuf.limit(dbposition + Sensor_Datatype.getOffset(1) + MAXSTRINGSIZE);
byte[] bytearr = new byte[stringbuf.remaining()];
stringbuf.get(bytearr);
- this.location = new String(bytearr, Charset.forName("UTF-8")).trim();
+ this.location = new String(bytearr, Charset.forName("UTF-8")).trim();
this.temperature = databuf.getDouble(dbposition + Sensor_Datatype.getOffset(2));
- this.pressure = databuf.getDouble(dbposition + Sensor_Datatype.getOffset(3));
+ this.pressure = databuf.getDouble(dbposition + Sensor_Datatype.getOffset(3));
}
@Override
- public String toString() {
- return String.format("Serial number : " + serial_no + "%n" +
- "Location : " + location + "%n" +
- "Temperature (F) : " + temperature + "%n" +
- "Pressure (inHg) : " + pressure + "%n");
+ public String toString()
+ {
+ return String.format("Serial number : " + serial_no + "%n"
+ + "Location : " + location + "%n"
+ + "Temperature (F) : " + temperature + "%n"
+ + "Pressure (inHg) : " + pressure + "%n");
}
}
- private static void CreateDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long strtype_id = HDF5Constants.H5I_INVALID_HID;
- long memtype_id = HDF5Constants.H5I_INVALID_HID;
- long filetype_id = HDF5Constants.H5I_INVALID_HID;
- long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long attribute_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM0 };
+ private static void CreateDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long strtype_id = HDF5Constants.H5I_INVALID_HID;
+ long memtype_id = HDF5Constants.H5I_INVALID_HID;
+ long filetype_id = HDF5Constants.H5I_INVALID_HID;
+ long dataspace_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long attribute_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM0};
Sensor[] object_data = new Sensor[DIM0];
- byte[] dset_data = null;
+ byte[] dset_data = null;
// Initialize data.
object_data[0] = new Sensor(1153, new String("Exterior (static)"), 53.23, 24.57);
@@ -144,7 +150,7 @@ public class H5Ex_T_CompoundAttribute {
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -168,8 +174,8 @@ public class H5Ex_T_CompoundAttribute {
long type_id = Sensor_Datatype.memberMemTypes[indx];
if (type_id == HDF5Constants.H5T_C_S1)
type_id = strtype_id;
- H5.H5Tinsert(memtype_id, Sensor_Datatype.memberNames[indx], Sensor_Datatype.getOffset(indx),
- type_id);
+ H5.H5Tinsert(memtype_id, Sensor_Datatype.memberNames[indx],
+ Sensor_Datatype.getOffset(indx), type_id);
}
}
}
@@ -188,8 +194,8 @@ public class H5Ex_T_CompoundAttribute {
long type_id = Sensor_Datatype.memberFileTypes[indx];
if (type_id == HDF5Constants.H5T_C_S1)
type_id = strtype_id;
- H5.H5Tinsert(filetype_id, Sensor_Datatype.memberNames[indx], Sensor_Datatype.getOffset(indx),
- type_id);
+ H5.H5Tinsert(filetype_id, Sensor_Datatype.memberNames[indx],
+ Sensor_Datatype.getOffset(indx), type_id);
}
}
}
@@ -202,7 +208,8 @@ public class H5Ex_T_CompoundAttribute {
dataspace_id = H5.H5Screate(HDF5Constants.H5S_SCALAR);
if (dataspace_id >= 0) {
dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
H5.H5Sclose(dataspace_id);
dataspace_id = HDF5Constants.H5I_INVALID_HID;
}
@@ -224,17 +231,17 @@ public class H5Ex_T_CompoundAttribute {
try {
if ((dataset_id >= 0) && (dataspace_id >= 0) && (filetype_id >= 0))
attribute_id = H5.H5Acreate(dataset_id, ATTRIBUTENAME, filetype_id, dataspace_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
}
// Write the compound data.
- dset_data = new byte[(int) dims[0] * (int)Sensor_Datatype.getDataSize()];
+ dset_data = new byte[(int)dims[0] * (int)Sensor_Datatype.getDataSize()];
ByteBuffer outBuf = ByteBuffer.wrap(dset_data);
outBuf.order(ByteOrder.nativeOrder());
- for (int indx = 0; indx < (int) dims[0]; indx++) {
+ for (int indx = 0; indx < (int)dims[0]; indx++) {
object_data[indx].writeBuffer(outBuf, indx * (int)Sensor_Datatype.getDataSize());
}
try {
@@ -305,17 +312,17 @@ public class H5Ex_T_CompoundAttribute {
catch (Exception e) {
e.printStackTrace();
}
-
}
- private static void ReadDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long strtype_id = HDF5Constants.H5I_INVALID_HID;
- long memtype_id = HDF5Constants.H5I_INVALID_HID;
+ private static void ReadDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long strtype_id = HDF5Constants.H5I_INVALID_HID;
+ long memtype_id = HDF5Constants.H5I_INVALID_HID;
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
long attribute_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM0 };
+ long[] dims = {DIM0};
Sensor[] object_data2;
byte[] dset_data;
@@ -339,7 +346,7 @@ public class H5Ex_T_CompoundAttribute {
try {
if (dataset_id >= 0)
attribute_id = H5.H5Aopen_by_name(dataset_id, ".", ATTRIBUTENAME, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -382,8 +389,8 @@ public class H5Ex_T_CompoundAttribute {
long type_id = Sensor_Datatype.memberMemTypes[indx];
if (type_id == HDF5Constants.H5T_C_S1)
type_id = strtype_id;
- H5.H5Tinsert(memtype_id, Sensor_Datatype.memberNames[indx], Sensor_Datatype.getOffset(indx),
- type_id);
+ H5.H5Tinsert(memtype_id, Sensor_Datatype.memberNames[indx],
+ Sensor_Datatype.getOffset(indx), type_id);
}
}
}
@@ -392,9 +399,9 @@ public class H5Ex_T_CompoundAttribute {
}
// allocate memory for read buffer.
- dset_data = new byte[(int) dims[0] * (int)Sensor_Datatype.getDataSize()];
+ dset_data = new byte[(int)dims[0] * (int)Sensor_Datatype.getDataSize()];
- object_data2 = new Sensor[(int) dims[0]];
+ object_data2 = new Sensor[(int)dims[0]];
// Read data.
try {
@@ -403,7 +410,7 @@ public class H5Ex_T_CompoundAttribute {
ByteBuffer inBuf = ByteBuffer.wrap(dset_data);
inBuf.order(ByteOrder.nativeOrder());
- for (int indx = 0; indx < (int) dims[0]; indx++) {
+ for (int indx = 0; indx < (int)dims[0]; indx++) {
object_data2[indx] = new Sensor(inBuf, indx * (int)Sensor_Datatype.getDataSize());
}
}
@@ -468,10 +475,10 @@ public class H5Ex_T_CompoundAttribute {
catch (Exception e) {
e.printStackTrace();
}
-
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
H5Ex_T_CompoundAttribute.CreateDataset();
// Now we begin the read section of this example. Here we assume
// the dataset and array have the same name and rank, but can have
@@ -479,5 +486,4 @@ public class H5Ex_T_CompoundAttribute {
// data using malloc().
H5Ex_T_CompoundAttribute.ReadDataset();
}
-
}
diff --git a/java/examples/datatypes/H5Ex_T_Float.java b/java/examples/datatypes/H5Ex_T_Float.java
index e8da7f6..9ca099e 100644
--- a/java/examples/datatypes/H5Ex_T_Float.java
+++ b/java/examples/datatypes/H5Ex_T_Float.java
@@ -28,17 +28,18 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5Ex_T_Float {
- private static String FILENAME = "H5Ex_T_Float.h5";
+ private static String FILENAME = "H5Ex_T_Float.h5";
private static String DATASETNAME = "DS1";
- private static final int DIM0 = 4;
- private static final int DIM1 = 7;
- private static final int RANK = 2;
-
- private static void CreateDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM0, DIM1 };
+ private static final int DIM0 = 4;
+ private static final int DIM1 = 7;
+ private static final int RANK = 2;
+
+ private static void CreateDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long dataspace_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM0, DIM1};
double[][] dset_data = new double[DIM0][DIM1];
// Initialize data.
@@ -50,7 +51,7 @@ public class H5Ex_T_Float {
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -73,7 +74,8 @@ public class H5Ex_T_Float {
try {
if ((file_id >= 0) && (dataspace_id >= 0))
dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_IEEE_F64LE, dataspace_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -82,8 +84,8 @@ public class H5Ex_T_Float {
// Write the data to the dataset.
try {
if (dataset_id >= 0)
- H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_DOUBLE, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_DOUBLE, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -115,14 +117,14 @@ public class H5Ex_T_Float {
catch (Exception e) {
e.printStackTrace();
}
-
}
- private static void ReadDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void ReadDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM0, DIM1 };
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM0, DIM1};
double[][] dset_data;
// Open an existing file.
@@ -161,13 +163,13 @@ public class H5Ex_T_Float {
// Allocate array of pointers to two-dimensional arrays (the
// elements of the dataset.
- dset_data = new double[(int) dims[0]][(int) (dims[1])];
+ dset_data = new double[(int)dims[0]][(int)(dims[1])];
// Read data.
try {
if (dataset_id >= 0)
- H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_DOUBLE, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_DOUBLE, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -211,10 +213,10 @@ public class H5Ex_T_Float {
catch (Exception e) {
e.printStackTrace();
}
-
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
H5Ex_T_Float.CreateDataset();
// Now we begin the read section of this example. Here we assume
// the dataset and array have the same name and rank, but can have
@@ -222,5 +224,4 @@ public class H5Ex_T_Float {
// data using malloc().
H5Ex_T_Float.ReadDataset();
}
-
}
diff --git a/java/examples/datatypes/H5Ex_T_FloatAttribute.java b/java/examples/datatypes/H5Ex_T_FloatAttribute.java
index eb8e1f8..426c4dd 100644
--- a/java/examples/datatypes/H5Ex_T_FloatAttribute.java
+++ b/java/examples/datatypes/H5Ex_T_FloatAttribute.java
@@ -28,19 +28,20 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5Ex_T_FloatAttribute {
- private static String FILENAME = "H5Ex_T_FloatAttribute.h5";
- private static String DATASETNAME = "DS1";
+ private static String FILENAME = "H5Ex_T_FloatAttribute.h5";
+ private static String DATASETNAME = "DS1";
private static String ATTRIBUTENAME = "A1";
- private static final int DIM0 = 4;
- private static final int DIM1 = 7;
- private static final int RANK = 2;
-
- private static void CreateDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long attribute_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM0, DIM1 };
+ private static final int DIM0 = 4;
+ private static final int DIM1 = 7;
+ private static final int RANK = 2;
+
+ private static void CreateDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long dataspace_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long attribute_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM0, DIM1};
double[][] dset_data = new double[DIM0][DIM1];
// Initialize data.
@@ -52,7 +53,7 @@ public class H5Ex_T_FloatAttribute {
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -63,7 +64,8 @@ public class H5Ex_T_FloatAttribute {
dataspace_id = H5.H5Screate(HDF5Constants.H5S_SCALAR);
if (dataspace_id >= 0) {
dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
H5.H5Sclose(dataspace_id);
dataspace_id = HDF5Constants.H5I_INVALID_HID;
}
@@ -84,8 +86,9 @@ public class H5Ex_T_FloatAttribute {
// Create the attribute and write the array data to it.
try {
if ((dataset_id >= 0) && (dataspace_id >= 0))
- attribute_id = H5.H5Acreate(dataset_id, ATTRIBUTENAME, HDF5Constants.H5T_IEEE_F64LE, dataspace_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ attribute_id =
+ H5.H5Acreate(dataset_id, ATTRIBUTENAME, HDF5Constants.H5T_IEEE_F64LE, dataspace_id,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -134,15 +137,15 @@ public class H5Ex_T_FloatAttribute {
catch (Exception e) {
e.printStackTrace();
}
-
}
- private static void ReadDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void ReadDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
long attribute_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM0, DIM1 };
+ long[] dims = {DIM0, DIM1};
double[][] dset_data;
// Open an existing file.
@@ -165,7 +168,7 @@ public class H5Ex_T_FloatAttribute {
try {
if (dataset_id >= 0)
attribute_id = H5.H5Aopen_by_name(dataset_id, ".", ATTRIBUTENAME, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -190,7 +193,7 @@ public class H5Ex_T_FloatAttribute {
// Allocate array of pointers to two-dimensional arrays (the
// elements of the dataset.
- dset_data = new double[(int) dims[0]][(int) (dims[1])];
+ dset_data = new double[(int)dims[0]][(int)(dims[1])];
// Read data.
try {
@@ -247,10 +250,10 @@ public class H5Ex_T_FloatAttribute {
catch (Exception e) {
e.printStackTrace();
}
-
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
H5Ex_T_FloatAttribute.CreateDataset();
// Now we begin the read section of this example. Here we assume
// the dataset and array have the same name and rank, but can have
@@ -258,5 +261,4 @@ public class H5Ex_T_FloatAttribute {
// data using malloc().
H5Ex_T_FloatAttribute.ReadDataset();
}
-
}
diff --git a/java/examples/datatypes/H5Ex_T_Integer.java b/java/examples/datatypes/H5Ex_T_Integer.java
index bb8e0cb..919ea7e 100644
--- a/java/examples/datatypes/H5Ex_T_Integer.java
+++ b/java/examples/datatypes/H5Ex_T_Integer.java
@@ -26,17 +26,18 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5Ex_T_Integer {
- private static String FILENAME = "H5Ex_T_Integer.h5";
+ private static String FILENAME = "H5Ex_T_Integer.h5";
private static String DATASETNAME = "DS1";
- private static final int DIM0 = 4;
- private static final int DIM1 = 7;
- private static final int RANK = 2;
+ private static final int DIM0 = 4;
+ private static final int DIM1 = 7;
+ private static final int RANK = 2;
- private static void CreateDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void CreateDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM0, DIM1 };
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM0, DIM1};
int[][] dset_data = new int[DIM0][DIM1];
// Initialize data.
@@ -48,7 +49,7 @@ public class H5Ex_T_Integer {
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -70,7 +71,8 @@ public class H5Ex_T_Integer {
try {
if ((file_id >= 0) && (dataspace_id >= 0))
dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I64BE, dataspace_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -79,8 +81,8 @@ public class H5Ex_T_Integer {
// Write the data to the dataset.
try {
if (dataset_id >= 0)
- H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -112,14 +114,14 @@ public class H5Ex_T_Integer {
catch (Exception e) {
e.printStackTrace();
}
-
}
- private static void ReadDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void ReadDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM0, DIM1 };
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM0, DIM1};
int[][] dset_data;
// Open an existing file.
@@ -158,13 +160,13 @@ public class H5Ex_T_Integer {
// Allocate array of pointers to two-dimensional arrays (the
// elements of the dataset.
- dset_data = new int[(int) dims[0]][(int) (dims[1])];
+ dset_data = new int[(int)dims[0]][(int)(dims[1])];
// Read data.
try {
if (dataset_id >= 0)
- H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -208,10 +210,10 @@ public class H5Ex_T_Integer {
catch (Exception e) {
e.printStackTrace();
}
-
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
H5Ex_T_Integer.CreateDataset();
// Now we begin the read section of this example. Here we assume
// the dataset and array have the same name and rank, but can have
@@ -219,5 +221,4 @@ public class H5Ex_T_Integer {
// data using malloc().
H5Ex_T_Integer.ReadDataset();
}
-
}
diff --git a/java/examples/datatypes/H5Ex_T_IntegerAttribute.java b/java/examples/datatypes/H5Ex_T_IntegerAttribute.java
index b0df5e4..4ec98c4 100644
--- a/java/examples/datatypes/H5Ex_T_IntegerAttribute.java
+++ b/java/examples/datatypes/H5Ex_T_IntegerAttribute.java
@@ -26,19 +26,20 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5Ex_T_IntegerAttribute {
- private static String FILENAME = "H5Ex_T_IntegerAttribute.h5";
- private static String DATASETNAME = "DS1";
+ private static String FILENAME = "H5Ex_T_IntegerAttribute.h5";
+ private static String DATASETNAME = "DS1";
private static String ATTRIBUTENAME = "A1";
- private static final int DIM0 = 4;
- private static final int DIM1 = 7;
- private static final int RANK = 2;
+ private static final int DIM0 = 4;
+ private static final int DIM1 = 7;
+ private static final int RANK = 2;
- private static void CreateDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void CreateDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
long attribute_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM0, DIM1 };
+ long[] dims = {DIM0, DIM1};
int[][] dset_data = new int[DIM0][DIM1];
// Initialize data.
@@ -50,7 +51,7 @@ public class H5Ex_T_IntegerAttribute {
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -61,7 +62,8 @@ public class H5Ex_T_IntegerAttribute {
dataspace_id = H5.H5Screate(HDF5Constants.H5S_SCALAR);
if (dataspace_id >= 0) {
dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
H5.H5Sclose(dataspace_id);
dataspace_id = HDF5Constants.H5I_INVALID_HID;
}
@@ -82,8 +84,9 @@ public class H5Ex_T_IntegerAttribute {
// Create the attribute and write the array data to it.
try {
if ((dataset_id >= 0) && (dataspace_id >= 0))
- attribute_id = H5.H5Acreate(dataset_id, ATTRIBUTENAME, HDF5Constants.H5T_STD_I64BE, dataspace_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ attribute_id =
+ H5.H5Acreate(dataset_id, ATTRIBUTENAME, HDF5Constants.H5T_STD_I64BE, dataspace_id,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -132,15 +135,15 @@ public class H5Ex_T_IntegerAttribute {
catch (Exception e) {
e.printStackTrace();
}
-
}
- private static void ReadDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void ReadDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
long attribute_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM0, DIM1 };
+ long[] dims = {DIM0, DIM1};
int[][] dset_data;
// Open an existing file.
@@ -163,7 +166,7 @@ public class H5Ex_T_IntegerAttribute {
try {
if (dataset_id >= 0)
attribute_id = H5.H5Aopen_by_name(dataset_id, ".", ATTRIBUTENAME, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -188,7 +191,7 @@ public class H5Ex_T_IntegerAttribute {
// Allocate array of pointers to two-dimensional arrays (the
// elements of the dataset.
- dset_data = new int[(int) dims[0]][(int) (dims[1])];
+ dset_data = new int[(int)dims[0]][(int)(dims[1])];
// Read data.
try {
@@ -245,10 +248,10 @@ public class H5Ex_T_IntegerAttribute {
catch (Exception e) {
e.printStackTrace();
}
-
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
H5Ex_T_IntegerAttribute.CreateDataset();
// Now we begin the read section of this example. Here we assume
// the dataset and array have the same name and rank, but can have
@@ -256,5 +259,4 @@ public class H5Ex_T_IntegerAttribute {
// data using malloc().
H5Ex_T_IntegerAttribute.ReadDataset();
}
-
}
diff --git a/java/examples/datatypes/H5Ex_T_ObjectReference.java b/java/examples/datatypes/H5Ex_T_ObjectReference.java
index b0f98de..9220d8f 100644
--- a/java/examples/datatypes/H5Ex_T_ObjectReference.java
+++ b/java/examples/datatypes/H5Ex_T_ObjectReference.java
@@ -28,54 +28,50 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5Ex_T_ObjectReference {
- private static String FILENAME = "H5Ex_T_ObjectReference.h5";
- private static String DATASETNAME = "DS1";
+ private static String FILENAME = "H5Ex_T_ObjectReference.h5";
+ private static String DATASETNAME = "DS1";
private static String DATASETNAME2 = "DS2";
- private static String GROUPNAME = "G1";
- private static final int DIM0 = 2;
- private static final int RANK = 1;
+ private static String GROUPNAME = "G1";
+ private static final int DIM0 = 2;
+ private static final int RANK = 1;
// Values for the status of space allocation
enum H5G_obj {
- H5G_UNKNOWN(HDF5Constants.H5O_TYPE_UNKNOWN), /* Unknown object type */
- H5G_GROUP(HDF5Constants.H5O_TYPE_GROUP), /* Object is a group */
- H5G_DATASET(HDF5Constants.H5O_TYPE_DATASET), /* Object is a dataset */
+ H5G_UNKNOWN(HDF5Constants.H5O_TYPE_UNKNOWN), /* Unknown object type */
+ H5G_GROUP(HDF5Constants.H5O_TYPE_GROUP), /* Object is a group */
+ H5G_DATASET(HDF5Constants.H5O_TYPE_DATASET), /* Object is a dataset */
H5G_TYPE(HDF5Constants.H5O_TYPE_NAMED_DATATYPE); /* Object is a named data type */
private static final Map<Integer, H5G_obj> lookup = new HashMap<Integer, H5G_obj>();
- static {
+ static
+ {
for (H5G_obj s : EnumSet.allOf(H5G_obj.class))
lookup.put(s.getCode(), s);
}
private int code;
- H5G_obj(int layout_type) {
- this.code = layout_type;
- }
+ H5G_obj(int layout_type) { this.code = layout_type; }
- public int getCode() {
- return this.code;
- }
+ public int getCode() { return this.code; }
- public static H5G_obj get(int code) {
- return lookup.get(code);
- }
+ public static H5G_obj get(int code) { return lookup.get(code); }
}
- private static void writeObjRef() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long filespace_id = HDF5Constants.H5I_INVALID_HID;
- long group_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM0 };
+ private static void writeObjRef()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long dataspace_id = HDF5Constants.H5I_INVALID_HID;
+ long filespace_id = HDF5Constants.H5I_INVALID_HID;
+ long group_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM0};
byte[][] dset_data = new byte[DIM0][HDF5Constants.H5R_REF_BUF_SIZE];
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -86,7 +82,8 @@ public class H5Ex_T_ObjectReference {
dataspace_id = H5.H5Screate(HDF5Constants.H5S_SCALAR);
if ((file_id >= 0) && (dataspace_id >= 0)) {
dataset_id = H5.H5Dcreate(file_id, DATASETNAME2, HDF5Constants.H5T_STD_I32LE, dataspace_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
if (dataset_id >= 0)
H5.H5Dclose(dataset_id);
dataset_id = HDF5Constants.H5I_INVALID_HID;
@@ -101,8 +98,8 @@ public class H5Ex_T_ObjectReference {
// Create a group in the file.
try {
if (file_id >= 0)
- group_id = H5.H5Gcreate(file_id, GROUPNAME, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ group_id = H5.H5Gcreate(file_id, GROUPNAME, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
if (group_id >= 0)
H5.H5Gclose(group_id);
group_id = HDF5Constants.H5I_INVALID_HID;
@@ -119,7 +116,7 @@ public class H5Ex_T_ObjectReference {
catch (Throwable err) {
err.printStackTrace();
}
-
+
try {
dset_data[1] = H5.H5Rcreate_object(file_id, DATASETNAME2, HDF5Constants.H5P_DEFAULT);
}
@@ -127,7 +124,7 @@ public class H5Ex_T_ObjectReference {
err.printStackTrace();
}
}
-
+
// Create dataspace. Setting maximum size to NULL sets the maximum
// size to be the current size.
try {
@@ -136,22 +133,23 @@ public class H5Ex_T_ObjectReference {
catch (Exception e) {
e.printStackTrace();
}
-
+
// Create the dataset.
try {
if ((file_id >= 0) && (filespace_id >= 0))
dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_REF, filespace_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
}
-
+
// Write the object references to it.
try {
if (dataset_id >= 0)
- H5.H5Dwrite(dataset_id, HDF5Constants.H5T_STD_REF, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dwrite(dataset_id, HDF5Constants.H5T_STD_REF, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -161,8 +159,16 @@ public class H5Ex_T_ObjectReference {
ex.printStackTrace();
}
finally {
- try {H5.H5Rdestroy(dset_data[1]);} catch (Exception ex) {}
- try {H5.H5Rdestroy(dset_data[0]);} catch (Exception ex) {}
+ try {
+ H5.H5Rdestroy(dset_data[1]);
+ }
+ catch (Exception ex) {
+ }
+ try {
+ H5.H5Rdestroy(dset_data[0]);
+ }
+ catch (Exception ex) {
+ }
}
// End access to the dataset and release resources used by it.
@@ -193,13 +199,14 @@ public class H5Ex_T_ObjectReference {
}
}
- private static void readObjRef() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- int object_type = -1;
- long object_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM0 };
+ private static void readObjRef()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long dataspace_id = HDF5Constants.H5I_INVALID_HID;
+ int object_type = -1;
+ long object_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM0};
byte[][] dset_data = new byte[DIM0][HDF5Constants.H5R_REF_BUF_SIZE];
// Open an existing file.
@@ -209,23 +216,24 @@ public class H5Ex_T_ObjectReference {
// Open an existing dataset.
try {
dataset_id = H5.H5Dopen(file_id, DATASETNAME, HDF5Constants.H5P_DEFAULT);
-
+
try {
// Get dataspace and allocate memory for read buffer.
dataspace_id = H5.H5Dget_space(dataset_id);
H5.H5Sget_simple_extent_dims(dataspace_id, dims, null);
-
+
// Read data.
- H5.H5Dread(dataset_id, HDF5Constants.H5T_STD_REF, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
-
+ H5.H5Dread(dataset_id, HDF5Constants.H5T_STD_REF, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
+
// Output the data to the screen.
for (int indx = 0; indx < dims[0]; indx++) {
System.out.println(DATASETNAME + "[" + indx + "]:");
System.out.print(" ->");
// Open the referenced object, get its name and type.
try {
- object_id = H5.H5Ropen_object(dset_data[indx], HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ object_id = H5.H5Ropen_object(dset_data[indx], HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
try {
object_type = H5.H5Rget_obj_type3(dset_data[indx], HDF5Constants.H5R_OBJECT);
String obj_name = null;
@@ -255,14 +263,22 @@ public class H5Ex_T_ObjectReference {
e.printStackTrace();
}
finally {
- try {H5.H5Oclose(object_id);} catch (Exception e) {}
+ try {
+ H5.H5Oclose(object_id);
+ }
+ catch (Exception e) {
+ }
}
}
catch (Exception e4) {
e4.printStackTrace();
}
finally {
- try {H5.H5Rdestroy(dset_data[indx]);} catch (Exception e4) {}
+ try {
+ H5.H5Rdestroy(dset_data[indx]);
+ }
+ catch (Exception e4) {
+ }
}
} // end for
}
@@ -270,25 +286,38 @@ public class H5Ex_T_ObjectReference {
e3.printStackTrace();
}
finally {
- try {H5.H5Sclose(dataspace_id);} catch (Exception e3) {}
+ try {
+ H5.H5Sclose(dataspace_id);
+ }
+ catch (Exception e3) {
+ }
}
}
catch (Exception e2) {
e2.printStackTrace();
}
finally {
- try {H5.H5Dclose(dataset_id);} catch (Exception e2) {}
+ try {
+ H5.H5Dclose(dataset_id);
+ }
+ catch (Exception e2) {
+ }
}
}
catch (Exception e1) {
e1.printStackTrace();
}
finally {
- try {H5.H5Fclose(file_id);} catch (Exception e1) {}
+ try {
+ H5.H5Fclose(file_id);
+ }
+ catch (Exception e1) {
+ }
}
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
// Check if gzip compression is available and can be used for both
// compression and decompression. Normally we do not perform error
// checking in these examples for the sake of clarity, but in this
@@ -297,5 +326,4 @@ public class H5Ex_T_ObjectReference {
H5Ex_T_ObjectReference.writeObjRef();
H5Ex_T_ObjectReference.readObjRef();
}
-
}
diff --git a/java/examples/datatypes/H5Ex_T_ObjectReferenceAttribute.java b/java/examples/datatypes/H5Ex_T_ObjectReferenceAttribute.java
index f61ae0d..be84e51 100644
--- a/java/examples/datatypes/H5Ex_T_ObjectReferenceAttribute.java
+++ b/java/examples/datatypes/H5Ex_T_ObjectReferenceAttribute.java
@@ -28,55 +28,51 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5Ex_T_ObjectReferenceAttribute {
- private static String FILENAME = "H5Ex_T_ObjectReferenceAttribute.h5";
- private static String DATASETNAME = "DS1";
+ private static String FILENAME = "H5Ex_T_ObjectReferenceAttribute.h5";
+ private static String DATASETNAME = "DS1";
private static String ATTRIBUTENAME = "A1";
- private static String DATASETNAME2 = "DS2";
- private static String GROUPNAME = "G1";
- private static final int DIM0 = 2;
- private static final int RANK = 1;
+ private static String DATASETNAME2 = "DS2";
+ private static String GROUPNAME = "G1";
+ private static final int DIM0 = 2;
+ private static final int RANK = 1;
// Values for the status of space allocation
enum H5G_obj {
- H5G_UNKNOWN(HDF5Constants.H5O_TYPE_UNKNOWN), /* Unknown object type */
- H5G_GROUP(HDF5Constants.H5O_TYPE_GROUP), /* Object is a group */
- H5G_DATASET(HDF5Constants.H5O_TYPE_DATASET), /* Object is a dataset */
+ H5G_UNKNOWN(HDF5Constants.H5O_TYPE_UNKNOWN), /* Unknown object type */
+ H5G_GROUP(HDF5Constants.H5O_TYPE_GROUP), /* Object is a group */
+ H5G_DATASET(HDF5Constants.H5O_TYPE_DATASET), /* Object is a dataset */
H5G_TYPE(HDF5Constants.H5O_TYPE_NAMED_DATATYPE); /* Object is a named data type */
private static final Map<Integer, H5G_obj> lookup = new HashMap<Integer, H5G_obj>();
- static {
+ static
+ {
for (H5G_obj s : EnumSet.allOf(H5G_obj.class))
lookup.put(s.getCode(), s);
}
private int code;
- H5G_obj(int layout_type) {
- this.code = layout_type;
- }
+ H5G_obj(int layout_type) { this.code = layout_type; }
- public int getCode() {
- return this.code;
- }
+ public int getCode() { return this.code; }
- public static H5G_obj get(int code) {
- return lookup.get(code);
- }
+ public static H5G_obj get(int code) { return lookup.get(code); }
}
- private static void CreateDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long group_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long attribute_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM0 };
+ private static void CreateDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long dataspace_id = HDF5Constants.H5I_INVALID_HID;
+ long group_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long attribute_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM0};
byte[][] dset_data = new byte[DIM0][HDF5Constants.H5R_REF_BUF_SIZE];
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -87,7 +83,8 @@ public class H5Ex_T_ObjectReferenceAttribute {
dataspace_id = H5.H5Screate(HDF5Constants.H5S_SCALAR);
if ((file_id >= 0) && (dataspace_id >= 0)) {
dataset_id = H5.H5Dcreate(file_id, DATASETNAME2, HDF5Constants.H5T_STD_I32LE, dataspace_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
if (dataset_id >= 0)
H5.H5Dclose(dataset_id);
dataset_id = HDF5Constants.H5I_INVALID_HID;
@@ -102,8 +99,8 @@ public class H5Ex_T_ObjectReferenceAttribute {
// Create a group in the file.
try {
if (file_id >= 0)
- group_id = H5.H5Gcreate(file_id, GROUPNAME, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ group_id = H5.H5Gcreate(file_id, GROUPNAME, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
if (group_id >= 0)
H5.H5Gclose(group_id);
group_id = HDF5Constants.H5I_INVALID_HID;
@@ -120,7 +117,7 @@ public class H5Ex_T_ObjectReferenceAttribute {
catch (Throwable err) {
err.printStackTrace();
}
-
+
try {
dset_data[1] = H5.H5Rcreate_object(file_id, DATASETNAME2, HDF5Constants.H5P_DEFAULT);
}
@@ -135,7 +132,8 @@ public class H5Ex_T_ObjectReferenceAttribute {
dataspace_id = H5.H5Screate(HDF5Constants.H5S_SCALAR);
if (dataspace_id >= 0) {
dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
H5.H5Sclose(dataspace_id);
dataspace_id = HDF5Constants.H5I_INVALID_HID;
}
@@ -143,7 +141,7 @@ public class H5Ex_T_ObjectReferenceAttribute {
catch (Exception e) {
e.printStackTrace();
}
-
+
// Create dataspace. Setting maximum size to NULL sets the maximum
// size to be the current size.
try {
@@ -152,17 +150,18 @@ public class H5Ex_T_ObjectReferenceAttribute {
catch (Exception e) {
e.printStackTrace();
}
-
+
// Create the attribute and write the array data to it.
try {
if ((dataset_id >= 0) && (dataspace_id >= 0))
- attribute_id = H5.H5Acreate(dataset_id, ATTRIBUTENAME, HDF5Constants.H5T_STD_REF, dataspace_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ attribute_id =
+ H5.H5Acreate(dataset_id, ATTRIBUTENAME, HDF5Constants.H5T_STD_REF, dataspace_id,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
}
-
+
// Write the dataset.
try {
if (attribute_id >= 0)
@@ -176,8 +175,16 @@ public class H5Ex_T_ObjectReferenceAttribute {
ex.printStackTrace();
}
finally {
- try {H5.H5Rdestroy(dset_data[1]);} catch (Exception ex) {}
- try {H5.H5Rdestroy(dset_data[0]);} catch (Exception ex) {}
+ try {
+ H5.H5Rdestroy(dset_data[1]);
+ }
+ catch (Exception ex) {
+ }
+ try {
+ H5.H5Rdestroy(dset_data[0]);
+ }
+ catch (Exception ex) {
+ }
}
// End access to the dataset and release resources used by it.
@@ -215,14 +222,15 @@ public class H5Ex_T_ObjectReferenceAttribute {
}
}
- private static void ReadDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long attribute_id = HDF5Constants.H5I_INVALID_HID;
- int object_type = -1;
- long object_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM0 };
+ private static void ReadDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long dataspace_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long attribute_id = HDF5Constants.H5I_INVALID_HID;
+ int object_type = -1;
+ long object_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM0};
byte[][] dset_data = new byte[DIM0][HDF5Constants.H5R_REF_BUF_SIZE];
// Open an existing file.
@@ -232,28 +240,30 @@ public class H5Ex_T_ObjectReferenceAttribute {
// Open an existing dataset.
try {
dataset_id = H5.H5Dopen(file_id, DATASETNAME, HDF5Constants.H5P_DEFAULT);
-
+
try {
- attribute_id = H5.H5Aopen_by_name(dataset_id, ".", ATTRIBUTENAME, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
-
+ attribute_id = H5.H5Aopen_by_name(dataset_id, ".", ATTRIBUTENAME,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+
// Get dataspace and allocate memory for read buffer.
try {
dataspace_id = H5.H5Aget_space(attribute_id);
H5.H5Sget_simple_extent_dims(dataspace_id, dims, null);
-
+
// Read data.
H5.H5Aread(attribute_id, HDF5Constants.H5T_STD_REF, dset_data);
-
+
// Output the data to the screen.
for (int indx = 0; indx < dims[0]; indx++) {
System.out.println(ATTRIBUTENAME + "[" + indx + "]:");
System.out.print(" ->");
// Open the referenced object, get its name and type.
try {
- object_id = H5.H5Ropen_object(dset_data[indx], HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ object_id = H5.H5Ropen_object(dset_data[indx], HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
try {
- object_type = H5.H5Rget_obj_type3(dset_data[indx], HDF5Constants.H5R_OBJECT);
+ object_type =
+ H5.H5Rget_obj_type3(dset_data[indx], HDF5Constants.H5R_OBJECT);
String obj_name = null;
if (object_type >= 0) {
// Get the name.
@@ -281,14 +291,22 @@ public class H5Ex_T_ObjectReferenceAttribute {
e.printStackTrace();
}
finally {
- try {H5.H5Oclose(object_id);} catch (Exception e) {}
+ try {
+ H5.H5Oclose(object_id);
+ }
+ catch (Exception e) {
+ }
}
}
catch (Exception e5) {
e5.printStackTrace();
}
finally {
- try {H5.H5Rdestroy(dset_data[indx]);} catch (Exception e5) {}
+ try {
+ H5.H5Rdestroy(dset_data[indx]);
+ }
+ catch (Exception e5) {
+ }
}
} // end for
}
@@ -296,32 +314,49 @@ public class H5Ex_T_ObjectReferenceAttribute {
e4.printStackTrace();
}
finally {
- try {H5.H5Sclose(dataspace_id);} catch (Exception e3) {}
+ try {
+ H5.H5Sclose(dataspace_id);
+ }
+ catch (Exception e3) {
+ }
}
}
catch (Exception e3) {
e3.printStackTrace();
}
finally {
- try {H5.H5Aclose(attribute_id);} catch (Exception e4) {}
+ try {
+ H5.H5Aclose(attribute_id);
+ }
+ catch (Exception e4) {
+ }
}
}
catch (Exception e2) {
e2.printStackTrace();
}
finally {
- try {H5.H5Dclose(dataset_id);} catch (Exception e2) {}
+ try {
+ H5.H5Dclose(dataset_id);
+ }
+ catch (Exception e2) {
+ }
}
}
catch (Exception e1) {
e1.printStackTrace();
}
finally {
- try {H5.H5Fclose(file_id);} catch (Exception e1) {}
+ try {
+ H5.H5Fclose(file_id);
+ }
+ catch (Exception e1) {
+ }
}
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
H5Ex_T_ObjectReferenceAttribute.CreateDataset();
// Now we begin the read section of this example. Here we assume
// the dataset and array have the same name and rank, but can have
@@ -329,5 +364,4 @@ public class H5Ex_T_ObjectReferenceAttribute {
// data using malloc().
H5Ex_T_ObjectReferenceAttribute.ReadDataset();
}
-
}
diff --git a/java/examples/datatypes/H5Ex_T_Opaque.java b/java/examples/datatypes/H5Ex_T_Opaque.java
index e851fb2..419a5c8 100644
--- a/java/examples/datatypes/H5Ex_T_Opaque.java
+++ b/java/examples/datatypes/H5Ex_T_Opaque.java
@@ -24,32 +24,33 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5Ex_T_Opaque {
- private static String FILENAME = "H5Ex_T_Opaque.h5";
+ private static String FILENAME = "H5Ex_T_Opaque.h5";
private static String DATASETNAME = "DS1";
- private static final int DIM0 = 4;
- private static final int LEN = 7;
- private static final int RANK = 1;
+ private static final int DIM0 = 4;
+ private static final int LEN = 7;
+ private static final int RANK = 1;
- private static void CreateDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void CreateDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long datatype_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM0 };
- byte[] dset_data = new byte[DIM0 * LEN];
- byte[] str_data = { 'O', 'P', 'A', 'Q', 'U', 'E' };
+ long datatype_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM0};
+ byte[] dset_data = new byte[DIM0 * LEN];
+ byte[] str_data = {'O', 'P', 'A', 'Q', 'U', 'E'};
// Initialize data.
for (int indx = 0; indx < DIM0; indx++) {
for (int jndx = 0; jndx < LEN - 1; jndx++)
dset_data[jndx + indx * LEN] = str_data[jndx];
- dset_data[LEN - 1 + indx * LEN] = (byte) (indx + '0');
+ dset_data[LEN - 1 + indx * LEN] = (byte)(indx + '0');
}
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -82,8 +83,9 @@ public class H5Ex_T_Opaque {
// automatically converts between different integer types.
try {
if ((file_id >= 0) && (datatype_id >= 0) && (dataspace_id >= 0))
- dataset_id = H5.H5Dcreate(file_id, DATASETNAME, datatype_id, dataspace_id, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ dataset_id =
+ H5.H5Dcreate(file_id, DATASETNAME, datatype_id, dataspace_id, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -93,7 +95,7 @@ public class H5Ex_T_Opaque {
try {
if ((dataset_id >= 0) && (datatype_id >= 0))
H5.H5Dwrite(dataset_id, datatype_id, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -133,16 +135,16 @@ public class H5Ex_T_Opaque {
catch (Exception e) {
e.printStackTrace();
}
-
}
- private static void ReadDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long datatype_id = HDF5Constants.H5I_INVALID_HID;
+ private static void ReadDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long datatype_id = HDF5Constants.H5I_INVALID_HID;
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long type_len = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM0 };
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long type_len = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM0};
byte[] dset_data;
String tag_name = null;
@@ -194,13 +196,13 @@ public class H5Ex_T_Opaque {
}
// Allocate buffer.
- dset_data = new byte[(int) (dims[0] * type_len)];
+ dset_data = new byte[(int)(dims[0] * type_len)];
// Read data.
try {
if ((dataset_id >= 0) && (datatype_id >= 0))
H5.H5Dread(dataset_id, datatype_id, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -211,7 +213,7 @@ public class H5Ex_T_Opaque {
for (int indx = 0; indx < dims[0]; indx++) {
System.out.print(DATASETNAME + "[" + indx + "]: ");
for (int jndx = 0; jndx < type_len; jndx++) {
- char temp = (char) dset_data[jndx + indx * (int)type_len];
+ char temp = (char)dset_data[jndx + indx * (int)type_len];
System.out.print(temp);
}
System.out.println("");
@@ -252,10 +254,10 @@ public class H5Ex_T_Opaque {
catch (Exception e) {
e.printStackTrace();
}
-
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
H5Ex_T_Opaque.CreateDataset();
// Now we begin the read section of this example. Here we assume
// the dataset and array have the same name and rank, but can have
@@ -263,5 +265,4 @@ public class H5Ex_T_Opaque {
// data using malloc().
H5Ex_T_Opaque.ReadDataset();
}
-
}
diff --git a/java/examples/datatypes/H5Ex_T_OpaqueAttribute.java b/java/examples/datatypes/H5Ex_T_OpaqueAttribute.java
index 3e16ab4..b8a15a6 100644
--- a/java/examples/datatypes/H5Ex_T_OpaqueAttribute.java
+++ b/java/examples/datatypes/H5Ex_T_OpaqueAttribute.java
@@ -24,34 +24,35 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5Ex_T_OpaqueAttribute {
- private static String FILENAME = "H5Ex_T_OpaqueAttribute.h5";
- private static String DATASETNAME = "DS1";
+ private static String FILENAME = "H5Ex_T_OpaqueAttribute.h5";
+ private static String DATASETNAME = "DS1";
private static String ATTRIBUTENAME = "A1";
- private static final int DIM0 = 4;
- private static final int LEN = 7;
- private static final int RANK = 1;
+ private static final int DIM0 = 4;
+ private static final int LEN = 7;
+ private static final int RANK = 1;
- private static void CreateDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void CreateDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long datatype_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long datatype_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
long attribute_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM0 };
- byte[] dset_data = new byte[DIM0 * LEN];
- byte[] str_data = { 'O', 'P', 'A', 'Q', 'U', 'E' };
+ long[] dims = {DIM0};
+ byte[] dset_data = new byte[DIM0 * LEN];
+ byte[] str_data = {'O', 'P', 'A', 'Q', 'U', 'E'};
// Initialize data.
for (int indx = 0; indx < DIM0; indx++) {
for (int jndx = 0; jndx < LEN - 1; jndx++)
dset_data[jndx + indx * LEN] = str_data[jndx];
- dset_data[LEN - 1 + indx * LEN] = (byte) (indx + '0');
+ dset_data[LEN - 1 + indx * LEN] = (byte)(indx + '0');
}
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -62,7 +63,8 @@ public class H5Ex_T_OpaqueAttribute {
dataspace_id = H5.H5Screate(HDF5Constants.H5S_SCALAR);
if (dataspace_id >= 0) {
dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
H5.H5Sclose(dataspace_id);
dataspace_id = HDF5Constants.H5I_INVALID_HID;
}
@@ -96,7 +98,7 @@ public class H5Ex_T_OpaqueAttribute {
try {
if ((dataset_id >= 0) && (datatype_id >= 0) && (dataspace_id >= 0))
attribute_id = H5.H5Acreate(dataset_id, ATTRIBUTENAME, datatype_id, dataspace_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -153,17 +155,17 @@ public class H5Ex_T_OpaqueAttribute {
catch (Exception e) {
e.printStackTrace();
}
-
}
- private static void ReadDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long datatype_id = HDF5Constants.H5I_INVALID_HID;
+ private static void ReadDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long datatype_id = HDF5Constants.H5I_INVALID_HID;
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
long attribute_id = HDF5Constants.H5I_INVALID_HID;
- long type_len = -1;
- long[] dims = { DIM0 };
+ long type_len = -1;
+ long[] dims = {DIM0};
byte[] dset_data;
String tag_name = null;
@@ -187,7 +189,7 @@ public class H5Ex_T_OpaqueAttribute {
try {
if (dataset_id >= 0)
attribute_id = H5.H5Aopen_by_name(dataset_id, ".", ATTRIBUTENAME, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -224,7 +226,7 @@ public class H5Ex_T_OpaqueAttribute {
}
// Allocate buffer.
- dset_data = new byte[(int) (dims[0] * type_len)];
+ dset_data = new byte[(int)(dims[0] * type_len)];
// Read data.
try {
@@ -240,7 +242,7 @@ public class H5Ex_T_OpaqueAttribute {
for (int indx = 0; indx < dims[0]; indx++) {
System.out.print(ATTRIBUTENAME + "[" + indx + "]: ");
for (int jndx = 0; jndx < type_len; jndx++) {
- char temp = (char) dset_data[jndx + indx * (int)type_len];
+ char temp = (char)dset_data[jndx + indx * (int)type_len];
System.out.print(temp);
}
System.out.println("");
@@ -289,10 +291,10 @@ public class H5Ex_T_OpaqueAttribute {
catch (Exception e) {
e.printStackTrace();
}
-
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
H5Ex_T_OpaqueAttribute.CreateDataset();
// Now we begin the read section of this example. Here we assume
// the dataset and array have the same name and rank, but can have
@@ -300,5 +302,4 @@ public class H5Ex_T_OpaqueAttribute {
// data using malloc().
H5Ex_T_OpaqueAttribute.ReadDataset();
}
-
}
diff --git a/java/examples/datatypes/H5Ex_T_String.java b/java/examples/datatypes/H5Ex_T_String.java
index e497bd8..a69a70b 100644
--- a/java/examples/datatypes/H5Ex_T_String.java
+++ b/java/examples/datatypes/H5Ex_T_String.java
@@ -24,27 +24,28 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5Ex_T_String {
- private static String FILENAME = "H5Ex_T_String.h5";
+ private static String FILENAME = "H5Ex_T_String.h5";
private static String DATASETNAME = "DS1";
- private static final int DIM0 = 4;
- private static final int SDIM = 8;
- private static final int RANK = 1;
-
- private static void CreateDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long memtype_id = HDF5Constants.H5I_INVALID_HID;
- long filetype_id = HDF5Constants.H5I_INVALID_HID;
- long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM0 };
- byte[][] dset_data = new byte[DIM0][SDIM];
- StringBuffer[] str_data = { new StringBuffer("Parting"), new StringBuffer("is such"),
- new StringBuffer("sweet"), new StringBuffer("sorrow.") };
+ private static final int DIM0 = 4;
+ private static final int SDIM = 8;
+ private static final int RANK = 1;
+
+ private static void CreateDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long memtype_id = HDF5Constants.H5I_INVALID_HID;
+ long filetype_id = HDF5Constants.H5I_INVALID_HID;
+ long dataspace_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM0};
+ byte[][] dset_data = new byte[DIM0][SDIM];
+ StringBuffer[] str_data = {new StringBuffer("Parting"), new StringBuffer("is such"),
+ new StringBuffer("sweet"), new StringBuffer("sorrow.")};
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -82,8 +83,9 @@ public class H5Ex_T_String {
// Create the dataset and write the string data to it.
try {
if ((file_id >= 0) && (filetype_id >= 0) && (dataspace_id >= 0))
- dataset_id = H5.H5Dcreate(file_id, DATASETNAME, filetype_id, dataspace_id, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ dataset_id =
+ H5.H5Dcreate(file_id, DATASETNAME, filetype_id, dataspace_id, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -94,14 +96,14 @@ public class H5Ex_T_String {
for (int indx = 0; indx < DIM0; indx++) {
for (int jndx = 0; jndx < SDIM; jndx++) {
if (jndx < str_data[indx].length())
- dset_data[indx][jndx] = (byte) str_data[indx].charAt(jndx);
+ dset_data[indx][jndx] = (byte)str_data[indx].charAt(jndx);
else
dset_data[indx][jndx] = 0;
}
}
if ((dataset_id >= 0) && (memtype_id >= 0))
H5.H5Dwrite(dataset_id, memtype_id, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -151,17 +153,17 @@ public class H5Ex_T_String {
catch (Exception e) {
e.printStackTrace();
}
-
}
- private static void ReadDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long filetype_id = HDF5Constants.H5I_INVALID_HID;
- long memtype_id = HDF5Constants.H5I_INVALID_HID;
+ private static void ReadDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long filetype_id = HDF5Constants.H5I_INVALID_HID;
+ long memtype_id = HDF5Constants.H5I_INVALID_HID;
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long sdim = 0;
- long[] dims = { DIM0 };
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long sdim = 0;
+ long[] dims = {DIM0};
byte[][] dset_data;
StringBuffer[] str_data;
@@ -213,8 +215,8 @@ public class H5Ex_T_String {
}
// Allocate space for data.
- dset_data = new byte[(int) dims[0]][(int)sdim];
- str_data = new StringBuffer[(int) dims[0]];
+ dset_data = new byte[(int)dims[0]][(int)sdim];
+ str_data = new StringBuffer[(int)dims[0]];
// Create the memory datatype.
try {
@@ -230,9 +232,9 @@ public class H5Ex_T_String {
try {
if ((dataset_id >= 0) && (memtype_id >= 0))
H5.H5Dread(dataset_id, memtype_id, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ HDF5Constants.H5P_DEFAULT, dset_data);
byte[] tempbuf = new byte[(int)sdim];
- for (int indx = 0; indx < (int) dims[0]; indx++) {
+ for (int indx = 0; indx < (int)dims[0]; indx++) {
for (int jndx = 0; jndx < sdim; jndx++) {
tempbuf[jndx] = dset_data[indx][jndx];
}
@@ -293,10 +295,10 @@ public class H5Ex_T_String {
catch (Exception e) {
e.printStackTrace();
}
-
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
H5Ex_T_String.CreateDataset();
// Now we begin the read section of this example. Here we assume
// the dataset and array have the same name and rank, but can have
@@ -304,5 +306,4 @@ public class H5Ex_T_String {
// data using malloc().
H5Ex_T_String.ReadDataset();
}
-
}
diff --git a/java/examples/datatypes/H5Ex_T_StringAttribute.java b/java/examples/datatypes/H5Ex_T_StringAttribute.java
index 700f6a9..46c1038 100644
--- a/java/examples/datatypes/H5Ex_T_StringAttribute.java
+++ b/java/examples/datatypes/H5Ex_T_StringAttribute.java
@@ -24,29 +24,30 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5Ex_T_StringAttribute {
- private static String FILENAME = "H5Ex_T_StringAttribute.h5";
- private static String DATASETNAME = "DS1";
+ private static String FILENAME = "H5Ex_T_StringAttribute.h5";
+ private static String DATASETNAME = "DS1";
private static String ATTRIBUTENAME = "A1";
- private static final int DIM0 = 4;
- private static final int SDIM = 8;
- private static final int RANK = 1;
-
- private static void CreateDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long memtype_id = HDF5Constants.H5I_INVALID_HID;
- long filetype_id = HDF5Constants.H5I_INVALID_HID;
- long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long attribute_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM0 };
- byte[][] dset_data = new byte[DIM0][SDIM];
- StringBuffer[] str_data = { new StringBuffer("Parting"), new StringBuffer("is such"),
- new StringBuffer("sweet"), new StringBuffer("sorrow.") };
+ private static final int DIM0 = 4;
+ private static final int SDIM = 8;
+ private static final int RANK = 1;
+
+ private static void CreateDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long memtype_id = HDF5Constants.H5I_INVALID_HID;
+ long filetype_id = HDF5Constants.H5I_INVALID_HID;
+ long dataspace_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long attribute_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM0};
+ byte[][] dset_data = new byte[DIM0][SDIM];
+ StringBuffer[] str_data = {new StringBuffer("Parting"), new StringBuffer("is such"),
+ new StringBuffer("sweet"), new StringBuffer("sorrow.")};
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -77,7 +78,8 @@ public class H5Ex_T_StringAttribute {
dataspace_id = H5.H5Screate(HDF5Constants.H5S_SCALAR);
if (dataspace_id >= 0) {
dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
H5.H5Sclose(dataspace_id);
dataspace_id = HDF5Constants.H5I_INVALID_HID;
}
@@ -99,7 +101,7 @@ public class H5Ex_T_StringAttribute {
try {
if ((dataset_id >= 0) && (dataspace_id >= 0) && (filetype_id >= 0))
attribute_id = H5.H5Acreate(dataset_id, ATTRIBUTENAME, filetype_id, dataspace_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -110,7 +112,7 @@ public class H5Ex_T_StringAttribute {
for (int indx = 0; indx < DIM0; indx++) {
for (int jndx = 0; jndx < SDIM; jndx++) {
if (jndx < str_data[indx].length())
- dset_data[indx][jndx] = (byte) str_data[indx].charAt(jndx);
+ dset_data[indx][jndx] = (byte)str_data[indx].charAt(jndx);
else
dset_data[indx][jndx] = 0;
}
@@ -174,18 +176,18 @@ public class H5Ex_T_StringAttribute {
catch (Exception e) {
e.printStackTrace();
}
-
}
- private static void ReadDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long filetype_id = HDF5Constants.H5I_INVALID_HID;
- long memtype_id = HDF5Constants.H5I_INVALID_HID;
+ private static void ReadDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long filetype_id = HDF5Constants.H5I_INVALID_HID;
+ long memtype_id = HDF5Constants.H5I_INVALID_HID;
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
long attribute_id = HDF5Constants.H5I_INVALID_HID;
- long sdim = 0;
- long[] dims = { DIM0 };
+ long sdim = 0;
+ long[] dims = {DIM0};
byte[][] dset_data;
StringBuffer[] str_data;
@@ -209,7 +211,7 @@ public class H5Ex_T_StringAttribute {
try {
if (dataset_id >= 0)
attribute_id = H5.H5Aopen_by_name(dataset_id, ".", ATTRIBUTENAME, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -246,8 +248,8 @@ public class H5Ex_T_StringAttribute {
}
// Allocate space for data.
- dset_data = new byte[(int) dims[0]][(int)sdim];
- str_data = new StringBuffer[(int) dims[0]];
+ dset_data = new byte[(int)dims[0]][(int)sdim];
+ str_data = new StringBuffer[(int)dims[0]];
// Create the memory datatype.
try {
@@ -264,7 +266,7 @@ public class H5Ex_T_StringAttribute {
if ((attribute_id >= 0) && (memtype_id >= 0))
H5.H5Aread(attribute_id, memtype_id, dset_data);
byte[] tempbuf = new byte[(int)sdim];
- for (int indx = 0; indx < (int) dims[0]; indx++) {
+ for (int indx = 0; indx < (int)dims[0]; indx++) {
for (int jndx = 0; jndx < sdim; jndx++) {
tempbuf[jndx] = dset_data[indx][jndx];
}
@@ -333,10 +335,10 @@ public class H5Ex_T_StringAttribute {
catch (Exception e) {
e.printStackTrace();
}
-
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
H5Ex_T_StringAttribute.CreateDataset();
// Now we begin the read section of this example. Here we assume
// the dataset and array have the same name and rank, but can have
@@ -344,5 +346,4 @@ public class H5Ex_T_StringAttribute {
// data using malloc().
H5Ex_T_StringAttribute.ReadDataset();
}
-
}
diff --git a/java/examples/datatypes/H5Ex_T_VLString.java b/java/examples/datatypes/H5Ex_T_VLString.java
index 8a29e60..1d4c2c4 100644
--- a/java/examples/datatypes/H5Ex_T_VLString.java
+++ b/java/examples/datatypes/H5Ex_T_VLString.java
@@ -19,24 +19,24 @@ package examples.datatypes;
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
-public class H5Ex_T_VLString
-{
- private static String FILENAME = "H5Ex_T_VLString.h5";
+public class H5Ex_T_VLString {
+ private static String FILENAME = "H5Ex_T_VLString.h5";
private static String DATASETNAME = "DS1";
- private static void createDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long type_id = HDF5Constants.H5I_INVALID_HID;
+ private static void createDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long type_id = HDF5Constants.H5I_INVALID_HID;
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- int rank = 1;
- String[] str_data = { "Parting", "is such", "sweet", "sorrow." };
- long[] dims = { str_data.length };
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ int rank = 1;
+ String[] str_data = {"Parting", "is such", "sweet", "sorrow."};
+ long[] dims = {str_data.length};
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -62,8 +62,9 @@ public class H5Ex_T_VLString
// Create the dataset and write the string data to it.
try {
if ((file_id >= 0) && (type_id >= 0) && (dataspace_id >= 0)) {
- dataset_id = H5.H5Dcreate(file_id, DATASETNAME, type_id, dataspace_id, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ dataset_id =
+ H5.H5Dcreate(file_id, DATASETNAME, type_id, dataspace_id, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
}
catch (Exception e) {
@@ -74,7 +75,7 @@ public class H5Ex_T_VLString
try {
if (dataset_id >= 0)
H5.H5Dwrite_VLStrings(dataset_id, type_id, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, str_data);
+ HDF5Constants.H5P_DEFAULT, str_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -91,11 +92,12 @@ public class H5Ex_T_VLString
}
}
- private static void readDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long type_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- String[] str_data = { "", "", "", "" };
+ private static void readDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long type_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ String[] str_data = {"", "", "", ""};
try {
file_id = H5.H5Fopen(FILENAME, HDF5Constants.H5F_ACC_RDONLY, HDF5Constants.H5P_DEFAULT);
@@ -106,9 +108,9 @@ public class H5Ex_T_VLString
try {
dataset_id = H5.H5Dopen(file_id, DATASETNAME, HDF5Constants.H5P_DEFAULT);
- type_id = H5.H5Dget_type(dataset_id);
- H5.H5Dread_VLStrings(dataset_id, type_id, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT,
- str_data);
+ type_id = H5.H5Dget_type(dataset_id);
+ H5.H5Dread_VLStrings(dataset_id, type_id, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5P_DEFAULT, str_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -127,9 +129,9 @@ public class H5Ex_T_VLString
}
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
H5Ex_T_VLString.createDataset();
H5Ex_T_VLString.readDataset();
}
-
}
diff --git a/java/examples/groups/CMakeLists.txt b/java/examples/groups/CMakeLists.txt
index 6483f91..9f20abf 100644
--- a/java/examples/groups/CMakeLists.txt
+++ b/java/examples/groups/CMakeLists.txt
@@ -36,6 +36,13 @@ foreach (example ${HDF_JAVA_EXAMPLES})
# install_jar (${example} ${HJAVA_INSTALL_DATA_DIR}/examples examples)
get_target_property (${example}_CLASSPATH ${example} CLASSDIR)
add_dependencies (${example} ${HDF5_JAVA_HDF5_LIB_TARGET})
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_JAVA_${example}_SRC_FORMAT ${example}.java)
+ endif ()
endforeach ()
set (CMAKE_JAVA_INCLUDE_PATH "${HDF5_JAVA_JARS};${HDF5_JAVA_LOGGING_JAR};${HDF5_JAVA_LOGGING_NOP_JAR}")
diff --git a/java/examples/groups/H5Ex_G_Compact.java b/java/examples/groups/H5Ex_G_Compact.java
index 313c9c7..2c6535a 100644
--- a/java/examples/groups/H5Ex_G_Compact.java
+++ b/java/examples/groups/H5Ex_G_Compact.java
@@ -16,14 +16,14 @@
package examples.groups;
-import hdf.hdf5lib.H5;
-import hdf.hdf5lib.HDF5Constants;
-import hdf.hdf5lib.structs.H5G_info_t;
-
import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;
+import hdf.hdf5lib.H5;
+import hdf.hdf5lib.HDF5Constants;
+import hdf.hdf5lib.structs.H5G_info_t;
+
public class H5Ex_G_Compact {
private static final String FILE1 = "H5Ex_G_Compact1.h5";
@@ -38,44 +38,42 @@ public class H5Ex_G_Compact {
private static final Map<Integer, H5G_storage> lookup = new HashMap<Integer, H5G_storage>();
- static {
+ static
+ {
for (H5G_storage s : EnumSet.allOf(H5G_storage.class))
lookup.put(s.getCode(), s);
}
private int code;
- H5G_storage(int layout_type) {
- this.code = layout_type;
- }
+ H5G_storage(int layout_type) { this.code = layout_type; }
- public int getCode() {
- return this.code;
- }
+ public int getCode() { return this.code; }
- public static H5G_storage get(int code) {
- return lookup.get(code);
- }
+ public static H5G_storage get(int code) { return lookup.get(code); }
}
- public static void CreateGroup() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ public static void CreateGroup()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long group_id = HDF5Constants.H5I_INVALID_HID;
- long fapl_id = HDF5Constants.H5I_INVALID_HID;
+ long fapl_id = HDF5Constants.H5I_INVALID_HID;
H5G_info_t ginfo;
long size;
// Create file 1. This file will use original format groups.
try {
- file_id = H5.H5Fcreate (FILE1, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ file_id = H5.H5Fcreate(FILE1, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
}
// Create a group in the file1.
try {
- if(file_id >= 0)
- group_id = H5.H5Gcreate(file_id, GROUP, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ if (file_id >= 0)
+ group_id = H5.H5Gcreate(file_id, GROUP, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -83,7 +81,7 @@ public class H5Ex_G_Compact {
// Obtain the group info and print the group storage type.
try {
- if(group_id >= 0) {
+ if (group_id >= 0) {
ginfo = H5.H5Gget_info(group_id);
System.out.print("Group storage type for " + FILE1 + " is: ");
switch (H5G_storage.get(ginfo.storage_type)) {
@@ -160,7 +158,8 @@ public class H5Ex_G_Compact {
try {
fapl_id = H5.H5Pcreate(HDF5Constants.H5P_FILE_ACCESS);
if (fapl_id >= 0)
- H5.H5Pset_libver_bounds(fapl_id, HDF5Constants.H5F_LIBVER_LATEST, HDF5Constants.H5F_LIBVER_LATEST);
+ H5.H5Pset_libver_bounds(fapl_id, HDF5Constants.H5F_LIBVER_LATEST,
+ HDF5Constants.H5F_LIBVER_LATEST);
}
catch (Exception e) {
e.printStackTrace();
@@ -175,8 +174,9 @@ public class H5Ex_G_Compact {
}
// Create group in file2.
try {
- if(file_id >= 0)
- group_id = H5.H5Gcreate(file_id, GROUP, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ if (file_id >= 0)
+ group_id = H5.H5Gcreate(file_id, GROUP, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -257,7 +257,5 @@ public class H5Ex_G_Compact {
}
}
- public static void main(String[] args) {
- H5Ex_G_Compact.CreateGroup();
- }
+ public static void main(String[] args) { H5Ex_G_Compact.CreateGroup(); }
}
diff --git a/java/examples/groups/H5Ex_G_Corder.java b/java/examples/groups/H5Ex_G_Corder.java
index 4fa5aa2..86a790d 100644
--- a/java/examples/groups/H5Ex_G_Corder.java
+++ b/java/examples/groups/H5Ex_G_Corder.java
@@ -23,11 +23,12 @@ import hdf.hdf5lib.structs.H5G_info_t;
public class H5Ex_G_Corder {
private static String FILE = "H5Ex_G_Corder.h5";
- private static void CreateGroup() throws Exception {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long group_id = HDF5Constants.H5I_INVALID_HID;
+ private static void CreateGroup() throws Exception
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long group_id = HDF5Constants.H5I_INVALID_HID;
long subgroup_id = HDF5Constants.H5I_INVALID_HID;
- long gcpl_id = HDF5Constants.H5I_INVALID_HID;
+ long gcpl_id = HDF5Constants.H5I_INVALID_HID;
int status;
H5G_info_t ginfo;
int i;
@@ -36,35 +37,35 @@ public class H5Ex_G_Corder {
try {
// Create a new file using default properties.
file_id = H5.H5Fcreate(FILE, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
// Create group creation property list and enable link creation order tracking.
gcpl_id = H5.H5Pcreate(HDF5Constants.H5P_GROUP_CREATE);
- status = H5.H5Pset_link_creation_order(gcpl_id, HDF5Constants.H5P_CRT_ORDER_TRACKED
- + HDF5Constants.H5P_CRT_ORDER_INDEXED);
+ status = H5.H5Pset_link_creation_order(gcpl_id, HDF5Constants.H5P_CRT_ORDER_TRACKED +
+ HDF5Constants.H5P_CRT_ORDER_INDEXED);
// Create primary group using the property list.
if (status >= 0)
group_id = H5.H5Gcreate(file_id, "index_group", HDF5Constants.H5P_DEFAULT, gcpl_id,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
try {
/*
- * Create subgroups in the primary group. These will be tracked by creation order. Note that these
- * groups do not have to have the creation order tracking property set.
+ * Create subgroups in the primary group. These will be tracked by creation order. Note that
+ * these groups do not have to have the creation order tracking property set.
*/
- subgroup_id = H5.H5Gcreate(group_id, "H", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
- status = H5.H5Gclose(subgroup_id);
- subgroup_id = H5.H5Gcreate(group_id, "D", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
- status = H5.H5Gclose(subgroup_id);
- subgroup_id = H5.H5Gcreate(group_id, "F", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
- status = H5.H5Gclose(subgroup_id);
- subgroup_id = H5.H5Gcreate(group_id, "5", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
- status = H5.H5Gclose(subgroup_id);
+ subgroup_id = H5.H5Gcreate(group_id, "H", HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ status = H5.H5Gclose(subgroup_id);
+ subgroup_id = H5.H5Gcreate(group_id, "D", HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ status = H5.H5Gclose(subgroup_id);
+ subgroup_id = H5.H5Gcreate(group_id, "F", HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ status = H5.H5Gclose(subgroup_id);
+ subgroup_id = H5.H5Gcreate(group_id, "5", HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ status = H5.H5Gclose(subgroup_id);
// Get group info.
ginfo = H5.H5Gget_info(group_id);
@@ -73,8 +74,8 @@ public class H5Ex_G_Corder {
System.out.println("Traversing group using alphabetical indices:");
for (i = 0; i < ginfo.nlinks; i++) {
// Retrieve the name of the ith link in a group
- name = H5.H5Lget_name_by_idx(group_id, ".", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC,
- i, HDF5Constants.H5P_DEFAULT);
+ name = H5.H5Lget_name_by_idx(group_id, ".", HDF5Constants.H5_INDEX_NAME,
+ HDF5Constants.H5_ITER_INC, i, HDF5Constants.H5P_DEFAULT);
System.out.println("Index " + i + ": " + name);
}
@@ -83,10 +84,9 @@ public class H5Ex_G_Corder {
for (i = 0; i < ginfo.nlinks; i++) {
// Retrieve the name of the ith link in a group
name = H5.H5Lget_name_by_idx(group_id, ".", HDF5Constants.H5_INDEX_CRT_ORDER,
- HDF5Constants.H5_ITER_INC, i, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5_ITER_INC, i, HDF5Constants.H5P_DEFAULT);
System.out.println("Index " + i + ": " + name);
}
-
}
catch (Exception e) {
e.printStackTrace();
@@ -106,7 +106,8 @@ public class H5Ex_G_Corder {
}
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
try {
H5Ex_G_Corder.CreateGroup();
}
@@ -114,5 +115,4 @@ public class H5Ex_G_Corder {
ex.printStackTrace();
}
}
-
}
diff --git a/java/examples/groups/H5Ex_G_Create.java b/java/examples/groups/H5Ex_G_Create.java
index 9304538..51804b9 100644
--- a/java/examples/groups/H5Ex_G_Create.java
+++ b/java/examples/groups/H5Ex_G_Create.java
@@ -20,17 +20,18 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5Ex_G_Create {
- private static String FILENAME = "H5Ex_G_Create.h5";
+ private static String FILENAME = "H5Ex_G_Create.h5";
private static String GROUPNAME = "G1";
- private static void CreateGroup() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void CreateGroup()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long group_id = HDF5Constants.H5I_INVALID_HID;
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -39,8 +40,8 @@ public class H5Ex_G_Create {
// Create a group in the file.
try {
if (file_id >= 0)
- group_id = H5.H5Gcreate(file_id, "/" + GROUPNAME, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ group_id = H5.H5Gcreate(file_id, "/" + GROUPNAME, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -81,11 +82,7 @@ public class H5Ex_G_Create {
catch (Exception e) {
e.printStackTrace();
}
-
- }
-
- public static void main(String[] args) {
- H5Ex_G_Create.CreateGroup();
}
+ public static void main(String[] args) { H5Ex_G_Create.CreateGroup(); }
}
diff --git a/java/examples/groups/H5Ex_G_Intermediate.java b/java/examples/groups/H5Ex_G_Intermediate.java
index ad0290c..e638fd0 100644
--- a/java/examples/groups/H5Ex_G_Intermediate.java
+++ b/java/examples/groups/H5Ex_G_Intermediate.java
@@ -16,47 +16,49 @@
************************************************************/
package examples.groups;
+import java.util.ArrayList;
+
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
-import hdf.hdf5lib.callbacks.H5O_iterate_t;
import hdf.hdf5lib.callbacks.H5O_iterate_opdata_t;
+import hdf.hdf5lib.callbacks.H5O_iterate_t;
import hdf.hdf5lib.structs.H5O_info_t;
-import java.util.ArrayList;
-
public class H5Ex_G_Intermediate {
private static String FILE = "H5Ex_G_Intermediate.h5";
- private void CreateGroup() throws Exception {
+ private void CreateGroup() throws Exception
+ {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long group_id = HDF5Constants.H5I_INVALID_HID;
- long gcpl_id = HDF5Constants.H5I_INVALID_HID;
+ long gcpl_id = HDF5Constants.H5I_INVALID_HID;
try {
// Create a new file_id using the default properties.
file_id = H5.H5Fcreate(FILE, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
// Create group_id creation property list and set it to allow creation of intermediate group_ids.
gcpl_id = H5.H5Pcreate(HDF5Constants.H5P_LINK_CREATE);
H5.H5Pset_create_intermediate_group(gcpl_id, true);
/*
- * Create the group_id /G1/G2/G3. Note that /G1 and /G1/G2 do not exist yet. This call would cause an error
- * if we did not use the previously created property list.
+ * Create the group_id /G1/G2/G3. Note that /G1 and /G1/G2 do not exist yet. This call would cause
+ * an error if we did not use the previously created property list.
*/
- group_id = H5
- .H5Gcreate(file_id, "/G1/G2/G3", gcpl_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ group_id = H5.H5Gcreate(file_id, "/G1/G2/G3", gcpl_id, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
// Print all the objects in the file_ids to show that intermediate group_ids have been created.
System.out.println("Objects in the file_id:");
// H5O_iterate_opdata_t iter_data = null;
H5O_iterate_opdata_t iter_data = new H5O_iter_data();
- H5O_iterate_t iter_cb = new H5O_iter_callback();
+ H5O_iterate_t iter_cb = new H5O_iter_callback();
- H5.H5Ovisit(file_id, HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_NATIVE, iter_cb, iter_data);
+ H5.H5Ovisit(file_id, HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_NATIVE, iter_cb,
+ iter_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -72,7 +74,8 @@ public class H5Ex_G_Intermediate {
}
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
try {
(new H5Ex_G_Intermediate()).CreateGroup();
}
@@ -83,9 +86,10 @@ public class H5Ex_G_Intermediate {
private class idata {
public String link_name = null;
- public int link_type = -1;
+ public int link_type = -1;
- idata(String name, int type) {
+ idata(String name, int type)
+ {
this.link_name = name;
this.link_type = type;
}
@@ -96,9 +100,10 @@ public class H5Ex_G_Intermediate {
}
private class H5O_iter_callback implements H5O_iterate_t {
- public int callback(long group, String name, H5O_info_t info, H5O_iterate_opdata_t op_data) {
+ public int callback(long group, String name, H5O_info_t info, H5O_iterate_opdata_t op_data)
+ {
idata id = new idata(name, info.type);
- ((H5O_iter_data) op_data).iterdata.add(id);
+ ((H5O_iter_data)op_data).iterdata.add(id);
System.out.print("/"); /* Print root group in object path */
@@ -118,5 +123,4 @@ public class H5Ex_G_Intermediate {
return 0;
}
}
-
}
diff --git a/java/examples/groups/H5Ex_G_Iterate.java b/java/examples/groups/H5Ex_G_Iterate.java
index 6caecac..24cbb0a 100644
--- a/java/examples/groups/H5Ex_G_Iterate.java
+++ b/java/examples/groups/H5Ex_G_Iterate.java
@@ -16,47 +16,43 @@
************************************************************/
package examples.groups;
-import hdf.hdf5lib.H5;
-import hdf.hdf5lib.HDF5Constants;
-import hdf.hdf5lib.structs.H5O_token_t;
-
import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;
+import hdf.hdf5lib.H5;
+import hdf.hdf5lib.HDF5Constants;
+import hdf.hdf5lib.structs.H5O_token_t;
+
public class H5Ex_G_Iterate {
- private static String FILENAME = "groups/h5ex_g_iterate.h5";
+ private static String FILENAME = "groups/h5ex_g_iterate.h5";
private static String DATASETNAME = "/";
enum H5O_type {
- H5O_TYPE_UNKNOWN(-1), // Unknown object type
- H5O_TYPE_GROUP(0), // Object is a group
- H5O_TYPE_DATASET(1), // Object is a dataset
+ H5O_TYPE_UNKNOWN(-1), // Unknown object type
+ H5O_TYPE_GROUP(0), // Object is a group
+ H5O_TYPE_DATASET(1), // Object is a dataset
H5O_TYPE_NAMED_DATATYPE(2), // Object is a named data type
- H5O_TYPE_NTYPES(3); // Number of different object types
+ H5O_TYPE_NTYPES(3); // Number of different object types
private static final Map<Integer, H5O_type> lookup = new HashMap<Integer, H5O_type>();
- static {
+ static
+ {
for (H5O_type s : EnumSet.allOf(H5O_type.class))
lookup.put(s.getCode(), s);
}
private int code;
- H5O_type(int layout_type) {
- this.code = layout_type;
- }
+ H5O_type(int layout_type) { this.code = layout_type; }
- public int getCode() {
- return this.code;
- }
+ public int getCode() { return this.code; }
- public static H5O_type get(int code) {
- return lookup.get(code);
- }
+ public static H5O_type get(int code) { return lookup.get(code); }
}
- private static void do_iterate() {
+ private static void do_iterate()
+ {
long file_id = HDF5Constants.H5I_INVALID_HID;
// Open a file using default properties.
@@ -71,12 +67,13 @@ public class H5Ex_G_Iterate {
System.out.println("Objects in root group:");
try {
if (file_id >= 0) {
- int count = (int) H5.H5Gn_members(file_id, DATASETNAME);
- String[] oname = new String[count];
- int[] otype = new int[count];
- int[] ltype = new int[count];
+ int count = (int)H5.H5Gn_members(file_id, DATASETNAME);
+ String[] oname = new String[count];
+ int[] otype = new int[count];
+ int[] ltype = new int[count];
H5O_token_t[] otokens = new H5O_token_t[count];
- H5.H5Gget_obj_info_all(file_id, DATASETNAME, oname, otype, ltype, otokens, HDF5Constants.H5_INDEX_NAME);
+ H5.H5Gget_obj_info_all(file_id, DATASETNAME, oname, otype, ltype, otokens,
+ HDF5Constants.H5_INDEX_NAME);
// Get type of the object and display its name and type.
for (int indx = 0; indx < otype.length; indx++) {
@@ -110,8 +107,5 @@ public class H5Ex_G_Iterate {
}
}
- public static void main(String[] args) {
- H5Ex_G_Iterate.do_iterate();
- }
-
+ public static void main(String[] args) { H5Ex_G_Iterate.do_iterate(); }
}
diff --git a/java/examples/groups/H5Ex_G_Phase.java b/java/examples/groups/H5Ex_G_Phase.java
index 67a2f53..7a3fba3 100644
--- a/java/examples/groups/H5Ex_G_Phase.java
+++ b/java/examples/groups/H5Ex_G_Phase.java
@@ -16,19 +16,19 @@
************************************************************/
package examples.groups;
-import hdf.hdf5lib.H5;
-import hdf.hdf5lib.HDF5Constants;
-import hdf.hdf5lib.structs.H5G_info_t;
-
import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;
+import hdf.hdf5lib.H5;
+import hdf.hdf5lib.HDF5Constants;
+import hdf.hdf5lib.structs.H5G_info_t;
+
public class H5Ex_G_Phase {
- private static String FILE = "H5Ex_G_Phase.h5";
- private static int MAX_GROUPS = 7;
+ private static String FILE = "H5Ex_G_Phase.h5";
+ private static int MAX_GROUPS = 7;
private static int MAX_COMPACT = 5;
- private static int MIN_DENSE = 3;
+ private static int MIN_DENSE = 3;
enum H5G_storage {
H5G_STORAGE_TYPE_UNKNOWN(-1),
@@ -38,42 +38,39 @@ public class H5Ex_G_Phase {
private static final Map<Integer, H5G_storage> lookup = new HashMap<Integer, H5G_storage>();
- static {
+ static
+ {
for (H5G_storage s : EnumSet.allOf(H5G_storage.class))
lookup.put(s.getCode(), s);
}
private int code;
- H5G_storage(int layout_type) {
- this.code = layout_type;
- }
+ H5G_storage(int layout_type) { this.code = layout_type; }
- public int getCode() {
- return this.code;
- }
+ public int getCode() { return this.code; }
- public static H5G_storage get(int code) {
- return lookup.get(code);
- }
+ public static H5G_storage get(int code) { return lookup.get(code); }
}
- private static void CreateGroup() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long group_id = HDF5Constants.H5I_INVALID_HID;
+ private static void CreateGroup()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long group_id = HDF5Constants.H5I_INVALID_HID;
long subgroup_id = HDF5Constants.H5I_INVALID_HID;
- long fapl_id = HDF5Constants.H5I_INVALID_HID;
- long gcpl_id = HDF5Constants.H5I_INVALID_HID;
+ long fapl_id = HDF5Constants.H5I_INVALID_HID;
+ long gcpl_id = HDF5Constants.H5I_INVALID_HID;
H5G_info_t ginfo;
String name = "G0"; // Name of subgroup_id
int i;
- // Set file access property list to allow the latest file format.This will allow the library to create new
- // format groups.
+ // Set file access property list to allow the latest file format.This will allow the library to create
+ // new format groups.
try {
fapl_id = H5.H5Pcreate(HDF5Constants.H5P_FILE_ACCESS);
if (fapl_id >= 0)
- H5.H5Pset_libver_bounds(fapl_id, HDF5Constants.H5F_LIBVER_LATEST, HDF5Constants.H5F_LIBVER_LATEST);
+ H5.H5Pset_libver_bounds(fapl_id, HDF5Constants.H5F_LIBVER_LATEST,
+ HDF5Constants.H5F_LIBVER_LATEST);
}
catch (Exception e) {
e.printStackTrace();
@@ -101,21 +98,23 @@ public class H5Ex_G_Phase {
// Create primary group.
try {
if ((file_id >= 0) && (gcpl_id >= 0))
- group_id = H5.H5Gcreate(file_id, name, HDF5Constants.H5P_DEFAULT, gcpl_id, HDF5Constants.H5P_DEFAULT);
+ group_id = H5.H5Gcreate(file_id, name, HDF5Constants.H5P_DEFAULT, gcpl_id,
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
}
- // Add subgroups to "group" one at a time, print the storage type for "group" after each subgroup is created.
+ // Add subgroups to "group" one at a time, print the storage type for "group" after each subgroup is
+ // created.
for (i = 1; i <= MAX_GROUPS; i++) {
// Define the subgroup name and create the subgroup.
- char append = (char) (((char) i) + '0');
- name = name + append; /* G1, G2, G3 etc. */
+ char append = (char)(((char)i) + '0');
+ name = name + append; /* G1, G2, G3 etc. */
try {
if (group_id >= 0) {
- subgroup_id = H5.H5Gcreate(group_id, name, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ subgroup_id = H5.H5Gcreate(group_id, name, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
H5.H5Gclose(subgroup_id);
}
}
@@ -127,7 +126,8 @@ public class H5Ex_G_Phase {
try {
if (group_id >= 0) {
ginfo = H5.H5Gget_info(group_id);
- System.out.print(ginfo.nlinks + " Group" + (ginfo.nlinks == 1 ? " " : "s") + ": Storage type is ");
+ System.out.print(ginfo.nlinks + " Group" + (ginfo.nlinks == 1 ? " " : "s") +
+ ": Storage type is ");
switch (H5G_storage.get(ginfo.storage_type)) {
case H5G_STORAGE_TYPE_COMPACT:
System.out.println("H5G_STORAGE_TYPE_COMPACT"); // New compact format
@@ -169,7 +169,8 @@ public class H5Ex_G_Phase {
try {
if (group_id >= 0) {
ginfo = H5.H5Gget_info(group_id);
- System.out.print(ginfo.nlinks + " Group" + (ginfo.nlinks == 1 ? " " : "s") + ": Storage type is ");
+ System.out.print(ginfo.nlinks + " Group" + (ginfo.nlinks == 1 ? " " : "s") +
+ ": Storage type is ");
switch (H5G_storage.get(ginfo.storage_type)) {
case H5G_STORAGE_TYPE_COMPACT:
System.out.println("H5G_STORAGE_TYPE_COMPACT"); // New compact format
@@ -228,11 +229,7 @@ public class H5Ex_G_Phase {
catch (Exception e) {
e.printStackTrace();
}
-
- }
-
- public static void main(String[] args) {
- H5Ex_G_Phase.CreateGroup();
}
+ public static void main(String[] args) { H5Ex_G_Phase.CreateGroup(); }
}
diff --git a/java/examples/groups/H5Ex_G_Traverse.java b/java/examples/groups/H5Ex_G_Traverse.java
index c5b6373..cd60f6b 100644
--- a/java/examples/groups/H5Ex_G_Traverse.java
+++ b/java/examples/groups/H5Ex_G_Traverse.java
@@ -24,10 +24,11 @@ package examples.groups;
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
-import hdf.hdf5lib.callbacks.H5L_iterate_t;
import hdf.hdf5lib.callbacks.H5L_iterate_opdata_t;
+import hdf.hdf5lib.callbacks.H5L_iterate_t;
import hdf.hdf5lib.structs.H5L_info_t;
import hdf.hdf5lib.structs.H5O_info_t;
+
import examples.groups.H5Ex_G_Iterate.H5O_type;
class opdata implements H5L_iterate_opdata_t {
@@ -38,10 +39,11 @@ class opdata implements H5L_iterate_opdata_t {
public class H5Ex_G_Traverse {
- private static String FILE = "h5ex_g_traverse.h5";
+ private static String FILE = "h5ex_g_traverse.h5";
public static H5L_iterate_t iter_cb = new H5L_iter_callbackT();
- private static void OpenGroup() {
+ private static void OpenGroup()
+ {
long file_id = HDF5Constants.H5I_INVALID_HID;
H5O_info_t infobuf;
opdata od = new opdata();
@@ -50,9 +52,9 @@ public class H5Ex_G_Traverse {
try {
file_id = H5.H5Fopen(FILE, HDF5Constants.H5F_ACC_RDONLY, HDF5Constants.H5P_DEFAULT);
if (file_id >= 0) {
- infobuf = H5.H5Oget_info(file_id);
- od.recurs = 0;
- od.prev = null;
+ infobuf = H5.H5Oget_info(file_id);
+ od.recurs = 0;
+ od.prev = null;
od.obj_token = infobuf.token;
}
}
@@ -64,7 +66,8 @@ public class H5Ex_G_Traverse {
try {
System.out.println("/ {");
// H5L_iterate_t iter_cb = new H5L_iter_callbackT();
- H5.H5Literate(file_id, HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_NATIVE, 0L, iter_cb, od);
+ H5.H5Literate(file_id, HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_NATIVE, 0L, iter_cb,
+ od);
System.out.println("}");
}
catch (Exception e) {
@@ -81,18 +84,17 @@ public class H5Ex_G_Traverse {
}
}
- public static void main(String[] args) {
- H5Ex_G_Traverse.OpenGroup();
- }
+ public static void main(String[] args) { H5Ex_G_Traverse.OpenGroup(); }
}
class H5L_iter_callbackT implements H5L_iterate_t {
- public int callback(long group, String name, H5L_info_t info, H5L_iterate_opdata_t op_data) {
+ public int callback(long group, String name, H5L_info_t info, H5L_iterate_opdata_t op_data)
+ {
H5O_info_t infobuf;
int return_val = 0;
- opdata od = (opdata) op_data; // Type conversion
- int spaces = 2 * (od.recurs + 1); // Number of white spaces to prepend to output.
+ opdata od = (opdata)op_data; // Type conversion
+ int spaces = 2 * (od.recurs + 1); // Number of white spaces to prepend to output.
// Get type of the object and display its name and type.
// The name of the object is passed to this function by the Library.
@@ -123,13 +125,14 @@ class H5L_iter_callbackT implements H5L_iterate_t {
// recursive iteration on the discovered
// group. The new opdata is given a pointer to the
// current one.
- opdata nextod = new opdata();
- nextod.recurs = od.recurs + 1;
- nextod.prev = od;
- nextod.obj_token = infobuf.token;
+ opdata nextod = new opdata();
+ nextod.recurs = od.recurs + 1;
+ nextod.prev = od;
+ nextod.obj_token = infobuf.token;
H5L_iterate_t iter_cb2 = new H5L_iter_callbackT();
- return_val = H5.H5Literate_by_name(group, name, HDF5Constants.H5_INDEX_NAME,
- HDF5Constants.H5_ITER_NATIVE, 0L, iter_cb2, nextod, HDF5Constants.H5P_DEFAULT);
+ return_val = H5.H5Literate_by_name(group, name, HDF5Constants.H5_INDEX_NAME,
+ HDF5Constants.H5_ITER_NATIVE, 0L, iter_cb2, nextod,
+ HDF5Constants.H5P_DEFAULT);
}
for (int i = 0; i < spaces; i++)
System.out.print(" ");
@@ -152,7 +155,8 @@ class H5L_iter_callbackT implements H5L_iterate_t {
return return_val;
}
- public boolean group_check(opdata od, H5O_token_t target_token) {
+ public boolean group_check(opdata od, H5O_token_t target_token)
+ {
if (od.obj_token.equals(target_token))
return true; // Object tokens match
else if (od.recurs == 0)
@@ -160,5 +164,4 @@ class H5L_iter_callbackT implements H5L_iterate_t {
else
return group_check(od.prev, target_token); // Recursively examine the next node
}
-
}
diff --git a/java/examples/groups/H5Ex_G_Visit.java b/java/examples/groups/H5Ex_G_Visit.java
index 790be80..d14ded6 100644
--- a/java/examples/groups/H5Ex_G_Visit.java
+++ b/java/examples/groups/H5Ex_G_Visit.java
@@ -20,22 +20,23 @@
************************************************************/
package examples.groups;
+import java.util.ArrayList;
+
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
-import hdf.hdf5lib.callbacks.H5L_iterate_t;
import hdf.hdf5lib.callbacks.H5L_iterate_opdata_t;
-import hdf.hdf5lib.callbacks.H5O_iterate_t;
+import hdf.hdf5lib.callbacks.H5L_iterate_t;
import hdf.hdf5lib.callbacks.H5O_iterate_opdata_t;
+import hdf.hdf5lib.callbacks.H5O_iterate_t;
import hdf.hdf5lib.structs.H5L_info_t;
import hdf.hdf5lib.structs.H5O_info_t;
-import java.util.ArrayList;
-
public class H5Ex_G_Visit {
private static String FILE = "groups/h5ex_g_visit.h5";
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
try {
(new H5Ex_G_Visit()).VisitGroup();
}
@@ -44,7 +45,8 @@ public class H5Ex_G_Visit {
}
}
- private void VisitGroup() throws Exception {
+ private void VisitGroup() throws Exception
+ {
long file_id = HDF5Constants.H5I_INVALID_HID;
@@ -55,15 +57,16 @@ public class H5Ex_G_Visit {
// Begin iteration using H5Ovisit
System.out.println("Objects in the file:");
H5O_iterate_opdata_t iter_data = new H5O_iter_data();
- H5O_iterate_t iter_cb = new H5O_iter_callback();
- H5.H5Ovisit(file_id, HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_NATIVE, iter_cb, iter_data);
+ H5O_iterate_t iter_cb = new H5O_iter_callback();
+ H5.H5Ovisit(file_id, HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_NATIVE, iter_cb,
+ iter_data);
System.out.println();
// Repeat the same process using H5Lvisit
H5L_iterate_opdata_t iter_data2 = new H5L_iter_data();
- H5L_iterate_t iter_cb2 = new H5L_iter_callback();
+ H5L_iterate_t iter_cb2 = new H5L_iter_callback();
System.out.println("Links in the file:");
- H5.H5Lvisit(file_id, HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_NATIVE, iter_cb2, iter_data2);
-
+ H5.H5Lvisit(file_id, HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_NATIVE, iter_cb2,
+ iter_data2);
}
catch (Exception e) {
e.printStackTrace();
@@ -76,15 +79,16 @@ public class H5Ex_G_Visit {
}
/************************************************************
- * Operator function for H5Lvisit. This function simply retrieves the info for the object the current link points
- * to, and calls the operator function for H5Ovisit.
+ * Operator function for H5Lvisit. This function simply retrieves the info for the object the current link
+ *points to, and calls the operator function for H5Ovisit.
************************************************************/
private class idata {
public String link_name = null;
- public int link_type = -1;
+ public int link_type = -1;
- idata(String name, int type) {
+ idata(String name, int type)
+ {
this.link_name = name;
this.link_type = type;
}
@@ -95,20 +99,21 @@ public class H5Ex_G_Visit {
}
private class H5L_iter_callback implements H5L_iterate_t {
- public int callback(long group, String name, H5L_info_t info, H5L_iterate_opdata_t op_data) {
+ public int callback(long group, String name, H5L_info_t info, H5L_iterate_opdata_t op_data)
+ {
idata id = new idata(name, info.type);
- ((H5L_iter_data) op_data).iterdata.add(id);
+ ((H5L_iter_data)op_data).iterdata.add(id);
H5O_info_t infobuf;
int ret = 0;
try {
- // Get type of the object and display its name and type. The name of the object is passed to this
- // function by the Library.
- infobuf = H5.H5Oget_info_by_name(group, name, HDF5Constants.H5P_DEFAULT);
+ // Get type of the object and display its name and type. The name of the object is passed to
+ // this function by the Library.
+ infobuf = H5.H5Oget_info_by_name(group, name, HDF5Constants.H5P_DEFAULT);
H5O_iterate_t iter_cbO = new H5O_iter_callback();
H5O_iterate_opdata_t iter_dataO = new H5O_iter_data();
- ret = iter_cbO.callback(group, name, infobuf, iter_dataO);
+ ret = iter_cbO.callback(group, name, infobuf, iter_dataO);
}
catch (Exception e) {
e.printStackTrace();
@@ -123,9 +128,10 @@ public class H5Ex_G_Visit {
}
private class H5O_iter_callback implements H5O_iterate_t {
- public int callback(long group, String name, H5O_info_t info, H5O_iterate_opdata_t op_data) {
+ public int callback(long group, String name, H5O_info_t info, H5O_iterate_opdata_t op_data)
+ {
idata id = new idata(name, info.type);
- ((H5O_iter_data) op_data).iterdata.add(id);
+ ((H5O_iter_data)op_data).iterdata.add(id);
System.out.print("/"); /* Print root group in object path */
@@ -145,5 +151,4 @@ public class H5Ex_G_Visit {
return 0;
}
}
-
}
diff --git a/java/examples/intro/CMakeLists.txt b/java/examples/intro/CMakeLists.txt
index 867740b..a5e2a67 100644
--- a/java/examples/intro/CMakeLists.txt
+++ b/java/examples/intro/CMakeLists.txt
@@ -36,6 +36,13 @@ foreach (example ${HDF_JAVA_EXAMPLES})
# install_jar (${example} ${HJAVA_INSTALL_DATA_DIR}/examples examples)
get_target_property (${example}_CLASSPATH ${example} CLASSDIR)
add_dependencies (${example} ${HDF5_JAVA_HDF5_LIB_TARGET})
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_JAVA_${example}_SRC_FORMAT ${example}.java)
+ endif ()
endforeach ()
set (CMAKE_JAVA_INCLUDE_PATH "${HDF5_JAVA_JARS};${HDF5_JAVA_LOGGING_JAR};${HDF5_JAVA_LOGGING_NOP_JAR}")
diff --git a/java/examples/intro/H5_CreateAttribute.java b/java/examples/intro/H5_CreateAttribute.java
index 949a770..22ecdae 100644
--- a/java/examples/intro/H5_CreateAttribute.java
+++ b/java/examples/intro/H5_CreateAttribute.java
@@ -20,25 +20,26 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5_CreateAttribute {
- private static String FILENAME = "H5_CreateAttribute.h5";
- private static String DATASETNAME = "dset";
- private static final int DIM_X = 4;
- private static final int DIM_Y = 6;
+ private static String FILENAME = "H5_CreateAttribute.h5";
+ private static String DATASETNAME = "dset";
+ private static final int DIM_X = 4;
+ private static final int DIM_Y = 6;
private static String DATASETATTRIBUTE = "Units";
- private static void CreateDatasetAttribute() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void CreateDatasetAttribute()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
long attribute_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims1 = { DIM_X, DIM_Y };
- long[] dims = { 2 };
- int[] attr_data = { 100, 200 };
+ long[] dims1 = {DIM_X, DIM_Y};
+ long[] dims = {2};
+ int[] attr_data = {100, 200};
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -55,8 +56,9 @@ public class H5_CreateAttribute {
// Create the dataset.
try {
if ((file_id >= 0) && (dataspace_id >= 0))
- dataset_id = H5.H5Dcreate(file_id, "/" + DATASETNAME, HDF5Constants.H5T_STD_I32BE, dataspace_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ dataset_id = H5.H5Dcreate(file_id, "/" + DATASETNAME, HDF5Constants.H5T_STD_I32BE,
+ dataspace_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -82,8 +84,9 @@ public class H5_CreateAttribute {
// Create a dataset attribute.
try {
if ((dataset_id >= 0) && (dataspace_id >= 0))
- attribute_id = H5.H5Acreate(dataset_id, DATASETATTRIBUTE, HDF5Constants.H5T_STD_I32BE, dataspace_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ attribute_id =
+ H5.H5Acreate(dataset_id, DATASETATTRIBUTE, HDF5Constants.H5T_STD_I32BE, dataspace_id,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -135,8 +138,5 @@ public class H5_CreateAttribute {
}
}
- public static void main(String[] args) {
- H5_CreateAttribute.CreateDatasetAttribute();
- }
-
+ public static void main(String[] args) { H5_CreateAttribute.CreateDatasetAttribute(); }
}
diff --git a/java/examples/intro/H5_CreateDataset.java b/java/examples/intro/H5_CreateDataset.java
index f938be2..20683e8 100644
--- a/java/examples/intro/H5_CreateDataset.java
+++ b/java/examples/intro/H5_CreateDataset.java
@@ -20,21 +20,22 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5_CreateDataset {
- private static String FILENAME = "H5_CreateDataset.h5";
+ private static String FILENAME = "H5_CreateDataset.h5";
private static String DATASETNAME = "dset";
- private static final int DIM_X = 4;
- private static final int DIM_Y = 6;
+ private static final int DIM_X = 4;
+ private static final int DIM_Y = 6;
- private static void CreateDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void CreateDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM_X, DIM_Y };
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM_X, DIM_Y};
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -51,8 +52,9 @@ public class H5_CreateDataset {
// Create the dataset.
try {
if ((file_id >= 0) && (dataspace_id >= 0))
- dataset_id = H5.H5Dcreate(file_id, "/" + DATASETNAME, HDF5Constants.H5T_STD_I32BE, dataspace_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ dataset_id = H5.H5Dcreate(file_id, "/" + DATASETNAME, HDF5Constants.H5T_STD_I32BE,
+ dataspace_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -84,11 +86,7 @@ public class H5_CreateDataset {
catch (Exception e) {
e.printStackTrace();
}
-
- }
-
- public static void main(String[] args) {
- H5_CreateDataset.CreateDataset();
}
+ public static void main(String[] args) { H5_CreateDataset.CreateDataset(); }
}
diff --git a/java/examples/intro/H5_CreateFile.java b/java/examples/intro/H5_CreateFile.java
index d48ba6c..4323581 100644
--- a/java/examples/intro/H5_CreateFile.java
+++ b/java/examples/intro/H5_CreateFile.java
@@ -22,13 +22,14 @@ import hdf.hdf5lib.HDF5Constants;
public class H5_CreateFile {
static final String FILENAME = "H5_CreateFile.h5";
- private static void CreateFile() {
+ private static void CreateFile()
+ {
long file_id = HDF5Constants.H5I_INVALID_HID;
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -42,11 +43,7 @@ public class H5_CreateFile {
catch (Exception e) {
e.printStackTrace();
}
-
- }
-
- public static void main(String[] args) {
- H5_CreateFile.CreateFile();
}
+ public static void main(String[] args) { H5_CreateFile.CreateFile(); }
}
diff --git a/java/examples/intro/H5_CreateGroup.java b/java/examples/intro/H5_CreateGroup.java
index c0bb954..a276cbd 100644
--- a/java/examples/intro/H5_CreateGroup.java
+++ b/java/examples/intro/H5_CreateGroup.java
@@ -20,17 +20,18 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5_CreateGroup {
- private static String FILENAME = "H5_CreateGroup.h5";
+ private static String FILENAME = "H5_CreateGroup.h5";
private static String GROUPNAME = "MyGroup";
- private static void CreateGroup() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void CreateGroup()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long group_id = HDF5Constants.H5I_INVALID_HID;
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -39,8 +40,8 @@ public class H5_CreateGroup {
// Create a group in the file.
try {
if (file_id >= 0)
- group_id = H5.H5Gcreate(file_id, "/" + GROUPNAME, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ group_id = H5.H5Gcreate(file_id, "/" + GROUPNAME, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -63,11 +64,7 @@ public class H5_CreateGroup {
catch (Exception e) {
e.printStackTrace();
}
-
- }
-
- public static void main(String[] args) {
- H5_CreateGroup.CreateGroup();
}
+ public static void main(String[] args) { H5_CreateGroup.CreateGroup(); }
}
diff --git a/java/examples/intro/H5_CreateGroupAbsoluteRelative.java b/java/examples/intro/H5_CreateGroupAbsoluteRelative.java
index f2c6168..2fb9c3c 100644
--- a/java/examples/intro/H5_CreateGroupAbsoluteRelative.java
+++ b/java/examples/intro/H5_CreateGroupAbsoluteRelative.java
@@ -20,13 +20,14 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5_CreateGroupAbsoluteRelative {
- private static String FILENAME = "H5_CreateGroupAbsoluteRelative.h5";
- private static String GROUPNAME = "MyGroup";
+ private static String FILENAME = "H5_CreateGroupAbsoluteRelative.h5";
+ private static String GROUPNAME = "MyGroup";
private static String GROUPNAME_A = "GroupA";
private static String GROUPNAME_B = "GroupB";
- private static void CreateGroupAbsoluteAndRelative() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void CreateGroupAbsoluteAndRelative()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long group1_id = HDF5Constants.H5I_INVALID_HID;
long group2_id = HDF5Constants.H5I_INVALID_HID;
long group3_id = HDF5Constants.H5I_INVALID_HID;
@@ -34,7 +35,7 @@ public class H5_CreateGroupAbsoluteRelative {
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -44,7 +45,7 @@ public class H5_CreateGroupAbsoluteRelative {
try {
if (file_id >= 0)
group1_id = H5.H5Gcreate(file_id, "/" + GROUPNAME, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -53,8 +54,9 @@ public class H5_CreateGroupAbsoluteRelative {
// Create group "Group_A" in group "MyGroup" using absolute name.
try {
if (file_id >= 0)
- group2_id = H5.H5Gcreate(file_id, "/" + GROUPNAME + "/" + GROUPNAME_A, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ group2_id =
+ H5.H5Gcreate(file_id, "/" + GROUPNAME + "/" + GROUPNAME_A, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -63,8 +65,8 @@ public class H5_CreateGroupAbsoluteRelative {
// Create group "Group_B" in group "MyGroup" using relative name.
try {
if (group1_id >= 0)
- group3_id = H5.H5Gcreate(group1_id, GROUPNAME_B, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ group3_id = H5.H5Gcreate(group1_id, GROUPNAME_B, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -105,11 +107,10 @@ public class H5_CreateGroupAbsoluteRelative {
catch (Exception e) {
e.printStackTrace();
}
-
}
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
H5_CreateGroupAbsoluteRelative.CreateGroupAbsoluteAndRelative();
}
-
}
diff --git a/java/examples/intro/H5_CreateGroupDataset.java b/java/examples/intro/H5_CreateGroupDataset.java
index f1d1cba..1d7cf99 100644
--- a/java/examples/intro/H5_CreateGroupDataset.java
+++ b/java/examples/intro/H5_CreateGroupDataset.java
@@ -20,27 +20,28 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5_CreateGroupDataset {
- private static String FILENAME = "H5_CreateGroupDataset.h5";
- private static String GROUPNAME = "MyGroup";
- private static String GROUPNAME_A = "GroupA";
+ private static String FILENAME = "H5_CreateGroupDataset.h5";
+ private static String GROUPNAME = "MyGroup";
+ private static String GROUPNAME_A = "GroupA";
private static String DATASETNAME1 = "dset1";
private static String DATASETNAME2 = "dset2";
- private static final int DIM1_X = 3;
- private static final int DIM1_Y = 3;
- private static final int DIM2_X = 2;
- private static final int DIM2_Y = 10;
-
- private static void h5_crtgrpd() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
- long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long group_id = HDF5Constants.H5I_INVALID_HID;
- long group1_id = HDF5Constants.H5I_INVALID_HID;
- long group2_id = HDF5Constants.H5I_INVALID_HID;
+ private static final int DIM1_X = 3;
+ private static final int DIM1_Y = 3;
+ private static final int DIM2_X = 2;
+ private static final int DIM2_Y = 10;
+
+ private static void h5_crtgrpd()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ long dataspace_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long group_id = HDF5Constants.H5I_INVALID_HID;
+ long group1_id = HDF5Constants.H5I_INVALID_HID;
+ long group2_id = HDF5Constants.H5I_INVALID_HID;
int[][] dset1_data = new int[DIM1_X][DIM1_Y];
int[][] dset2_data = new int[DIM2_X][DIM2_Y];
- long[] dims1 = { DIM1_X, DIM1_Y };
- long[] dims2 = { DIM2_X, DIM2_Y };
+ long[] dims1 = {DIM1_X, DIM1_Y};
+ long[] dims2 = {DIM2_X, DIM2_Y};
// Initialize the first dataset.
for (int indx = 0; indx < DIM1_X; indx++)
@@ -55,15 +56,16 @@ public class H5_CreateGroupDataset {
// Create a file.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
// Create a group named "/MyGroup" in the file.
if (file_id >= 0) {
group1_id = H5.H5Gcreate(file_id, "/" + GROUPNAME, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
// Create group "Group_A" in group "MyGroup" using absolute name.
if (group1_id >= 0) {
- group2_id = H5.H5Gcreate(file_id, "/" + GROUPNAME + "/" + GROUPNAME_A, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ group2_id =
+ H5.H5Gcreate(file_id, "/" + GROUPNAME + "/" + GROUPNAME_A, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
if (group2_id >= 0)
H5.H5Gclose(group2_id);
}
@@ -86,8 +88,9 @@ public class H5_CreateGroupDataset {
// Create the dataset in group "MyGroup".
try {
if ((file_id >= 0) && (dataspace_id >= 0))
- dataset_id = H5.H5Dcreate(file_id, "/" + GROUPNAME + "/" + DATASETNAME1, HDF5Constants.H5T_STD_I32BE,
- dataspace_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ dataset_id = H5.H5Dcreate(
+ file_id, "/" + GROUPNAME + "/" + DATASETNAME1, HDF5Constants.H5T_STD_I32BE, dataspace_id,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -96,8 +99,8 @@ public class H5_CreateGroupDataset {
// Write the first dataset.
try {
if (dataset_id >= 0)
- H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset1_data);
+ H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset1_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -126,7 +129,8 @@ public class H5_CreateGroupDataset {
// Open an existing group of the specified file.
try {
if (file_id >= 0)
- group_id = H5.H5Gopen(file_id, "/" + GROUPNAME + "/" + GROUPNAME_A, HDF5Constants.H5P_DEFAULT);
+ group_id =
+ H5.H5Gopen(file_id, "/" + GROUPNAME + "/" + GROUPNAME_A, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -144,7 +148,8 @@ public class H5_CreateGroupDataset {
try {
if ((group_id >= 0) && (dataspace_id >= 0))
dataset_id = H5.H5Dcreate(group_id, DATASETNAME2, HDF5Constants.H5T_STD_I32BE, dataspace_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -153,8 +158,8 @@ public class H5_CreateGroupDataset {
// Write the second dataset.
try {
if (dataset_id >= 0)
- H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset2_data);
+ H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset2_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -197,8 +202,5 @@ public class H5_CreateGroupDataset {
}
}
- public static void main(String[] args) {
- H5_CreateGroupDataset.h5_crtgrpd();
- }
-
+ public static void main(String[] args) { H5_CreateGroupDataset.h5_crtgrpd(); }
}
diff --git a/java/examples/intro/H5_ReadWrite.java b/java/examples/intro/H5_ReadWrite.java
index 67e1ac5..379fe20 100644
--- a/java/examples/intro/H5_ReadWrite.java
+++ b/java/examples/intro/H5_ReadWrite.java
@@ -20,16 +20,17 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5_ReadWrite {
- private static String FILENAME = "H5_ReadWrite.h5";
+ private static String FILENAME = "H5_ReadWrite.h5";
private static String DATASETNAME = "dset";
- private static final int DIM_X = 4;
- private static final int DIM_Y = 6;
+ private static final int DIM_X = 4;
+ private static final int DIM_Y = 6;
- private static void ReadWriteDataset() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ private static void ReadWriteDataset()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { DIM_X, DIM_Y };
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {DIM_X, DIM_Y};
int[][] dset_data = new int[DIM_X][DIM_Y];
// Initialize the dataset.
@@ -40,7 +41,7 @@ public class H5_ReadWrite {
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -57,8 +58,9 @@ public class H5_ReadWrite {
// Create the dataset.
try {
if ((file_id >= 0) && (dataspace_id >= 0))
- dataset_id = H5.H5Dcreate(file_id, "/" + DATASETNAME, HDF5Constants.H5T_STD_I32BE, dataspace_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ dataset_id = H5.H5Dcreate(file_id, "/" + DATASETNAME, HDF5Constants.H5T_STD_I32BE,
+ dataspace_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -67,8 +69,8 @@ public class H5_ReadWrite {
// Write the dataset.
try {
if (dataset_id >= 0)
- H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -76,8 +78,8 @@ public class H5_ReadWrite {
try {
if (dataset_id >= 0)
- H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dread(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -102,8 +104,5 @@ public class H5_ReadWrite {
}
}
- public static void main(String[] args) {
- H5_ReadWrite.ReadWriteDataset();
- }
-
+ public static void main(String[] args) { H5_ReadWrite.ReadWriteDataset(); }
}
diff --git a/java/src/hdf/hdf5lib/CMakeLists.txt b/java/src/hdf/hdf5lib/CMakeLists.txt
index a26e117..0b716f7 100644
--- a/java/src/hdf/hdf5lib/CMakeLists.txt
+++ b/java/src/hdf/hdf5lib/CMakeLists.txt
@@ -132,6 +132,9 @@ SET_GLOBAL_VARIABLE (HDF5_JAVA_JARS ${${HDF5_JAVA_HDF5_LIB_TARGET}_JAR_FILE})
add_dependencies (${HDF5_JAVA_HDF5_LIB_TARGET} ${HDF5_JAVA_JNI_LIB_TARGET})
set_target_properties (${HDF5_JAVA_HDF5_LIB_TARGET} PROPERTIES FOLDER libraries/java)
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_JAVA_SRC_FORMAT ${HDF5_JAVA_HDF_HDF5_CALLBACKS_SOURCES} ${HDF5_JAVA_HDF_HDF5_EXCEPTIONS_SOURCES} ${HDF5_JAVA_HDF_HDF5_STRUCTS_SOURCES} ${HDF5_JAVA_HDF_HDF5_SOURCES})
+endif ()
create_javadoc(hdf5_java_doc
FILES ${HDF5_JAVADOC_HDF_HDF5_CALLBACKS_SOURCES} ${HDF5_JAVADOC_HDF_HDF5_EXCEPTIONS_SOURCES} ${HDF5_JAVADOC_HDF_HDF5_STRUCTS_SOURCES} ${HDF5_JAVADOC_HDF_HDF5_SOURCES}
diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java
index 3180ede..9fac20c 100644
--- a/java/src/hdf/hdf5lib/H5.java
+++ b/java/src/hdf/hdf5lib/H5.java
@@ -11,47 +11,47 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
package hdf.hdf5lib;
import java.io.File;
import java.nio.ByteBuffer;
import java.util.Collection;
import java.util.LinkedHashSet;
+
import hdf.hdf5lib.callbacks.H5A_iterate_cb;
import hdf.hdf5lib.callbacks.H5A_iterate_t;
import hdf.hdf5lib.callbacks.H5D_iterate_cb;
import hdf.hdf5lib.callbacks.H5D_iterate_t;
import hdf.hdf5lib.callbacks.H5E_walk_cb;
import hdf.hdf5lib.callbacks.H5E_walk_t;
-import hdf.hdf5lib.callbacks.H5L_iterate_t;
import hdf.hdf5lib.callbacks.H5L_iterate_opdata_t;
-import hdf.hdf5lib.callbacks.H5O_iterate_t;
+import hdf.hdf5lib.callbacks.H5L_iterate_t;
import hdf.hdf5lib.callbacks.H5O_iterate_opdata_t;
+import hdf.hdf5lib.callbacks.H5O_iterate_t;
import hdf.hdf5lib.callbacks.H5P_cls_close_func_cb;
import hdf.hdf5lib.callbacks.H5P_cls_close_func_t;
import hdf.hdf5lib.callbacks.H5P_cls_copy_func_cb;
import hdf.hdf5lib.callbacks.H5P_cls_copy_func_t;
import hdf.hdf5lib.callbacks.H5P_cls_create_func_cb;
import hdf.hdf5lib.callbacks.H5P_cls_create_func_t;
-import hdf.hdf5lib.callbacks.H5P_prp_set_func_cb;
-import hdf.hdf5lib.callbacks.H5P_prp_get_func_cb;
-import hdf.hdf5lib.callbacks.H5P_prp_delete_func_cb;
-import hdf.hdf5lib.callbacks.H5P_prp_copy_func_cb;
-import hdf.hdf5lib.callbacks.H5P_prp_compare_func_cb;
-import hdf.hdf5lib.callbacks.H5P_prp_close_func_cb;
-import hdf.hdf5lib.callbacks.H5P_prp_create_func_cb;
import hdf.hdf5lib.callbacks.H5P_iterate_cb;
import hdf.hdf5lib.callbacks.H5P_iterate_t;
+import hdf.hdf5lib.callbacks.H5P_prp_close_func_cb;
+import hdf.hdf5lib.callbacks.H5P_prp_compare_func_cb;
+import hdf.hdf5lib.callbacks.H5P_prp_copy_func_cb;
+import hdf.hdf5lib.callbacks.H5P_prp_create_func_cb;
+import hdf.hdf5lib.callbacks.H5P_prp_delete_func_cb;
+import hdf.hdf5lib.callbacks.H5P_prp_get_func_cb;
+import hdf.hdf5lib.callbacks.H5P_prp_set_func_cb;
import hdf.hdf5lib.exceptions.HDF5Exception;
import hdf.hdf5lib.exceptions.HDF5JavaException;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
import hdf.hdf5lib.structs.H5AC_cache_config_t;
import hdf.hdf5lib.structs.H5A_info_t;
import hdf.hdf5lib.structs.H5E_error2_t;
-import hdf.hdf5lib.structs.H5F_info2_t;
import hdf.hdf5lib.structs.H5FD_hdfs_fapl_t;
import hdf.hdf5lib.structs.H5FD_ros3_fapl_t;
+import hdf.hdf5lib.structs.H5F_info2_t;
import hdf.hdf5lib.structs.H5G_info_t;
import hdf.hdf5lib.structs.H5L_info_t;
import hdf.hdf5lib.structs.H5O_info_t;
@@ -61,8 +61,8 @@ import hdf.hdf5lib.structs.H5O_token_t;
/**
* This class is the Java interface for the HDF5 library.
* <p>
- * This code is the called by Java programs to access the entry points of the HDF5 library. Each routine wraps a single
- * HDF5 entry point, generally with the arguments and return codes analogous to the C interface.
+ * This code is the called by Java programs to access the entry points of the HDF5 library. Each routine wraps
+ * a single HDF5 entry point, generally with the arguments and return codes analogous to the C interface.
* <p>
* For details of the HDF5 library, see the HDF5 Documentation at:
* <a href="http://hdfgroup.org/HDF5/">http://hdfgroup.org/HDF5/</a>
@@ -71,8 +71,8 @@ import hdf.hdf5lib.structs.H5O_token_t;
* <b>Mapping of arguments for Java</b>
*
* <p>
- * In general, arguments to the HDF Java API are straightforward translations from the 'C' API described in the HDF
- * Reference Manual.
+ * In general, arguments to the HDF Java API are straightforward translations from the 'C' API described in
+ * the HDF Reference Manual.
*
* <table border=1>
* <caption><b>HDF-5 C types to Java types</b> </caption>
@@ -112,17 +112,19 @@ import hdf.hdf5lib.structs.H5O_token_t;
* </table>
* <b>General Rules for Passing Arguments and Results</b>
* <p>
- * In general, arguments passed <b>IN</b> to Java are the analogous basic types, as above. The exception is for arrays,
- * which are discussed below.
+ * In general, arguments passed <b>IN</b> to Java are the analogous basic types, as above. The exception is
+ * for arrays, which are discussed below.
* <p>
- * The <i>return value</i> of Java methods is also the analogous type, as above. A major exception to that rule is that
- * all HDF functions that return SUCCEED/FAIL are declared <i>boolean</i> in the Java version, rather than <i>int</i> as
- * in the C. Functions that return a value or else FAIL are declared the equivalent to the C function. However, in most
- * cases the Java method will raise an exception instead of returning an error code. See <a href="#ERRORS">Errors and
- * Exceptions</a> below.
+ * The <i>return value</i> of Java methods is also the analogous type, as above. A major exception to that
+ * rule is that all HDF functions that return SUCCEED/FAIL are declared <i>boolean</i> in the Java version,
+ * rather than <i>int</i> as in the C. Functions that return a value or else FAIL are declared the
+ * equivalent to the C function.
+ * However, in most cases the Java method will raise an exception instead of returning an error code.
+ * See <a href="#ERRORS">Errors and Exceptions</a> below.
* <p>
- * Java does not support pass by reference of arguments, so arguments that are returned through <b>OUT</b> parameters
- * must be wrapped in an object or array. The Java API for HDF consistently wraps arguments in arrays.
+ * Java does not support pass by reference of arguments, so arguments that are returned through <b>OUT</b>
+ * parameters must be wrapped in an object or array. The Java API for HDF consistently wraps arguments in
+ * arrays.
* <p>
* For instance, a function that returns two integers is declared:
*
@@ -143,53 +145,57 @@ import hdf.hdf5lib.structs.H5O_token_t;
* </pre>
*
* <p>
- * All the routines where this convention is used will have specific documentation of the details, given below.
+ * All the routines where this convention is used will have specific documentation of the details, given
+ * below.
* <p>
* <b>Arrays</b>
* <p>
- * HDF5 needs to read and write multi-dimensional arrays of any number type (and records). The HDF5 API describes the
- * layout of the source and destination, and the data for the array passed as a block of bytes, for instance,
+ * HDF5 needs to read and write multi-dimensional arrays of any number type (and records). The HDF5 API
+ * describes the layout of the source and destination, and the data for the array passed as a block of
+ * bytes, for instance,
*
* <pre>
- * herr_t H5Dread(long fid, long filetype, long memtype, long memspace,
- * void * data);
+ * herr_t H5Dread(long fid, long filetype, long memtype, long memspace, void * data);
* </pre>
*
* <p>
- * where ``void *'' means that the data may be any valid numeric type, and is a contiguous block of bytes that is the
- * data for a multi-dimensional array. The other parameters describe the dimensions, rank, and datatype of the array on
- * disk (source) and in memory (destination).
+ * where ``void *'' means that the data may be any valid numeric type, and is a contiguous block of bytes that
+ * is the data for a multi-dimensional array. The other parameters describe the dimensions, rank, and datatype
+ * of the array ondisk (source) and in memory (destination).
* <p>
- * For Java, this ``ANY'' is a problem, as the type of data must always be declared. Furthermore, multidimensional
- * arrays are definitely <i>not</i> laid out contiguously in memory. It would be infeasible to declare a separate
- * routine for every combination of number type and dimensionality. For that reason, the
- * <a href="./hdf.hdf5lib.HDFArray.html"><b>HDFArray</b></a> class is used to discover the type, shape, and size of the
- * data array at run time, and to convert to and from a contiguous array of bytes in synchronized static native C order.
+ * For Java, this ``ANY'' is a problem, as the type of data must always be declared. Furthermore,
+ * multidimensional arrays are definitely <i>not</i> laid out contiguously in memory. It would be infeasible
+ * to declare a separate routine for every combination of number type and dimensionality. For that reason, the
+ * <a href="./hdf.hdf5lib.HDFArray.html"><b>HDFArray</b></a> class is used to discover the type, shape, and
+ * size of the data array at run time, and to convert to and from a contiguous array of bytes in synchronized
+ * static native C order.
* <p>
- * The upshot is that any Java array of numbers (either primitive or sub-classes of type <b>Number</b>) can be passed as
- * an ``Object'', and the Java API will translate to and from the appropriate packed array of bytes needed by the C
- * library. So the function above would be declared:
+ * The upshot is that any Java array of numbers (either primitive or sub-classes of type <b>Number</b>) can be
+ * passed as an ``Object'', and the Java API will translate to and from the appropriate packed array of bytes
+ * needed by the C library. So the function above would be declared:
*
* <pre>
- * public synchronized static native int H5Dread(long fid, long filetype, long memtype, long memspace, Object data);
+ * public synchronized static native int H5Dread(long fid, long filetype, long memtype, long memspace,
+ * Object data);
* </pre>
* OPEN_IDS.addElement(id);
- * and the parameter <i>data</i> can be any multi-dimensional array of numbers, such as float[][], or int[][][], or
- * Double[][].
+ * and the parameter <i>data</i> can be any multi-dimensional array of numbers, such as float[][], or
+ * int[][][], or Double[][].
* <p>
* <b>HDF-5 Constants</b>
* <p>
- * The HDF-5 API defines a set of constants and enumerated values. Most of these values are available to Java programs
- * via the class <a href="./hdf.hdf5lib.HDF5Constants.html"> <b>HDF5Constants</b></a>. For example, the parameters for
- * the h5open() call include two numeric values, <b><i>HDFConstants.H5F_ACC_RDWR</i></b> and
- * <b><i>HDF5Constants.H5P_DEFAULT</i></b>. As would be expected, these numbers correspond to the C constants
+ * The HDF-5 API defines a set of constants and enumerated values. Most of these values are available to Java
+ * programs via the class <a href="./hdf.hdf5lib.HDF5Constants.html"> <b>HDF5Constants</b></a>. For example,
+ * the parameters for the h5open() call include two numeric values, <b><i>HDFConstants.H5F_ACC_RDWR</i></b>
+ * and <b><i>HDF5Constants.H5P_DEFAULT</i></b>.
+ * As would be expected, these numbers correspond to the C constants
* <b><i>H5F_ACC_RDWR</i></b> and <b><i>H5P_DEFAULT</i></b>.
* <p>
- * The HDF-5 API defines a set of values that describe number types and sizes, such as "H5T_NATIVE_INT" and "hsize_t".
- * These values are determined at run time by the HDF-5 C library. To support these parameters, the Java class
- * <a href="./hdf.hdf5lib.HDF5CDataTypes.html"> <b>HDF5CDataTypes</b></a> looks up the values when initiated. The values
- * can be accessed as public variables of the Java class, such as:
+ * The HDF-5 API defines a set of values that describe number types and sizes, such as "H5T_NATIVE_INT" and
+ * "hsize_t". These values are determined at run time by the HDF-5 C library. To support these parameters,
+ * the Java class <a href="./hdf.hdf5lib.HDF5CDataTypes.html"> <b>HDF5CDataTypes</b></a> looks up the values
+ * when initiated. The values can be accessed as public variables of the Java class, such as:
*
* <pre>
* long data_type = HDF5CDataTypes.JH5T_NATIVE_INT;
@@ -200,20 +206,22 @@ import hdf.hdf5lib.structs.H5O_token_t;
* <p>
* <b>Error handling and Exceptions</b>
* <p>
- * The HDF5 error API (H5E) manages the behavior of the error stack in the HDF-5 library. This API is omitted from the
- * JHI5. Errors are converted into Java exceptions. This is totally different from the C interface, but is very natural
- * for Java programming.
+ * The HDF5 error API (H5E) manages the behavior of the error stack in the HDF-5 library. This API is omitted
+ * from the JHI5. Errors are converted into Java exceptions. This is totally different from the C interface,
+ * but is very natural for Java programming.
* <p>
* The exceptions of the JHI5 are organized as sub-classes of the class
- * <a href="./hdf.hdf5lib.exceptions.HDF5Exception.html"> <b>HDF5Exception</b></a>. There are two subclasses of
- * <b>HDF5Exception</b>, <a href="./hdf.hdf5lib.exceptions.HDF5LibraryException.html"> <b>HDF5LibraryException</b></a>
- * and <a href="./hdf.hdf5lib.exceptions.HDF5JavaException.html"> <b>HDF5JavaException</b></a>. The sub-classes of the
- * former represent errors from the HDF-5 C library, while sub-classes of the latter represent errors in the JHI5
- * wrapper and support code.
+ * <a href="./hdf.hdf5lib.exceptions.HDF5Exception.html"> <b>HDF5Exception</b></a>. There are two subclasses
+ * of
+ * <b>HDF5Exception</b>, <a href="./hdf.hdf5lib.exceptions.HDF5LibraryException.html">
+ <b>HDF5LibraryException</b></a>
+ * and <a href="./hdf.hdf5lib.exceptions.HDF5JavaException.html"> <b>HDF5JavaException</b></a>. The
+ * sub-classes of the former represent errors from the HDF-5 C library, while sub-classes of the latter
+ * represent errors in the JHI5 wrapper and support code.
* <p>
- * The super-class <b><i>HDF5LibraryException</i></b> implements the method '<b><i>printStackTrace()</i></b>', which
- * prints out the HDF-5 error stack, as described in the HDF-5 C API <i><b>H5Eprint()</b>.</i> This may be used by Java
- * exception handlers to print out the HDF-5 error stack.
+ * The super-class <b><i>HDF5LibraryException</i></b> implements the method '<b><i>printStackTrace()</i></b>',
+ * which prints out the HDF-5 error stack, as described in the HDF-5 C API <i><b>H5Eprint()</b>.</i> This may
+ * be used by Java exception handlers to print out the HDF-5 error stack.
* <hr>
*
* @version HDF5 1.13.2 <BR>
@@ -222,7 +230,8 @@ import hdf.hdf5lib.structs.H5O_token_t;
* <a href ="./hdf.hdf5lib.HDF5CDataTypes.html"> hdf.hdf5lib.HDF5CDataTypes</a><BR>
* <a href ="./hdf.hdf5lib.HDF5Exception.html"> hdf.hdf5lib.HDF5Exception</a><BR>
* <a href="http://hdfgroup.org/HDF5/"> http://hdfgroup.org/HDF5"</a>
- **/
+ *
+ */
public class H5 implements java.io.Serializable {
/**
*
@@ -239,38 +248,36 @@ public class H5 implements java.io.Serializable {
*
* Make sure to update the versions number when a different library is used.
*/
- public final static int LIB_VERSION[] = { 1, 13, 2 };
+ public final static int LIB_VERSION[] = {1, 13, 2};
/**
- * add system property to load library by path
- */
+ * add system property to load library by path
+ */
public final static String H5PATH_PROPERTY_KEY = "hdf.hdf5lib.H5.hdf5lib";
/**
- * add system property to load library by name from library path, via System.loadLibrary()
- */
+ * add system property to load library by name from library path, via System.loadLibrary()
+ */
public final static String H5_LIBRARY_NAME_PROPERTY_KEY = "hdf.hdf5lib.H5.loadLibraryName";
private static String s_libraryName;
private static boolean isLibraryLoaded = false;
- private final static boolean IS_CRITICAL_PINNING = true;
- // change from Vector to LinkedHashSet - jp 6-Oct-2014
+ private final static boolean IS_CRITICAL_PINNING = true;
private final static LinkedHashSet<Long> OPEN_IDS = new LinkedHashSet<Long>();
- static {
- loadH5Lib();
- }
+ static { loadH5Lib(); }
/**
- * load native library
- */
- public static void loadH5Lib() {
+ * load native library
+ */
+ public static void loadH5Lib()
+ {
// Make sure that the library is loaded only once
if (isLibraryLoaded)
return;
// first try loading library by name from user supplied library path
- s_libraryName = System.getProperty(H5_LIBRARY_NAME_PROPERTY_KEY, null);
+ s_libraryName = System.getProperty(H5_LIBRARY_NAME_PROPERTY_KEY, null);
String mappedName = null;
if ((s_libraryName != null) && (s_libraryName.length() > 0)) {
try {
@@ -311,7 +318,7 @@ public class H5 implements java.io.Serializable {
}
else {
isLibraryLoaded = false;
- throw (new UnsatisfiedLinkError("Invalid HDF5 library, " + filename));
+ throw(new UnsatisfiedLinkError("Invalid HDF5 library, " + filename));
}
}
}
@@ -320,7 +327,7 @@ public class H5 implements java.io.Serializable {
if (!isLibraryLoaded) {
try {
s_libraryName = "hdf5_java";
- mappedName = System.mapLibraryName(s_libraryName);
+ mappedName = System.mapLibraryName(s_libraryName);
System.loadLibrary("hdf5_java");
isLibraryLoaded = true;
}
@@ -369,18 +376,14 @@ public class H5 implements java.io.Serializable {
*
* @return Returns a count of open IDs
*/
- public final static int getOpenIDCount() {
- return OPEN_IDS.size();
- }
+ public final static int getOpenIDCount() { return OPEN_IDS.size(); }
/**
* Get the open IDs
*
* @return Returns a collection of open IDs
*/
- public final static Collection<Long> getOpenIDs() {
- return OPEN_IDS;
- }
+ public final static Collection<Long> getOpenIDs() { return OPEN_IDS; }
/**
* H5check_version verifies that the arguments match the version numbers compiled into the library.
@@ -391,20 +394,21 @@ public class H5 implements java.io.Serializable {
* The minor version of the library.
* @param relnum
* The release number of the library.
- * @return a non-negative value if successful. Upon failure (when the versions do not match), this function causes
- * the application to abort (i.e., crash)
+ * @return a non-negative value if successful. Upon failure (when the versions do not match), this
+ * function causes the application to abort (i.e., crash)
*
- * See C API function: herr_t H5check_version()
+ * See C API function: herr_t H5check_version()
**/
public synchronized static native int H5check_version(int majnum, int minnum, int relnum);
/**
- * H5close flushes all data to disk, closes all file identifiers, and cleans up all memory used by the library.
+ * H5close flushes all data to disk, closes all file identifiers, and cleans up all memory used by the
+ * library.
*
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5close() throws HDF5LibraryException;
@@ -414,35 +418,35 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5open() throws HDF5LibraryException;
/**
- * H5dont_atexit indicates to the library that an atexit() cleanup routine should not be installed. In order to be
- * effective, this routine must be called before any other HDF function calls, and must be called each time the
- * library is loaded/linked into the application (the first time and after it's been unloaded).
- * <P>
- * This is called by the static initializer, so this should never need to be explicitly called by a Java program.
+ * H5dont_atexit indicates to the library that an atexit() cleanup routine should not be installed. In
+ * order to be effective, this routine must be called before any other HDF function calls, and must be
+ * called each time the library is loaded/linked into the application (the first time and after it's been
+ * unloaded). <P> This is called by the static initializer, so this should never need to be explicitly
+ * called by a Java program.
*
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
private synchronized static native int H5dont_atexit() throws HDF5LibraryException;
/**
- * Turn off error handling. By default, the C library prints the error stack of the HDF-5 C library on stdout. This
- * behavior may be disabled by calling H5error_off().
+ * Turn off error handling. By default, the C library prints the error stack of the HDF-5 C library on
+ * stdout. This behavior may be disabled by calling H5error_off().
*
* @return a non-negative value if successful
*/
public synchronized static native int H5error_off();
/**
- * Turn on error handling. By default, the C library prints the error stack of the HDF-5 C library on stdout. This
- * behavior may be re-enabled by calling H5error_on().
+ * Turn on error handling. By default, the C library prints the error stack of the HDF-5 C library on
+ * stdout. This behavior may be re-enabled by calling H5error_on().
*/
public synchronized static native void H5error_on();
@@ -452,13 +456,13 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5garbage_collect() throws HDF5LibraryException;
/**
- * H5get_libversion retrieves the major, minor, and release numbers of the version of the HDF library which is
- * linked to the application.
+ * H5get_libversion retrieves the major, minor, and release numbers of the version of the HDF library
+ * which is linked to the application.
*
* @param libversion
* The version information of the HDF library.
@@ -471,7 +475,7 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful, along with the version information.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5get_libversion(int[] libversion) throws HDF5LibraryException;
@@ -502,10 +506,12 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful, along with the version information.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
- */
+ * Error from the HDF-5 Library.
+ */
public synchronized static native int H5set_free_list_limits(int reg_global_lim, int reg_list_lim,
- int arr_global_lim, int arr_list_lim, int blk_global_lim, int blk_list_lim) throws HDF5LibraryException;
+ int arr_global_lim, int arr_list_lim,
+ int blk_global_lim, int blk_list_lim)
+ throws HDF5LibraryException;
/**
* H5export_dataset is a utility function to save data in a file.
@@ -523,10 +529,11 @@ public class H5 implements java.io.Serializable {
* 3 - export data as binary Big Endian.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native void H5export_dataset(String file_export_name, long file_id,
- String object_path, int binary_order) throws HDF5LibraryException;
+ String object_path, int binary_order)
+ throws HDF5LibraryException;
/**
* H5export_attribute is a utility function to save data in a file.
@@ -544,10 +551,11 @@ public class H5 implements java.io.Serializable {
* 3 - export data as binary Big Endian.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native void H5export_attribute(String file_export_name, long dataset_id,
- String attribute_name, int binary_order) throws HDF5LibraryException;
+ String attribute_name, int binary_order)
+ throws HDF5LibraryException;
/**
* H5is_library_threadsafe Checks to see if the library was built with thread-safety enabled.
@@ -577,9 +585,10 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public static int H5Aclose(long attr_id) throws HDF5LibraryException {
+ public static int H5Aclose(long attr_id) throws HDF5LibraryException
+ {
if (attr_id < 0)
return 0; // throw new HDF5LibraryException("Negative ID");;
@@ -602,12 +611,13 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*/
public synchronized static native int H5Acopy(long src_aid, long dst_aid) throws HDF5LibraryException;
/**
- * H5Acreate creates an attribute, attr_name, which is attached to the object specified by the identifier loc_id.
+ * H5Acreate creates an attribute, attr_name, which is attached to the object specified by the identifier
+ * loc_id.
*
* @param loc_id
* IN: Location or object identifier; may be dataset or group
@@ -625,12 +635,13 @@ public class H5 implements java.io.Serializable {
* @return An attribute identifier if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - Name is null.
+ * Name is null.
**/
- public static long H5Acreate(long loc_id, String attr_name, long type_id, long space_id, long acpl_id, long aapl_id)
- throws HDF5LibraryException, NullPointerException {
+ public static long H5Acreate(long loc_id, String attr_name, long type_id, long space_id, long acpl_id,
+ long aapl_id) throws HDF5LibraryException, NullPointerException
+ {
long id = _H5Acreate2(loc_id, attr_name, type_id, space_id, acpl_id, aapl_id);
if (id > 0) {
log.trace("OPEN_IDS: H5A create add {}", id);
@@ -643,15 +654,16 @@ public class H5 implements java.io.Serializable {
/**
* H5Acreate2 an attribute, attr_name, which is attached to the object specified by the identifier loc_id.
*
- * @see public static long H5Acreate( long loc_id, String attr_name, long type_id, long space_id, long acpl_id, long
- * aapl_id )
+ * @see public static long H5Acreate( long loc_id, String attr_name, long type_id, long space_id, long
+ * acpl_id, long aapl_id )
**/
- private synchronized static native long _H5Acreate2(long loc_id, String attr_name, long type_id, long space_id,
- long acpl_id, long aapl_id) throws HDF5LibraryException, NullPointerException;
+ private synchronized static native long _H5Acreate2(long loc_id, String attr_name, long type_id,
+ long space_id, long acpl_id, long aapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Acreate_by_name creates an attribute, attr_name, which is attached to the object specified by loc_id and
- * obj_name.
+ * H5Acreate_by_name creates an attribute, attr_name, which is attached to the object specified by loc_id
+ * and obj_name.
*
* @param loc_id
* IN: Location or object identifier; may be dataset or group
@@ -673,13 +685,16 @@ public class H5 implements java.io.Serializable {
* @return An attribute identifier if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public static long H5Acreate_by_name(long loc_id, String obj_name, String attr_name, long type_id, long space_id,
- long acpl_id, long aapl_id, long lapl_id) throws HDF5LibraryException, NullPointerException {
- long id = _H5Acreate_by_name(loc_id, obj_name, attr_name, type_id, space_id, acpl_id, aapl_id, lapl_id);
+ public static long H5Acreate_by_name(long loc_id, String obj_name, String attr_name, long type_id,
+ long space_id, long acpl_id, long aapl_id, long lapl_id)
+ throws HDF5LibraryException, NullPointerException
+ {
+ long id =
+ _H5Acreate_by_name(loc_id, obj_name, attr_name, type_id, space_id, acpl_id, aapl_id, lapl_id);
if (id > 0) {
log.trace("OPEN_IDS: H5Acreate_by_name add {}", id);
OPEN_IDS.add(id);
@@ -689,8 +704,9 @@ public class H5 implements java.io.Serializable {
}
private synchronized static native long _H5Acreate_by_name(long loc_id, String obj_name, String attr_name,
- long type_id, long space_id, long acpl_id, long aapl_id, long lapl_id) throws HDF5LibraryException,
- NullPointerException;
+ long type_id, long space_id, long acpl_id,
+ long aapl_id, long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Adelete removes the attribute specified by its name, name, from a dataset, group, or named datatype.
@@ -703,12 +719,12 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public synchronized static native int H5Adelete(long loc_id, String name) throws HDF5LibraryException,
- NullPointerException;
+ public synchronized static native int H5Adelete(long loc_id, String name)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Adelete_by_idx removes an attribute, specified by its location in an index, from an object.
@@ -727,16 +743,17 @@ public class H5 implements java.io.Serializable {
* IN: Link access property list identifier
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - obj_name is null.
+ * obj_name is null.
**/
- public synchronized static native void H5Adelete_by_idx(long loc_id, String obj_name, int idx_type, int order,
- long n, long lapl_id) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native void H5Adelete_by_idx(long loc_id, String obj_name, int idx_type,
+ int order, long n, long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Adelete_by_name removes the attribute attr_name from an object specified by location and name, loc_id and
- * obj_name, respectively.
+ * H5Adelete_by_name removes the attribute attr_name from an object specified by location and name, loc_id
+ * and obj_name, respectively.
*
* @param loc_id
* IN: Location or object identifier; may be dataset or group
@@ -750,12 +767,13 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public synchronized static native int H5Adelete_by_name(long loc_id, String obj_name, String attr_name, long lapl_id)
- throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Adelete_by_name(long loc_id, String obj_name, String attr_name,
+ long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Aexists determines whether the attribute attr_name exists on the object specified by obj_id.
@@ -768,16 +786,16 @@ public class H5 implements java.io.Serializable {
* @return boolean true if an attribute with a given name exists.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - attr_name is null.
+ * attr_name is null.
**/
- public synchronized static native boolean H5Aexists(long obj_id, String attr_name) throws HDF5LibraryException,
- NullPointerException;
+ public synchronized static native boolean H5Aexists(long obj_id, String attr_name)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Aexists_by_name determines whether the attribute attr_name exists on an object. That object is specified by its
- * location and name, loc_id and obj_name, respectively.
+ * H5Aexists_by_name determines whether the attribute attr_name exists on an object. That object is
+ * specified by its location and name, loc_id and obj_name, respectively.
*
* @param loc_id
* IN: Location of object to which attribute is attached .
@@ -791,12 +809,13 @@ public class H5 implements java.io.Serializable {
* @return boolean true if an attribute with a given name exists, otherwise returns false.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public synchronized static native boolean H5Aexists_by_name(long loc_id, String obj_name, String attr_name,
- long lapl_id) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native boolean H5Aexists_by_name(long loc_id, String obj_name,
+ String attr_name, long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Aget_info retrieves attribute information, by attribute identifier.
@@ -807,7 +826,7 @@ public class H5 implements java.io.Serializable {
* @return A buffer(H5A_info_t) for Attribute information
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native H5A_info_t H5Aget_info(long attr_id) throws HDF5LibraryException;
@@ -830,12 +849,14 @@ public class H5 implements java.io.Serializable {
* @return A buffer(H5A_info_t) for Attribute information
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - obj_name is null.
+ * obj_name is null.
**/
- public synchronized static native H5A_info_t H5Aget_info_by_idx(long loc_id, String obj_name, int idx_type,
- int order, long n, long lapl_id) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native H5A_info_t H5Aget_info_by_idx(long loc_id, String obj_name,
+ int idx_type, int order, long n,
+ long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Aget_info_by_name Retrieves attribute information, by attribute name.
@@ -852,12 +873,13 @@ public class H5 implements java.io.Serializable {
* @return A buffer(H5A_info_t) for Attribute information
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - obj_name is null.
+ * obj_name is null.
**/
- public synchronized static native H5A_info_t H5Aget_info_by_name(long loc_id, String obj_name, String attr_name,
- long lapl_id) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native H5A_info_t H5Aget_info_by_name(long loc_id, String obj_name,
+ String attr_name, long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Aget_name retrieves the name of an attribute specified by the identifier, attr_id.
@@ -868,14 +890,13 @@ public class H5 implements java.io.Serializable {
* @return String for Attribute name.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native String H5Aget_name(long attr_id)
- throws HDF5LibraryException;
+ public synchronized static native String H5Aget_name(long attr_id) throws HDF5LibraryException;
/**
- * H5Aget_name_by_idx retrieves the name of an attribute that is attached to an object, which is specified by its
- * location and name, loc_id and obj_name, respectively.
+ * H5Aget_name_by_idx retrieves the name of an attribute that is attached to an object, which is specified
+ * by its location and name, loc_id and obj_name, respectively.
*
* @param attr_id
* IN: Attribute identifier
@@ -893,12 +914,13 @@ public class H5 implements java.io.Serializable {
* @return String for Attribute name.
*
* @exception HDF5LibraryException
- * - Error from the HDF5 Library.
+ * Error from the HDF5 Library.
* @exception NullPointerException
- * - obj_name is null.
+ * obj_name is null.
**/
- public synchronized static native String H5Aget_name_by_idx(long attr_id, String obj_name, int idx_type, int order,
- long n, long lapl_id) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native String H5Aget_name_by_idx(long attr_id, String obj_name, int idx_type,
+ int order, long n, long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Aget_space retrieves a copy of the dataspace for an attribute.
@@ -909,7 +931,7 @@ public class H5 implements java.io.Serializable {
* @return attribute dataspace identifier if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public static long H5Aget_space(long attr_id) throws HDF5LibraryException
{
@@ -925,7 +947,8 @@ public class H5 implements java.io.Serializable {
private synchronized static native long _H5Aget_space(long attr_id) throws HDF5LibraryException;
/**
- * H5Aget_storage_size returns the amount of storage that is required for the specified attribute, attr_id.
+ * H5Aget_storage_size returns the amount of storage that is required for the specified attribute,
+ * attr_id.
*
* @param attr_id
* IN: Identifier of the attribute to query.
@@ -933,7 +956,7 @@ public class H5 implements java.io.Serializable {
* @return the amount of storage size allocated for the attribute; otherwise returns 0 (zero)
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native long H5Aget_storage_size(long attr_id) throws HDF5LibraryException;
@@ -946,7 +969,7 @@ public class H5 implements java.io.Serializable {
* @return a datatype identifier if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public static long H5Aget_type(long attr_id) throws HDF5LibraryException
{
@@ -962,8 +985,8 @@ public class H5 implements java.io.Serializable {
private synchronized static native long _H5Aget_type(long attr_id) throws HDF5LibraryException;
/**
- * H5Aopen opens an existing attribute, attr_name, that is attached to an object specified an object identifier,
- * object_id.
+ * H5Aopen opens an existing attribute, attr_name, that is attached to an object specified an object
+ * identifier, object_id.
*
* @param obj_id
* IN: Identifier for object to which attribute is attached
@@ -975,12 +998,12 @@ public class H5 implements java.io.Serializable {
* @return An attribute identifier if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - Name is null.
+ * Name is null.
**/
public static long H5Aopen(long obj_id, String attr_name, long aapl_id)
- throws HDF5LibraryException, NullPointerException
+ throws HDF5LibraryException, NullPointerException
{
long id = _H5Aopen(obj_id, attr_name, aapl_id);
if (id > 0) {
@@ -992,11 +1015,11 @@ public class H5 implements java.io.Serializable {
}
private synchronized static native long _H5Aopen(long obj_id, String attr_name, long aapl_id)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Aopen_by_idx opens an existing attribute that is attached to an object specified by location and name, loc_id
- * and obj_name, respectively
+ * H5Aopen_by_idx opens an existing attribute that is attached to an object specified by location and
+ * name, loc_id and obj_name, respectively
*
* @param loc_id
* IN: Location of object to which attribute is attached
@@ -1016,12 +1039,13 @@ public class H5 implements java.io.Serializable {
* @return An attribute identifier if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - Name is null.
+ * Name is null.
**/
- public static long H5Aopen_by_idx(long loc_id, String obj_name, int idx_type, int order, long n, long aapl_id,
- long lapl_id) throws HDF5LibraryException, NullPointerException
+ public static long H5Aopen_by_idx(long loc_id, String obj_name, int idx_type, int order, long n,
+ long aapl_id, long lapl_id)
+ throws HDF5LibraryException, NullPointerException
{
long id = _H5Aopen_by_idx(loc_id, obj_name, idx_type, order, n, aapl_id, lapl_id);
if (id > 0) {
@@ -1032,8 +1056,9 @@ public class H5 implements java.io.Serializable {
return id;
}
- private synchronized static native long _H5Aopen_by_idx(long loc_id, String obj_name, int idx_type, int order,
- long n, long aapl_id, long lapl_id) throws HDF5LibraryException, NullPointerException;
+ private synchronized static native long _H5Aopen_by_idx(long loc_id, String obj_name, int idx_type,
+ int order, long n, long aapl_id, long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Aopen_by_name Opens an attribute for an object by object name and attribute name
@@ -1052,12 +1077,12 @@ public class H5 implements java.io.Serializable {
* @return Returns an attribute identifier if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - obj_name is null.
+ * obj_name is null.
**/
- public static long H5Aopen_by_name(long loc_id, String obj_name, String attr_name, long aapl_id, long lapl_id)
- throws HDF5LibraryException, NullPointerException
+ public static long H5Aopen_by_name(long loc_id, String obj_name, String attr_name, long aapl_id,
+ long lapl_id) throws HDF5LibraryException, NullPointerException
{
long id = _H5Aopen_by_name(loc_id, obj_name, attr_name, aapl_id, lapl_id);
if (id > 0) {
@@ -1069,7 +1094,8 @@ public class H5 implements java.io.Serializable {
}
private synchronized static native long _H5Aopen_by_name(long loc_id, String obj_name, String attr_name,
- long aapl_id, long lapl_id) throws HDF5LibraryException, NullPointerException;
+ long aapl_id, long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Aread reads an attribute, specified with attr_id. The attribute's memory datatype is specified with
@@ -1087,12 +1113,13 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
- public synchronized static native int H5Aread(long attr_id, long mem_type_id, byte[] obj, boolean isCriticalPinning)
- throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Aread(long attr_id, long mem_type_id, byte[] obj,
+ boolean isCriticalPinning)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Aread reads an attribute, specified with attr_id. The attribute's memory datatype is specified with
@@ -1108,11 +1135,12 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
- public synchronized static int H5Aread(long attr_id, long mem_type_id, byte[] buf) throws HDF5LibraryException, NullPointerException
+ public synchronized static int H5Aread(long attr_id, long mem_type_id, byte[] buf)
+ throws HDF5LibraryException, NullPointerException
{
return H5Aread(attr_id, mem_type_id, buf, true);
}
@@ -1131,11 +1159,12 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
- public synchronized static int H5Aread(long attr_id, long mem_type_id, Object obj) throws HDF5Exception, HDF5LibraryException, NullPointerException
+ public synchronized static int H5Aread(long attr_id, long mem_type_id, Object obj)
+ throws HDF5Exception, HDF5LibraryException, NullPointerException
{
return H5Aread(attr_id, mem_type_id, obj, true);
}
@@ -1156,66 +1185,67 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5Exception
- * - Failure in the data conversion.
+ * Failure in the data conversion.
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null. See public synchronized static native int H5Aread( )
+ * data buffer is null. See public synchronized static native int H5Aread( )
**/
- public synchronized static int H5Aread(long attr_id, long mem_type_id, Object obj, boolean isCriticalPinning)
- throws HDF5Exception, HDF5LibraryException, NullPointerException
+ public synchronized static int H5Aread(long attr_id, long mem_type_id, Object obj,
+ boolean isCriticalPinning)
+ throws HDF5Exception, HDF5LibraryException, NullPointerException
{
- int status = -1;
+ int status = -1;
boolean is1D = false;
Class dataClass = obj.getClass();
if (!dataClass.isArray()) {
- throw (new HDF5JavaException("H5Aread: data is not an array"));
+ throw(new HDF5JavaException("H5Aread: data is not an array"));
}
String cname = dataClass.getName();
- is1D = (cname.lastIndexOf('[') == cname.indexOf('['));
- char dname = cname.charAt(cname.lastIndexOf("[") + 1);
+ is1D = (cname.lastIndexOf('[') == cname.indexOf('['));
+ char dname = cname.charAt(cname.lastIndexOf("[") + 1);
log.trace("H5Aread: cname={} is1D={} dname={}", cname, is1D, dname);
if (is1D && (dname == 'B')) {
log.trace("H5Aread_dname_B");
- status = H5Aread(attr_id, mem_type_id, (byte[]) obj, isCriticalPinning);
+ status = H5Aread(attr_id, mem_type_id, (byte[])obj, isCriticalPinning);
}
else if (is1D && (dname == 'S')) {
log.trace("H5Aread_dname_S");
- status = H5Aread_short(attr_id, mem_type_id, (short[]) obj, isCriticalPinning);
+ status = H5Aread_short(attr_id, mem_type_id, (short[])obj, isCriticalPinning);
}
else if (is1D && (dname == 'I')) {
log.trace("H5Aread_dname_I");
- status = H5Aread_int(attr_id, mem_type_id, (int[]) obj, isCriticalPinning);
+ status = H5Aread_int(attr_id, mem_type_id, (int[])obj, isCriticalPinning);
}
else if (is1D && (dname == 'J')) {
log.trace("H5Aread_dname_J");
- status = H5Aread_long(attr_id, mem_type_id, (long[]) obj, isCriticalPinning);
+ status = H5Aread_long(attr_id, mem_type_id, (long[])obj, isCriticalPinning);
}
else if (is1D && (dname == 'F')) {
log.trace("H5Aread_dname_F");
- status = H5Aread_float(attr_id, mem_type_id, (float[]) obj, isCriticalPinning);
+ status = H5Aread_float(attr_id, mem_type_id, (float[])obj, isCriticalPinning);
}
else if (is1D && (dname == 'D')) {
log.trace("H5Aread_dname_D");
- status = H5Aread_double(attr_id, mem_type_id, (double[]) obj, isCriticalPinning);
+ status = H5Aread_double(attr_id, mem_type_id, (double[])obj, isCriticalPinning);
}
else if ((H5.H5Tdetect_class(mem_type_id, HDF5Constants.H5T_REFERENCE) &&
- (is1D && (dataClass.getComponentType() == String.class))) ||
- H5.H5Tequal(mem_type_id, HDF5Constants.H5T_STD_REF_DSETREG)) {
+ (is1D && (dataClass.getComponentType() == String.class))) ||
+ H5.H5Tequal(mem_type_id, HDF5Constants.H5T_STD_REF_DSETREG)) {
log.trace("H5Aread_reg_ref");
- status = H5Aread_reg_ref(attr_id, mem_type_id, (String[]) obj);
+ status = H5Aread_reg_ref(attr_id, mem_type_id, (String[])obj);
}
else if (is1D && (dataClass.getComponentType() == String.class)) {
log.trace("H5Aread_string type");
- status = H5Aread_string(attr_id, mem_type_id, (String[]) obj);
+ status = H5Aread_string(attr_id, mem_type_id, (String[])obj);
}
else {
// Create a data buffer to hold the data into a Java Array
HDFArray theArray = new HDFArray(obj);
- byte[] buf = theArray.emptyBytes();
+ byte[] buf = theArray.emptyBytes();
log.trace("H5Aread_else");
// This will raise an exception if there is an error
@@ -1227,7 +1257,7 @@ public class H5 implements java.io.Serializable {
}
// clean up these: assign 'null' as hint to gc()
- buf = null;
+ buf = null;
theArray = null;
}
@@ -1250,12 +1280,13 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
- public synchronized static native int H5Aread_double(long attr_id, long mem_type_id, double[] buf, boolean isCriticalPinning)
- throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Aread_double(long attr_id, long mem_type_id, double[] buf,
+ boolean isCriticalPinning)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Aread reads an attribute, specified with attr_id. The attribute's memory datatype is specified with
@@ -1271,12 +1302,12 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
public synchronized static int H5Aread_double(long attr_id, long mem_type_id, double[] buf)
- throws HDF5LibraryException, NullPointerException
+ throws HDF5LibraryException, NullPointerException
{
return H5Aread_double(attr_id, mem_type_id, buf, true);
}
@@ -1297,12 +1328,13 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
- public synchronized static native int H5Aread_float(long attr_id, long mem_type_id, float[] buf, boolean isCriticalPinning)
- throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Aread_float(long attr_id, long mem_type_id, float[] buf,
+ boolean isCriticalPinning)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Aread reads an attribute, specified with attr_id. The attribute's memory datatype is specified with
@@ -1318,12 +1350,12 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
public synchronized static int H5Aread_float(long attr_id, long mem_type_id, float[] buf)
- throws HDF5LibraryException, NullPointerException
+ throws HDF5LibraryException, NullPointerException
{
return H5Aread_float(attr_id, mem_type_id, buf, true);
}
@@ -1344,12 +1376,13 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
- public synchronized static native int H5Aread_int(long attr_id, long mem_type_id, int[] buf, boolean isCriticalPinning)
- throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Aread_int(long attr_id, long mem_type_id, int[] buf,
+ boolean isCriticalPinning)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Aread reads an attribute, specified with attr_id. The attribute's memory datatype is specified with
@@ -1365,12 +1398,12 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
public synchronized static int H5Aread_int(long attr_id, long mem_type_id, int[] buf)
- throws HDF5LibraryException, NullPointerException
+ throws HDF5LibraryException, NullPointerException
{
return H5Aread_int(attr_id, mem_type_id, buf, true);
}
@@ -1391,12 +1424,13 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
- public synchronized static native int H5Aread_long(long attr_id, long mem_type_id, long[] buf, boolean isCriticalPinning)
- throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Aread_long(long attr_id, long mem_type_id, long[] buf,
+ boolean isCriticalPinning)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Aread reads an attribute, specified with attr_id. The attribute's memory datatype is specified with
@@ -1412,12 +1446,12 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
public synchronized static int H5Aread_long(long attr_id, long mem_type_id, long[] buf)
- throws HDF5LibraryException, NullPointerException
+ throws HDF5LibraryException, NullPointerException
{
return H5Aread_long(attr_id, mem_type_id, buf, true);
}
@@ -1436,12 +1470,12 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
public synchronized static native int H5Aread_reg_ref(long attr_id, long mem_type_id, String[] buf)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Aread reads an attribute, specified with attr_id. The attribute's memory datatype is specified with
@@ -1459,12 +1493,13 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
- public synchronized static native int H5Aread_short(long attr_id, long mem_type_id, short[] buf, boolean isCriticalPinning)
- throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Aread_short(long attr_id, long mem_type_id, short[] buf,
+ boolean isCriticalPinning)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Aread reads an attribute, specified with attr_id. The attribute's memory datatype is specified with
@@ -1480,12 +1515,12 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
public synchronized static int H5Aread_short(long attr_id, long mem_type_id, short[] buf)
- throws HDF5LibraryException, NullPointerException
+ throws HDF5LibraryException, NullPointerException
{
return H5Aread_short(attr_id, mem_type_id, buf, true);
}
@@ -1504,12 +1539,12 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
public synchronized static native int H5AreadVL(long attr_id, long mem_type_id, Object[] buf)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Aread reads an attribute, specified with attr_id. The attribute's memory datatype is specified with
@@ -1525,12 +1560,12 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
public synchronized static native int H5Aread_string(long attr_id, long mem_type_id, String[] buf)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Aread reads an attribute, specified with attr_id. The attribute's memory datatype is specified with
@@ -1546,12 +1581,12 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
public synchronized static native int H5Aread_VLStrings(long attr_id, long mem_type_id, Object[] buf)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Aread reads an attribute, specified with attr_id. The attribute's memory datatype is specified with
@@ -1567,16 +1602,16 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
public synchronized static native int H5AreadComplex(long attr_id, long mem_type_id, String[] buf)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Arename changes the name of attribute that is attached to the object specified by loc_id. The attribute named
- * old_attr_name is renamed new_attr_name.
+ * H5Arename changes the name of attribute that is attached to the object specified by loc_id. The
+ *attribute named old_attr_name is renamed new_attr_name.
*
* @param loc_id
* IN: Location or object identifier; may be dataset or group
@@ -1588,16 +1623,16 @@ public class H5 implements java.io.Serializable {
* @return A non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - Name is null.
+ * Name is null.
**/
public synchronized static native int H5Arename(long loc_id, String old_attr_name, String new_attr_name)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Arename_by_name changes the name of attribute that is attached to the object specified by loc_id and obj_name.
- * The attribute named old_attr_name is renamed new_attr_name.
+ * H5Arename_by_name changes the name of attribute that is attached to the object specified by loc_id and
+ * obj_name. The attribute named old_attr_name is renamed new_attr_name.
*
* @param loc_id
* IN: Location or object identifier; may be dataset or group
@@ -1613,12 +1648,13 @@ public class H5 implements java.io.Serializable {
* @return A non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - Name is null.
+ * Name is null.
**/
- public synchronized static native int H5Arename_by_name(long loc_id, String obj_name, String old_attr_name,
- String new_attr_name, long lapl_id) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int
+ H5Arename_by_name(long loc_id, String obj_name, String old_attr_name, String new_attr_name, long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Awrite writes an attribute, specified with attr_id. The attribute's memory datatype is specified with
@@ -1636,12 +1672,13 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data is null.
+ * data is null.
**/
- public synchronized static native int H5Awrite(long attr_id, long mem_type_id, byte[] buf, boolean isCriticalPinning)
- throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Awrite(long attr_id, long mem_type_id, byte[] buf,
+ boolean isCriticalPinning)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Awrite writes an attribute, specified with attr_id. The attribute's memory datatype is specified with
@@ -1657,12 +1694,12 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data is null.
+ * data is null.
**/
public synchronized static int H5Awrite(long attr_id, long mem_type_id, byte[] buf)
- throws HDF5LibraryException, NullPointerException
+ throws HDF5LibraryException, NullPointerException
{
return H5Awrite(attr_id, mem_type_id, buf, true);
}
@@ -1681,12 +1718,12 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data is null.
+ * data is null.
**/
public synchronized static int H5Awrite(long attr_id, long mem_type_id, Object obj)
- throws HDF5Exception, HDF5LibraryException, NullPointerException
+ throws HDF5Exception, HDF5LibraryException, NullPointerException
{
return H5Awrite(attr_id, mem_type_id, obj, true);
}
@@ -1707,55 +1744,56 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5Exception
- * - Failure in the data conversion.
+ * Failure in the data conversion.
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data object is null
+ * data object is null
**/
- public synchronized static int H5Awrite(long attr_id, long mem_type_id, Object obj, boolean isCriticalPinning)
- throws HDF5Exception, HDF5LibraryException, NullPointerException
+ public synchronized static int H5Awrite(long attr_id, long mem_type_id, Object obj,
+ boolean isCriticalPinning)
+ throws HDF5Exception, HDF5LibraryException, NullPointerException
{
- int status = -1;
+ int status = -1;
boolean is1D = false;
Class dataClass = obj.getClass();
if (!dataClass.isArray()) {
- throw (new HDF5JavaException("H5Dwrite: data is not an array"));
+ throw(new HDF5JavaException("H5Dwrite: data is not an array"));
}
String cname = dataClass.getName();
- is1D = (cname.lastIndexOf('[') == cname.indexOf('['));
- char dname = cname.charAt(cname.lastIndexOf("[") + 1);
+ is1D = (cname.lastIndexOf('[') == cname.indexOf('['));
+ char dname = cname.charAt(cname.lastIndexOf("[") + 1);
if (is1D && (dname == 'B')) {
- status = H5Awrite(attr_id, mem_type_id, (byte[]) obj, isCriticalPinning);
+ status = H5Awrite(attr_id, mem_type_id, (byte[])obj, isCriticalPinning);
}
else if (is1D && (dname == 'S')) {
- status = H5Awrite_short(attr_id, mem_type_id, (short[]) obj, isCriticalPinning);
+ status = H5Awrite_short(attr_id, mem_type_id, (short[])obj, isCriticalPinning);
}
else if (is1D && (dname == 'I')) {
- status = H5Awrite_int(attr_id, mem_type_id, (int[]) obj, isCriticalPinning);
+ status = H5Awrite_int(attr_id, mem_type_id, (int[])obj, isCriticalPinning);
}
else if (is1D && (dname == 'J')) {
- status = H5Awrite_long(attr_id, mem_type_id, (long[]) obj, isCriticalPinning);
+ status = H5Awrite_long(attr_id, mem_type_id, (long[])obj, isCriticalPinning);
}
else if (is1D && (dname == 'F')) {
- status = H5Awrite_float(attr_id, mem_type_id, (float[]) obj, isCriticalPinning);
+ status = H5Awrite_float(attr_id, mem_type_id, (float[])obj, isCriticalPinning);
}
else if (is1D && (dname == 'D')) {
- status = H5Awrite_double(attr_id, mem_type_id, (double[]) obj, isCriticalPinning);
+ status = H5Awrite_double(attr_id, mem_type_id, (double[])obj, isCriticalPinning);
}
else if (is1D && (dataClass.getComponentType() == String.class)) {
log.trace("H5Dwrite_string type");
- status = H5Awrite_string(attr_id, mem_type_id, (String[]) obj);
+ status = H5Awrite_string(attr_id, mem_type_id, (String[])obj);
}
else {
HDFArray theArray = new HDFArray(obj);
- byte[] buf = theArray.byteify();
+ byte[] buf = theArray.byteify();
- status = H5Awrite(attr_id, mem_type_id, buf);
- buf = null;
+ status = H5Awrite(attr_id, mem_type_id, buf);
+ buf = null;
theArray = null;
}
@@ -1778,12 +1816,13 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data is null.
+ * data is null.
**/
- public synchronized static native int H5Awrite_double(long attr_id, long mem_type_id, double[] buf, boolean isCriticalPinning)
- throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Awrite_double(long attr_id, long mem_type_id, double[] buf,
+ boolean isCriticalPinning)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Awrite writes an attribute, specified with attr_id. The attribute's memory datatype is specified with
@@ -1799,12 +1838,12 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data is null.
+ * data is null.
**/
public synchronized static int H5Awrite_double(long attr_id, long mem_type_id, double[] buf)
- throws HDF5LibraryException, NullPointerException
+ throws HDF5LibraryException, NullPointerException
{
return H5Awrite_double(attr_id, mem_type_id, buf, true);
}
@@ -1825,12 +1864,13 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data is null.
+ * data is null.
**/
- public synchronized static native int H5Awrite_float(long attr_id, long mem_type_id, float[] buf, boolean isCriticalPinning)
- throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Awrite_float(long attr_id, long mem_type_id, float[] buf,
+ boolean isCriticalPinning)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Awrite writes an attribute, specified with attr_id. The attribute's memory datatype is specified with
@@ -1846,12 +1886,12 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data is null.
+ * data is null.
**/
public synchronized static int H5Awrite_float(long attr_id, long mem_type_id, float[] buf)
- throws HDF5LibraryException, NullPointerException
+ throws HDF5LibraryException, NullPointerException
{
return H5Awrite_float(attr_id, mem_type_id, buf, true);
}
@@ -1872,12 +1912,13 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data is null.
+ * data is null.
**/
- public synchronized static native int H5Awrite_int(long attr_id, long mem_type_id, int[] buf, boolean isCriticalPinning)
- throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Awrite_int(long attr_id, long mem_type_id, int[] buf,
+ boolean isCriticalPinning)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Awrite writes an attribute, specified with attr_id. The attribute's memory datatype is specified with
@@ -1893,12 +1934,12 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data is null.
+ * data is null.
**/
public synchronized static int H5Awrite_int(long attr_id, long mem_type_id, int[] buf)
- throws HDF5LibraryException, NullPointerException
+ throws HDF5LibraryException, NullPointerException
{
return H5Awrite_int(attr_id, mem_type_id, buf, true);
}
@@ -1919,12 +1960,13 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data is null.
+ * data is null.
**/
- public synchronized static native int H5Awrite_long(long attr_id, long mem_type_id, long[] buf, boolean isCriticalPinning)
- throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Awrite_long(long attr_id, long mem_type_id, long[] buf,
+ boolean isCriticalPinning)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Awrite writes an attribute, specified with attr_id. The attribute's memory datatype is specified with
@@ -1940,12 +1982,12 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data is null.
+ * data is null.
**/
public synchronized static int H5Awrite_long(long attr_id, long mem_type_id, long[] buf)
- throws HDF5LibraryException, NullPointerException
+ throws HDF5LibraryException, NullPointerException
{
return H5Awrite_long(attr_id, mem_type_id, buf, true);
}
@@ -1966,12 +2008,13 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data is null.
+ * data is null.
**/
- public synchronized static native int H5Awrite_short(long attr_id, long mem_type_id, short[] buf, boolean isCriticalPinning)
- throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Awrite_short(long attr_id, long mem_type_id, short[] buf,
+ boolean isCriticalPinning)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Awrite writes an attribute, specified with attr_id. The attribute's memory datatype is specified with
@@ -1987,12 +2030,12 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data is null.
+ * data is null.
**/
public synchronized static int H5Awrite_short(long attr_id, long mem_type_id, short[] buf)
- throws HDF5LibraryException, NullPointerException
+ throws HDF5LibraryException, NullPointerException
{
return H5Awrite_short(attr_id, mem_type_id, buf, true);
}
@@ -2011,12 +2054,12 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data is null.
+ * data is null.
**/
public synchronized static native int H5Awrite_string(long attr_id, long mem_type_id, String[] buf)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Awrite writes an attribute, specified with attr_id. The attribute's memory datatype is specified with
@@ -2032,12 +2075,12 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data is null.
+ * data is null.
**/
public synchronized static native int H5AwriteVL(long attr_id, long mem_type_id, Object[] buf)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Awrite_VLStrings writes a variable length String dataset, specified by its identifier attr_id, from
@@ -2055,13 +2098,13 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
public synchronized static native int H5Awrite_VLStrings(long attr_id, long mem_type_id, Object[] buf)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Aget_create_plist retrieves a copy of the attribute creation property list identifier.
@@ -2072,10 +2115,9 @@ public class H5 implements java.io.Serializable {
* @return identifier for the attribute's creation property list if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public static long H5Aget_create_plist(long attr_id)
- throws HDF5LibraryException
+ public static long H5Aget_create_plist(long attr_id) throws HDF5LibraryException
{
long id = _H5Aget_create_plist(attr_id);
if (id > 0) {
@@ -2094,20 +2136,22 @@ public class H5 implements java.io.Serializable {
* as defined below, is passed to a user-defined function, op, which operates on that attribute.
*
* @param loc_id
- * IN: Identifier for object to which attributes are attached; may be group, dataset, or named datatype.
+ * IN: Identifier for object to which attributes are attached; may be group, dataset, or named
+ * datatype.
* @param idx_type
* IN: The type of index specified by idx_type can be one of the following:
* H5_INDEX_NAME An alphanumeric index by attribute name.
* H5_INDEX_CRT_ORDER An index by creation order.
* @param order
- * IN: The order in which the index is to be traversed, as specified by order, can be one of the following:
+ * IN: The order in which the index is to be traversed, as specified by order, can be one of
+ * the following:
* H5_ITER_INC Iteration is from beginning to end, i.e., a top-down iteration
* incrementing the index position at each step.
- * H5_ITER_DEC Iteration starts at the end of the index, i.e., a bottom-up iteration
- * decrementing the index position at each step.
- * H5_ITER_NATIVE HDF5 iterates in the fastest-available order. No information is provided
- * as to the order, but HDF5 ensures that each element in the index will be
- * visited if the iteration completes successfully.
+ * H5_ITER_DEC Iteration starts at the end of the index, i.e., a bottom-up
+ * iteration decrementing the index position at each step.
+ * H5_ITER_NATIVE HDF5 iterates in the fastest-available order. No information is
+ * provided as to the order, but HDF5 ensures that each element in
+ * the index will be visited if the iteration completes successfully.
* @param idx
* IN/OUT: Initial and returned offset within index.
* @param op
@@ -2115,16 +2159,17 @@ public class H5 implements java.io.Serializable {
* @param op_data
* IN/OUT: Pointer to any user-efined data for use by operator function.
*
- * @return returns the return value of the first operator that returns a positive value, or zero if all members were
- * processed with no operator returning non-zero.
+ * @return returns the return value of the first operator that returns a positive value, or zero if all
+ * members were processed with no operator returning non-zero.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - buf is null.
+ * buf is null.
**/
- public synchronized static native int H5Aiterate(long loc_id, int idx_type, int order, long idx,
- H5A_iterate_cb op, H5A_iterate_t op_data) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Aiterate(long loc_id, int idx_type, int order, long idx,
+ H5A_iterate_cb op, H5A_iterate_t op_data)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Aiterate_by_name iterates over the attributes attached to the dataset or group specified with loc_id
@@ -2132,7 +2177,8 @@ public class H5 implements java.io.Serializable {
* below, is passed to a user-defined function, op, which operates on that attribute.
*
* @param loc_id
- * IN: Identifier for object to which attributes are attached; may be group, dataset, or named datatype.
+ * IN: Identifier for object to which attributes are attached; may be group, dataset, or named
+ * datatype.
* @param obj_name
* IN: Name of object, relative to location.
* @param idx_type
@@ -2140,14 +2186,15 @@ public class H5 implements java.io.Serializable {
* H5_INDEX_NAME An alphanumeric index by attribute name.
* H5_INDEX_CRT_ORDER An index by creation order.
* @param order
- * IN: The order in which the index is to be traversed, as specified by order, can be one of the following:
- * H5_ITER_INC Iteration is from beginning to end, i.e., a top-down iteration
- * incrementing the index position at each step.
- * H5_ITER_DEC Iteration starts at the end of the index, i.e., a bottom-up iteration
- * decrementing the index position at each step.
- * H5_ITER_NATIVE HDF5 iterates in the fastest-available order. No information is provided
- * as to the order, but HDF5 ensures that each element in the index will be
- * visited if the iteration completes successfully.
+ * IN: The order in which the index is to be traversed, as specified by order, can be one of
+ * the following:
+ * H5_ITER_INC Iteration is from beginning to end, i.e., a top-down
+ * iteration incrementing the index position at each step.
+ * H5_ITER_DEC Iteration starts at the end of the index, i.e., a bottom-up iteration
+ * decrementing the index position at each step.
+ * H5_ITER_NATIVE HDF5 iterates in the fastest-available order. No information is provided
+ * as to the order, but HDF5 ensures that each element in the index will be
+ * visited if the iteration completes successfully.
* @param idx
* IN/OUT: Initial and returned offset within index.
* @param op
@@ -2157,16 +2204,18 @@ public class H5 implements java.io.Serializable {
* @param lapl_id
* IN: Link access property list
*
- * @return returns the return value of the first operator that returns a positive value, or zero if all members were
- * processed with no operator returning non-zero.
+ * @return returns the return value of the first operator that returns a positive value, or zero if all
+ * members were processed with no operator returning non-zero.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - buf is null.
+ * buf is null.
**/
- public synchronized static native int H5Aiterate_by_name(long loc_id, String obj_name, int idx_type,
- int order, long idx, H5A_iterate_cb op, H5A_iterate_t op_data, long lapl_id) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Aiterate_by_name(long loc_id, String obj_name, int idx_type,
+ int order, long idx, H5A_iterate_cb op,
+ H5A_iterate_t op_data, long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
// ////////////////////////////////////////////////////////////
// //
@@ -2217,7 +2266,7 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*/
public synchronized static native int H5Dcopy(long src_did, long dst_did) throws HDF5LibraryException;
@@ -2230,9 +2279,10 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public static int H5Dclose(long dataset_id) throws HDF5LibraryException {
+ public static int H5Dclose(long dataset_id) throws HDF5LibraryException
+ {
if (dataset_id < 0)
return 0; // throw new HDF5LibraryException("Negative ID");
@@ -2265,12 +2315,13 @@ public class H5 implements java.io.Serializable {
* @return a dataset identifier
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public static long H5Dcreate(long loc_id, String name, long type_id, long space_id, long lcpl_id, long dcpl_id,
- long dapl_id) throws HDF5LibraryException, NullPointerException {
+ public static long H5Dcreate(long loc_id, String name, long type_id, long space_id, long lcpl_id,
+ long dcpl_id, long dapl_id) throws HDF5LibraryException, NullPointerException
+ {
long id = _H5Dcreate2(loc_id, name, type_id, space_id, lcpl_id, dcpl_id, dapl_id);
if (id > 0) {
log.trace("OPEN_IDS: H5Dcreate add {}", id);
@@ -2283,11 +2334,12 @@ public class H5 implements java.io.Serializable {
/**
* H5Dcreate2 creates a new dataset named name at the location specified by loc_id.
*
- * @see public static int H5Dcreate(int loc_id, String name, int type_id, int space_id, int lcpl_id, int dcpl_id,
- * int dapl_id)
+ * @see public static int H5Dcreate(int loc_id, String name, int type_id, int space_id, int lcpl_id, int
+ * dcpl_id, int dapl_id)
**/
private synchronized static native long _H5Dcreate2(long loc_id, String name, long type_id, long space_id,
- long lcpl_id, long dcpl_id, long dapl_id) throws HDF5LibraryException, NullPointerException;
+ long lcpl_id, long dcpl_id, long dapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Dcreate_anon creates a dataset in the file specified by loc_id.
@@ -2306,10 +2358,11 @@ public class H5 implements java.io.Serializable {
* @return a dataset identifier
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public static long H5Dcreate_anon(long loc_id, long type_id, long space_id, long dcpl_id, long dapl_id)
- throws HDF5LibraryException {
+ throws HDF5LibraryException
+ {
long id = _H5Dcreate_anon(loc_id, type_id, space_id, dcpl_id, dapl_id);
if (id > 0) {
log.trace("OPEN_IDS: H5Dcreate_anon add {}", id);
@@ -2319,11 +2372,13 @@ public class H5 implements java.io.Serializable {
return id;
}
- private synchronized static native long _H5Dcreate_anon(long loc_id, long type_id, long space_id, long dcpl_id,
- long dapl_id) throws HDF5LibraryException;
+ private synchronized static native long _H5Dcreate_anon(long loc_id, long type_id, long space_id,
+ long dcpl_id, long dapl_id)
+ throws HDF5LibraryException;
/**
- * H5Dfill explicitly fills the dataspace selection in memory, space_id, with the fill value specified in fill.
+ * H5Dfill explicitly fills the dataspace selection in memory, space_id, with the fill value specified in
+ * fill.
*
* @param fill
* IN: Pointer to the fill value to be used.
@@ -2337,12 +2392,13 @@ public class H5 implements java.io.Serializable {
* IN: Dataspace describing memory buffer and containing the selection to be filled.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - buf is null.
+ * buf is null.
**/
- public synchronized static native void H5Dfill(byte[] fill, long fill_type, byte[] buf, long buf_type, long space_id)
- throws HDF5LibraryException, NullPointerException;
+ public synchronized static native void H5Dfill(byte[] fill, long fill_type, byte[] buf, long buf_type,
+ long space_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Dget_access_plist returns an identifier for a copy of the dataset access property list for a dataset.
@@ -2353,21 +2409,23 @@ public class H5 implements java.io.Serializable {
* @return a dataset access property list identifier
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native long H5Dget_access_plist(long dset_id) throws HDF5LibraryException;
/**
- * H5Dget_create_plist returns an identifier for a copy of the dataset creation property list for a dataset.
+ * H5Dget_create_plist returns an identifier for a copy of the dataset creation property list for a
+ * dataset.
*
* @param dataset_id
* Identifier of the dataset to query.
* @return a dataset creation property list identifier if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public static long H5Dget_create_plist(long dataset_id) throws HDF5LibraryException {
+ public static long H5Dget_create_plist(long dataset_id) throws HDF5LibraryException
+ {
long id = _H5Dget_create_plist(dataset_id);
if (id > 0) {
log.trace("OPEN_IDS: H5Dget_create_plist add {}", id);
@@ -2388,7 +2446,7 @@ public class H5 implements java.io.Serializable {
* @return the offset in bytes.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native long H5Dget_offset(long dset_id) throws HDF5LibraryException;
@@ -2401,9 +2459,10 @@ public class H5 implements java.io.Serializable {
* @return a dataspace identifier if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public static long H5Dget_space(long dataset_id) throws HDF5LibraryException {
+ public static long H5Dget_space(long dataset_id) throws HDF5LibraryException
+ {
long id = _H5Dget_space(dataset_id);
if (id > 0) {
log.trace("OPEN_IDS: H5Dget_space add {}", id);
@@ -2424,7 +2483,7 @@ public class H5 implements java.io.Serializable {
* @return the space allocation status
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Dget_space_status(long dset_id) throws HDF5LibraryException;
@@ -2437,10 +2496,10 @@ public class H5 implements java.io.Serializable {
* @return he amount of storage space allocated for the dataset.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native long H5Dget_storage_size(long dataset_id) throws HDF5LibraryException,
- IllegalArgumentException;
+ public synchronized static native long H5Dget_storage_size(long dataset_id)
+ throws HDF5LibraryException, IllegalArgumentException;
/**
* H5Dget_type returns an identifier for a copy of the datatype for a dataset.
@@ -2451,9 +2510,10 @@ public class H5 implements java.io.Serializable {
* @return a datatype identifier if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public static long H5Dget_type(long dataset_id) throws HDF5LibraryException {
+ public static long H5Dget_type(long dataset_id) throws HDF5LibraryException
+ {
long id = _H5Dget_type(dataset_id);
if (id > 0) {
log.trace("OPEN_IDS: H5Dget_type add {}", id);
@@ -2466,8 +2526,8 @@ public class H5 implements java.io.Serializable {
private synchronized static native long _H5Dget_type(long dataset_id) throws HDF5LibraryException;
/**
- * H5Diterate iterates over all the data elements in the memory buffer buf, executing the callback function operator
- * once for each such data element.
+ * H5Diterate iterates over all the data elements in the memory buffer buf, executing the callback
+ * function operator once for each such data element.
*
* @param buf
* IN/OUT: Pointer to the memory containing the elements to iterate over.
@@ -2480,19 +2540,21 @@ public class H5 implements java.io.Serializable {
* @param op_data
* IN/OUT: Pointer to any user-efined data for use by operator function.
*
- * @return returns the return value of the first operator that returns a positive value, or zero if all members were
- * processed with no operator returning non-zero.
+ * @return returns the return value of the first operator that returns a positive value, or zero if all
+ * members were processed with no operator returning non-zero.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - buf is null.
+ * buf is null.
**/
- public synchronized static native int H5Diterate(byte[] buf, long buf_type, long space_id, H5D_iterate_cb op,
- H5D_iterate_t op_data) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Diterate(byte[] buf, long buf_type, long space_id,
+ H5D_iterate_cb op, H5D_iterate_t op_data)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Dopen opens the existing dataset specified by a location identifier and name, loc_id and name, respectively.
+ * H5Dopen opens the existing dataset specified by a location identifier and name, loc_id and name,
+ * respectively.
*
* @param loc_id
* IN: Location identifier
@@ -2504,11 +2566,12 @@ public class H5 implements java.io.Serializable {
* @return a dataset identifier if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public static long H5Dopen(long loc_id, String name, long dapl_id) throws HDF5LibraryException, NullPointerException
+ public static long H5Dopen(long loc_id, String name, long dapl_id)
+ throws HDF5LibraryException, NullPointerException
{
long id = _H5Dopen2(loc_id, name, dapl_id);
if (id > 0) {
@@ -2520,16 +2583,17 @@ public class H5 implements java.io.Serializable {
}
/**
- * H5Dopen2 opens the existing dataset specified by a location identifier and name, loc_id and name, respectively.
+ * H5Dopen2 opens the existing dataset specified by a location identifier and name, loc_id and name,
+ * respectively.
*
* @see public static int H5Dopen(int loc_id, String name, int dapl_id)
**/
private synchronized static native long _H5Dopen2(long loc_id, String name, long dapl_id)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application
- * memory buffer buf.
+ * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the
+ * application memory buffer buf.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -2549,17 +2613,18 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
public synchronized static native int H5Dread(long dataset_id, long mem_type_id, long mem_space_id,
- long file_space_id, long xfer_plist_id, byte[] obj, boolean isCriticalPinning) throws HDF5LibraryException,
- NullPointerException;
+ long file_space_id, long xfer_plist_id, byte[] obj,
+ boolean isCriticalPinning)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application
- * memory buffer buf.
+ * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the
+ * application memory buffer buf.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -2577,19 +2642,20 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
- public synchronized static int H5Dread(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id,
- long xfer_plist_id, byte[] buf) throws HDF5LibraryException, NullPointerException
+ public synchronized static int H5Dread(long dataset_id, long mem_type_id, long mem_space_id,
+ long file_space_id, long xfer_plist_id, byte[] buf)
+ throws HDF5LibraryException, NullPointerException
{
return H5Dread(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf, true);
}
/**
- * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application
- * memory buffer buf.
+ * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the
+ * application memory buffer buf.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -2607,19 +2673,20 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
- public synchronized static int H5Dread(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id,
- long xfer_plist_id, Object obj) throws HDF5Exception, HDF5LibraryException, NullPointerException
+ public synchronized static int H5Dread(long dataset_id, long mem_type_id, long mem_space_id,
+ long file_space_id, long xfer_plist_id, Object obj)
+ throws HDF5Exception, HDF5LibraryException, NullPointerException
{
return H5Dread(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, obj, true);
}
/**
- * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application
- * data object.
+ * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the
+ * application data object.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -2639,87 +2706,88 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5Exception
- * - Failure in the data conversion.
+ * Failure in the data conversion.
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data object is null.
+ * data object is null.
**/
- public synchronized static int H5Dread(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id,
- long xfer_plist_id, Object obj, boolean isCriticalPinning) throws HDF5Exception, HDF5LibraryException,
- NullPointerException
+ public synchronized static int H5Dread(long dataset_id, long mem_type_id, long mem_space_id,
+ long file_space_id, long xfer_plist_id, Object obj,
+ boolean isCriticalPinning)
+ throws HDF5Exception, HDF5LibraryException, NullPointerException
{
- int status = -1;
+ int status = -1;
boolean is1D = false;
Class dataClass = obj.getClass();
if (!dataClass.isArray()) {
- throw (new HDF5JavaException("H5Dread: data is not an array"));
+ throw(new HDF5JavaException("H5Dread: data is not an array"));
}
String cname = dataClass.getName();
- is1D = (cname.lastIndexOf('[') == cname.indexOf('['));
- char dname = cname.charAt(cname.lastIndexOf("[") + 1);
+ is1D = (cname.lastIndexOf('[') == cname.indexOf('['));
+ char dname = cname.charAt(cname.lastIndexOf("[") + 1);
log.trace("H5Dread: cname={} is1D={} dname={}", cname, is1D, dname);
if (is1D && (dname == 'B')) {
log.trace("H5Dread_dname_B");
- status = H5Dread(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, (byte[]) obj,
- isCriticalPinning);
+ status = H5Dread(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, (byte[])obj,
+ isCriticalPinning);
}
else if (is1D && (dname == 'S')) {
log.trace("H5Dread_dname_S");
- status = H5Dread_short(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, (short[]) obj,
- isCriticalPinning);
+ status = H5Dread_short(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id,
+ (short[])obj, isCriticalPinning);
}
else if (is1D && (dname == 'I')) {
log.trace("H5Dread_dname_I");
- status = H5Dread_int(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, (int[]) obj,
- isCriticalPinning);
+ status = H5Dread_int(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id,
+ (int[])obj, isCriticalPinning);
}
else if (is1D && (dname == 'J')) {
log.trace("H5Dread_dname_J");
- status = H5Dread_long(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, (long[]) obj,
- isCriticalPinning);
+ status = H5Dread_long(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id,
+ (long[])obj, isCriticalPinning);
}
else if (is1D && (dname == 'F')) {
log.trace("H5Dread_dname_F");
- status = H5Dread_float(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, (float[]) obj,
- isCriticalPinning);
+ status = H5Dread_float(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id,
+ (float[])obj, isCriticalPinning);
}
else if (is1D && (dname == 'D')) {
log.trace("H5Dread_dname_D");
status = H5Dread_double(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id,
- (double[]) obj, isCriticalPinning);
+ (double[])obj, isCriticalPinning);
}
else if ((H5.H5Tdetect_class(mem_type_id, HDF5Constants.H5T_REFERENCE) &&
- (is1D && (dataClass.getComponentType() == String.class))) ||
- H5.H5Tequal(mem_type_id, HDF5Constants.H5T_STD_REF_DSETREG)) {
+ (is1D && (dataClass.getComponentType() == String.class))) ||
+ H5.H5Tequal(mem_type_id, HDF5Constants.H5T_STD_REF_DSETREG)) {
log.trace("H5Dread_reg_ref");
status = H5Dread_reg_ref(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id,
- (String[]) obj);
+ (String[])obj);
}
else if (is1D && (dataClass.getComponentType() == String.class)) {
log.trace("H5Dread_string type");
status = H5Dread_string(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id,
- (String[]) obj);
+ (String[])obj);
}
else {
// Create a data buffer to hold the data into a Java Array
HDFArray theArray = new HDFArray(obj);
- byte[] buf = theArray.emptyBytes();
+ byte[] buf = theArray.emptyBytes();
log.trace("H5Dread_else");
// will raise exception if read fails
status = H5Dread(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf,
- isCriticalPinning);
+ isCriticalPinning);
if (status >= 0) {
// convert the data into a Java Array
obj = theArray.arrayify(buf);
}
// clean up these: assign 'null' as hint to gc()
- buf = null;
+ buf = null;
theArray = null;
}
@@ -2727,8 +2795,8 @@ public class H5 implements java.io.Serializable {
}
/**
- * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application
- * memory buffer of type double.
+ * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the
+ * application memory buffer of type double.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -2748,17 +2816,18 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
public synchronized static native int H5Dread_double(long dataset_id, long mem_type_id, long mem_space_id,
- long file_space_id, long xfer_plist_id, double[] buf, boolean isCriticalPinning)
- throws HDF5LibraryException, NullPointerException;
+ long file_space_id, long xfer_plist_id, double[] buf,
+ boolean isCriticalPinning)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application
- * memory buffer of type double.
+ * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the
+ * application memory buffer of type double.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -2776,19 +2845,20 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
public synchronized static int H5Dread_double(long dataset_id, long mem_type_id, long mem_space_id,
- long file_space_id, long xfer_plist_id, double[] buf) throws HDF5LibraryException, NullPointerException
+ long file_space_id, long xfer_plist_id, double[] buf)
+ throws HDF5LibraryException, NullPointerException
{
return H5Dread_double(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf, true);
}
/**
- * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application
- * memory buffer of float.
+ * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the
+ * application memory buffer of float.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -2808,17 +2878,18 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
public synchronized static native int H5Dread_float(long dataset_id, long mem_type_id, long mem_space_id,
- long file_space_id, long xfer_plist_id, float[] buf, boolean isCriticalPinning)
- throws HDF5LibraryException, NullPointerException;
+ long file_space_id, long xfer_plist_id, float[] buf,
+ boolean isCriticalPinning)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application
- * memory buffer of float.
+ * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the
+ * application memory buffer of float.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -2836,19 +2907,20 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
public synchronized static int H5Dread_float(long dataset_id, long mem_type_id, long mem_space_id,
- long file_space_id, long xfer_plist_id, float[] buf) throws HDF5LibraryException, NullPointerException
+ long file_space_id, long xfer_plist_id, float[] buf)
+ throws HDF5LibraryException, NullPointerException
{
return H5Dread_float(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf, true);
}
/**
- * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application
- * memory buffer of int.
+ * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the
+ * application memory buffer of int.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -2868,17 +2940,18 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
public synchronized static native int H5Dread_int(long dataset_id, long mem_type_id, long mem_space_id,
- long file_space_id, long xfer_plist_id, int[] buf, boolean isCriticalPinning) throws HDF5LibraryException,
- NullPointerException;
+ long file_space_id, long xfer_plist_id, int[] buf,
+ boolean isCriticalPinning)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application
- * memory buffer of int.
+ * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the
+ * application memory buffer of int.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -2896,19 +2969,20 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
public synchronized static int H5Dread_int(long dataset_id, long mem_type_id, long mem_space_id,
- long file_space_id, long xfer_plist_id, int[] buf) throws HDF5LibraryException, NullPointerException
+ long file_space_id, long xfer_plist_id, int[] buf)
+ throws HDF5LibraryException, NullPointerException
{
return H5Dread_int(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf, true);
}
/**
- * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application
- * memory buffer of long.
+ * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the
+ * application memory buffer of long.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -2928,17 +3002,18 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
public synchronized static native int H5Dread_long(long dataset_id, long mem_type_id, long mem_space_id,
- long file_space_id, long xfer_plist_id, long[] buf, boolean isCriticalPinning) throws HDF5LibraryException,
- NullPointerException;
+ long file_space_id, long xfer_plist_id, long[] buf,
+ boolean isCriticalPinning)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application
- * memory buffer of long.
+ * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the
+ * application memory buffer of long.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -2956,19 +3031,20 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
public synchronized static int H5Dread_long(long dataset_id, long mem_type_id, long mem_space_id,
- long file_space_id, long xfer_plist_id, long[] buf) throws HDF5LibraryException, NullPointerException
+ long file_space_id, long xfer_plist_id, long[] buf)
+ throws HDF5LibraryException, NullPointerException
{
return H5Dread_long(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf, true);
}
/**
- * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application
- * memory buffer of string.
+ * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the
+ * application memory buffer of string.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -2986,16 +3062,18 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
- public synchronized static native int H5Dread_reg_ref(long dataset_id, long mem_type_id, long mem_space_id,
- long file_space_id, long xfer_plist_id, String[] buf) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Dread_reg_ref(long dataset_id, long mem_type_id,
+ long mem_space_id, long file_space_id,
+ long xfer_plist_id, String[] buf)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application
- * memory buffer of short.
+ * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the
+ * application memory buffer of short.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -3015,17 +3093,18 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
public synchronized static native int H5Dread_short(long dataset_id, long mem_type_id, long mem_space_id,
- long file_space_id, long xfer_plist_id, short[] buf, boolean isCriticalPinning)
- throws HDF5LibraryException, NullPointerException;
+ long file_space_id, long xfer_plist_id, short[] buf,
+ boolean isCriticalPinning)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application
- * memory buffer of short.
+ * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the
+ * application memory buffer of short.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -3043,19 +3122,20 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
public synchronized static int H5Dread_short(long dataset_id, long mem_type_id, long mem_space_id,
- long file_space_id, long xfer_plist_id, short[] buf) throws HDF5LibraryException, NullPointerException
+ long file_space_id, long xfer_plist_id, short[] buf)
+ throws HDF5LibraryException, NullPointerException
{
return H5Dread_short(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf, true);
}
/**
- * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application
- * memory buffer of variable-lenght.
+ * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the
+ * application memory buffer of variable-lenght.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -3073,16 +3153,17 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
public synchronized static native int H5DreadVL(long dataset_id, long mem_type_id, long mem_space_id,
- long file_space_id, long xfer_plist_id, Object[] buf) throws HDF5LibraryException, NullPointerException;
+ long file_space_id, long xfer_plist_id, Object[] buf)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application
- * memory buffer of string.
+ * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the
+ * application memory buffer of string.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -3100,16 +3181,17 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
public synchronized static native int H5Dread_string(long dataset_id, long mem_type_id, long mem_space_id,
- long file_space_id, long xfer_plist_id, String[] buf) throws HDF5LibraryException, NullPointerException;
+ long file_space_id, long xfer_plist_id, String[] buf)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application
- * memory buffer of variable-lenght strings.
+ * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the
+ * application memory buffer of variable-lenght strings.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -3127,15 +3209,18 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data buffer is null.
+ * data buffer is null.
**/
- public synchronized static native int H5Dread_VLStrings(long dataset_id, long mem_type_id, long mem_space_id,
- long file_space_id, long xfer_plist_id, Object[] buf) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Dread_VLStrings(long dataset_id, long mem_type_id,
+ long mem_space_id, long file_space_id,
+ long xfer_plist_id, Object[] buf)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Dset_extent sets the current dimensions of the chunked dataset dset_id to the sizes specified in size.
+ * H5Dset_extent sets the current dimensions of the chunked dataset dset_id to the sizes specified in
+ * size.
*
* @param dset_id
* IN: Chunked dataset identifier.
@@ -3143,17 +3228,17 @@ public class H5 implements java.io.Serializable {
* IN: Array containing the new magnitude of each dimension of the dataset.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - size is null.
+ * size is null.
**/
- public synchronized static native void H5Dset_extent(long dset_id, long size[]) throws HDF5LibraryException,
- NullPointerException;
+ public synchronized static native void H5Dset_extent(long dset_id, long size[])
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Dvlen_get_buf_size determines the number of bytes required to store the VL data from the dataset, using the
- * space_id for the selection in the dataset on disk and the type_id for the memory representation of the VL data in
- * memory.
+ * H5Dvlen_get_buf_size determines the number of bytes required to store the VL data from the dataset,
+ * using the space_id for the selection in the dataset on disk and the type_id for the memory
+ * representation of the VL data in memory.
*
* @param dset_id
* IN: Identifier of the dataset read from.
@@ -3165,12 +3250,12 @@ public class H5 implements java.io.Serializable {
* @return the size in bytes of the memory buffer required to store the VL data.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - buf is null.
+ * buf is null.
**/
public synchronized static native long H5Dvlen_get_buf_size(long dset_id, long type_id, long space_id)
- throws HDF5LibraryException;
+ throws HDF5LibraryException;
/**
* H5Dvlen_reclaim reclaims buffer used for VL data.
@@ -3187,19 +3272,20 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - buf is null.
+ * buf is null.
*
* @deprecated As of HDF5 1.12.0 in favor of H5Treclaim
**/
@Deprecated
- public synchronized static native int H5Dvlen_reclaim(long type_id, long space_id, long xfer_plist_id, byte[] buf)
- throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Dvlen_reclaim(long type_id, long space_id, long xfer_plist_id,
+ byte[] buf)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application memory buffer
- * into the file.
+ * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application
+ * memory buffer into the file.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -3219,17 +3305,18 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
public synchronized static native int H5Dwrite(long dataset_id, long mem_type_id, long mem_space_id,
- long file_space_id, long xfer_plist_id, byte[] buf, boolean isCriticalPinning) throws HDF5LibraryException,
- NullPointerException;
+ long file_space_id, long xfer_plist_id, byte[] buf,
+ boolean isCriticalPinning)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application memory buffer
- * into the file.
+ * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application
+ * memory buffer into the file.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -3247,19 +3334,20 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public synchronized static int H5Dwrite(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id,
- long xfer_plist_id, byte[] buf) throws HDF5LibraryException, NullPointerException
+ public synchronized static int H5Dwrite(long dataset_id, long mem_type_id, long mem_space_id,
+ long file_space_id, long xfer_plist_id, byte[] buf)
+ throws HDF5LibraryException, NullPointerException
{
return H5Dwrite(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf, true);
}
/**
- * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application memory buffer
- * into the file.
+ * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application
+ * memory buffer into the file.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -3277,19 +3365,20 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public synchronized static int H5Dwrite(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id,
- long xfer_plist_id, Object obj) throws HDF5Exception, HDF5LibraryException, NullPointerException
+ public synchronized static int H5Dwrite(long dataset_id, long mem_type_id, long mem_space_id,
+ long file_space_id, long xfer_plist_id, Object obj)
+ throws HDF5Exception, HDF5LibraryException, NullPointerException
{
return H5Dwrite(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, obj, true);
}
/**
- * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application memory data
- * object into the file.
+ * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application
+ * memory data object into the file.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -3309,67 +3398,68 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5Exception
- * - Failure in the data conversion.
+ * Failure in the data conversion.
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - data object is null.
+ * data object is null.
**/
- public synchronized static int H5Dwrite(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id,
- long xfer_plist_id, Object obj, boolean isCriticalPinning) throws HDF5Exception, HDF5LibraryException,
- NullPointerException
+ public synchronized static int H5Dwrite(long dataset_id, long mem_type_id, long mem_space_id,
+ long file_space_id, long xfer_plist_id, Object obj,
+ boolean isCriticalPinning)
+ throws HDF5Exception, HDF5LibraryException, NullPointerException
{
- int status = -1;
+ int status = -1;
boolean is1D = false;
Class dataClass = obj.getClass();
if (!dataClass.isArray()) {
- throw (new HDF5JavaException("H5Dwrite: data is not an array"));
+ throw(new HDF5JavaException("H5Dwrite: data is not an array"));
}
String cname = dataClass.getName();
- is1D = (cname.lastIndexOf('[') == cname.indexOf('['));
- char dname = cname.charAt(cname.lastIndexOf("[") + 1);
+ is1D = (cname.lastIndexOf('[') == cname.indexOf('['));
+ char dname = cname.charAt(cname.lastIndexOf("[") + 1);
if (is1D && (dname == 'B')) {
- status = H5Dwrite(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, (byte[]) obj,
- isCriticalPinning);
+ status = H5Dwrite(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id,
+ (byte[])obj, isCriticalPinning);
}
else if (is1D && (dname == 'S')) {
- status = H5Dwrite_short(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, (short[]) obj,
- isCriticalPinning);
+ status = H5Dwrite_short(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id,
+ (short[])obj, isCriticalPinning);
}
else if (is1D && (dname == 'I')) {
- status = H5Dwrite_int(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, (int[]) obj,
- isCriticalPinning);
+ status = H5Dwrite_int(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id,
+ (int[])obj, isCriticalPinning);
}
else if (is1D && (dname == 'J')) {
- status = H5Dwrite_long(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, (long[]) obj,
- isCriticalPinning);
+ status = H5Dwrite_long(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id,
+ (long[])obj, isCriticalPinning);
}
else if (is1D && (dname == 'F')) {
- status = H5Dwrite_float(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, (float[]) obj,
- isCriticalPinning);
+ status = H5Dwrite_float(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id,
+ (float[])obj, isCriticalPinning);
}
else if (is1D && (dname == 'D')) {
status = H5Dwrite_double(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id,
- (double[]) obj, isCriticalPinning);
+ (double[])obj, isCriticalPinning);
}
else if (is1D && (dataClass.getComponentType() == String.class)) {
log.trace("H5Dwrite_string type");
status = H5Dwrite_string(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id,
- (String[]) obj);
+ (String[])obj);
}
else {
HDFArray theArray = new HDFArray(obj);
- byte[] buf = theArray.byteify();
+ byte[] buf = theArray.byteify();
// will raise exception on error
status = H5Dwrite(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf,
- isCriticalPinning);
+ isCriticalPinning);
// clean up these: assign 'null' as hint to gc()
- buf = null;
+ buf = null;
theArray = null;
}
@@ -3377,8 +3467,8 @@ public class H5 implements java.io.Serializable {
}
/**
- * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application memory buffer
- * into the file.
+ * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application
+ * memory buffer into the file.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -3398,17 +3488,18 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public synchronized static native int H5Dwrite_double(long dataset_id, long mem_type_id, long mem_space_id,
- long file_space_id, long xfer_plist_id, double[] buf, boolean isCriticalPinning)
- throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int
+ H5Dwrite_double(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id,
+ long xfer_plist_id, double[] buf, boolean isCriticalPinning)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application memory buffer
- * into the file.
+ * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application
+ * memory buffer into the file.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -3426,19 +3517,21 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
public synchronized static int H5Dwrite_double(long dataset_id, long mem_type_id, long mem_space_id,
- long file_space_id, long xfer_plist_id, double[] buf) throws HDF5LibraryException, NullPointerException
+ long file_space_id, long xfer_plist_id, double[] buf)
+ throws HDF5LibraryException, NullPointerException
{
- return H5Dwrite_double(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf, true);
+ return H5Dwrite_double(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf,
+ true);
}
/**
- * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application memory buffer
- * into the file.
+ * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application
+ * memory buffer into the file.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -3458,17 +3551,18 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
public synchronized static native int H5Dwrite_float(long dataset_id, long mem_type_id, long mem_space_id,
- long file_space_id, long xfer_plist_id, float[] buf, boolean isCriticalPinning)
- throws HDF5LibraryException, NullPointerException;
+ long file_space_id, long xfer_plist_id, float[] buf,
+ boolean isCriticalPinning)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application memory buffer
- * into the file.
+ * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application
+ * memory buffer into the file.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -3486,19 +3580,20 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
public synchronized static int H5Dwrite_float(long dataset_id, long mem_type_id, long mem_space_id,
- long file_space_id, long xfer_plist_id, float[] buf) throws HDF5LibraryException, NullPointerException
+ long file_space_id, long xfer_plist_id, float[] buf)
+ throws HDF5LibraryException, NullPointerException
{
return H5Dwrite_float(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf, true);
}
/**
- * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application memory buffer
- * into the file.
+ * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application
+ * memory buffer into the file.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -3518,17 +3613,18 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
public synchronized static native int H5Dwrite_int(long dataset_id, long mem_type_id, long mem_space_id,
- long file_space_id, long xfer_plist_id, int[] buf, boolean isCriticalPinning) throws HDF5LibraryException,
- NullPointerException;
+ long file_space_id, long xfer_plist_id, int[] buf,
+ boolean isCriticalPinning)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application memory buffer
- * into the file.
+ * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application
+ * memory buffer into the file.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -3546,19 +3642,20 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
public synchronized static int H5Dwrite_int(long dataset_id, long mem_type_id, long mem_space_id,
- long file_space_id, long xfer_plist_id, int[] buf) throws HDF5LibraryException, NullPointerException
+ long file_space_id, long xfer_plist_id, int[] buf)
+ throws HDF5LibraryException, NullPointerException
{
return H5Dwrite_int(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf, true);
}
/**
- * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application memory buffer
- * into the file.
+ * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application
+ * memory buffer into the file.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -3578,17 +3675,18 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
public synchronized static native int H5Dwrite_long(long dataset_id, long mem_type_id, long mem_space_id,
- long file_space_id, long xfer_plist_id, long[] buf, boolean isCriticalPinning) throws HDF5LibraryException,
- NullPointerException;
+ long file_space_id, long xfer_plist_id, long[] buf,
+ boolean isCriticalPinning)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application memory buffer
- * into the file.
+ * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application
+ * memory buffer into the file.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -3606,19 +3704,20 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
public synchronized static int H5Dwrite_long(long dataset_id, long mem_type_id, long mem_space_id,
- long file_space_id, long xfer_plist_id, long[] buf) throws HDF5LibraryException, NullPointerException
+ long file_space_id, long xfer_plist_id, long[] buf)
+ throws HDF5LibraryException, NullPointerException
{
return H5Dwrite_long(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf, true);
}
/**
- * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application memory buffer
- * into the file.
+ * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application
+ * memory buffer into the file.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -3638,17 +3737,18 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
public synchronized static native int H5Dwrite_short(long dataset_id, long mem_type_id, long mem_space_id,
- long file_space_id, long xfer_plist_id, short[] buf, boolean isCriticalPinning)
- throws HDF5LibraryException, NullPointerException;
+ long file_space_id, long xfer_plist_id, short[] buf,
+ boolean isCriticalPinning)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application memory buffer
- * into the file.
+ * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application
+ * memory buffer into the file.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -3666,19 +3766,20 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
public synchronized static int H5Dwrite_short(long dataset_id, long mem_type_id, long mem_space_id,
- long file_space_id, long xfer_plist_id, short[] buf) throws HDF5LibraryException, NullPointerException
+ long file_space_id, long xfer_plist_id, short[] buf)
+ throws HDF5LibraryException, NullPointerException
{
return H5Dwrite_short(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf, true);
}
/**
- * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application memory buffer
- * into the file.
+ * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application
+ * memory buffer into the file.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -3696,16 +3797,18 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public synchronized static native int H5Dwrite_string(long dataset_id, long mem_type_id, long mem_space_id,
- long file_space_id, long xfer_plist_id, String[] buf) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Dwrite_string(long dataset_id, long mem_type_id,
+ long mem_space_id, long file_space_id,
+ long xfer_plist_id, String[] buf)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application memory buffer
- * into the file.
+ * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application
+ * memory buffer into the file.
*
* @param dataset_id
* Identifier of the dataset read from.
@@ -3723,16 +3826,17 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
public synchronized static native int H5DwriteVL(long dataset_id, long mem_type_id, long mem_space_id,
- long file_space_id, long xfer_plist_id, Object[] buf) throws HDF5LibraryException, NullPointerException;
+ long file_space_id, long xfer_plist_id, Object[] buf)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Dwrite_VLStrings writes a (partial) variable length String dataset, specified by its identifier dataset_id, from
- * the application memory buffer buf into the file.
+ * H5Dwrite_VLStrings writes a (partial) variable length String dataset, specified by its identifier
+ * dataset_id, from the application memory buffer buf into the file.
*
* ---- contributed by Rosetta Biosoftware
*
@@ -3752,48 +3856,52 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public synchronized static native int H5Dwrite_VLStrings(long dataset_id, long mem_type_id, long mem_space_id,
- long file_space_id, long xfer_plist_id, Object[] buf) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Dwrite_VLStrings(long dataset_id, long mem_type_id,
+ long mem_space_id, long file_space_id,
+ long xfer_plist_id, Object[] buf)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Dflush causes all buffers associated with a dataset to be immediately flushed to disk without removing the
- * data from the cache.
+ * H5Dflush causes all buffers associated with a dataset to be immediately flushed to disk without
+ * removing the data from the cache.
*
* @param dset_id
* IN: Identifier of the dataset to be flushed.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native void H5Dflush(long dset_id) throws HDF5LibraryException;
/**
- * H5Drefresh causes all buffers associated with a dataset to be cleared and immediately re-loaded with updated
- * contents from disk. This function essentially closes the dataset, evicts all metadata associated with it
- * from the cache, and then re-opens the dataset. The reopened dataset is automatically re-registered with the same ID.
+ * H5Drefresh causes all buffers associated with a dataset to be cleared and immediately re-loaded with
+ * updated contents from disk. This function essentially closes the dataset, evicts all metadata
+ * associated with it from the cache, and then re-opens the dataset. The reopened dataset is automatically
+ * re-registered with the same ID.
*
* @param dset_id
* IN: Identifier of the dataset to be refreshed.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native void H5Drefresh(long dset_id) throws HDF5LibraryException;
// /////// unimplemented ////////
- // herr_t H5Ddebug(hid_t dset_id);
- // herr_t H5Dget_chunk_storage_size(hid_t dset_id, const hsize_t *offset, hsize_t *chunk_bytes);
- // herr_t H5Dformat_convert(hid_t dset_id);
- // herr_t H5Dget_chunk_index_type(hid_t did, H5D_chunk_index_t *idx_type);
+ // herr_t H5Ddebug(hid_t dset_id);
+ // herr_t H5Dget_chunk_storage_size(hid_t dset_id, const hsize_t *offset, hsize_t *chunk_bytes);
+ // herr_t H5Dformat_convert(hid_t dset_id);
+ // herr_t H5Dget_chunk_index_type(hid_t did, H5D_chunk_index_t *idx_type);
// herr_t H5Dgather(hid_t src_space_id, const void *src_buf, hid_t type_id,
// size_t dst_buf_size, void *dst_buf, H5D_gather_func_t op, void *op_data);
- // herr_t H5Dscatter(H5D_scatter_func_t op, void *op_data, hid_t type_id, hid_t dst_space_id, void *dst_buf);
+ // herr_t H5Dscatter(H5D_scatter_func_t op, void *op_data, hid_t type_id, hid_t dst_space_id, void
+ // *dst_buf);
// ////////////////////////////////////////////////////////////
// //
@@ -3802,58 +3910,57 @@ public class H5 implements java.io.Serializable {
// ////////////////////////////////////////////////////////////
/**
- * H5Eauto_is_v2 determines whether the error auto reporting function for an error stack conforms to the H5E_auto2_t
- * typedef or the H5E_auto1_t typedef.
+ * H5Eauto_is_v2 determines whether the error auto reporting function for an error stack conforms to the
+ * H5E_auto2_t typedef or the H5E_auto1_t typedef.
*
* @param stack_id
* IN: Error stack identifier.
*
- * @return boolean true if the error stack conforms to H5E_auto2_t and false if it conforms to H5E_auto1_t.
+ * @return boolean true if the error stack conforms to H5E_auto2_t and false if it conforms to
+ * H5E_auto1_t.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native boolean H5Eauto_is_v2(long stack_id) throws HDF5LibraryException;
/**
- * H5Eclear clears the error stack for the current thread. H5Eclear can fail if there are problems initializing the
- * library.
- * <p>
- * This may be used by exception handlers to assure that the error condition in the HDF-5 library has been reset.
+ * H5Eclear clears the error stack for the current thread. H5Eclear can fail if there are problems
+ * initializing the library. <p> This may be used by exception handlers to assure that the error condition
+ * in the HDF-5 library has been reset.
*
* @return Returns a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public static int H5Eclear() throws HDF5LibraryException {
+ public static int H5Eclear() throws HDF5LibraryException
+ {
H5Eclear2(HDF5Constants.H5E_DEFAULT);
return 0;
}
/**
- * H5Eclear clears the error stack specified by estack_id, or, if estack_id is set to H5E_DEFAULT, the error stack
- * for the current thread.
+ * H5Eclear clears the error stack specified by estack_id, or, if estack_id is set to H5E_DEFAULT, the
+ * error stack for the current thread.
*
* @param stack_id
* IN: Error stack identifier.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public static void H5Eclear(long stack_id) throws HDF5LibraryException {
- H5Eclear2(stack_id);
- }
+ public static void H5Eclear(long stack_id) throws HDF5LibraryException { H5Eclear2(stack_id); }
/**
- * H5Eclear2 clears the error stack specified by estack_id, or, if estack_id is set to H5E_DEFAULT, the error stack
- * for the current thread.
+ * H5Eclear2 clears the error stack specified by estack_id, or, if estack_id is set to H5E_DEFAULT, the
+ * error stack for the current thread.
*
* @param stack_id
* IN: Error stack identifier.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native void H5Eclear2(long stack_id) throws HDF5LibraryException;
@@ -3864,7 +3971,7 @@ public class H5 implements java.io.Serializable {
* IN: Error message identifier.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native void H5Eclose_msg(long err_id) throws HDF5LibraryException;
@@ -3875,7 +3982,7 @@ public class H5 implements java.io.Serializable {
* IN: Error stack identifier.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native void H5Eclose_stack(long stack_id) throws HDF5LibraryException;
@@ -3892,12 +3999,12 @@ public class H5 implements java.io.Serializable {
* @return a message identifier
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - msg is null.
+ * msg is null.
**/
public synchronized static native long H5Ecreate_msg(long cls_id, int msg_type, String msg)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Ecreate_stack creates a new empty error stack and returns the new stack's identifier.
@@ -3905,7 +4012,7 @@ public class H5 implements java.io.Serializable {
* @return an error stack identifier
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native long H5Ecreate_stack() throws HDF5LibraryException;
@@ -3918,30 +4025,31 @@ public class H5 implements java.io.Serializable {
* @return the name of the error class
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native String H5Eget_class_name(long class_id)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Eget_current_stack copies the current error stack and returns an error stack identifier for the new copy.
+ * H5Eget_current_stack copies the current error stack and returns an error stack identifier for the new
+ * copy.
*
* @return an error stack identifier
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native long H5Eget_current_stack() throws HDF5LibraryException;
/**
- * H5Eset_current_stack replaces the content of the current error stack with a copy of the content of the error
- * stack specified by estack_id.
+ * H5Eset_current_stack replaces the content of the current error stack with a copy of the content of the
+ * error stack specified by estack_id.
*
* @param stack_id
* IN: Error stack identifier.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native void H5Eset_current_stack(long stack_id) throws HDF5LibraryException;
@@ -3956,13 +4064,14 @@ public class H5 implements java.io.Serializable {
* @return the error message
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native String H5Eget_msg(long msg_id, int[] type_list) throws HDF5LibraryException;
+ public synchronized static native String H5Eget_msg(long msg_id, int[] type_list)
+ throws HDF5LibraryException;
/**
- * H5Eget_num retrieves the number of error records in the error stack specified by estack_id (including major,
- * minor messages and description).
+ * H5Eget_num retrieves the number of error records in the error stack specified by estack_id (including
+ * major, minor messages and description).
*
* @param stack_id
* IN: Error stack identifier.
@@ -3970,26 +4079,29 @@ public class H5 implements java.io.Serializable {
* @return the number of error messages
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native long H5Eget_num(long stack_id) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native long H5Eget_num(long stack_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Eprint2 prints the error stack specified by estack_id on the specified stream, stream.
*
* @param stack_id
- * IN: Error stack identifier.If the identifier is H5E_DEFAULT, the current error stack will be printed.
+ * IN: Error stack identifier.If the identifier is H5E_DEFAULT, the current error stack will be
+ * printed.
* @param stream
* IN: File pointer, or stderr if null.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native void H5Eprint2(long stack_id, Object stream) throws HDF5LibraryException;
+ public synchronized static native void H5Eprint2(long stack_id, Object stream)
+ throws HDF5LibraryException;
/**
- * H5Epop deletes the number of error records specified in count from the top of the error stack specified by
- * estack_id (including major, minor messages and description).
+ * H5Epop deletes the number of error records specified in count from the top of the error stack specified
+ * by estack_id (including major, minor messages and description).
*
* @param stack_id
* IN: Error stack identifier.
@@ -3997,11 +4109,10 @@ public class H5 implements java.io.Serializable {
* IN: Version of the client library or application to which the error class belongs.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native void H5Epop(long stack_id, long count) throws HDF5LibraryException;
-
/**
* H5Epush pushes a new error record onto the error stack specified by estack_id.
*
@@ -4023,14 +4134,14 @@ public class H5 implements java.io.Serializable {
* IN: Error description string.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - file, func, or msg is null.
- **/
- public static void H5Epush(long stack_id, String file, String func, int line,
- long cls_id, long maj_id, long min_id, String msg) throws HDF5LibraryException, NullPointerException
+ * file, func, or msg is null.
+ **/
+ public static void H5Epush(long stack_id, String file, String func, int line, long cls_id, long maj_id,
+ long min_id, String msg) throws HDF5LibraryException, NullPointerException
{
- H5Epush2(stack_id, file, func, line, cls_id, maj_id, min_id, msg);
+ H5Epush2(stack_id, file, func, line, cls_id, maj_id, min_id, msg);
}
/**
* H5Epush2 pushes a new error record onto the error stack specified by estack_id.
@@ -4053,16 +4164,17 @@ public class H5 implements java.io.Serializable {
* IN: Error description string.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - file, func, or msg is null.
- **/
+ * file, func, or msg is null.
+ **/
public synchronized static native void H5Epush2(long stack_id, String file, String func, int line,
- long cls_id, long maj_id, long min_id, String msg) throws HDF5LibraryException, NullPointerException;
+ long cls_id, long maj_id, long min_id, String msg)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Eregister_class registers a client library or application program to the HDF5 error API so that the client
- * library or application program can report errors together with HDF5 library.
+ * H5Eregister_class registers a client library or application program to the HDF5 error API so that the
+ * client library or application program can report errors together with HDF5 library.
*
* @param cls_name
* IN: Name of the error class.
@@ -4074,12 +4186,12 @@ public class H5 implements java.io.Serializable {
* @return a class identifier
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
public synchronized static native long H5Eregister_class(String cls_name, String lib_name, String version)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Eunregister_class removes the error class specified by class_id.
@@ -4088,7 +4200,7 @@ public class H5 implements java.io.Serializable {
* IN: Error class identifier.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native void H5Eunregister_class(long class_id) throws HDF5LibraryException;
@@ -4106,13 +4218,14 @@ public class H5 implements java.io.Serializable {
* IN: Data to be passed with func.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - func is null.
+ * func is null.
**/
- public static void H5Ewalk(long stack_id, long direction, H5E_walk_cb func, H5E_walk_t client_data) throws HDF5LibraryException, NullPointerException
+ public static void H5Ewalk(long stack_id, long direction, H5E_walk_cb func, H5E_walk_t client_data)
+ throws HDF5LibraryException, NullPointerException
{
- H5Ewalk2(stack_id, direction, func, client_data);
+ H5Ewalk2(stack_id, direction, func, client_data);
}
/**
* H5Ewalk2 walks the error stack specified by estack_id for the current thread and calls the
@@ -4128,12 +4241,13 @@ public class H5 implements java.io.Serializable {
* IN: Data to be passed with func.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - func is null.
+ * func is null.
**/
- public synchronized static native void H5Ewalk2(long stack_id, long direction, H5E_walk_cb func, H5E_walk_t client_data)
- throws HDF5LibraryException, NullPointerException;
+ public synchronized static native void H5Ewalk2(long stack_id, long direction, H5E_walk_cb func,
+ H5E_walk_t client_data)
+ throws HDF5LibraryException, NullPointerException;
// /////// unimplemented ////////
// public interface H5E_auto2_t extends Callback
@@ -4176,9 +4290,10 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public static int H5Fclose(long file_id) throws HDF5LibraryException {
+ public static int H5Fclose(long file_id) throws HDF5LibraryException
+ {
if (file_id < 0)
return 0; // throw new HDF5LibraryException("Negative ID");;
@@ -4203,12 +4318,13 @@ public class H5 implements java.io.Serializable {
* @return a file identifier if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public static long H5Fopen(String name, int flags, long access_id) throws HDF5LibraryException,
- NullPointerException {
+ public static long H5Fopen(String name, int flags, long access_id)
+ throws HDF5LibraryException, NullPointerException
+ {
long id = _H5Fopen(name, flags, access_id);
if (id > 0) {
log.trace("OPEN_IDS: H5Fopen add {}", id);
@@ -4219,7 +4335,7 @@ public class H5 implements java.io.Serializable {
}
private synchronized static native long _H5Fopen(String name, int flags, long access_id)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Freopen reopens an HDF5 file.
@@ -4227,11 +4343,13 @@ public class H5 implements java.io.Serializable {
* @param file_id
* Identifier of a file to terminate and reopen access to.
*
- * @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
* @return a new file identifier if successful
+ *
+ * @exception HDF5LibraryException
+ * Error from the HDF-5 Library.
**/
- public static long H5Freopen(long file_id) throws HDF5LibraryException {
+ public static long H5Freopen(long file_id) throws HDF5LibraryException
+ {
long id = _H5Freopen(file_id);
if (id > 0) {
log.trace("OPEN_IDS: H5Freopen add {}", id);
@@ -4256,7 +4374,8 @@ public class H5 implements java.io.Serializable {
* <LI>
* H5F_ACC_RDONLY Allow read-only access to file.</LI>
* <LI>
- * H5F_ACC_TRUNC Truncate file, if it already exists, erasing all data previously stored in the file.</LI>
+ * H5F_ACC_TRUNC Truncate file, if it already exists, erasing all data previously stored in the
+ * file.</LI>
* <LI>
* H5F_ACC_EXCL Fail if file already exists.</LI>
* <LI>
@@ -4264,22 +4383,23 @@ public class H5 implements java.io.Serializable {
* </UL>
*
* @param create_id
- * File creation property list identifier, used when modifying default file meta-data. Use H5P_DEFAULT
- * for default access properties.
+ * File creation property list identifier, used when modifying default file meta-data. Use
+ * H5P_DEFAULT for default access properties.
* @param access_id
- * File access property list identifier. If parallel file access is desired, this is a collective call
- * according to the communicator stored in the access_id (not supported in Java). Use H5P_DEFAULT for
- * default access properties.
+ * File access property list identifier. If parallel file access is desired, this is a
+ * collective call according to the communicator stored in the access_id (not supported
+ * in Java). Use H5P_DEFAULT for default access properties.
*
* @return a file identifier if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public static long H5Fcreate(String name, int flags, long create_id, long access_id) throws HDF5LibraryException,
- NullPointerException {
+ public static long H5Fcreate(String name, int flags, long create_id, long access_id)
+ throws HDF5LibraryException, NullPointerException
+ {
long id = _H5Fcreate(name, flags, create_id, access_id);
if (id > 0) {
log.trace("OPEN_IDS: H5Fcreate add {}", id);
@@ -4290,34 +4410,30 @@ public class H5 implements java.io.Serializable {
}
private synchronized static native long _H5Fcreate(String name, int flags, long create_id, long access_id)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Fflush causes all buffers associated with a file or object to be immediately flushed (written) to disk without
- * removing the data from the (memory) cache.
- * <P>
- * After this call completes, the file (or object) is in a consistent state and all data written to date is assured
- * to be permanent.
+ * H5Fflush causes all buffers associated with a file or object to be immediately flushed (written) to
+ * disk without removing the data from the (memory) cache. <P> After this call completes, the file (or
+ * object) is in a consistent state and all data written to date is assured to be permanent.
*
* @param object_id
- * Identifier of object used to identify the file. <b>object_id</b> can be any object associated with the
- * file, including the file itself, a dataset, a group, an attribute, or a named data type.
+ * Identifier of object used to identify the file. <b>object_id</b> can be any object
+ * associated with the file, including the file itself, a dataset, a group, an attribute,
+ * or a named data type.
* @param scope
- * specifies the scope of the flushing action, in the case that the HDF-5 file is not a single physical
- * file.
- * <P>
- * Valid values are:
+ * specifies the scope of the flushing action, in the case that the HDF-5 file is not a single
+ * physical file.
+ * <P> Valid values are:
* <UL>
- * <LI>
- * H5F_SCOPE_GLOBAL Flushes the entire virtual file.</LI>
- * <LI>
- * H5F_SCOPE_LOCAL Flushes only the specified file.</LI>
+ * <LI> H5F_SCOPE_GLOBAL Flushes the entire virtual file.</LI>
+ * <LI> H5F_SCOPE_LOCAL Flushes only the specified file.</LI>
* </UL>
*
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Fflush(long object_id, int scope) throws HDF5LibraryException;
@@ -4330,9 +4446,10 @@ public class H5 implements java.io.Serializable {
* @return a file access property list identifier if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public static long H5Fget_access_plist(long file_id) throws HDF5LibraryException {
+ public static long H5Fget_access_plist(long file_id) throws HDF5LibraryException
+ {
long id = _H5Fget_access_plist(file_id);
if (id > 0) {
log.trace("OPEN_IDS: H5Fget_access_plist add {}", id);
@@ -4345,8 +4462,8 @@ public class H5 implements java.io.Serializable {
private synchronized static native long _H5Fget_access_plist(long file_id) throws HDF5LibraryException;
/**
- * H5Fget_create_plist returns a file creation property list identifier identifying the creation properties used to
- * create this file.
+ * H5Fget_create_plist returns a file creation property list identifier identifying the creation
+ * properties used to create this file.
*
* @param file_id
* Identifier of the file to get creation property list
@@ -4354,9 +4471,10 @@ public class H5 implements java.io.Serializable {
* @return a file creation property list identifier if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public static long H5Fget_create_plist(long file_id) throws HDF5LibraryException {
+ public static long H5Fget_create_plist(long file_id) throws HDF5LibraryException
+ {
long id = _H5Fget_create_plist(file_id);
if (id > 0) {
log.trace("OPEN_IDS: H5Fget_create_plist add {}", id);
@@ -4379,7 +4497,7 @@ public class H5 implements java.io.Serializable {
* @return the file size of the HDF5 file
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native long H5Fget_filesize(long file_id) throws HDF5LibraryException;
@@ -4392,7 +4510,7 @@ public class H5 implements java.io.Serializable {
* @return the amount of free space in the file
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native long H5Fget_freespace(long file_id) throws HDF5LibraryException;
@@ -4405,7 +4523,7 @@ public class H5 implements java.io.Serializable {
* @return the intended access mode flag, as originally passed with H5Fopen.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Fget_intent(long file_id) throws HDF5LibraryException;
@@ -4418,13 +4536,13 @@ public class H5 implements java.io.Serializable {
* @return the unique file number for the file.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native long H5Fget_fileno(long file_id) throws HDF5LibraryException;
/**
- * H5Fget_mdc_hit_rate queries the metadata cache of the target file to obtain its hit rate (cache hits / (cache
- * hits + cache misses)) since the last time hit rate statistics were reset.
+ * H5Fget_mdc_hit_rate queries the metadata cache of the target file to obtain its hit rate (cache hits /
+ * (cache hits + cache misses)) since the last time hit rate statistics were reset.
*
* @param file_id
* IN: Identifier of the target file.
@@ -4432,7 +4550,7 @@ public class H5 implements java.io.Serializable {
* @return the double in which the hit rate is returned.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native double H5Fget_mdc_hit_rate(long file_id) throws HDF5LibraryException;
@@ -4452,12 +4570,12 @@ public class H5 implements java.io.Serializable {
* @return current number of entries in the cache
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - metadata_cache is null.
+ * metadata_cache is null.
**/
public synchronized static native int H5Fget_mdc_size(long file_id, long[] metadata_cache)
- throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
* H5Fget_name retrieves the name of the file to which the object obj_id belongs.
@@ -4468,7 +4586,7 @@ public class H5 implements java.io.Serializable {
* @return the filename.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native String H5Fget_name(long obj_id) throws HDF5LibraryException;
@@ -4492,12 +4610,14 @@ public class H5 implements java.io.Serializable {
* @return the number of open objects.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native long H5Fget_obj_count(long file_id, int types) throws HDF5LibraryException;
+ public synchronized static native long H5Fget_obj_count(long file_id, int types)
+ throws HDF5LibraryException;
/**
- * H5Fget_obj_ids returns the list of identifiers for all open HDF5 objects fitting the specified criteria.
+ * H5Fget_obj_ids returns the list of identifiers for all open HDF5 objects fitting the specified
+ * criteria.
*
* @param file_id
* IN: File identifier for a currently-open HDF5 file
@@ -4511,12 +4631,13 @@ public class H5 implements java.io.Serializable {
* @return the number of objects placed into obj_id_list.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - obj_id_list is null.
+ * obj_id_list is null.
**/
- public synchronized static native long H5Fget_obj_ids(long file_id, int types, long max_objs, long[] obj_id_list)
- throws HDF5LibraryException, NullPointerException;
+ public synchronized static native long H5Fget_obj_ids(long file_id, int types, long max_objs,
+ long[] obj_id_list)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Fis_hdf5 determines whether a file is in the HDF5 format.
@@ -4527,14 +4648,15 @@ public class H5 implements java.io.Serializable {
* @return true if is HDF-5, false if not.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
*
* @deprecated As of HDF5 1.10.5 in favor of H5Fis_accessible.
**/
@Deprecated
- public synchronized static native boolean H5Fis_hdf5(String name) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native boolean H5Fis_hdf5(String name)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Fis_accessible determines if the file can be opened with the given fapl.
@@ -4547,15 +4669,16 @@ public class H5 implements java.io.Serializable {
* @return true if file is accessible, false if not.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public synchronized static native boolean H5Fis_accessible(String name, long file_id) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native boolean H5Fis_accessible(String name, long file_id)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Fmount mounts the file specified by child_id onto the group specified by loc_id and name using the mount
- * properties plist_id.
+ * H5Fmount mounts the file specified by child_id onto the group specified by loc_id and name using the
+ * mount properties plist_id.
*
* @param loc_id
* The identifier for the group onto which the file specified by child_id is to be mounted.
@@ -4569,12 +4692,12 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
public synchronized static native int H5Fmount(long loc_id, String name, long child_id, long plist_id)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* Given a mount point, H5Funmount disassociates the mount point's file from the file mounted there.
@@ -4587,24 +4710,25 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public synchronized static native int H5Funmount(long loc_id, String name) throws HDF5LibraryException,
- NullPointerException;
+ public synchronized static native int H5Funmount(long loc_id, String name)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Freset_mdc_hit_rate_stats resets the hit rate statistics counters in the metadata cache associated with the
- * specified file.
+ * H5Freset_mdc_hit_rate_stats resets the hit rate statistics counters in the metadata cache associated
+ * with the specified file.
*
* @param file_id
* IN: Identifier of the target file.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native void H5Freset_mdc_hit_rate_stats(long file_id) throws HDF5LibraryException;
+ public synchronized static native void H5Freset_mdc_hit_rate_stats(long file_id)
+ throws HDF5LibraryException;
/**
* H5Fget_info returns global information for the file associated with the
@@ -4614,7 +4738,8 @@ public class H5 implements java.io.Serializable {
*
* @return A buffer(H5F_info2_t) for current "global" information about file
*
- * @exception HDF5LibraryException - Error from the HDF-5 Library.
+ * @exception HDF5LibraryException
+ * Error from the HDF-5 Library.
**/
public synchronized static native H5F_info2_t H5Fget_info(long obj_id) throws HDF5LibraryException;
@@ -4626,19 +4751,20 @@ public class H5 implements java.io.Serializable {
* IN: Identifier of the target file.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native void H5Fclear_elink_file_cache(long file_id) throws HDF5LibraryException;
+ public synchronized static native void H5Fclear_elink_file_cache(long file_id)
+ throws HDF5LibraryException;
/**
- * H5Fstart_swmr_write will activate SWMR writing mode for a file associated with file_id. This routine will
- * prepare and ensure the file is safe for SWMR writing.
+ * H5Fstart_swmr_write will activate SWMR writing mode for a file associated with file_id. This routine
+ * will prepare and ensure the file is safe for SWMR writing.
*
* @param file_id
* IN: Identifier of the target file.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native void H5Fstart_swmr_write(long file_id) throws HDF5LibraryException;
@@ -4649,18 +4775,19 @@ public class H5 implements java.io.Serializable {
* IN: Identifier of the target file.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native void H5Fstart_mdc_logging(long file_id) throws HDF5LibraryException;
/**
- * H5Fstop_mdc_logging stops logging metadata cache events if logging was previously enabled and is currently ongoing.
+ * H5Fstop_mdc_logging stops logging metadata cache events if logging was previously enabled and is
+ * currently ongoing.
*
* @param file_id
* IN: Identifier of the target file.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native void H5Fstop_mdc_logging(long file_id) throws HDF5LibraryException;
@@ -4676,12 +4803,13 @@ public class H5 implements java.io.Serializable {
* mdc_logging_status[1] = is_currently_logging, whether events are currently being logged
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - mdc_logging_status is null.
+ * mdc_logging_status is null.
**/
- public synchronized static native void H5Fget_mdc_logging_status(long file_id, boolean[] mdc_logging_status)
- throws HDF5LibraryException, NullPointerException;
+ public synchronized static native void H5Fget_mdc_logging_status(long file_id,
+ boolean[] mdc_logging_status)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Fget_dset_no_attrs_hint gets the file-level setting to create minimized dataset object headers.
@@ -4692,11 +4820,10 @@ public class H5 implements java.io.Serializable {
* @return true if the file-level is set to create minimized dataset object headers, false if not.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native boolean H5Fget_dset_no_attrs_hint(long file_id)
- throws HDF5LibraryException;
-
+ throws HDF5LibraryException;
/**
* H5Fset_dset_no_attrs_hint sets the file-level setting to create minimized dataset object headers.
@@ -4704,14 +4831,13 @@ public class H5 implements java.io.Serializable {
* @param file_id
* IN: Identifier of the target file.
* @param minimize
- * the minimize hint setting
+ * the minimize hint setting
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native void H5Fset_dset_no_attrs_hint(long file_id, boolean minimize)
- throws HDF5LibraryException;
-
+ throws HDF5LibraryException;
/**
* H5Fset_libver_bounds sets a different low and high bounds while a file is open.
@@ -4724,17 +4850,18 @@ public class H5 implements java.io.Serializable {
* IN: The latest version of the library that will be used for writing objects.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native void H5Fset_libver_bounds(long file_id, int low, int high)
- throws HDF5LibraryException;
+ throws HDF5LibraryException;
// /////// unimplemented ////////
// herr_t H5Fget_eoa(hid_t file_id, haddr_t *eoa);
// herr_t H5Fincrement_filesize(hid_t file_id, hsize_t increment);
// ssize_t H5Fget_file_image(hid_t file_id, void * buf_ptr, size_t buf_len);
// herr_t H5Fget_metadata_read_retry_info(hid_t file_id, H5F_retry_info_t *info);
- // ssize_t H5Fget_free_sections(hid_t file_id, H5F_mem_t type, size_t nsects, H5F_sect_info_t *sect_info/*out*/);
+ // ssize_t H5Fget_free_sections(hid_t file_id, H5F_mem_t type, size_t nsects, H5F_sect_info_t
+ // *sect_info/*out*/);
// herr_t H5Fformat_convert(hid_t fid);
// herr_t H5Freset_page_buffering_stats(hid_t file_id);
// herr_t H5Fget_page_buffering_stats(hid_t file_id, unsigned accesses[2],
@@ -4814,11 +4941,10 @@ public class H5 implements java.io.Serializable {
// herr_t H5FDset_eoa(H5FD_t *file, H5FD_mem_t type, haddr_t eoa);
// haddr_t H5FDget_eof(H5FD_t *file, H5FD_mem_t type);
// herr_t H5FDget_vfd_handle(H5FD_t *file, hid_t fapl, void**file_handle);
- // herr_t H5FDread(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size, void *buf/*out*/);
- // herr_t H5FDwrite(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size, const void *buf);
- // herr_t H5FDflush(H5FD_t *file, hid_t dxpl_id, hbool_t closing);
- // herr_t H5FDtruncate(H5FD_t *file, hid_t dxpl_id, hbool_t closing);
- // herr_t H5FDlock(H5FD_t *file, hbool_t rw);
+ // herr_t H5FDread(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size, void
+ // *buf/*out*/); herr_t H5FDwrite(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t
+ // size, const void *buf); herr_t H5FDflush(H5FD_t *file, hid_t dxpl_id, hbool_t closing); herr_t
+ // H5FDtruncate(H5FD_t *file, hid_t dxpl_id, hbool_t closing); herr_t H5FDlock(H5FD_t *file, hbool_t rw);
// herr_t H5FDunlock(H5FD_t *file);
// herr_t H5FDdriver_query(hid_t driver_id, unsigned long *flags/*out*/);
@@ -4845,9 +4971,10 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public static int H5Gclose(long group_id) throws HDF5LibraryException {
+ public static int H5Gclose(long group_id) throws HDF5LibraryException
+ {
if (group_id < 0)
return 0; // throw new HDF5LibraryException("Negative ID");;
@@ -4871,18 +4998,19 @@ public class H5 implements java.io.Serializable {
* @param gcpl_id
* IN: Identifier of group creation property list.
* @param gapl_id
- * IN: Identifier of group access property list. (No group access properties have been implemented at
- * this time; use H5P_DEFAULT.)
+ * IN: Identifier of group access property list. (No group access properties have been
+ *implemented at this time; use H5P_DEFAULT.)
*
* @return a valid group identifier
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
public static long H5Gcreate(long loc_id, String name, long lcpl_id, long gcpl_id, long gapl_id)
- throws HDF5LibraryException, NullPointerException {
+ throws HDF5LibraryException, NullPointerException
+ {
long id = _H5Gcreate2(loc_id, name, lcpl_id, gcpl_id, gapl_id);
if (id > 0) {
log.trace("OPEN_IDS: H5Gcreate add {}", id);
@@ -4893,7 +5021,8 @@ public class H5 implements java.io.Serializable {
}
private synchronized static native long _H5Gcreate2(long loc_id, String name, long lcpl_id, long gcpl_id,
- long gapl_id) throws HDF5LibraryException, NullPointerException;
+ long gapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Gcreate_anon creates a new empty group in the file specified by loc_id.
@@ -4903,15 +5032,16 @@ public class H5 implements java.io.Serializable {
* @param gcpl_id
* IN: Identifier of group creation property list.
* @param gapl_id
- * IN: Identifier of group access property list. (No group access properties have been implemented at
- * this time; use H5P_DEFAULT.)
+ * IN: Identifier of group access property list. (No group access properties have been
+ * implemented at this time; use H5P_DEFAULT.)
*
* @return a valid group identifier
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public static long H5Gcreate_anon(long loc_id, long gcpl_id, long gapl_id) throws HDF5LibraryException {
+ public static long H5Gcreate_anon(long loc_id, long gcpl_id, long gapl_id) throws HDF5LibraryException
+ {
long id = _H5Gcreate_anon(loc_id, gcpl_id, gapl_id);
if (id > 0) {
log.trace("OPEN_IDS: H5Gcreate_anon add {}", id);
@@ -4922,11 +5052,11 @@ public class H5 implements java.io.Serializable {
}
private synchronized static native long _H5Gcreate_anon(long loc_id, long gcpl_id, long gapl_id)
- throws HDF5LibraryException;
+ throws HDF5LibraryException;
/**
- * H5Gget_create_plist returns an identifier for the group creation property list associated with the group
- * specified by group_id.
+ * H5Gget_create_plist returns an identifier for the group creation property list associated with the
+ * group specified by group_id.
*
* @param group_id
* IN: Identifier of the group.
@@ -4934,13 +5064,13 @@ public class H5 implements java.io.Serializable {
* @return an identifier for the group's creation property list
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native long H5Gget_create_plist(long group_id) throws HDF5LibraryException;
/**
- * H5Gget_info retrieves information about the group specified by group_id. The information is returned in the
- * group_info struct.
+ * H5Gget_info retrieves information about the group specified by group_id. The information is returned in
+ * the group_info struct.
*
* @param group_id
* IN: Identifier of the group.
@@ -4948,12 +5078,13 @@ public class H5 implements java.io.Serializable {
* @return a structure in which group information is returned
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native H5G_info_t H5Gget_info(long group_id) throws HDF5LibraryException;
/**
- * H5Gget_info_by_idx retrieves information about a group, according to the group's position within an index.
+ * H5Gget_info_by_idx retrieves information about a group, according to the group's position within an
+ * index.
*
* @param group_id
* IN: File or group identifier.
@@ -4971,16 +5102,18 @@ public class H5 implements java.io.Serializable {
* @return a structure in which group information is returned
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public synchronized static native H5G_info_t H5Gget_info_by_idx(long group_id, String group_name, int idx_type,
- int order, long n, long lapl_id) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native H5G_info_t H5Gget_info_by_idx(long group_id, String group_name,
+ int idx_type, int order, long n,
+ long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Gget_info_by_name retrieves information about the group group_name located in the file or group specified by
- * loc_id.
+ * H5Gget_info_by_name retrieves information about the group group_name located in the file or group
+ * specified by loc_id.
*
* @param group_id
* IN: File or group identifier.
@@ -4992,15 +5125,16 @@ public class H5 implements java.io.Serializable {
* @return a structure in which group information is returned
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
public synchronized static native H5G_info_t H5Gget_info_by_name(long group_id, String name, long lapl_id)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
- * retrieves information of all objects under the group (name) located in the file or group specified by loc_id.
+ * retrieves information of all objects under the group (name) located in the file or group specified by
+ * loc_id.
*
* @param loc_id
* IN: File or group identifier
@@ -5016,21 +5150,25 @@ public class H5 implements java.io.Serializable {
* @return the number of items found
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
*/
- public synchronized static int H5Gget_obj_info_all(long loc_id, String name, String[] objNames, int[] objTypes,
- H5O_token_t[] tokens) throws HDF5LibraryException, NullPointerException {
+ public synchronized static int H5Gget_obj_info_all(long loc_id, String name, String[] objNames,
+ int[] objTypes, H5O_token_t[] tokens)
+ throws HDF5LibraryException, NullPointerException
+ {
if (objNames == null) {
throw new NullPointerException("H5Gget_obj_info_all(): name array is null");
}
- return H5Gget_obj_info_all(loc_id, name, objNames, objTypes, null, null, tokens, HDF5Constants.H5_INDEX_NAME);
+ return H5Gget_obj_info_all(loc_id, name, objNames, objTypes, null, null, tokens,
+ HDF5Constants.H5_INDEX_NAME);
}
/**
- * retrieves information of all objects under the group (name) located in the file or group specified by loc_id.
+ * retrieves information of all objects under the group (name) located in the file or group specified by
+ * loc_id.
*
* @param loc_id
* IN: File or group identifier
@@ -5050,17 +5188,21 @@ public class H5 implements java.io.Serializable {
* @return the number of items found
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
*/
- public synchronized static int H5Gget_obj_info_all(long loc_id, String name, String[] objNames, int[] objTypes,
- int[] ltype, H5O_token_t[] tokens, int indx_type) throws HDF5LibraryException, NullPointerException {
+ public synchronized static int H5Gget_obj_info_all(long loc_id, String name, String[] objNames,
+ int[] objTypes, int[] ltype, H5O_token_t[] tokens,
+ int indx_type)
+ throws HDF5LibraryException, NullPointerException
+ {
return H5Gget_obj_info_full(loc_id, name, objNames, objTypes, ltype, null, tokens, indx_type, -1);
}
/**
- * retrieves information of all objects under the group (name) located in the file or group specified by loc_id.
+ * retrieves information of all objects under the group (name) located in the file or group specified by
+ * loc_id.
*
* @param loc_id
* IN: File or group identifier
@@ -5082,17 +5224,21 @@ public class H5 implements java.io.Serializable {
* @return the number of items found
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
*/
- public synchronized static int H5Gget_obj_info_all(long loc_id, String name, String[] objNames, int[] objTypes,
- int[] ltype, long[] fno, H5O_token_t[] tokens, int indx_type) throws HDF5LibraryException, NullPointerException {
+ public synchronized static int H5Gget_obj_info_all(long loc_id, String name, String[] objNames,
+ int[] objTypes, int[] ltype, long[] fno,
+ H5O_token_t[] tokens, int indx_type)
+ throws HDF5LibraryException, NullPointerException
+ {
return H5Gget_obj_info_full(loc_id, name, objNames, objTypes, ltype, fno, tokens, indx_type, -1);
}
/**
- * retrieves information of all objects under the group (name) located in the file or group specified by loc_id.
+ * retrieves information of all objects under the group (name) located in the file or group specified by
+ * loc_id.
*
* @param loc_id
* IN: File or group identifier
@@ -5116,13 +5262,15 @@ public class H5 implements java.io.Serializable {
* @return the number of items found
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
*/
- public synchronized static int H5Gget_obj_info_full(long loc_id, String name, String[] objNames, int[] objTypes,
- int[] ltype, long[] fno, H5O_token_t[] tokens, int indx_type, int indx_order) throws HDF5LibraryException,
- NullPointerException {
+ public synchronized static int H5Gget_obj_info_full(long loc_id, String name, String[] objNames,
+ int[] objTypes, int[] ltype, long[] fno,
+ H5O_token_t[] tokens, int indx_type, int indx_order)
+ throws HDF5LibraryException, NullPointerException
+ {
if (objNames == null) {
throw new NullPointerException("H5Gget_obj_info_full(): name array is null");
}
@@ -5152,21 +5300,22 @@ public class H5 implements java.io.Serializable {
indx_order = HDF5Constants.H5_ITER_INC;
log.trace("H5Gget_obj_info_full: objNames_len={}", objNames.length);
- int status = H5Gget_obj_info_full(loc_id, name, objNames, objTypes, ltype, fno, tokens, objNames.length, indx_type,
- indx_order);
+ int status = H5Gget_obj_info_full(loc_id, name, objNames, objTypes, ltype, fno, tokens,
+ objNames.length, indx_type, indx_order);
for (int indx = 0; indx < objNames.length; indx++)
log.trace("H5Gget_obj_info_full: objNames={}", objNames[indx]);
return status;
}
- private synchronized static native int H5Gget_obj_info_full(long loc_id, String name, String[] objNames, int[] objTypes,
- int[] ltype, long[] fno, H5O_token_t[] tokens, int n, int indx_type, int indx_order) throws HDF5LibraryException,
- NullPointerException;
+ private synchronized static native int
+ H5Gget_obj_info_full(long loc_id, String name, String[] objNames, int[] objTypes, int[] ltype, long[] fno,
+ H5O_token_t[] tokens, int n, int indx_type, int indx_order)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Gget_obj_info_idx report the name and type of object with index 'idx' in a Group. The 'idx' corresponds to the
- * index maintained by H5Giterate. Each link is returned, so objects with multiple links will be counted once for
- * each link.
+ * H5Gget_obj_info_idx report the name and type of object with index 'idx' in a Group. The 'idx'
+ * corresponds to the index maintained by H5Giterate. Each link is returned, so objects with multiple
+ * links will be counted once for each link.
*
* @param loc_id
* IN: file or group ID.
@@ -5182,19 +5331,21 @@ public class H5 implements java.io.Serializable {
* @return non-negative if successful, -1 if not.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
*/
- public synchronized static int H5Gget_obj_info_idx(long loc_id, String name, int idx, String[] oname, int[] type)
- throws HDF5LibraryException, NullPointerException {
+ public synchronized static int H5Gget_obj_info_idx(long loc_id, String name, int idx, String[] oname,
+ int[] type)
+ throws HDF5LibraryException, NullPointerException
+ {
String n[] = new String[1];
- n[0] = new String("");
- oname[0] = H5Lget_name_by_idx(loc_id, name, HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, idx,
- HDF5Constants.H5P_DEFAULT);
- H5L_info_t info = H5Lget_info_by_idx(loc_id, name, HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, idx,
- HDF5Constants.H5P_DEFAULT);
- type[0] = info.type;
+ n[0] = new String("");
+ oname[0] = H5Lget_name_by_idx(loc_id, name, HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC,
+ idx, HDF5Constants.H5P_DEFAULT);
+ H5L_info_t info = H5Lget_info_by_idx(loc_id, name, HDF5Constants.H5_INDEX_NAME,
+ HDF5Constants.H5_ITER_INC, idx, HDF5Constants.H5P_DEFAULT);
+ type[0] = info.type;
return 0;
}
@@ -5204,8 +5355,8 @@ public class H5 implements java.io.Serializable {
* a lot of time to finish if the number of objects is more than 10,000
*/
/**
- * retrieves information of all objects (recurvisely) under the group (name) located in the file or group specified
- * by loc_id up to maximum specified by objMax.
+ * retrieves information of all objects (recurvisely) under the group (name) located in the file or group
+ * specified by loc_id up to maximum specified by objMax.
*
* @param loc_id
* IN: File or group identifier
@@ -5223,12 +5374,14 @@ public class H5 implements java.io.Serializable {
* @return the number of items found
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
*/
- public synchronized static int H5Gget_obj_info_max(long loc_id, String[] objNames, int[] objTypes, int[] lnkTypes,
- H5O_token_t[] objToken, long objMax) throws HDF5LibraryException, NullPointerException {
+ public synchronized static int H5Gget_obj_info_max(long loc_id, String[] objNames, int[] objTypes,
+ int[] lnkTypes, H5O_token_t[] objToken, long objMax)
+ throws HDF5LibraryException, NullPointerException
+ {
if (objNames == null) {
throw new NullPointerException("H5Gget_obj_info_max(): name array is null");
}
@@ -5256,12 +5409,15 @@ public class H5 implements java.io.Serializable {
return H5Gget_obj_info_max(loc_id, objNames, objTypes, lnkTypes, objToken, objMax, objNames.length);
}
- private synchronized static native int H5Gget_obj_info_max(long loc_id, String[] oname, int[] otype, int[] ltype,
- H5O_token_t[] tokens, long amax, int n) throws HDF5LibraryException, NullPointerException;
+ private synchronized static native int H5Gget_obj_info_max(long loc_id, String[] oname, int[] otype,
+ int[] ltype, H5O_token_t[] tokens, long amax,
+ int n)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Gn_members report the number of objects in a Group. The 'objects' include everything that will be visited by
- * H5Giterate. Each link is returned, so objects with multiple links will be counted once for each link.
+ * H5Gn_members report the number of objects in a Group. The 'objects' include everything that will be
+ * visited by H5Giterate. Each link is returned, so objects with multiple links will be counted once for
+ * each link.
*
* @param loc_id
* file or group ID.
@@ -5271,18 +5427,19 @@ public class H5 implements java.io.Serializable {
* @return the number of members in the group or -1 if error.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
*/
- public synchronized static long H5Gn_members(long loc_id, String name) throws HDF5LibraryException,
- NullPointerException {
+ public synchronized static long H5Gn_members(long loc_id, String name)
+ throws HDF5LibraryException, NullPointerException
+ {
long grp_id = H5Gopen(loc_id, name, HDF5Constants.H5P_DEFAULT);
- long n = -1;
+ long n = -1;
try {
H5G_info_t info = H5.H5Gget_info(grp_id);
- n = info.nlinks;
+ n = info.nlinks;
}
finally {
H5Gclose(grp_id);
@@ -5304,12 +5461,13 @@ public class H5 implements java.io.Serializable {
* @return a valid group identifier if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public static long H5Gopen(long loc_id, String name, long gapl_id) throws HDF5LibraryException,
- NullPointerException {
+ public static long H5Gopen(long loc_id, String name, long gapl_id)
+ throws HDF5LibraryException, NullPointerException
+ {
long id = _H5Gopen2(loc_id, name, gapl_id);
if (id > 0) {
log.trace("OPEN_IDS: H5Gopen add {}", id);
@@ -5320,7 +5478,7 @@ public class H5 implements java.io.Serializable {
}
private synchronized static native long _H5Gopen2(long loc_id, String name, long gapl_id)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Gflush causes all buffers associated with a group to be immediately flushed to disk without
@@ -5330,7 +5488,7 @@ public class H5 implements java.io.Serializable {
* IN: Identifier of the group to be flushed.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native void H5Gflush(long group_id) throws HDF5LibraryException;
@@ -5344,7 +5502,7 @@ public class H5 implements java.io.Serializable {
* IN: Identifier of the group to be refreshed.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native void H5Grefresh(long group_id) throws HDF5LibraryException;
@@ -5387,7 +5545,7 @@ public class H5 implements java.io.Serializable {
* @return the file ID.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native long H5Iget_file_id(long obj_id) throws HDF5LibraryException;
@@ -5405,11 +5563,11 @@ public class H5 implements java.io.Serializable {
* @return the length of the name retrieved.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
@Deprecated
public synchronized static native long H5Iget_name_long(long obj_id, String[] name, long size)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Iget_name retrieves the name of an object specified by the identifier, obj_id.
*
@@ -5419,10 +5577,9 @@ public class H5 implements java.io.Serializable {
* @return String for Attribute name.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native String H5Iget_name(long obj_id)
- throws HDF5LibraryException;
+ public synchronized static native String H5Iget_name(long obj_id) throws HDF5LibraryException;
/**
* H5Iget_ref obtains the number of references outstanding specified by the identifier, obj_id.
@@ -5433,13 +5590,14 @@ public class H5 implements java.io.Serializable {
* @return the reference count.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native int H5Iget_ref(long obj_id) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Iget_ref(long obj_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Idec_ref decrements the reference count specified by the identifier, obj_id.
- * If the reference count for an ID reaches zero, the object will be closed.
+ * If the reference count for an ID reaches zero, the object will be closed.
*
* @param obj_id
* IN: Identifier of the object.
@@ -5447,9 +5605,10 @@ public class H5 implements java.io.Serializable {
* @return the reference count.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native int H5Idec_ref(long obj_id) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Idec_ref(long obj_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Iinc_ref increments the reference count specified by the identifier, obj_id.
@@ -5460,9 +5619,10 @@ public class H5 implements java.io.Serializable {
* @return the reference count.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native int H5Iinc_ref(long obj_id) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Iinc_ref(long obj_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Iget_type retrieves the type of the object identified by obj_id.
@@ -5473,13 +5633,13 @@ public class H5 implements java.io.Serializable {
* @return the object type if successful; otherwise H5I_BADID.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Iget_type(long obj_id) throws HDF5LibraryException;
/**
- * H5Iget_type_ref retrieves the reference count on an ID type. The reference count is used by the library to
- * indicate when an ID type can be destroyed.
+ * H5Iget_type_ref retrieves the reference count on an ID type. The reference count is used by the library
+ * to indicate when an ID type can be destroyed.
*
* @param type_id
* IN: The identifier of the type whose reference count is to be retrieved
@@ -5487,13 +5647,13 @@ public class H5 implements java.io.Serializable {
* @return The current reference count on success, negative on failure.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Iget_type_ref(long type_id) throws HDF5LibraryException;
/**
- * H5Idec_type_ref decrements the reference count on an identifier type. The reference count is used by the
- * library to indicate when an identifier type can be destroyed. If the reference count reaches zero,
+ * H5Idec_type_ref decrements the reference count on an identifier type. The reference count is used by
+ * the library to indicate when an identifier type can be destroyed. If the reference count reaches zero,
* this function will destroy it.
*
* @param type_id
@@ -5502,13 +5662,13 @@ public class H5 implements java.io.Serializable {
* @return The current reference count on success, negative on failure.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Idec_type_ref(long type_id) throws HDF5LibraryException;
/**
- * H5Iinc_type_ref increments the reference count on an ID type. The reference count is used by the library
- * to indicate when an ID type can be destroyed.
+ * H5Iinc_type_ref increments the reference count on an ID type. The reference count is used by the
+ * library to indicate when an ID type can be destroyed.
*
* @param type_id
* IN: The identifier of the type whose reference count is to be incremented
@@ -5516,7 +5676,7 @@ public class H5 implements java.io.Serializable {
* @return The current reference count on success, negative on failure.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Iinc_type_ref(long type_id) throws HDF5LibraryException;
@@ -5529,7 +5689,7 @@ public class H5 implements java.io.Serializable {
* @return Number of identifiers of the specified identifier type
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Inmembers(long type_id) throws HDF5LibraryException;
@@ -5542,7 +5702,7 @@ public class H5 implements java.io.Serializable {
* @return a boolean, true if the specified identifier id is valid
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native boolean H5Iis_valid(long obj_id) throws HDF5LibraryException;
@@ -5555,11 +5715,10 @@ public class H5 implements java.io.Serializable {
* @return a boolean, true if the specified identifier type exists
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native boolean H5Itype_exists(int type_id) throws HDF5LibraryException;
-
/**
* H5Iclear_type deletes all identifiers of the type identified by the argument type.
*
@@ -5569,9 +5728,10 @@ public class H5 implements java.io.Serializable {
* IN: Whether or not to force deletion of all identifiers
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native void H5Iclear_type(int type_id, boolean force) throws HDF5LibraryException;
+ public synchronized static native void H5Iclear_type(int type_id, boolean force)
+ throws HDF5LibraryException;
/**
* H5Idestroy_type deletes an entire identifier type. All identifiers of this type are destroyed
@@ -5581,7 +5741,7 @@ public class H5 implements java.io.Serializable {
* IN: Identifier of identifier type which is to be destroyed
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native void H5Idestroy_type(int type_id) throws HDF5LibraryException;
@@ -5604,7 +5764,6 @@ public class H5 implements java.io.Serializable {
// typedef herr_t (*H5I_iterate_func_t)(hid_t id, void *udata);
// herr_t H5Iiterate(H5I_type_t type, H5I_iterate_func_t op, void *op_data);
-
// //////////////////////////////////////////////////////////////////
// H5L: Link Interface Functions //
// //////////////////////////////////////////////////////////////////
@@ -5626,16 +5785,17 @@ public class H5 implements java.io.Serializable {
* IN: Link access property list identifier
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public synchronized static native void H5Lcopy(long src_loc, String src_name, long dst_loc, String dst_name,
- long lcpl_id, long lapl_id) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native void H5Lcopy(long src_loc, String src_name, long dst_loc,
+ String dst_name, long lcpl_id, long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Lcreate_external creates a new soft link to an external object, which is an object in a different HDF5 file
- * from the location of the link.
+ * H5Lcreate_external creates a new soft link to an external object, which is an object in a different
+ * HDF5 file from the location of the link.
*
* @param file_name
* IN: Name of the target file containing the target object.
@@ -5651,12 +5811,14 @@ public class H5 implements java.io.Serializable {
* IN: Link access property list identifier
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public synchronized static native void H5Lcreate_external(String file_name, String obj_name, long link_loc_id,
- String link_name, long lcpl_id, long lapl_id) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native void H5Lcreate_external(String file_name, String obj_name,
+ long link_loc_id, String link_name,
+ long lcpl_id, long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Lcreate_hard creates a new hard link to a pre-existing object in an HDF5 file.
@@ -5675,12 +5837,13 @@ public class H5 implements java.io.Serializable {
* IN: Link access property list identifier
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - cur_name or dst_name is null.
+ * cur_name or dst_name is null.
**/
- public synchronized static native void H5Lcreate_hard(long cur_loc, String cur_name, long dst_loc, String dst_name,
- long lcpl_id, long lapl_id) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native void H5Lcreate_hard(long cur_loc, String cur_name, long dst_loc,
+ String dst_name, long lcpl_id, long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Lcreate_soft creates a new soft link to an object in an HDF5 file.
@@ -5697,12 +5860,13 @@ public class H5 implements java.io.Serializable {
* IN: Link access property list identifier
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - link_name is null.
+ * link_name is null.
**/
- public synchronized static native void H5Lcreate_soft(String link_target, long link_loc_id, String link_name,
- long lcpl_id, long lapl_id) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native void H5Lcreate_soft(String link_target, long link_loc_id,
+ String link_name, long lcpl_id, long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Ldelete removes the link specified from a group.
@@ -5715,15 +5879,16 @@ public class H5 implements java.io.Serializable {
* IN: Link access property list identifier
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
public synchronized static native void H5Ldelete(long loc_id, String name, long lapl_id)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Ldelete_by_idx removes the nth link in a group according to the specified order and in the specified index.
+ * H5Ldelete_by_idx removes the nth link in a group according to the specified order and in the specified
+ * index.
*
* @param loc_id
* IN: File or group identifier specifying location of subject group
@@ -5739,12 +5904,13 @@ public class H5 implements java.io.Serializable {
* IN: Link access property list identifier
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - group_name is null.
+ * group_name is null.
**/
- public synchronized static native void H5Ldelete_by_idx(long loc_id, String group_name, int idx_type, int order,
- long n, long lapl_id) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native void H5Ldelete_by_idx(long loc_id, String group_name, int idx_type,
+ int order, long n, long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Lexists checks if a link with a particular name exists in a group.
@@ -5759,12 +5925,12 @@ public class H5 implements java.io.Serializable {
* @return a boolean, true if the name exists, otherwise false.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
public synchronized static native boolean H5Lexists(long loc_id, String name, long lapl_id)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Lget_info returns information about the specified link.
@@ -5779,16 +5945,16 @@ public class H5 implements java.io.Serializable {
* @return a buffer(H5L_info_t) for the link information.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
public synchronized static native H5L_info_t H5Lget_info(long loc_id, String name, long lapl_id)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Lget_info_by_idx opens a named datatype at the location specified by loc_id and return an identifier for the
- * datatype.
+ * H5Lget_info_by_idx opens a named datatype at the location specified by loc_id and return an identifier
+ * for the datatype.
*
* @param loc_id
* IN: File or group identifier specifying location of subject group
@@ -5806,16 +5972,18 @@ public class H5 implements java.io.Serializable {
* @return a buffer(H5L_info_t) for the link information.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - group_name is null.
+ * group_name is null.
**/
- public synchronized static native H5L_info_t H5Lget_info_by_idx(long loc_id, String group_name, int idx_type,
- int order, long n, long lapl_id) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native H5L_info_t H5Lget_info_by_idx(long loc_id, String group_name,
+ int idx_type, int order, long n,
+ long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Lget_name_by_idx retrieves name of the nth link in a group, according to the order within a specified field or
- * index.
+ * H5Lget_name_by_idx retrieves name of the nth link in a group, according to the order within a specified
+ * field or index.
*
* @param loc_id
* IN: File or group identifier specifying location of subject group
@@ -5833,12 +6001,13 @@ public class H5 implements java.io.Serializable {
* @return a String for the link name.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - group_name is null.
+ * group_name is null.
**/
public synchronized static native String H5Lget_name_by_idx(long loc_id, String group_name, int idx_type,
- int order, long n, long lapl_id) throws HDF5LibraryException, NullPointerException;
+ int order, long n, long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Lget_value returns the link value of a symbolic link. Note that this function is a combination
@@ -5856,12 +6025,13 @@ public class H5 implements java.io.Serializable {
* @return the link type
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public synchronized static native int H5Lget_value(long loc_id, String name, String[] link_value, long lapl_id)
- throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Lget_value(long loc_id, String name, String[] link_value,
+ long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Lget_value_by_idx retrieves value of the nth link in a group, according to the order within an index.
@@ -5886,12 +6056,14 @@ public class H5 implements java.io.Serializable {
* @return the link type
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - group_name is null.
+ * group_name is null.
**/
- public synchronized static native int H5Lget_value_by_idx(long loc_id, String group_name, int idx_type, int order,
- long n, String[] link_value, long lapl_id) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Lget_value_by_idx(long loc_id, String group_name, int idx_type,
+ int order, long n, String[] link_value,
+ long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Literate iterates through links in a group.
@@ -5909,14 +6081,15 @@ public class H5 implements java.io.Serializable {
* @param op_data
* IN: User-defined pointer to data required by the application for its processing of the link
*
- * @return returns the return value of the first operator that returns a positive value, or zero if all members were
- * processed with no operator returning non-zero.
+ * @return returns the return value of the first operator that returns a positive value, or zero if all
+ * members were processed with no operator returning non-zero.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native int H5Literate(long grp_id, int idx_type, int order, long idx, H5L_iterate_t op,
- H5L_iterate_opdata_t op_data) throws HDF5LibraryException;
+ public synchronized static native int H5Literate(long grp_id, int idx_type, int order, long idx,
+ H5L_iterate_t op, H5L_iterate_opdata_t op_data)
+ throws HDF5LibraryException;
/**
* H5Literate_by_name iterates through links in a group.
@@ -5938,17 +6111,18 @@ public class H5 implements java.io.Serializable {
* @param lapl_id
* IN: Link access property list identifier
*
- * @return returns the return value of the first operator that returns a positive value, or zero if all members were
- * processed with no operator returning non-zero.
+ * @return returns the return value of the first operator that returns a positive value, or zero if all
+ * members were processed with no operator returning non-zero.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - group_name is null.
+ * group_name is null.
**/
- public synchronized static native int H5Literate_by_name(long grp_id, String group_name, int idx_type, int order,
- long idx, H5L_iterate_t op, H5L_iterate_opdata_t op_data, long lapl_id) throws HDF5LibraryException,
- NullPointerException;
+ public synchronized static native int H5Literate_by_name(long grp_id, String group_name, int idx_type,
+ int order, long idx, H5L_iterate_t op,
+ H5L_iterate_opdata_t op_data, long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Lmove renames a link within an HDF5 file.
@@ -5967,12 +6141,13 @@ public class H5 implements java.io.Serializable {
* IN: Link access property list identifier to be associated with the new link.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public synchronized static native void H5Lmove(long src_loc, String src_name, long dst_loc, String dst_name,
- long lcpl_id, long lapl_id) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native void H5Lmove(long src_loc, String src_name, long dst_loc,
+ String dst_name, long lcpl_id, long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Lvisit recursively visits all links starting from a specified group.
@@ -5988,14 +6163,14 @@ public class H5 implements java.io.Serializable {
* @param op_data
* IN: User-defined pointer to data required by the application for its processing of the link
*
- * @return returns the return value of the first operator that returns a positive value, or zero if all members were
- * processed with no operator returning non-zero.
+ * @return returns the return value of the first operator that returns a positive value, or zero if all
+ * members were processed with no operator returning non-zero.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Lvisit(long grp_id, int idx_type, int order, H5L_iterate_t op,
- H5L_iterate_opdata_t op_data) throws HDF5LibraryException;
+ H5L_iterate_opdata_t op_data) throws HDF5LibraryException;
/**
* H5Lvisit_by_name recursively visits all links starting from a specified group.
@@ -6015,17 +6190,18 @@ public class H5 implements java.io.Serializable {
* @param lapl_id
* IN: link access property
*
- * @return returns the return value of the first operator that returns a positive value, or zero if all members were
- * processed with no operator returning non-zero.
+ * @return returns the return value of the first operator that returns a positive value, or zero if all
+ * members were processed with no operator returning non-zero.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - group_name is null.
+ * group_name is null.
**/
- public synchronized static native int H5Lvisit_by_name(long loc_id, String group_name, int idx_type, int order,
- H5L_iterate_t op, H5L_iterate_opdata_t op_data, long lapl_id) throws HDF5LibraryException, NullPointerException;
-
+ public synchronized static native int H5Lvisit_by_name(long loc_id, String group_name, int idx_type,
+ int order, H5L_iterate_t op,
+ H5L_iterate_opdata_t op_data, long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Lis_registered tests whether a user-defined link class is currently registered,
@@ -6035,21 +6211,23 @@ public class H5 implements java.io.Serializable {
* IN: User-defined link class identifier
*
* @return Returns a positive value if the link class has been registered and zero if it is unregistered.
- * Otherwise returns a negative value; this may mean that the identifier is not a valid user-defined class identifier.
+ * Otherwise returns a negative value; this may mean that the identifier is not a valid
+ * user-defined class identifier.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Lis_registered(int link_cls_id) throws HDF5LibraryException;
/**
- * H5Lunregister unregisters a class of user-defined links, preventing them from being traversed, queried, moved, etc.
+ * H5Lunregister unregisters a class of user-defined links, preventing them from being traversed, queried,
+ * moved, etc.
*
* @param link_cls_id
* IN: User-defined link class identifier
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native void H5Lunregister(int link_cls_id) throws HDF5LibraryException;
@@ -6093,9 +6271,10 @@ public class H5 implements java.io.Serializable {
* @return non-negative on success
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public static int H5Oclose(long object_id) throws HDF5LibraryException {
+ public static int H5Oclose(long object_id) throws HDF5LibraryException
+ {
if (object_id < 0)
return 0; // throw new HDF5LibraryException("Negative ID");;
@@ -6108,8 +6287,8 @@ public class H5 implements java.io.Serializable {
private synchronized static native int _H5Oclose(long object_id) throws HDF5LibraryException;
/**
- * H5Ocopy copies the group, dataset or named datatype specified from the file or group specified by source location
- * to the destination location.
+ * H5Ocopy copies the group, dataset or named datatype specified from the file or group specified by
+ * source location to the destination location.
*
* @param src_loc_id
* IN: Object identifier indicating the location of the source object to be copied
@@ -6125,12 +6304,13 @@ public class H5 implements java.io.Serializable {
* IN: Link creation property list for the new hard link
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public synchronized static native void H5Ocopy(long src_loc_id, String src_name, long dst_loc_id, String dst_name,
- long ocpypl_id, long lcpl_id) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native void H5Ocopy(long src_loc_id, String src_name, long dst_loc_id,
+ String dst_name, long ocpypl_id, long lcpl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Oget_comment retrieves the comment for the specified object.
@@ -6141,9 +6321,10 @@ public class H5 implements java.io.Serializable {
* @return the comment
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native String H5Oget_comment(long obj_id) throws HDF5LibraryException, IllegalArgumentException;
+ public synchronized static native String H5Oget_comment(long obj_id)
+ throws HDF5LibraryException, IllegalArgumentException;
/**
* H5Oset_comment sets the comment for the specified object.
@@ -6154,12 +6335,13 @@ public class H5 implements java.io.Serializable {
* IN: The new comment.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
* @deprecated As of HDF5 1.8 in favor of object attributes.
**/
@Deprecated
- public synchronized static native void H5Oset_comment(long obj_id, String comment) throws HDF5LibraryException;
+ public synchronized static native void H5Oset_comment(long obj_id, String comment)
+ throws HDF5LibraryException;
/**
* H5Oget_comment_by_name retrieves the comment for an object.
@@ -6174,12 +6356,12 @@ public class H5 implements java.io.Serializable {
* @return the comment
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
public synchronized static native String H5Oget_comment_by_name(long loc_id, String name, long lapl_id)
- throws HDF5LibraryException, IllegalArgumentException, NullPointerException;
+ throws HDF5LibraryException, IllegalArgumentException, NullPointerException;
/**
* H5Oset_comment_by_name sets the comment for the specified object.
@@ -6194,15 +6376,16 @@ public class H5 implements java.io.Serializable {
* IN: Link access property list identifier.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
*
* @deprecated As of HDF5 1.8 in favor of object attributes.
**/
@Deprecated
- public synchronized static native void H5Oset_comment_by_name(long loc_id, String name, String comment, long lapl_id)
- throws HDF5LibraryException, NullPointerException;
+ public synchronized static native void H5Oset_comment_by_name(long loc_id, String name, String comment,
+ long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Oget_info retrieves the metadata for an object specified by an identifier.
@@ -6213,12 +6396,12 @@ public class H5 implements java.io.Serializable {
* @return object information
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public static H5O_info_t H5Oget_info(long loc_id) throws HDF5LibraryException,
- NullPointerException {
+ public static H5O_info_t H5Oget_info(long loc_id) throws HDF5LibraryException, NullPointerException
+ {
return H5Oget_info(loc_id, HDF5Constants.H5O_INFO_ALL);
}
@@ -6233,38 +6416,41 @@ public class H5 implements java.io.Serializable {
* @return object information
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public synchronized static native H5O_info_t H5Oget_info(long loc_id, int fields) throws HDF5LibraryException,
- NullPointerException;
+ public synchronized static native H5O_info_t H5Oget_info(long loc_id, int fields)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Oget_info_by_name retrieves the metadata for an object, identifying the object by location and relative name.
+ * H5Oget_info_by_name retrieves the metadata for an object, identifying the object by location and
+ * relative name.
*
* @param loc_id
* IN: File or group identifier specifying location of group in which object is located
* @param name
* IN: Relative name of group
* @param lapl_id
- * IN: Access property list identifier for the link pointing to the object (Not currently used; pass as
- * H5P_DEFAULT.)
+ * IN: Access property list identifier for the link pointing to the object (Not currently used;
+ * pass as H5P_DEFAULT.)
*
* @return object information
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
public static H5O_info_t H5Oget_info_by_name(long loc_id, String name, long lapl_id)
- throws HDF5LibraryException, NullPointerException {
+ throws HDF5LibraryException, NullPointerException
+ {
return H5Oget_info_by_name(loc_id, name, HDF5Constants.H5O_INFO_ALL, lapl_id);
}
/**
- * H5Oget_info_by_name retrieves the metadata for an object, identifying the object by location and relative name.
+ * H5Oget_info_by_name retrieves the metadata for an object, identifying the object by location and
+ * relative name.
*
* @param loc_id
* IN: File or group identifier specifying location of group in which object is located
@@ -6273,18 +6459,19 @@ public class H5 implements java.io.Serializable {
* @param fields
* IN: Object fields to select
* @param lapl_id
- * IN: Access property list identifier for the link pointing to the object (Not currently used; pass as
- * H5P_DEFAULT.)
+ * IN: Access property list identifier for the link pointing to the object (Not currently used;
+ * pass as H5P_DEFAULT.)
*
* @return object information
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public synchronized static native H5O_info_t H5Oget_info_by_name(long loc_id, String name, int fields, long lapl_id)
- throws HDF5LibraryException, NullPointerException;
+ public synchronized static native H5O_info_t H5Oget_info_by_name(long loc_id, String name, int fields,
+ long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Oget_info_by_idx retrieves the metadata for an object, identifying the object by an index position.
@@ -6300,19 +6487,22 @@ public class H5 implements java.io.Serializable {
* @param n
* IN: Object to open
* @param lapl_id
- * IN: Access property list identifier for the link pointing to the object (Not currently used; pass as
- * H5P_DEFAULT.)
+ * IN: Access property list identifier for the link pointing to the object (Not currently used;
+ * pass as H5P_DEFAULT.)
*
* @return object information
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public static H5O_info_t H5Oget_info_by_idx(long loc_id, String group_name, int idx_type,
- int order, long n, long lapl_id) throws HDF5LibraryException, NullPointerException {
- return H5Oget_info_by_idx(loc_id, group_name, idx_type, order, n, HDF5Constants.H5O_INFO_ALL, lapl_id);
+ public static H5O_info_t H5Oget_info_by_idx(long loc_id, String group_name, int idx_type, int order,
+ long n, long lapl_id)
+ throws HDF5LibraryException, NullPointerException
+ {
+ return H5Oget_info_by_idx(loc_id, group_name, idx_type, order, n, HDF5Constants.H5O_INFO_ALL,
+ lapl_id);
}
/**
@@ -6331,22 +6521,25 @@ public class H5 implements java.io.Serializable {
* @param fields
* IN: Object fields to select
* @param lapl_id
- * IN: Access property list identifier for the link pointing to the object (Not currently used; pass as
- * H5P_DEFAULT.)
+ * IN: Access property list identifier for the link pointing to the object (Not currently used;
+ * pass as H5P_DEFAULT.)
*
* @return object information
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public synchronized static native H5O_info_t H5Oget_info_by_idx(long loc_id, String group_name, int idx_type,
- int order, long n, int fields, long lapl_id) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native H5O_info_t H5Oget_info_by_idx(long loc_id, String group_name,
+ int idx_type, int order, long n,
+ int fields, long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Oget_native_info retrieves the native HDF5-specific metadata for an HDF5 object specified by an identifier.
- * Native HDF5-specific metadata includes things like object header information and object storage layout information.
+ * H5Oget_native_info retrieves the native HDF5-specific metadata for an HDF5 object specified by an
+ * identifier. Native HDF5-specific metadata includes things like object header information and object
+ * storage layout information.
*
* @param loc_id
* IN: Identifier for target object
@@ -6354,18 +6547,20 @@ public class H5 implements java.io.Serializable {
* @return object information
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public static H5O_native_info_t H5Oget_native_info(long loc_id) throws HDF5LibraryException,
- NullPointerException {
+ public static H5O_native_info_t H5Oget_native_info(long loc_id)
+ throws HDF5LibraryException, NullPointerException
+ {
return H5Oget_native_info(loc_id, HDF5Constants.H5O_NATIVE_INFO_ALL);
}
/**
- * H5Oget_native_info retrieves the native HDF5-specific metadata for an HDF5 object specified by an identifier.
- * Native HDF5-specific metadata includes things like object header information and object storage layout information.
+ * H5Oget_native_info retrieves the native HDF5-specific metadata for an HDF5 object specified by an
+ * identifier. Native HDF5-specific metadata includes things like object header information and object
+ * storage layout information.
*
* @param loc_id
* IN: Identifier for target object
@@ -6375,42 +6570,43 @@ public class H5 implements java.io.Serializable {
* @return object information
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public synchronized static native H5O_native_info_t H5Oget_native_info(long loc_id, int fields) throws HDF5LibraryException,
- NullPointerException;
+ public synchronized static native H5O_native_info_t H5Oget_native_info(long loc_id, int fields)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Oget_native_info_by_name retrieves the native HDF5-specific metadata for an HDF5 object, identifying the object
- * by location and relative name. Native HDF5-specific metadata includes things like object header information and
- * object storage layout information.
+ * H5Oget_native_info_by_name retrieves the native HDF5-specific metadata for an HDF5 object, identifying
+ * the object by location and relative name. Native HDF5-specific metadata includes things like object
+ * header information and object storage layout information.
*
* @param loc_id
* IN: File or group identifier specifying location of group in which object is located
* @param name
* IN: Relative name of group
* @param lapl_id
- * IN: Access property list identifier for the link pointing to the object (Not currently used; pass as
- * H5P_DEFAULT.)
+ * IN: Access property list identifier for the link pointing to the object (Not currently used;
+ * pass as H5P_DEFAULT.)
*
* @return object information
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
public static H5O_native_info_t H5Oget_native_info_by_name(long loc_id, String name, long lapl_id)
- throws HDF5LibraryException, NullPointerException {
+ throws HDF5LibraryException, NullPointerException
+ {
return H5Oget_native_info_by_name(loc_id, name, HDF5Constants.H5O_NATIVE_INFO_ALL, lapl_id);
}
/**
- * H5Oget_native_info_by_name retrieves the native HDF5-specific metadata for an HDF5 object, identifying the object
- * by location and relative name. Native HDF5-specific metadata includes things like object header information and
- * object storage layout information.
+ * H5Oget_native_info_by_name retrieves the native HDF5-specific metadata for an HDF5 object, identifying
+ * the object by location and relative name. Native HDF5-specific metadata includes things like object
+ * header information and object storage layout information.
*
* @param loc_id
* IN: File or group identifier specifying location of group in which object is located
@@ -6419,23 +6615,24 @@ public class H5 implements java.io.Serializable {
* @param fields
* IN: Object fields to select
* @param lapl_id
- * IN: Access property list identifier for the link pointing to the object (Not currently used; pass as
- * H5P_DEFAULT.)
+ * IN: Access property list identifier for the link pointing to the object (Not currently used;
+ * pass as H5P_DEFAULT.)
*
* @return object information
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public synchronized static native H5O_native_info_t H5Oget_native_info_by_name(long loc_id, String name, int fields, long lapl_id)
- throws HDF5LibraryException, NullPointerException;
+ public synchronized static native H5O_native_info_t H5Oget_native_info_by_name(long loc_id, String name,
+ int fields, long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Oget_native_info_by_idx retrieves the native HDF5-specific metadata for an HDF5 object, identifying the object
- * by an index position. Native HDF5-specific metadata includes things like object header information and
- * object storage layout information.
+ * H5Oget_native_info_by_idx retrieves the native HDF5-specific metadata for an HDF5 object, identifying
+ * the object by an index position. Native HDF5-specific metadata includes things like object header
+ * information and object storage layout information.
*
* @param loc_id
* IN: File or group identifier
@@ -6448,25 +6645,28 @@ public class H5 implements java.io.Serializable {
* @param n
* IN: Object to open
* @param lapl_id
- * IN: Access property list identifier for the link pointing to the object (Not currently used; pass as
- * H5P_DEFAULT.)
+ * IN: Access property list identifier for the link pointing to the object (Not currently used;
+ * pass as H5P_DEFAULT.)
*
* @return object information
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
public static H5O_native_info_t H5Oget_native_info_by_idx(long loc_id, String group_name, int idx_type,
- int order, long n, long lapl_id) throws HDF5LibraryException, NullPointerException {
- return H5Oget_native_info_by_idx(loc_id, group_name, idx_type, order, n, HDF5Constants.H5O_NATIVE_INFO_ALL, lapl_id);
+ int order, long n, long lapl_id)
+ throws HDF5LibraryException, NullPointerException
+ {
+ return H5Oget_native_info_by_idx(loc_id, group_name, idx_type, order, n,
+ HDF5Constants.H5O_NATIVE_INFO_ALL, lapl_id);
}
/**
- * H5Oget_native_info_by_idx retrieves the native HDF5-specific metadata for an HDF5 object, identifying the object
- * by an index position. Native HDF5-specific metadata includes things like object header information and
- * object storage layout information.
+ * H5Oget_native_info_by_idx retrieves the native HDF5-specific metadata for an HDF5 object, identifying
+ * the object by an index position. Native HDF5-specific metadata includes things like object header
+ * information and object storage layout information.
*
* @param loc_id
* IN: File or group identifier
@@ -6481,18 +6681,19 @@ public class H5 implements java.io.Serializable {
* @param fields
* IN: Object fields to select
* @param lapl_id
- * IN: Access property list identifier for the link pointing to the object (Not currently used; pass as
- * H5P_DEFAULT.)
+ * IN: Access property list identifier for the link pointing to the object (Not currently used;
+ * pass as H5P_DEFAULT.)
*
* @return object information
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public synchronized static native H5O_native_info_t H5Oget_native_info_by_idx(long loc_id, String group_name, int idx_type,
- int order, long n, int fields, long lapl_id) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native H5O_native_info_t H5Oget_native_info_by_idx(
+ long loc_id, String group_name, int idx_type, int order, long n, int fields, long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Olink creates a new hard link to an object in an HDF5 file.
@@ -6509,12 +6710,13 @@ public class H5 implements java.io.Serializable {
* IN: Access property list identifier.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public synchronized static native void H5Olink(long obj_id, long new_loc_id, String new_name, long lcpl_id,
- long lapl_id) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native void H5Olink(long obj_id, long new_loc_id, String new_name,
+ long lcpl_id, long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Oopen opens a group, dataset, or named datatype specified by a location and a path name.
@@ -6529,11 +6731,13 @@ public class H5 implements java.io.Serializable {
* @return an object identifier for the opened object
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public static long H5Oopen(long loc_id, String name, long lapl_id) throws HDF5LibraryException, NullPointerException {
+ public static long H5Oopen(long loc_id, String name, long lapl_id)
+ throws HDF5LibraryException, NullPointerException
+ {
long id = _H5Oopen(loc_id, name, lapl_id);
if (id > 0) {
log.trace("OPEN_IDS: H5Oopen add {}", id);
@@ -6544,7 +6748,7 @@ public class H5 implements java.io.Serializable {
}
private synchronized static native long _H5Oopen(long loc_id, String name, long lapl_id)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Ovisit recursively visits all objects accessible from a specified object.
@@ -6558,18 +6762,20 @@ public class H5 implements java.io.Serializable {
* @param op
* IN: Callback function passing data regarding the object to the calling application
* @param op_data
- * IN: User-defined pointer to data required by the application for its processing of the object
+ * IN: User-defined pointer to data required by the application for its processing of the
+ * object
*
- * @return returns the return value of the first operator that returns a positive value, or zero if all members were
- * processed with no operator returning non-zero.
+ * @return returns the return value of the first operator that returns a positive value, or zero if all
+ * members were processed with no operator returning non-zero.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public static int H5Ovisit(long obj_id, int idx_type, int order, H5O_iterate_t op, H5O_iterate_opdata_t op_data)
- throws HDF5LibraryException, NullPointerException {
+ public static int H5Ovisit(long obj_id, int idx_type, int order, H5O_iterate_t op,
+ H5O_iterate_opdata_t op_data) throws HDF5LibraryException, NullPointerException
+ {
return H5Ovisit(obj_id, idx_type, order, op, op_data, HDF5Constants.H5O_INFO_ALL);
}
@@ -6585,20 +6791,22 @@ public class H5 implements java.io.Serializable {
* @param op
* IN: Callback function passing data regarding the object to the calling application
* @param op_data
- * IN: User-defined pointer to data required by the application for its processing of the object
+ * IN: User-defined pointer to data required by the application for its processing of the
+ * object
* @param fields
* IN: Object fields to select
*
- * @return returns the return value of the first operator that returns a positive value, or zero if all members were
- * processed with no operator returning non-zero.
+ * @return returns the return value of the first operator that returns a positive value, or zero if all
+ * members were processed with no operator returning non-zero.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
public synchronized static native int H5Ovisit(long obj_id, int idx_type, int order, H5O_iterate_t op,
- H5O_iterate_opdata_t op_data, int fields) throws HDF5LibraryException, NullPointerException;
+ H5O_iterate_opdata_t op_data, int fields)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Ovisit_by_name recursively visits all objects starting from a specified object.
@@ -6614,21 +6822,25 @@ public class H5 implements java.io.Serializable {
* @param op
* IN: Callback function passing data regarding the object to the calling application
* @param op_data
- * IN: User-defined pointer to data required by the application for its processing of the object
+ * IN: User-defined pointer to data required by the application for its processing of the
+ * object
* @param lapl_id
* IN: Link access property list identifier
*
- * @return returns the return value of the first operator that returns a positive value, or zero if all members were
- * processed with no operator returning non-zero.
+ * @return returns the return value of the first operator that returns a positive value, or zero if all
+ * members were processed with no operator returning non-zero.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
public static int H5Ovisit_by_name(long loc_id, String obj_name, int idx_type, int order,
- H5O_iterate_t op, H5O_iterate_opdata_t op_data, long lapl_id) throws HDF5LibraryException, NullPointerException {
- return H5Ovisit_by_name(loc_id, obj_name, idx_type, order, op, op_data, HDF5Constants.H5O_INFO_ALL, lapl_id);
+ H5O_iterate_t op, H5O_iterate_opdata_t op_data, long lapl_id)
+ throws HDF5LibraryException, NullPointerException
+ {
+ return H5Ovisit_by_name(loc_id, obj_name, idx_type, order, op, op_data, HDF5Constants.H5O_INFO_ALL,
+ lapl_id);
}
/**
@@ -6645,23 +6857,25 @@ public class H5 implements java.io.Serializable {
* @param op
* IN: Callback function passing data regarding the object to the calling application
* @param op_data
- * IN: User-defined pointer to data required by the application for its processing of the object
+ * IN: User-defined pointer to data required by the application for its processing of the
+ * object
* @param fields
* IN: Object fields to select
* @param lapl_id
* IN: Link access property list identifier
*
- * @return returns the return value of the first operator that returns a positive value, or zero if all members were
- * processed with no operator returning non-zero.
+ * @return returns the return value of the first operator that returns a positive value, or zero if all
+ * members were processed with no operator returning non-zero.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public synchronized static native int H5Ovisit_by_name(long loc_id, String obj_name, int idx_type, int order,
- H5O_iterate_t op, H5O_iterate_opdata_t op_data, int fields, long lapl_id) throws HDF5LibraryException, NullPointerException;
-
+ public synchronized static native int
+ H5Ovisit_by_name(long loc_id, String obj_name, int idx_type, int order, H5O_iterate_t op,
+ H5O_iterate_opdata_t op_data, int fields, long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Oexists_by_name is used by an application to check that an existing link resolves to an object.
@@ -6677,41 +6891,50 @@ public class H5 implements java.io.Serializable {
* @return Returns TRUE or FALSE if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public synchronized static native boolean H5Oexists_by_name(long loc_id, String obj_name, long lapl_id) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native boolean H5Oexists_by_name(long loc_id, String obj_name, long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Odecr_refcount decrements the hard link reference count for an object.
*
- * @param object_id IN: Object identifier
+ * @param object_id
+ * IN: Object identifier
*
- * @exception HDF5LibraryException - Error from the HDF-5 Library.
+ * @exception HDF5LibraryException
+ * Error from the HDF-5 Library.
**/
public synchronized static native void H5Odecr_refcount(long object_id) throws HDF5LibraryException;
/**
* H5Oincr_refcount increments the hard link reference count for an object.
*
- * @param object_id IN: Object identifier
+ * @param object_id
+ * IN: Object identifier
*
- * @exception HDF5LibraryException - Error from the HDF-5 Library.
+ * @exception HDF5LibraryException
+ * Error from the HDF-5 Library.
**/
- public synchronized static native void H5Oincr_refcount(long object_id) throws HDF5LibraryException;
+ public synchronized static native void H5Oincr_refcount(long object_id) throws HDF5LibraryException;
/**
* H5Oopen_by_token opens a group, dataset, or named datatype using its object token within an HDF5 file.
*
- * @param loc_id IN: File or group identifier
- * @param token IN: Object's token in the file
+ * @param loc_id
+ * IN: File or group identifier
+ * @param token
+ * IN: Object's token in the file
*
* @return an object identifier for the opened object
*
- * @exception HDF5LibraryException - Error from the HDF-5 Library.
+ * @exception HDF5LibraryException
+ * Error from the HDF-5 Library.
**/
- public static long H5Oopen_by_token(long loc_id, H5O_token_t token) throws HDF5LibraryException {
+ public static long H5Oopen_by_token(long loc_id, H5O_token_t token) throws HDF5LibraryException
+ {
long id = _H5Oopen_by_token(loc_id, token);
if (id > 0) {
@@ -6724,25 +6947,34 @@ public class H5 implements java.io.Serializable {
}
private synchronized static native long _H5Oopen_by_token(long loc_id, H5O_token_t token)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Oopen_by_idx opens the nth object in the group specified.
*
- * @param loc_id IN: File or group identifier
- * @param group_name IN: Name of group, relative to loc_id, in which object is located
- * @param idx_type IN: Type of index by which objects are ordered
- * @param order IN: Order of iteration within index
- * @param n IN: Object to open
- * @param lapl_id IN: Access property list identifier for the link pointing to the object
+ * @param loc_id
+ * IN: File or group identifier
+ * @param group_name
+ * IN: Name of group, relative to loc_id, in which object is located
+ * @param idx_type
+ * IN: Type of index by which objects are ordered
+ * @param order
+ * IN: Order of iteration within index
+ * @param n
+ * IN: Object to open
+ * @param lapl_id
+ * IN: Access property list identifier for the link pointing to the object
*
* @return an object identifier for the opened object
*
- * @exception HDF5LibraryException - Error from the HDF-5 Library.
- * @exception NullPointerException - group_name is null.
+ * @exception HDF5LibraryException
+ * Error from the HDF-5 Library.
+ * @exception NullPointerException
+ * group_name is null.
**/
- public static long H5Oopen_by_idx(long loc_id, String group_name,
- int idx_type, int order, long n, long lapl_id) throws HDF5LibraryException, NullPointerException {
+ public static long H5Oopen_by_idx(long loc_id, String group_name, int idx_type, int order, long n,
+ long lapl_id) throws HDF5LibraryException, NullPointerException
+ {
long id = _H5Oopen_by_idx(loc_id, group_name, idx_type, order, n, lapl_id);
if (id > 0) {
log.trace("OPEN_IDS: H5Oopen_by_idx add {}", id);
@@ -6752,51 +6984,54 @@ public class H5 implements java.io.Serializable {
return id;
}
- private synchronized static native long _H5Oopen_by_idx(long loc_id, String group_name,
- int idx_type, int order, long n, long lapl_id) throws HDF5LibraryException, NullPointerException;
+ private synchronized static native long _H5Oopen_by_idx(long loc_id, String group_name, int idx_type,
+ int order, long n, long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Oflush causes all buffers associated with an object to be immediately flushed to disk without removing
- * the data from the cache. object_id can be any named object associated with an HDF5 file including a
- * dataset, a group, or a committed datatype.
+ * H5Oflush causes all buffers associated with an object to be immediately flushed to disk without
+ * removing the data from the cache. object_id can be any named object associated with an HDF5 file
+ * ncluding a dataset, a group, or a committed datatype.
*
* @param object_id
* IN: Identifier of the object to be flushed.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native void H5Oflush(long object_id) throws HDF5LibraryException;
/**
* H5Orefresh causes all buffers associated with an object to be cleared and immediately re-loaded with
* updated contents from disk. This function essentially closes the object, evicts all metadata associated
- * with it from the cache, and then re-opens the object. The reopened object is automatically re-registered
- * with the same ID. object_id can be any named object associated with an HDF5 file including a
- * dataset, a group, or a committed datatype.
+ * with it from the cache, and then re-opens the object. The reopened object is automatically
+ * re-registered with the same ID. object_id can be any named object associated with an HDF5 file
+ * including a dataset, a group, or a committed datatype.
*
* @param object_id
* IN: Identifier of the object to be refreshed.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native void H5Orefresh(long object_id) throws HDF5LibraryException;
/**
- * H5Odisable_mdc_flushes corks an object, keeping dirty entries associated with the object in the metadata cache.
+ * H5Odisable_mdc_flushes corks an object, keeping dirty entries associated with the object in the
+ * metadata cache.
*
* @param object_id
* IN: Identifier of the object to be corked.
**/
- public synchronized static native void H5Odisable_mdc_flushes(long object_id);
+ public synchronized static native void H5Odisable_mdc_flushes(long object_id);
/**
- * H5Oenable_mdc_flushes uncorks an object, keeping dirty entries associated with the object in the metadata cache.
+ * H5Oenable_mdc_flushes uncorks an object, keeping dirty entries associated with the object in the
+ * metadata cache.
*
* @param object_id
* IN: Identifier of the object to be uncorked.
**/
- public synchronized static native void H5Oenable_mdc_flushes(long object_id);
+ public synchronized static native void H5Oenable_mdc_flushes(long object_id);
/**
* H5Oare_mdc_flushes_disabled retrieve the object's "cork" status.
*
@@ -6804,10 +7039,10 @@ public class H5 implements java.io.Serializable {
* IN: Identifier of the object to be flushed.
*
* @return the cork status
- * TRUE if mdc flushes for the object is disabled
- * FALSE if mdc flushes for the object is not disabled
+ * TRUE if mdc flushes for the object is disabled
+ * FALSE if mdc flushes for the object is not disabled
**/
- public synchronized static native boolean H5Oare_mdc_flushes_disabled(long object_id);
+ public synchronized static native boolean H5Oare_mdc_flushes_disabled(long object_id);
// /////// unimplemented ////////
// herr_t H5Otoken_cmp(hid_t loc_id, const H5O_token_t *token1, const H5O_token_t *token2,
@@ -6831,7 +7066,7 @@ public class H5 implements java.io.Serializable {
* @return name of a property list if successful; null if failed
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*/
public synchronized static native String H5Pget_class_name(long plid) throws HDF5LibraryException;
@@ -6844,9 +7079,10 @@ public class H5 implements java.io.Serializable {
* @return a property list identifier (plist) if successful; otherwise Fail (-1).
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public static long H5Pcreate(long type) throws HDF5LibraryException {
+ public static long H5Pcreate(long type) throws HDF5LibraryException
+ {
long id = _H5Pcreate(type);
if (id > 0) {
log.trace("OPEN_IDS: H5Pcreate add {}", id);
@@ -6868,7 +7104,7 @@ public class H5 implements java.io.Serializable {
* @return value for a property if successful; a negative value if failed
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*/
public synchronized static native int H5Pget(long plid, String name) throws HDF5LibraryException;
@@ -6884,9 +7120,10 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; a negative value if failed
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*/
- public synchronized static native int H5Pset(long plid, String name, int value) throws HDF5LibraryException;
+ public synchronized static native int H5Pset(long plid, String name, int value)
+ throws HDF5LibraryException;
/**
* H5Pexist determines whether a property exists within a property list or class
@@ -6895,10 +7132,11 @@ public class H5 implements java.io.Serializable {
* IN: Identifier for the property to query
* @param name
* IN: Name of property to check for
- * @return a true value if the property exists in the property object; false if the property does not exist;
+ * @return a true value if the property exists in the property object; false if the property does not
+ * exist;
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*/
public synchronized static native boolean H5Pexist(long plid, String name) throws HDF5LibraryException;
@@ -6912,7 +7150,7 @@ public class H5 implements java.io.Serializable {
* @return size of a property's value if successful; a negative value if failed
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*/
public synchronized static native long H5Pget_size(long plid, String name) throws HDF5LibraryException;
@@ -6924,7 +7162,7 @@ public class H5 implements java.io.Serializable {
* @return number of properties if successful; a negative value if failed
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*/
public synchronized static native long H5Pget_nprops(long plid) throws HDF5LibraryException;
@@ -6936,7 +7174,7 @@ public class H5 implements java.io.Serializable {
* @return a property list class if successful. Otherwise returns H5P_ROOT (-1).
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native long H5Pget_class(long plist) throws HDF5LibraryException;
@@ -6948,7 +7186,7 @@ public class H5 implements java.io.Serializable {
* @return a valid parent class object identifier if successful; a negative value if failed
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*/
public synchronized static native long H5Pget_class_parent(long plid) throws HDF5LibraryException;
@@ -6963,7 +7201,7 @@ public class H5 implements java.io.Serializable {
* @return positive value if equal; zero if unequal, a negative value if failed
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*/
public synchronized static native int H5Pequal(long plid1, long plid2) throws HDF5LibraryException;
@@ -6978,9 +7216,10 @@ public class H5 implements java.io.Serializable {
* @return TRUE if equal, FALSE if unequal
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*/
- public static boolean H5P_equal(long plid1, long plid2) throws HDF5LibraryException {
+ public static boolean H5P_equal(long plid1, long plid2) throws HDF5LibraryException
+ {
if (H5Pequal(plid1, plid2) == 1)
return true;
return false;
@@ -6996,7 +7235,7 @@ public class H5 implements java.io.Serializable {
* @return a positive value if equal; zero if unequal; a negative value if failed
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*/
public synchronized static native int H5Pisa_class(long plist, long pclass) throws HDF5LibraryException;
@@ -7012,10 +7251,10 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; a negative value if failed
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*/
public synchronized static native int H5Pcopy_prop(long dst_id, long src_id, String name)
- throws HDF5LibraryException;
+ throws HDF5LibraryException;
/**
* H5Premove removes a property from a property list
@@ -7027,7 +7266,7 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; a negative value if failed
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*/
public synchronized static native int H5Premove(long plid, String name) throws HDF5LibraryException;
@@ -7041,7 +7280,7 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; a negative value if failed
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*/
public synchronized static native int H5Punregister(long plid, String name) throws HDF5LibraryException;
@@ -7053,9 +7292,10 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; a negative value if failed
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*/
- public static int H5Pclose_class(long plid) throws HDF5LibraryException {
+ public static int H5Pclose_class(long plid) throws HDF5LibraryException
+ {
if (plid < 0)
return 0; // throw new HDF5LibraryException("Negative ID");;
@@ -7075,9 +7315,10 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public static int H5Pclose(long plist) throws HDF5LibraryException {
+ public static int H5Pclose(long plist) throws HDF5LibraryException
+ {
if (plist < 0)
return 0; // throw new HDF5LibraryException("Negative ID");;
@@ -7098,9 +7339,10 @@ public class H5 implements java.io.Serializable {
* @return a property list identifier if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public static long H5Pcopy(long plist) throws HDF5LibraryException {
+ public static long H5Pcopy(long plist) throws HDF5LibraryException
+ {
long id = _H5Pcopy(plist);
if (id > 0) {
log.trace("OPEN_IDS: H5Pcopy add {}", id);
@@ -7144,11 +7386,12 @@ public class H5 implements java.io.Serializable {
* @return a property list identifier if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public static long H5Pcreate_class_nocb(long parent_class, String name) throws HDF5LibraryException {
+ public static long H5Pcreate_class_nocb(long parent_class, String name) throws HDF5LibraryException
+ {
long id = _H5Pcreate_class_nocb(parent_class, name);
- if (id > 0) {
+ if (id > 0) {
log.trace("OPEN_IDS: H5Pcreate_class_nocb add {}", id);
OPEN_IDS.add(id);
log.trace("OPEN_IDS: {}", OPEN_IDS.size());
@@ -7156,21 +7399,27 @@ public class H5 implements java.io.Serializable {
return id;
}
- private synchronized static native long _H5Pcreate_class_nocb(long parent_class, String name) throws HDF5LibraryException;
-
-// public static long H5Pcreate_class(long parent_class, String name, H5P_cls_create_func_cb create_op, H5P_cls_create_func_t create_data,
-// H5P_cls_copy_func_cb copy_op, H5P_cls_copy_func_t copy_data, H5P_cls_close_func_cb close_op, H5P_cls_close_func_t close_data) throws HDF5LibraryException {
-// long id = _H5Pcreate_class(parent_class, name, create_op, create_data, copy_op, copy_data, close_op, close_data);
-// if (id > 0) {
-// log.trace("OPEN_IDS: H5Pcreate_class add {}", id);
-// OPEN_IDS.add(id);
-// log.trace("OPEN_IDS: {}", OPEN_IDS.size());
-// }
-// return id;
-// }
-//
-// private synchronized static native long _H5Pcreate_class(long parent_class, String name, H5P_cls_create_func_cb create_op, H5P_cls_create_func_t create_data,
-// H5P_cls_copy_func_cb copy_op, H5P_cls_copy_func_t copy_data, H5P_cls_close_func_cb close_op, H5P_cls_close_func_t close_data) throws HDF5LibraryException;
+ private synchronized static native long _H5Pcreate_class_nocb(long parent_class, String name)
+ throws HDF5LibraryException;
+
+ // public static long H5Pcreate_class(long parent_class, String name, H5P_cls_create_func_cb create_op,
+ // H5P_cls_create_func_t create_data,
+ // H5P_cls_copy_func_cb copy_op, H5P_cls_copy_func_t copy_data, H5P_cls_close_func_cb
+ // close_op, H5P_cls_close_func_t close_data) throws HDF5LibraryException {
+ // long id = _H5Pcreate_class(parent_class, name, create_op, create_data, copy_op, copy_data,
+ // close_op, close_data);
+ // if (id > 0) {
+ // log.trace("OPEN_IDS: H5Pcreate_class add {}", id);
+ // OPEN_IDS.add(id);
+ // log.trace("OPEN_IDS: {}", OPEN_IDS.size());
+ // }
+ // return id;
+ // }
+ //
+ // private synchronized static native long _H5Pcreate_class(long parent_class, String name,
+ // H5P_cls_create_func_cb create_op, H5P_cls_create_func_t create_data,
+ // H5P_cls_copy_func_cb copy_op, H5P_cls_copy_func_t copy_data, H5P_cls_close_func_cb close_op,
+ // H5P_cls_close_func_t close_data) throws HDF5LibraryException;
/**
* H5Pregister2_nocb registers a property list with no callback functions.
@@ -7187,10 +7436,13 @@ public class H5 implements java.io.Serializable {
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
**/
- public synchronized static native void H5Pregister2_nocb(long plist_class, String name, long size, byte[] def_value) throws HDF5LibraryException;
+ public synchronized static native void H5Pregister2_nocb(long plist_class, String name, long size,
+ byte[] def_value) throws HDF5LibraryException;
-// public synchronized static native void H5Pregister2(long plist_class, String name, long size, byte[] def_value, H5P_prp_create_func_cb prp_create, H5P_prp_set_func_cb prp_set,
-// H5P_prp_get_func_cb prp_get, H5P_prp_delete_func_cb prp_delete, H5P_prp_copy_func_cb prp_copy, H5P_prp_compare_func_cb prp_cmp, H5P_prp_close_func_cb prp_close) throws HDF5LibraryException;
+ // public synchronized static native void H5Pregister2(long plist_class, String name, long size, byte[]
+ // def_value, H5P_prp_create_func_cb prp_create, H5P_prp_set_func_cb prp_set,
+ // H5P_prp_get_func_cb prp_get, H5P_prp_delete_func_cb prp_delete, H5P_prp_copy_func_cb prp_copy,
+ // H5P_prp_compare_func_cb prp_cmp, H5P_prp_close_func_cb prp_close) throws HDF5LibraryException;
/**
* H5Pinsert2_nocb inserts a property list with no callback functions.
@@ -7205,37 +7457,39 @@ public class H5 implements java.io.Serializable {
* IN: Default value of the property
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native void H5Pinsert2_nocb(long plist, String name, long size, byte[] value) throws HDF5LibraryException;
-
+ public synchronized static native void H5Pinsert2_nocb(long plist, String name, long size, byte[] value)
+ throws HDF5LibraryException;
- // public synchronized static native void H5Pinsert2(long plist, String name, long size, byte[] value, H5P_prp_set_func_cb prp_set, H5P_prp_get_func_cb prp_get,
- // H5P_prp_delete_func_cb prp_delete, H5P_prp_copy_func_cb prp_copy, H5P_prp_compare_func_cb prp_cmp, H5P_prp_close_func_cb prp_close) throws HDF5LibraryException;
+ // public synchronized static native void H5Pinsert2(long plist, String name, long size, byte[] value,
+ // H5P_prp_set_func_cb prp_set, H5P_prp_get_func_cb prp_get,
+ // H5P_prp_delete_func_cb prp_delete, H5P_prp_copy_func_cb prp_copy, H5P_prp_compare_func_cb prp_cmp,
+ // H5P_prp_close_func_cb prp_close) throws HDF5LibraryException;
/**
* H5Piterate iterates over the properties in a property list or class
*
* @param plist
- * IN: ID of property object to iterate over
+ * IN: ID of property object to iterate over
* @param idx
- * IN/OUT: index of the property to begin with
+ * IN/OUT: index of the property to begin with
* @param op
- * IN: function to be called with each property iterated over.
+ * IN: function to be called with each property iterated over.
* @param op_data
- * IN: iteration data from user
+ * IN: iteration data from user
*
- * @return
- * the return value of the last call to op if it was non-zero,
- * zero if all properties have been processed
+ * @return the return value of the last call to op if it was non-zero,
+ * zero if all properties have been processed
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - size is null.
+ * size is null.
*
**/
- public synchronized static native int H5Piterate(long plist, int[] idx, H5P_iterate_cb op, H5P_iterate_t op_data) throws HDF5LibraryException;
+ public synchronized static native int H5Piterate(long plist, int[] idx, H5P_iterate_cb op,
+ H5P_iterate_t op_data) throws HDF5LibraryException;
// /////// Object creation property list (OCPL) routines ///////
@@ -7243,7 +7497,7 @@ public class H5 implements java.io.Serializable {
* H5Pget_attr_phase_change retrieves attribute storage phase change thresholds.
*
* @param ocpl_id
- * IN: : Object (dataset or group) creation property list identifier
+ * IN: Object (dataset or group) creation property list identifier
* @param attributes
* The maximum and minimum no. of attributes to be stored.
*
@@ -7255,13 +7509,13 @@ public class H5 implements java.io.Serializable {
* @return Returns a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - size is null.
+ * size is null.
*
**/
public synchronized static native int H5Pget_attr_phase_change(long ocpl_id, int[] attributes)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Pset_attr_phase_change sets threshold values for attribute storage on an object. These
@@ -7277,14 +7531,16 @@ public class H5 implements java.io.Serializable {
* IN: Minimum number of attributes to be stored in dense storage (Default: 6)
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
- public synchronized static native void H5Pset_attr_phase_change(long ocpl_id, int max_compact, int min_dense)
- throws HDF5LibraryException;
+ public synchronized static native void H5Pset_attr_phase_change(long ocpl_id, int max_compact,
+ int min_dense)
+ throws HDF5LibraryException;
/**
- * H5Pget_attr_creation_order retrieves the settings for tracking and indexing attribute creation order on an object
+ * H5Pget_attr_creation_order retrieves the settings for tracking and indexing attribute creation order on
+ * an object.
*
* @param ocpl_id
* IN: Object (group or dataset) creation property list identifier
@@ -7292,14 +7548,15 @@ public class H5 implements java.io.Serializable {
* @return Flags specifying whether to track and index attribute creation order
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
- public synchronized static native int H5Pget_attr_creation_order(long ocpl_id) throws HDF5LibraryException;
+ public synchronized static native int H5Pget_attr_creation_order(long ocpl_id)
+ throws HDF5LibraryException;
/**
- * H5Pset_attr_creation_order sets flags specifying whether to track and index attribute creation order on an
- * object.
+ * H5Pset_attr_creation_order sets flags specifying whether to track and index attribute creation order on
+ * an object.
*
* @param ocpl_id
* IN: Object creation property list identifier
@@ -7309,15 +7566,15 @@ public class H5 implements java.io.Serializable {
* @return Returns a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
public synchronized static native int H5Pset_attr_creation_order(long ocpl_id, int crt_order_flags)
- throws HDF5LibraryException;
+ throws HDF5LibraryException;
/**
- * H5Pget_obj_track_times queries the object creation property list, ocpl_id, to determine whether object times are
- * being recorded.
+ * H5Pget_obj_track_times queries the object creation property list, ocpl_id, to determine whether object
+ * times are being recorded.
*
* @param ocpl_id
* IN: Object creation property list identifier
@@ -7325,14 +7582,15 @@ public class H5 implements java.io.Serializable {
* @return TRUE or FALSE, specifying whether object times are being recorded
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
- public synchronized static native boolean H5Pget_obj_track_times(long ocpl_id) throws HDF5LibraryException;
+ public synchronized static native boolean H5Pget_obj_track_times(long ocpl_id)
+ throws HDF5LibraryException;
/**
- * H5Pset_obj_track_times sets a property in the object creation property list, ocpl_id, that governs the recording
- * of times associated with an object.
+ * H5Pset_obj_track_times sets a property in the object creation property list, ocpl_id, that governs the
+ * recording of times associated with an object.
*
* @param ocpl_id
* IN: Object creation property list identifier
@@ -7341,11 +7599,11 @@ public class H5 implements java.io.Serializable {
* IN: TRUE or FALSE, specifying whether object times are to be tracked
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
public synchronized static native void H5Pset_obj_track_times(long ocpl_id, boolean track_times)
- throws HDF5LibraryException;
+ throws HDF5LibraryException;
/**
* H5Pmodify_filter modifies the specified FILTER in the transient or permanent output filter pipeline
@@ -7387,16 +7645,18 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name or an array is null.
+ * name or an array is null.
*
**/
public synchronized static native int H5Pmodify_filter(long plist, long filter, int flags, long cd_nelmts,
- int[] cd_values) throws HDF5LibraryException, NullPointerException;
+ int[] cd_values)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Pset_filter adds the specified filter and corresponding properties to the end of an output filter pipeline.
+ * H5Pset_filter adds the specified filter and corresponding properties to the end of an output filter
+ * pipeline.
*
* @param plist
* IN: Property list identifier.
@@ -7412,14 +7672,14 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Pset_filter(long plist, int filter, int flags, long cd_nelmts,
- int[] cd_values) throws HDF5LibraryException;
+ int[] cd_values) throws HDF5LibraryException;
/**
- * H5Pget_nfilters returns the number of filters defined in the filter pipeline associated with the property list
- * plist.
+ * H5Pget_nfilters returns the number of filters defined in the filter pipeline associated with the
+ * property list plist.
*
* @param plist
* IN: Property list identifier.
@@ -7427,18 +7687,19 @@ public class H5 implements java.io.Serializable {
* @return the number of filters in the pipeline if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Pget_nfilters(long plist) throws HDF5LibraryException;
/**
- * H5Pget_filter returns information about a filter, specified by its filter number, in a filter pipeline, specified
- * by the property list with which it is associated.
+ * H5Pget_filter returns information about a filter, specified by its filter number, in a filter pipeline,
+ * specified by the property list with which it is associated.
*
* @param plist
* IN: Property list identifier.
* @param filter_number
- * IN: Sequence number within the filter pipeline of the filter for which information is sought.
+ * IN: Sequence number within the filter pipeline of the filter for which information is
+ * sought.
* @param flags
* OUT: Bit vector specifying certain general properties of the filter.
* @param cd_nelmts
@@ -7455,44 +7716,49 @@ public class H5 implements java.io.Serializable {
* @return the filter identification number if successful. Otherwise returns H5Z_FILTER_ERROR (-1).
*
* @exception ArrayIndexOutOfBoundsException
- * Fatal error on Copyback
+ * Fatal error on Copyback
* @exception ArrayStoreException
- * Fatal error on Copyback
+ * Fatal error on Copyback
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name or an array is null.
+ * name or an array is null.
*
**/
- public static int H5Pget_filter(long plist, int filter_number, int[] flags, long[] cd_nelmts, int[] cd_values,
- long namelen, String[] name, int[] filter_config) throws ArrayIndexOutOfBoundsException,
- ArrayStoreException, HDF5LibraryException, NullPointerException {
- return H5Pget_filter2(plist, filter_number, flags, cd_nelmts, cd_values, namelen, name, filter_config);
+ public static int H5Pget_filter(long plist, int filter_number, int[] flags, long[] cd_nelmts,
+ int[] cd_values, long namelen, String[] name, int[] filter_config)
+ throws ArrayIndexOutOfBoundsException, ArrayStoreException, HDF5LibraryException, NullPointerException
+ {
+ return H5Pget_filter2(plist, filter_number, flags, cd_nelmts, cd_values, namelen, name,
+ filter_config);
}
/**
- * H5Pget_filter2 returns information about a filter, specified by its filter number, in a filter pipeline,
- * specified by the property list with which it is associated.
+ * H5Pget_filter2 returns information about a filter, specified by its filter number, in a filter
+ * pipeline, specified by the property list with which it is associated.
*
- * @see public static int H5Pget_filter(int plist, int filter_number, int[] flags, int[] cd_nelmts, int[] cd_values,
- * int namelen, String[] name, int[] filter_config)
+ * @see public static int H5Pget_filter(int plist, int filter_number, int[] flags, int[] cd_nelmts, int[]
+ * cd_values, int namelen, String[] name, int[] filter_config)
*
**/
- private synchronized static native int H5Pget_filter2(long plist, int filter_number, int[] flags, long[] cd_nelmts,
- int[] cd_values, long namelen, String[] name, int[] filter_config) throws ArrayIndexOutOfBoundsException,
- ArrayStoreException, HDF5LibraryException, NullPointerException;
+ private synchronized static native int H5Pget_filter2(long plist, int filter_number, int[] flags,
+ long[] cd_nelmts, int[] cd_values, long namelen,
+ String[] name, int[] filter_config)
+ throws ArrayIndexOutOfBoundsException, ArrayStoreException, HDF5LibraryException,
+ NullPointerException;
/**
- * H5Pget_filter_by_id returns information about the filter specified in filter_id, a filter identifier. plist_id
- * must be a dataset or group creation property list and filter_id must be in the associated filter pipeline. The
- * filter_id and flags parameters are used in the same manner as described in the discussion of H5Pset_filter. Aside
- * from the fact that they are used for output, the parameters cd_nelmts and cd_values[] are used in the same manner
- * as described in the discussion of H5Pset_filter. On input, the cd_nelmts parameter indicates the number of
- * entries in the cd_values[] array allocated by the calling program; on exit it contains the number of values
- * defined by the filter. On input, the namelen parameter indicates the number of characters allocated for the
- * filter name by the calling program in the array name[]. On exit name[] contains the name of the filter with one
- * character of the name in each element of the array. If the filter specified in filter_id is not set for the
- * property list, an error will be returned and H5Pget_filter_by_id1 will fail.
+ * H5Pget_filter_by_id returns information about the filter specified in filter_id, a filter identifier.
+ * plist_id must be a dataset or group creation property list and filter_id must be in the associated
+ * filter pipeline. The filter_id and flags parameters are used in the same manner as described in the
+ * discussion of H5Pset_filter. Aside from the fact that they are used for output, the parameters
+ * cd_nelmts and cd_values[] are used in the same manner as described in the discussion of H5Pset_filter.
+ * On input, the cd_nelmts parameter indicates the number of entries in the cd_values[] array allocated by
+ * the calling program; on exit it contains the number of values defined by the filter. On input, the
+ * namelen parameter indicates the number of characters allocated for the filter name by the calling
+ * program in the array name[]. On exit name[] contains the name of the filter with one character of the
+ * name in each element of the array. If the filter specified in filter_id is not set for the property
+ * list, an error will be returned and H5Pget_filter_by_id1 will fail.
*
* @param plist_id
* IN: Property list identifier.
@@ -7514,24 +7780,26 @@ public class H5 implements java.io.Serializable {
* @return the filter identification number if successful. Otherwise returns H5Z_FILTER_ERROR (-1).
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception ArrayIndexOutOfBoundsException
- * Fatal error on Copyback
+ * Fatal error on Copyback
* @exception ArrayStoreException
- * Fatal error on Copyback
+ * Fatal error on Copyback
* @exception NullPointerException
- * - name or an array is null.
+ * name or an array is null.
*
**/
public static int H5Pget_filter_by_id(long plist_id, long filter_id, int[] flags, long[] cd_nelmts,
- int[] cd_values, long namelen, String[] name, int[] filter_config) throws ArrayIndexOutOfBoundsException,
- ArrayStoreException, HDF5LibraryException, NullPointerException {
- return H5Pget_filter_by_id2(plist_id, filter_id, flags, cd_nelmts, cd_values, namelen, name, filter_config);
+ int[] cd_values, long namelen, String[] name, int[] filter_config)
+ throws ArrayIndexOutOfBoundsException, ArrayStoreException, HDF5LibraryException, NullPointerException
+ {
+ return H5Pget_filter_by_id2(plist_id, filter_id, flags, cd_nelmts, cd_values, namelen, name,
+ filter_config);
}
/**
- * H5Pget_filter_by_id2 returns information about a filter, specified by its filter id, in a filter pipeline,
- * specified by the property list with which it is associated.
+ * H5Pget_filter_by_id2 returns information about a filter, specified by its filter id, in a filter
+ * pipeline, specified by the property list with which it is associated.
*
* @param plist_id
* IN: Property list identifier.
@@ -7553,15 +7821,15 @@ public class H5 implements java.io.Serializable {
* @return the filter identification number if successful. Otherwise returns H5Z_FILTER_ERROR (-1).
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name or an array is null.
+ * name or an array is null.
*
**/
- public synchronized static native int H5Pget_filter_by_id2(long plist_id, long filter_id, int[] flags,
- long[] cd_nelmts, int[] cd_values, long namelen, String[] name, int[] filter_config)
- throws HDF5LibraryException, NullPointerException;
-
+ public synchronized static native int
+ H5Pget_filter_by_id2(long plist_id, long filter_id, int[] flags, long[] cd_nelmts, int[] cd_values,
+ long namelen, String[] name, int[] filter_config)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Pall_filters_avail query to verify that all the filters set
@@ -7575,10 +7843,10 @@ public class H5 implements java.io.Serializable {
* FALSE if one or more filters not currently available.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native boolean H5Pall_filters_avail(long dcpl_id) throws HDF5LibraryException,
- NullPointerException;
+ public synchronized static native boolean H5Pall_filters_avail(long dcpl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Premove_filter deletes a filter from the dataset creation property list;
@@ -7592,9 +7860,10 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value and the size of the user block; if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native int H5Premove_filter(long obj_id, long filter) throws HDF5LibraryException;
+ public synchronized static native int H5Premove_filter(long obj_id, long filter)
+ throws HDF5LibraryException;
/**
* H5Pset_deflate sets the compression method for a dataset.
@@ -7607,7 +7876,7 @@ public class H5 implements java.io.Serializable {
* @return non-negative if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Pset_deflate(long plist, int level) throws HDF5LibraryException;
@@ -7621,10 +7890,10 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value and the size of the user block; if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native int H5Pset_fletcher32(long plist) throws HDF5LibraryException,
- NullPointerException;
+ public synchronized static native int H5Pset_fletcher32(long plist)
+ throws HDF5LibraryException, NullPointerException;
// /////// File creation property list (FCPL) routines ///////
@@ -7639,12 +7908,12 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value and the size of the user block; if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - size is null.
+ * size is null.
**/
- public synchronized static native int H5Pget_userblock(long plist, long[] size) throws HDF5LibraryException,
- NullPointerException;
+ public synchronized static native int H5Pget_userblock(long plist, long[] size)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Pset_userblock sets the user block size of a file creation property list.
@@ -7657,13 +7926,13 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Pset_userblock(long plist, long size) throws HDF5LibraryException;
/**
- * H5Pget_sizes retrieves the size of the offsets and lengths used in an HDF5 file. This function is only valid for
- * file creation property lists.
+ * H5Pget_sizes retrieves the size of the offsets and lengths used in an HDF5 file. This function is only
+ * valid for file creation property lists.
*
* @param plist
* IN: Identifier of property list to query.
@@ -7677,14 +7946,14 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value with the sizes initialized; if successful;
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - size is null.
+ * size is null.
* @exception IllegalArgumentException
- * - size is invalid.
+ * size is invalid.
**/
- public synchronized static native int H5Pget_sizes(long plist, long[] size) throws HDF5LibraryException,
- NullPointerException, IllegalArgumentException;
+ public synchronized static native int H5Pget_sizes(long plist, long[] size)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
* H5Pset_sizes sets the byte size of the offsets and lengths used to address objects in an HDF5 file.
@@ -7699,13 +7968,14 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Pset_sizes(long plist, int sizeof_addr, int sizeof_size)
- throws HDF5LibraryException;
+ throws HDF5LibraryException;
/**
- * H5Pget_sym_k retrieves the size of the symbol table B-tree 1/2 rank and the symbol table leaf node 1/2 size.
+ * H5Pget_sym_k retrieves the size of the symbol table B-tree 1/2 rank and the symbol table leaf node 1/2
+ * size.
*
* @param plist
* IN: Property list to query.
@@ -7720,14 +7990,14 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - size is null.
+ * size is null.
* @exception IllegalArgumentException
- * - size is invalid.
+ * size is invalid.
**/
- public synchronized static native int H5Pget_sym_k(long plist, int[] size) throws HDF5LibraryException,
- NullPointerException, IllegalArgumentException;
+ public synchronized static native int H5Pget_sym_k(long plist, int[] size)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
* H5Pset_sym_k sets the size of parameters used to control the symbol table nodes.
@@ -7742,9 +8012,10 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native int H5Pset_sym_k(long plist, int ik, int lk) throws HDF5LibraryException;
+ public synchronized static native int H5Pset_sym_k(long plist, int ik, int lk)
+ throws HDF5LibraryException;
/**
* H5Pget_istore_k queries the 1/2 rank of an indexed storage B-tree.
@@ -7757,15 +8028,16 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - ik array is null.
+ * ik array is null.
**/
- public synchronized static native int H5Pget_istore_k(long plist, int[] ik) throws HDF5LibraryException,
- NullPointerException;
+ public synchronized static native int H5Pget_istore_k(long plist, int[] ik)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Pset_istore_k sets the size of the parameter used to control the B-trees for indexing chunked datasets.
+ * H5Pset_istore_k sets the size of the parameter used to control the B-trees for indexing chunked
+ * datasets.
*
* @param plist
* IN: Identifier of property list to query.
@@ -7775,46 +8047,47 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Pset_istore_k(long plist, int ik) throws HDF5LibraryException;
/**
- * H5Pget_shared_mesg_nindexes retrieves number of shared object header message indexes in file creation property
- * list.
+ * H5Pget_shared_mesg_nindexes retrieves number of shared object header message indexes in file creation
+ * property list.
*
* @param fcpl_id
* IN: : File creation property list identifier
*
- * @return nindexes, the number of shared object header message indexes available in files created with this
- * property list
+ * @return nindexes, the number of shared object header message indexes available in files created with
+ * this property list
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
- public synchronized static native int H5Pget_shared_mesg_nindexes(long fcpl_id) throws HDF5LibraryException;
+ public synchronized static native int H5Pget_shared_mesg_nindexes(long fcpl_id)
+ throws HDF5LibraryException;
/**
- * H5Pset_shared_mesg_nindexes sets the number of shared object header message indexes in the specified file
- * creation property list.
+ * H5Pset_shared_mesg_nindexes sets the number of shared object header message indexes in the specified
+ * file creation property list.
*
* @param plist_id
* IN: File creation property list
* @param nindexes
- * IN: Number of shared object header message indexes to be available in files created with this property
- * list
+ * IN: Number of shared object header message indexes to be available in files created with
+ * this property list
*
* @return a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception IllegalArgumentException
- * - Invalid value of nindexes
+ * Invalid value of nindexes
*
**/
public synchronized static native int H5Pset_shared_mesg_nindexes(long plist_id, int nindexes)
- throws HDF5LibraryException, IllegalArgumentException;
+ throws HDF5LibraryException, IllegalArgumentException;
/**
* H5Pget_shared_mesg_index Retrieves the configuration settings for a shared message index.
@@ -7834,15 +8107,16 @@ public class H5 implements java.io.Serializable {
* @return Returns a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - mesg_info is null.
+ * mesg_info is null.
* @exception IllegalArgumentException
- * - Invalid value of nindexes
+ * Invalid value of nindexes
*
**/
- public synchronized static native int H5Pget_shared_mesg_index(long fcpl_id, int index_num, int[] mesg_info)
- throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+ public synchronized static native int H5Pget_shared_mesg_index(long fcpl_id, int index_num,
+ int[] mesg_info)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
* H5Pset_shared_mesg_index Configures the specified shared object header message index
@@ -7859,13 +8133,14 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception IllegalArgumentException
- * - Invalid value of nindexes
+ * Invalid value of nindexes
*
**/
- public synchronized static native int H5Pset_shared_mesg_index(long fcpl_id, int index_num, int mesg_type_flags,
- int min_mesg_size) throws HDF5LibraryException, IllegalArgumentException;
+ public synchronized static native int H5Pset_shared_mesg_index(long fcpl_id, int index_num,
+ int mesg_type_flags, int min_mesg_size)
+ throws HDF5LibraryException, IllegalArgumentException;
/**
* H5Pget_shared_mesg_phase_change retrieves shared object header message phase change information.
@@ -7876,20 +8151,21 @@ public class H5 implements java.io.Serializable {
* The threshold values for storage of shared object header message indexes in a file.
*
* <pre>
- * size[0] = Threshold above which storage of a shared object header message index shifts from list to B-tree
- * size[1] = Threshold below which storage of a shared object header message index reverts to list format
+ * size[0] = Threshold above which storage of a shared object header message index shifts from list
+ * to B-tree size[1] = Threshold below which storage of a shared object header message index reverts
+ * to list format
* </pre>
*
* @return Returns a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - size is null.
+ * size is null.
*
**/
public synchronized static native int H5Pget_shared_mesg_phase_change(long fcpl_id, int[] size)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Pset_shared_mesg_phase_change sets shared object header message storage phase change thresholds.
@@ -7897,24 +8173,28 @@ public class H5 implements java.io.Serializable {
* @param fcpl_id
* IN: File creation property list identifier
* @param max_list
- * IN: Threshold above which storage of a shared object header message index shifts from list to B-tree
+ * IN: Threshold above which storage of a shared object header message index shifts from list
+ * to B-tree
* @param min_btree
- * IN: Threshold below which storage of a shared object header message index reverts to list format
+ * IN: Threshold below which storage of a shared object header message index reverts to list
+ * format
*
* @return a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception IllegalArgumentException
- * - Invalid values of max_list and min_btree.
+ * Invalid values of max_list and min_btree.
*
**/
- public synchronized static native int H5Pset_shared_mesg_phase_change(long fcpl_id, int max_list, int min_btree)
- throws HDF5LibraryException, IllegalArgumentException;
+ public synchronized static native int H5Pset_shared_mesg_phase_change(long fcpl_id, int max_list,
+ int min_btree)
+ throws HDF5LibraryException, IllegalArgumentException;
/**
- * H5Pset_file_space_strategy sets the file space management strategy for the file associated with fcpl_id to strategy.
- * There are four strategies that applications can select and they are described in the Parameters section.
+ * H5Pset_file_space_strategy sets the file space management strategy for the file associated with fcpl_id
+ * to strategy. There are four strategies that applications can select and they are described in the
+ * Parameters section.
*
* @param fcpl_id
* IN: File creation property list identifier
@@ -7924,7 +8204,8 @@ public class H5 implements java.io.Serializable {
* Mechanisms: free-space managers, aggregators, and virtual file drivers
* This is the library default when not set.
* H5F_FSPACE_STRATEGY_PAGE
- * Mechanisms: free-space managers with embedded paged aggregation and virtual file drivers
+ * Mechanisms: free-space managers with embedded paged aggregation and virtual file
+ * drivers
* H5F_FSPACE_STRATEGY_AGGR
* Mechanisms: aggregators and virtual file drivers
* H5F_FSPACE_STRATEGY_NONE
@@ -7932,20 +8213,23 @@ public class H5 implements java.io.Serializable {
* @param persist
* IN: True to persist free-space.
* @param threshold
- * IN: The free-space section threshold. The library default is 1, which is to track all free-space sections.
- * Passing a value of zero (0) indicates that the value of threshold is not to be modified.
+ * IN: The free-space section threshold. The library default is 1, which is to track all
+ * free-space sections. Passing a value of zero (0) indicates that the value of threshold
+ * is not to be modified.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception IllegalArgumentException
- * - Invalid values of max_list and min_btree.
+ * Invalid values of max_list and min_btree.
*
**/
- public synchronized static native void H5Pset_file_space_strategy(long fcpl_id, int strategy, boolean persist, long threshold)
- throws HDF5LibraryException, IllegalArgumentException;
+ public synchronized static native void H5Pset_file_space_strategy(long fcpl_id, int strategy,
+ boolean persist, long threshold)
+ throws HDF5LibraryException, IllegalArgumentException;
/**
- * H5Pget_file_space_strategy provides the means for applications to manage the HDF5 file's file space strategy for their specific needs.
+ * H5Pget_file_space_strategy provides the means for applications to manage the HDF5 file's file space
+ * strategy for their specific needs.
*
* @param fcpl_id
* IN: File creation property list identifier
@@ -7957,16 +8241,18 @@ public class H5 implements java.io.Serializable {
* @return the current free-space strategy.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception IllegalArgumentException
- * - Invalid values of max_list and min_btree.
+ * Invalid values of max_list and min_btree.
*
**/
- public synchronized static native int H5Pget_file_space_strategy(long fcpl_id, boolean[] persist, long[] threshold)
- throws HDF5LibraryException, IllegalArgumentException;
+ public synchronized static native int H5Pget_file_space_strategy(long fcpl_id, boolean[] persist,
+ long[] threshold)
+ throws HDF5LibraryException, IllegalArgumentException;
/**
- * H5Pget_file_space_strategy_persist provides the means for applications to manage the HDF5 file's file space strategy for their specific needs.
+ * H5Pget_file_space_strategy_persist provides the means for applications to manage the HDF5 file's file
+ * space strategy for their specific needs.
*
* @param fcpl_id
* IN: File creation property list identifier
@@ -7974,16 +8260,17 @@ public class H5 implements java.io.Serializable {
* @return the current free-space persistence.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception IllegalArgumentException
- * - Invalid values of max_list and min_btree.
+ * Invalid values of max_list and min_btree.
*
**/
public synchronized static native boolean H5Pget_file_space_strategy_persist(long fcpl_id)
- throws HDF5LibraryException, IllegalArgumentException;
+ throws HDF5LibraryException, IllegalArgumentException;
/**
- * H5Pget_file_space_strategy_threshold provides the means for applications to manage the HDF5 file's file space strategy for their specific needs.
+ * H5Pget_file_space_strategy_threshold provides the means for applications to manage the HDF5 file's file
+ * space strategy for their specific needs.
*
* @param fcpl_id
* IN: File creation property list identifier
@@ -7991,54 +8278,55 @@ public class H5 implements java.io.Serializable {
* @return the current free-space section threshold.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception IllegalArgumentException
- * - Invalid values of max_list and min_btree.
- *
- **/
- public synchronized static native long H5Pget_file_space_strategy_threshold(long fcpl_id)
- throws HDF5LibraryException, IllegalArgumentException;
-
- /**
- * H5Pset_file_space_page_size retrieves the file space page size for aggregating small metadata or raw data.
- *
- * @param fcpl_id
- * IN: File creation property list identifier
- * @param page_size
- * IN: the file space page size.
- *
- *
- * @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
- * @exception IllegalArgumentException
- * - Invalid values of max_list and min_btree.
- *
- **/
- public synchronized static native void H5Pset_file_space_page_size(long fcpl_id, long page_size)
- throws HDF5LibraryException, IllegalArgumentException;
-
- /**
- * H5Pget_file_space_page_size Sets the file space page size for paged aggregation.
- *
- * @param fcpl_id
- * IN: File creation property list identifier
- *
- * @return the current file space page size.
- *
- * @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
- * @exception IllegalArgumentException
- * - Invalid values of max_list and min_btree.
- *
- **/
- public synchronized static native long H5Pget_file_space_page_size(long fcpl_id)
- throws HDF5LibraryException, IllegalArgumentException;
+ * Invalid values of max_list and min_btree.
+ *
+ **/
+ public synchronized static native long H5Pget_file_space_strategy_threshold(long fcpl_id)
+ throws HDF5LibraryException, IllegalArgumentException;
+ /**
+ * H5Pset_file_space_page_size retrieves the file space page size for aggregating small metadata or raw
+ * data.
+ *
+ * @param fcpl_id
+ * IN: File creation property list identifier
+ * @param page_size
+ * IN: the file space page size.
+ *
+ *
+ * @exception HDF5LibraryException
+ * Error from the HDF-5 Library.
+ * @exception IllegalArgumentException
+ * Invalid values of max_list and min_btree.
+ *
+ **/
+ public synchronized static native void H5Pset_file_space_page_size(long fcpl_id, long page_size)
+ throws HDF5LibraryException, IllegalArgumentException;
+
+ /**
+ * H5Pget_file_space_page_size Sets the file space page size for paged aggregation.
+ *
+ * @param fcpl_id
+ * IN: File creation property list identifier
+ *
+ * @return the current file space page size.
+ *
+ * @exception HDF5LibraryException
+ * Error from the HDF-5 Library.
+ * @exception IllegalArgumentException
+ * Invalid values of max_list and min_btree.
+ *
+ **/
+ public synchronized static native long H5Pget_file_space_page_size(long fcpl_id)
+ throws HDF5LibraryException, IllegalArgumentException;
// /////// File access property list (FAPL) routines ///////
/**
- * H5Pget_alignment retrieves the current settings for alignment properties from a file access property list.
+ * H5Pget_alignment retrieves the current settings for alignment properties from a file access property
+ * list.
*
* @param plist
* IN: Identifier of a file access property list.
@@ -8052,18 +8340,18 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - alignment array is null.
+ * alignment array is null.
* @exception IllegalArgumentException
- * - alignment array is invalid.
+ * alignment array is invalid.
**/
- public synchronized static native int H5Pget_alignment(long plist, long[] alignment) throws HDF5LibraryException,
- NullPointerException, IllegalArgumentException;
+ public synchronized static native int H5Pget_alignment(long plist, long[] alignment)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
- * H5Pset_alignment sets the alignment properties of a file access property list so that any file object &gt;=
- * THRESHOLD bytes will be aligned on an address which is a multiple of ALIGNMENT.
+ * H5Pset_alignment sets the alignment properties of a file access property list so that any file object
+ * &gt;= THRESHOLD bytes will be aligned on an address which is a multiple of ALIGNMENT.
*
* @param plist
* IN: Identifier for a file access property list.
@@ -8075,21 +8363,21 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Pset_alignment(long plist, long threshold, long alignment)
- throws HDF5LibraryException;
+ throws HDF5LibraryException;
/**
- * H5Pget_driver returns the identifier of the low-level file driver associated with the file access property list
- * or data transfer property list plid.
+ * H5Pget_driver returns the identifier of the low-level file driver associated with the file access
+ * property list or data transfer property list plid.
*
* @param plid
* IN: File access or data transfer property list identifier.
* @return a valid low-level driver identifier if successful; a negative value if failed
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*/
public synchronized static native long H5Pget_driver(long plid) throws HDF5LibraryException;
@@ -8102,7 +8390,7 @@ public class H5 implements java.io.Serializable {
* @return the offset.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
public synchronized static native long H5Pget_family_offset(long fapl_id) throws HDF5LibraryException;
@@ -8118,14 +8406,15 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
- public synchronized static native int H5Pset_family_offset(long fapl_id, long offset) throws HDF5LibraryException;
+ public synchronized static native int H5Pset_family_offset(long fapl_id, long offset)
+ throws HDF5LibraryException;
/**
- * Retrieves the maximum possible number of elements in the meta data cache and the maximum possible number of bytes
- * and the RDCC_W0 value in the raw data chunk cache.
+ * Retrieves the maximum possible number of elements in the meta data cache and the maximum possible
+ * number of bytes and the RDCC_W0 value in the raw data chunk cache.
*
* @param plist
* IN: Identifier of the file access property list.
@@ -8141,16 +8430,17 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - an array is null.
+ * an array is null.
**/
public synchronized static native int H5Pget_cache(long plist, int[] mdc_nelmts, long[] rdcc_nelmts,
- long[] rdcc_nbytes, double[] rdcc_w0) throws HDF5LibraryException, NullPointerException;
+ long[] rdcc_nbytes, double[] rdcc_w0)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Pset_cache sets the number of elements (objects) in the meta data cache and the total number of bytes in the
- * raw data chunk cache.
+ * H5Pset_cache sets the number of elements (objects) in the meta data cache and the total number of bytes
+ * in the raw data chunk cache.
*
* @param plist
* IN: Identifier of the file access property list.
@@ -8166,14 +8456,15 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native int H5Pset_cache(long plist, int mdc_nelmts, long rdcc_nelmts, long rdcc_nbytes,
- double rdcc_w0) throws HDF5LibraryException;
+ public synchronized static native int H5Pset_cache(long plist, int mdc_nelmts, long rdcc_nelmts,
+ long rdcc_nbytes, double rdcc_w0)
+ throws HDF5LibraryException;
/**
- * H5Pget_mdc_config gets the initial metadata cache configuration contained in a file access property list.
- * This configuration is used when the file is opened.
+ * H5Pget_mdc_config gets the initial metadata cache configuration contained in a file access property
+ * list. This configuration is used when the file is opened.
*
* @param plist_id
* IN: Identifier of the file access property list.
@@ -8181,14 +8472,15 @@ public class H5 implements java.io.Serializable {
* @return A buffer(H5AC_cache_config_t) for the current metadata cache configuration information
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native H5AC_cache_config_t H5Pget_mdc_config(long plist_id) throws HDF5LibraryException;
+ public synchronized static native H5AC_cache_config_t H5Pget_mdc_config(long plist_id)
+ throws HDF5LibraryException;
/**
- * H5Pset_mdc_config sets the initial metadata cache configuration contained in a file access property list and
- * loads it into the instance of H5AC_cache_config_t pointed to by the config_ptr parameter. This configuration is
- * used when the file is opened.
+ * H5Pset_mdc_config sets the initial metadata cache configuration contained in a file access property
+ * list and loads it into the instance of H5AC_cache_config_t pointed to by the config_ptr parameter. This
+ * configuration is used when the file is opened.
*
* @param plist_id
* IN: Identifier of the file access property list.
@@ -8196,14 +8488,14 @@ public class H5 implements java.io.Serializable {
* IN: H5AC_cache_config_t, the initial metadata cache configuration.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native void H5Pset_mdc_config(long plist_id, H5AC_cache_config_t config_ptr)
- throws HDF5LibraryException;
+ throws HDF5LibraryException;
/**
- * H5Pget_gc_references Returns the current setting for the garbage collection references property from a file access
- * property list.
+ * H5Pget_gc_references Returns the current setting for the garbage collection references property from a
+ * file access property list.
*
* @param fapl_id
* IN File access property list
@@ -8211,13 +8503,13 @@ public class H5 implements java.io.Serializable {
* @return GC is on (true) or off (false)
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native boolean H5Pget_gc_references(long fapl_id) throws HDF5LibraryException;
/**
- * H5Pset_gc_references Sets the flag for garbage collecting references for the file. Default value for garbage
- * collecting references is off.
+ * H5Pset_gc_references Sets the flag for garbage collecting references for the file. Default value for
+ * garbage collecting references is off.
*
* @param fapl_id
* IN File access property list
@@ -8227,10 +8519,10 @@ public class H5 implements java.io.Serializable {
* @return non-negative if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Pset_gc_references(long fapl_id, boolean gc_ref)
- throws HDF5LibraryException;
+ throws HDF5LibraryException;
/**
* H5Pget_fclose_degree returns the degree for the file close behavior for a file access
@@ -8242,10 +8534,10 @@ public class H5 implements java.io.Serializable {
* @return the degree for the file close behavior
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native int H5Pget_fclose_degree(long fapl_id) throws HDF5LibraryException,
- NullPointerException;
+ public synchronized static native int H5Pget_fclose_degree(long fapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Pset_fclose_degree sets the degree for the file close behavior.
@@ -8258,10 +8550,10 @@ public class H5 implements java.io.Serializable {
* @return non-negative if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native int H5Pset_fclose_degree(long fapl_id, int degree) throws HDF5LibraryException,
- NullPointerException;
+ public synchronized static native int H5Pset_fclose_degree(long fapl_id, int degree)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Pget_meta_block_size the current metadata block size setting.
@@ -8272,7 +8564,7 @@ public class H5 implements java.io.Serializable {
* @return the minimum size, in bytes, of metadata block allocations.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
public synchronized static native long H5Pget_meta_block_size(long fapl_id) throws HDF5LibraryException;
@@ -8286,14 +8578,15 @@ public class H5 implements java.io.Serializable {
* IN: Minimum size, in bytes, of metadata block allocations.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
- public synchronized static native void H5Pset_meta_block_size(long fapl_id, long size) throws HDF5LibraryException;
+ public synchronized static native void H5Pset_meta_block_size(long fapl_id, long size)
+ throws HDF5LibraryException;
/**
* H5Pget_sieve_buf_size retrieves the current settings for the data sieve buffer size
- * property from a file access property list.
+ * property from a file access property list.
*
* @param fapl_id
* IN: Identifier for property list to query.
@@ -8301,7 +8594,7 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value and the size of the user block; if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native long H5Pget_sieve_buf_size(long fapl_id) throws HDF5LibraryException;
@@ -8323,12 +8616,14 @@ public class H5 implements java.io.Serializable {
* IN: maximum size of the data seive buffer.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native void H5Pset_sieve_buf_size(long fapl_id, long size) throws HDF5LibraryException;
+ public synchronized static native void H5Pset_sieve_buf_size(long fapl_id, long size)
+ throws HDF5LibraryException;
/**
- * H5Pget_small_data_block_size retrieves the size of a block of small data in a file creation property list.
+ * H5Pget_small_data_block_size retrieves the size of a block of small data in a file creation property
+ * list.
*
* @param plist
* IN: Identifier for property list to query.
@@ -8336,13 +8631,14 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value and the size of the user block; if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native long H5Pget_small_data_block_size(long plist) throws HDF5LibraryException;
+ public synchronized static native long H5Pget_small_data_block_size(long plist)
+ throws HDF5LibraryException;
/**
- * H5Pset_small_data_block_size reserves blocks of size bytes for the contiguous storage of the raw data portion of
- * small datasets.
+ * H5Pset_small_data_block_size reserves blocks of size bytes for the contiguous storage of the raw data
+ * portion of small datasets.
*
* @param plist
* IN: Identifier of property list to modify.
@@ -8352,14 +8648,14 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Pset_small_data_block_size(long plist, long size)
- throws HDF5LibraryException;
+ throws HDF5LibraryException;
/**
- * H5Pget_libver_bounds retrieves the lower and upper bounds on the HDF5 Library versions that indirectly determine
- * the object formats versions used when creating objects in the file.
+ * H5Pget_libver_bounds retrieves the lower and upper bounds on the HDF5 Library versions that indirectly
+ * determine the object formats versions used when creating objects in the file.
*
* @param fapl_id
* IN: File access property list identifier
@@ -8374,17 +8670,17 @@ public class H5 implements java.io.Serializable {
* @return Returns a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - size is null.
+ * size is null.
*
**/
- public synchronized static native int H5Pget_libver_bounds(long fapl_id, int[] libver) throws HDF5LibraryException,
- NullPointerException;
+ public synchronized static native int H5Pget_libver_bounds(long fapl_id, int[] libver)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Pset_libver_bounds Sets bounds on library versions, and indirectly format versions, to be used when creating
- * objects
+ * H5Pset_libver_bounds Sets bounds on library versions, and indirectly format versions, to be used when
+ * creating objects
*
* @param fapl_id
* IN: File access property list identifier
@@ -8397,13 +8693,13 @@ public class H5 implements java.io.Serializable {
* @return Returns a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception IllegalArgumentException
- * - Argument is Illegal
+ * Argument is Illegal
*
**/
public synchronized static native int H5Pset_libver_bounds(long fapl_id, int low, int high)
- throws HDF5LibraryException, IllegalArgumentException;
+ throws HDF5LibraryException, IllegalArgumentException;
/**
* H5Pget_elink_file_cache_size retrieves the size of the external link open file cache.
@@ -8414,13 +8710,15 @@ public class H5 implements java.io.Serializable {
* @return External link open file cache size in number of files.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
- public synchronized static native int H5Pget_elink_file_cache_size(long fapl_id) throws HDF5LibraryException;
+ public synchronized static native int H5Pget_elink_file_cache_size(long fapl_id)
+ throws HDF5LibraryException;
/**
- * H5Pset_elink_file_cache_size sets the number of files that can be held open in an external link open file cache.
+ * H5Pset_elink_file_cache_size sets the number of files that can be held open in an external link open
+ * file cache.
*
* @param fapl_id
* IN: File access property list identifier
@@ -8428,11 +8726,11 @@ public class H5 implements java.io.Serializable {
* IN: External link open file cache size in number of files.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
public synchronized static native void H5Pset_elink_file_cache_size(long fapl_id, int efc_size)
- throws HDF5LibraryException;
+ throws HDF5LibraryException;
/**
* H5Pset_mdc_log_options sets metadata cache logging options.
@@ -8447,13 +8745,14 @@ public class H5 implements java.io.Serializable {
* IN: Whether the logging begins as soon as the file is opened or created.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - location is null.
+ * location is null.
*
**/
- public synchronized static native void H5Pset_mdc_log_options(long fapl_id, boolean is_enabled, String location, boolean start_on_access)
- throws HDF5LibraryException, NullPointerException;
+ public synchronized static native void H5Pset_mdc_log_options(long fapl_id, boolean is_enabled,
+ String location, boolean start_on_access)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Pget_mdc_log_options gets metadata cache logging options.
@@ -8463,19 +8762,21 @@ public class H5 implements java.io.Serializable {
* @param mdc_log_options
* the options
* mdc_logging_options[0] = is_enabled, whether logging is enabled
- * mdc_logging_options[1] = start_on_access, whether the logging begins as soon as the file is opened or created
+ * mdc_logging_options[1] = start_on_access, whether the logging begins as soon as the file is
+ * opened or created
*
* @return the location of log in UTF-8/ASCII (file path/name) (On Windows, this must be ASCII).
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
public synchronized static native String H5Pget_mdc_log_options(long fapl_id, boolean[] mdc_log_options)
- throws HDF5LibraryException;
+ throws HDF5LibraryException;
/**
- * H5Pget_metadata_read_attempts retrieves the number of read attempts that is set in the file access property list plist_id.
+ * H5Pget_metadata_read_attempts retrieves the number of read attempts that is set in the file access
+ * property list plist_id.
*
* @param plist_id
* IN: File access property list identifier
@@ -8483,18 +8784,20 @@ public class H5 implements java.io.Serializable {
* @return The number of read attempts.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
- public synchronized static native long H5Pget_metadata_read_attempts(long plist_id) throws HDF5LibraryException;
+ public synchronized static native long H5Pget_metadata_read_attempts(long plist_id)
+ throws HDF5LibraryException;
/**
- * H5Pset_metadata_read_attempts sets the number of reads that the library will try when reading checksummed
- * metadata in an HDF5 file opened with SWMR access. When reading such metadata, the library will compare the
- * checksum computed for the metadata just read with the checksum stored within the piece of checksum. When
- * performing SWMR operations on a file, the checksum check might fail when the library reads data on a system
- * that is not atomic. To remedy such situations, the library will repeatedly read the piece of metadata until
- * the check passes or finally fails the read when the allowed number of attempts is reached.
+ * H5Pset_metadata_read_attempts sets the number of reads that the library will try when reading
+ * checksummed metadata in an HDF5 file opened with SWMR access. When reading such metadata, the library
+ * will compare the checksum computed for the metadata just read with the checksum stored within the piece
+ * of checksum. When performing SWMR operations on a file, the checksum check might fail when the library
+ * reads data on a system that is not atomic. To remedy such situations, the library will repeatedly read
+ * the piece of metadata until the check passes or finally fails the read when the allowed number of
+ * attempts is reached.
*
* @param plist_id
* IN: File access property list identifier
@@ -8502,15 +8805,15 @@ public class H5 implements java.io.Serializable {
* IN: The number of read attempts which is a value greater than 0.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
public synchronized static native void H5Pset_metadata_read_attempts(long plist_id, long attempts)
- throws HDF5LibraryException;
+ throws HDF5LibraryException;
/**
- * H5Pget_evict_on_close retrieves the file access property list setting that determines whether an HDF5 object
- * will be evicted from the library's metadata cache when it is closed.
+ * H5Pget_evict_on_close retrieves the file access property list setting that determines whether an HDF5
+ * object will be evicted from the library's metadata cache when it is closed.
*
* @param fapl_id
* IN: File access property list identifier
@@ -8518,14 +8821,14 @@ public class H5 implements java.io.Serializable {
* @return indication if the object will be evicted on close.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
- public synchronized static native boolean H5Pget_evict_on_close(long fapl_id)
- throws HDF5LibraryException;
+ public synchronized static native boolean H5Pget_evict_on_close(long fapl_id) throws HDF5LibraryException;
/**
- * H5Pset_evict_on_close controls the library's behavior of evicting metadata associated with a closed object.
+ * H5Pset_evict_on_close controls the library's behavior of evicting metadata associated with a closed
+ * object.
*
* @param fapl_id
* IN: File access property list identifier
@@ -8533,11 +8836,11 @@ public class H5 implements java.io.Serializable {
* IN: Whether the HDF5 object should be evicted on close.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
public synchronized static native void H5Pset_evict_on_close(long fapl_id, boolean evict_on_close)
- throws HDF5LibraryException;
+ throws HDF5LibraryException;
/**
* H5Pget_use_file_locking retrieves whether we are using file locking.
@@ -8548,11 +8851,11 @@ public class H5 implements java.io.Serializable {
* @return indication if file locking is used.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
public synchronized static native boolean H5Pget_use_file_locking(long fapl_id)
- throws HDF5LibraryException;
+ throws HDF5LibraryException;
/**
* H5Pget_use_file_locking retrieves whether we ignore file locks when they are disabled.
@@ -8563,11 +8866,11 @@ public class H5 implements java.io.Serializable {
* @return indication if file locking is ignored.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
public synchronized static native boolean H5Pget_ignore_disabled_file_locking(long fapl_id)
- throws HDF5LibraryException;
+ throws HDF5LibraryException;
/**
* H5Pset_file_locking sets parameters related to file locking.
@@ -8576,17 +8879,19 @@ public class H5 implements java.io.Serializable {
* IN: File access property list identifier
*
* @param use_file_locking
- * IN: Whether the library will use file locking when opening files (mainly for SWMR semantics).
+ * IN: Whether the library will use file locking when opening files (mainly for SWMR
+ *semantics).
*
* @param ignore_when_disabled
* IN: Whether file locking will be ignored when disabled on a file system (useful for Lustre).
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
- public synchronized static native void H5Pset_file_locking(long fapl_id, boolean use_file_locking, boolean ignore_when_disabled)
- throws HDF5LibraryException;
+ public synchronized static native void H5Pset_file_locking(long fapl_id, boolean use_file_locking,
+ boolean ignore_when_disabled)
+ throws HDF5LibraryException;
// ///// unimplemented /////
// herr_t H5Pset_vol(hid_t plist_id, hid_t new_vol_id, const void *new_vol_info);
@@ -8601,11 +8906,11 @@ public class H5 implements java.io.Serializable {
* @param plist
* IN: Identifier for property list to query.
*
- * @return the layout type of a dataset creation property list if successful. Otherwise returns H5D_LAYOUT_ERROR
- * (-1).
+ * @return the layout type of a dataset creation property list if successful. Otherwise returns
+ * H5D_LAYOUT_ERROR (-1).
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Pget_layout(long plist) throws HDF5LibraryException;
@@ -8620,7 +8925,7 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Pset_layout(long plist, int layout) throws HDF5LibraryException;
@@ -8637,14 +8942,14 @@ public class H5 implements java.io.Serializable {
* @return chunk dimensionality successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - dims array is null.
+ * dims array is null.
* @exception IllegalArgumentException
- * - max_ndims &lt;=0
+ * max_ndims &lt;=0
**/
public synchronized static native int H5Pget_chunk(long plist, int max_ndims, long[] dims)
- throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
* H5Pset_chunk sets the size of the chunks used to store a chunked layout dataset.
@@ -8659,14 +8964,14 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - dims array is null.
+ * dims array is null.
* @exception IllegalArgumentException
- * - dims &lt;=0
+ * dims &lt;=0
**/
- public synchronized static native int H5Pset_chunk(long plist, int ndims, byte[] dim) throws HDF5LibraryException,
- NullPointerException, IllegalArgumentException;
+ public synchronized static native int H5Pset_chunk(long plist, int ndims, byte[] dim)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
* H5Pset_chunk sets the size of the chunks used to store a chunked layout dataset.
@@ -8681,24 +8986,25 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5Exception
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - dims array is null.
+ * dims array is null.
* @exception IllegalArgumentException
- * - dims &lt;=0
+ * dims &lt;=0
**/
- public synchronized static int H5Pset_chunk(long plist, int ndims, long[] dim) throws HDF5Exception,
- NullPointerException, IllegalArgumentException {
+ public synchronized static int H5Pset_chunk(long plist, int ndims, long[] dim)
+ throws HDF5Exception, NullPointerException, IllegalArgumentException
+ {
if (dim == null) {
return -1;
}
HDFArray theArray = new HDFArray(dim);
- byte[] thedims = theArray.byteify();
+ byte[] thedims = theArray.byteify();
int retVal = H5Pset_chunk(plist, ndims, thedims);
- thedims = null;
+ thedims = null;
theArray = null;
return retVal;
}
@@ -8711,28 +9017,35 @@ public class H5 implements java.io.Serializable {
* and the name of the dataset, src_dset_name.
*
* @param dcpl_id
- * IN: The identifier of the dataset creation property list that will be used when creating the virtual dataset.
+ * IN: The identifier of the dataset creation property list that will be used when creating the
+ * virtual dataset.
* @param vspace_id
- * IN: The dataspace identifier with the selection within the virtual dataset applied, possibly an unlimited selection.
+ * IN: The dataspace identifier with the selection within the virtual dataset applied, possibly
+ * an unlimited selection.
* @param src_file_name
- * IN: The name of the HDF5 file where the source dataset is located. The file might not exist yet. The name can be specified using a C-style printf statement.
+ * IN: The name of the HDF5 file where the source dataset is located. The file might not exist
+ * yet. The name can be specified using a C-style printf statement.
* @param src_dset_name
- * IN: The path to the HDF5 dataset in the file specified by src_file_name. The dataset might not exist yet. The dataset name can be specified using a C-style printf statement.
+ * IN: The path to the HDF5 dataset in the file specified by src_file_name. The dataset might
+ * not exist yet. The dataset name can be specified using a C-style printf statement.
* @param src_space_id
- * IN: The source dataset dataspace identifier with a selection applied, possibly an unlimited selection.
+ * IN: The source dataset dataspace identifier with a selection applied, possibly an unlimited
+ * selection.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - an name string is null.
+ * an name string is null.
* @exception IllegalArgumentException
- * - An id is &lt;=0
+ * an id is &lt;=0
**/
- public synchronized static native void H5Pset_virtual(long dcpl_id, long vspace_id, String src_file_name, String src_dset_name, long src_space_id) throws HDF5LibraryException,
- NullPointerException, IllegalArgumentException;
+ public synchronized static native void H5Pset_virtual(long dcpl_id, long vspace_id, String src_file_name,
+ String src_dset_name, long src_space_id)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
- * H5Pget_virtual_count gets the number of mappings for a virtual dataset that has the creation property list specified by dcpl_id.
+ * H5Pget_virtual_count gets the number of mappings for a virtual dataset that has the creation property
+ * list specified by dcpl_id.
*
* @param dcpl_id
* IN: The identifier of the virtual dataset creation property list.
@@ -8740,15 +9053,17 @@ public class H5 implements java.io.Serializable {
* @return a non-negative number of mappings if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception IllegalArgumentException
- * - An id is &lt;=0
+ * An id is &lt;=0
**/
- public synchronized static native long H5Pget_virtual_count(long dcpl_id) throws HDF5LibraryException, IllegalArgumentException;
+ public synchronized static native long H5Pget_virtual_count(long dcpl_id)
+ throws HDF5LibraryException, IllegalArgumentException;
/**
- * H5Pget_virtual_vspace takes the dataset creation property list for the virtual dataset, dcpl_id, and the mapping index, index,
- * and returns a dataspace identifier for the selection within the virtual dataset used in the mapping.
+ * H5Pget_virtual_vspace takes the dataset creation property list for the virtual dataset, dcpl_id, and
+ * the mapping index, index, and returns a dataspace identifier for the selection within the virtual
+ * dataset used in the mapping.
*
* @param dcpl_id
* IN: The identifier of the virtual dataset creation property list.
@@ -8758,15 +9073,17 @@ public class H5 implements java.io.Serializable {
* @return a valid dataspace identifier if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception IllegalArgumentException
- * - An id is &lt;=0
+ * An id is &lt;=0
**/
- public synchronized static native long H5Pget_virtual_vspace(long dcpl_id, long index) throws HDF5LibraryException, IllegalArgumentException;
+ public synchronized static native long H5Pget_virtual_vspace(long dcpl_id, long index)
+ throws HDF5LibraryException, IllegalArgumentException;
/**
- * H5Pget_virtual_srcspace takes the dataset creation property list for the virtual dataset, dcpl_id, and the mapping index, index,
- * and returns a dataspace identifier for the selection within the source dataset used in the mapping.
+ * H5Pget_virtual_srcspace takes the dataset creation property list for the virtual dataset, dcpl_id, and
+ * the mapping index, index, and returns a dataspace identifier for the selection within the source
+ * dataset used in the mapping.
*
* @param dcpl_id
* IN: The identifier of the virtual dataset creation property list.
@@ -8776,15 +9093,17 @@ public class H5 implements java.io.Serializable {
* @return a valid dataspace identifier if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception IllegalArgumentException
- * - An id is &lt;=0
+ * An id is &lt;=0
**/
- public synchronized static native long H5Pget_virtual_srcspace(long dcpl_id, long index) throws HDF5LibraryException, IllegalArgumentException;
+ public synchronized static native long H5Pget_virtual_srcspace(long dcpl_id, long index)
+ throws HDF5LibraryException, IllegalArgumentException;
/**
- * H5Pget_virtual_filename takes the dataset creation property list for the virtual dataset, dcpl_id, the mapping index, index,
- * the size of the filename for a source dataset, size, and retrieves the name of the file for a source dataset used in the mapping.
+ * H5Pget_virtual_filename takes the dataset creation property list for the virtual dataset, dcpl_id, the
+ * mapping index, index, the size of the filename for a source dataset, size, and retrieves the name of
+ * the file for a source dataset used in the mapping.
*
* @param dcpl_id
* IN: The identifier of the virtual dataset creation property list.
@@ -8794,15 +9113,17 @@ public class H5 implements java.io.Serializable {
* @return the name of the file containing the source dataset if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception IllegalArgumentException
- * - An id is &lt;=0
+ * An id is &lt;=0
**/
- public synchronized static native String H5Pget_virtual_filename(long dcpl_id, long index) throws HDF5LibraryException, IllegalArgumentException;
+ public synchronized static native String H5Pget_virtual_filename(long dcpl_id, long index)
+ throws HDF5LibraryException, IllegalArgumentException;
/**
- * H5Pget_virtual_dsetname takes the dataset creation property list for the virtual dataset, dcpl_id, the mapping index, index, the
- * size of the dataset name for a source dataset, size, and retrieves the name of the source dataset used in the mapping.
+ * H5Pget_virtual_dsetname takes the dataset creation property list for the virtual dataset, dcpl_id, the
+ * mapping index, index, the size of the dataset name for a source dataset, size, and retrieves the name
+ * of the source dataset used in the mapping.
*
* @param dcpl_id
* IN: The identifier of the virtual dataset creation property list.
@@ -8812,41 +9133,44 @@ public class H5 implements java.io.Serializable {
* @return the name of the source dataset if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception IllegalArgumentException
- * - An id is &lt;=0
- **/
- public synchronized static native String H5Pget_virtual_dsetname(long dcpl_id, long index) throws HDF5LibraryException, IllegalArgumentException;
-
-// ///// unimplemented /////
-// /**
-// * H5Pget_vds_file_cache_size retrieves the size of the vds link open file cache.
-// *
-// * @param fapl_id
-// * IN: File access property list identifier
-// *
-// * @return VDS link open file cache size in number of files.
-// *
-// * @exception HDF5LibraryException
-// * - Error from the HDF-5 Library.
-// *
-// **/
-// public synchronized static native int H5Pget_vds_file_cache_size(long fapl_id) throws HDF5LibraryException;
-//
-// /**
-// * H5Pset_vds_file_cache_size sets the number of files that can be held open in an vds link open file cache.
-// *
-// * @param fapl_id
-// * IN: File access property list identifier
-// * @param efc_size
-// * IN: VDS link open file cache size in number of files.
-// *
-// * @exception HDF5LibraryException
-// * - Error from the HDF-5 Library.
-// *
-// **/
-// public synchronized static native void H5Pset_vds_file_cache_size(long fapl_id, int efc_size)
-// throws HDF5LibraryException;
+ * An id is &lt;=0
+ **/
+ public synchronized static native String H5Pget_virtual_dsetname(long dcpl_id, long index)
+ throws HDF5LibraryException, IllegalArgumentException;
+
+ // ///// unimplemented /////
+ // /**
+ // * H5Pget_vds_file_cache_size retrieves the size of the vds link open file cache.
+ // *
+ // * @param fapl_id
+ // * IN: File access property list identifier
+ // *
+ // * @return VDS link open file cache size in number of files.
+ // *
+ // * @exception HDF5LibraryException
+ // * Error from the HDF-5 Library.
+ // *
+ // **/
+ // public synchronized static native int H5Pget_vds_file_cache_size(long fapl_id) throws
+ // HDF5LibraryException;
+ //
+ // /**
+ // * H5Pset_vds_file_cache_size sets the number of files that can be held open in an vds link open
+ // * file cache.
+ // *
+ // * @param fapl_id
+ // * IN: File access property list identifier
+ // * @param efc_size
+ // * IN: VDS link open file cache size in number of files.
+ // *
+ // * @exception HDF5LibraryException
+ // * Error from the HDF-5 Library.
+ // *
+ // **/
+ // public synchronized static native void H5Pset_vds_file_cache_size(long fapl_id, int efc_size)
+ // throws HDF5LibraryException;
/**
* H5Pget_external returns information about an external file.
@@ -8871,20 +9195,21 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception ArrayIndexOutOfBoundsException
- * Fatal error on Copyback
+ * Fatal error on Copyback
* @exception ArrayStoreException
- * Fatal error on Copyback
+ * Fatal error on Copyback
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name or size is null.
+ * name or size is null.
* @exception IllegalArgumentException
- * - name_size &lt;= 0 .
+ * name_size &lt;= 0 .
*
**/
public synchronized static native int H5Pget_external(long plist, int idx, long name_size, String[] name,
- long[] size) throws ArrayIndexOutOfBoundsException, ArrayStoreException, HDF5LibraryException,
- NullPointerException, IllegalArgumentException;
+ long[] size)
+ throws ArrayIndexOutOfBoundsException, ArrayStoreException, HDF5LibraryException,
+ NullPointerException, IllegalArgumentException;
/**
* H5Pset_external adds an external file to the list of external files.
@@ -8894,20 +9219,20 @@ public class H5 implements java.io.Serializable {
* @param name
* IN: Name of an external file.
* @param offset
- * IN: Offset, in bytes, from the beginning of the file to the location in the file where the data
- * starts.
+ * IN: Offset, in bytes, from the beginning of the file to the location in the file where the
+ * data starts.
* @param size
* IN: Number of bytes reserved in the file for the data.
*
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
public synchronized static native int H5Pset_external(long plist, String name, long offset, long size)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Pget_external_count returns the number of external files for the specified dataset.
@@ -8918,7 +9243,7 @@ public class H5 implements java.io.Serializable {
* @return the number of external files if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Pget_external_count(long plist) throws HDF5LibraryException;
@@ -8935,11 +9260,11 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
public synchronized static native int H5Pset_szip(long plist, int options_mask, int pixels_per_block)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Pset_shuffle Sets up the use of the shuffle filter.
@@ -8950,11 +9275,11 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
- public synchronized static native int H5Pset_shuffle(long plist_id) throws HDF5LibraryException,
- NullPointerException;
+ public synchronized static native int H5Pset_shuffle(long plist_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Pset_nbit Sets up the use of the N-Bit filter.
@@ -8965,7 +9290,7 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
public synchronized static native int H5Pset_nbit(long plist_id) throws HDF5LibraryException;
@@ -8983,13 +9308,13 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception IllegalArgumentException
- * - Invalid arguments
+ * Invalid arguments
*
**/
public synchronized static native int H5Pset_scaleoffset(long plist_id, int scale_type, int scale_factor)
- throws HDF5LibraryException, IllegalArgumentException;
+ throws HDF5LibraryException, IllegalArgumentException;
/**
* H5Pget_fill_value queries the fill value property of a dataset creation property list.
@@ -9004,10 +9329,10 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5Exception
- * - Error converting data array.
+ * Error converting data array.
**/
public synchronized static native int H5Pget_fill_value(long plist_id, long type_id, byte[] value)
- throws HDF5Exception;
+ throws HDF5Exception;
/**
* H5Pget_fill_value queries the fill value property of a dataset creation property list.
@@ -9022,11 +9347,13 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5Exception
- * - Error converting data array.
+ * Error converting data array.
**/
- public synchronized static int H5Pget_fill_value(long plist_id, long type_id, Object obj) throws HDF5Exception {
+ public synchronized static int H5Pget_fill_value(long plist_id, long type_id, Object obj)
+ throws HDF5Exception
+ {
HDFArray theArray = new HDFArray(obj);
- byte[] buf = theArray.emptyBytes();
+ byte[] buf = theArray.emptyBytes();
int status = H5Pget_fill_value(plist_id, type_id, buf);
if (status >= 0) {
@@ -9049,10 +9376,10 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5Exception
- * - Error converting data array
+ * Error converting data array
**/
public synchronized static native int H5Pset_fill_value(long plist_id, long type_id, byte[] value)
- throws HDF5Exception;
+ throws HDF5Exception;
/**
* H5Pset_fill_value sets the fill value for a dataset creation property list.
@@ -9067,15 +9394,17 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5Exception
- * - Error converting data array
+ * Error converting data array
**/
- public synchronized static int H5Pset_fill_value(long plist_id, long type_id, Object obj) throws HDF5Exception {
+ public synchronized static int H5Pset_fill_value(long plist_id, long type_id, Object obj)
+ throws HDF5Exception
+ {
HDFArray theArray = new HDFArray(obj);
- byte[] buf = theArray.byteify();
+ byte[] buf = theArray.byteify();
int retVal = H5Pset_fill_value(plist_id, type_id, buf);
- buf = null;
+ buf = null;
theArray = null;
return retVal;
}
@@ -9095,10 +9424,10 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5Exception
- * - Error converting data array
+ * Error converting data array
**/
public synchronized static native int H5Pfill_value_defined(long plist_id, int[] status)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Pset_alloc_time Gets space allocation time for dataset during creation.
@@ -9111,11 +9440,11 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
public synchronized static native int H5Pget_alloc_time(long plist_id, int[] alloc_time)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Pset_alloc_time Sets space allocation time for dataset during creation.
@@ -9128,11 +9457,11 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
- public synchronized static native int H5Pset_alloc_time(long plist_id, int alloc_time) throws HDF5LibraryException,
- NullPointerException;
+ public synchronized static native int H5Pset_alloc_time(long plist_id, int alloc_time)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Pset_fill_time Gets fill value writing time.
@@ -9145,10 +9474,11 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
- public synchronized static native int H5Pget_fill_time(long plist_id, int[] fill_time) throws HDF5LibraryException;
+ public synchronized static native int H5Pget_fill_time(long plist_id, int[] fill_time)
+ throws HDF5LibraryException;
/**
* H5Pset_fill_time Sets the fill value writing time.
@@ -9161,10 +9491,11 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
- public synchronized static native int H5Pset_fill_time(long plist_id, int fill_time) throws HDF5LibraryException;
+ public synchronized static native int H5Pset_fill_time(long plist_id, int fill_time)
+ throws HDF5LibraryException;
/**
* H5Pset_chunk_opts Sets the edge chunk option in a dataset creation property list.
@@ -9177,12 +9508,13 @@ public class H5 implements java.io.Serializable {
* 0 - Disables option; partial edge chunks will be compressed.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library
+ * Error from the HDF-5 Library
**/
- public synchronized static native void H5Pset_chunk_opts(long dcpl_id, int opts) throws HDF5LibraryException;
+ public synchronized static native void H5Pset_chunk_opts(long dcpl_id, int opts)
+ throws HDF5LibraryException;
/**
- * H5Pget_chunk_opts retrieves the edge chunk option setting stored in the dataset creation property list .
+ * H5Pget_chunk_opts retrieves the edge chunk option setting stored in the dataset creation property list
*
* @param dcpl_id
* IN: Dataset creation property list
@@ -9190,13 +9522,14 @@ public class H5 implements java.io.Serializable {
* @return The edge chunk option setting.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library
- **/
+ * Error from the HDF-5 Library
+ *
+ */
public synchronized static native int H5Pget_chunk_opts(long dcpl_id) throws HDF5LibraryException;
/**
* H5Pget_dset_no_attrs_hint accesses the flag for whether or not datasets created by the given dcpl
- * will be created with a "minimized" object header.
+ * will be created with a "minimized" object header.
*
* @param dcpl_id
* IN: Dataset creation property list
@@ -9204,33 +9537,32 @@ public class H5 implements java.io.Serializable {
* @return true if the given dcpl is set to create minimized dataset object headers, false if not.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native boolean H5Pget_dset_no_attrs_hint(long dcpl_id)
- throws HDF5LibraryException;
-
+ throws HDF5LibraryException;
/**
* H5Pset_dset_no_attrs_hint sets the dcpl to minimize (or explicitly to not minimized) dataset object
- * headers upon creation.
+ * headers upon creation.
*
* @param dcpl_id
* IN: Dataset creation property list
*
* @param minimize
- * the minimize hint setting
+ * IN: the minimize hint setting
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native void H5Pset_dset_no_attrs_hint(long dcpl_id, boolean minimize)
- throws HDF5LibraryException;
+ throws HDF5LibraryException;
// /////// Dataset access property list (DAPL) routines ///////
/**
- * Retrieves the maximum possible number of elements in the meta data cache and the maximum possible number of bytes
- * and the RDCC_W0 value in the raw data chunk cache on a per-datset basis.
+ * Retrieves the maximum possible number of elements in the meta data cache and the maximum possible
+ * number of bytes and the RDCC_W0 value in the raw data chunk cache on a per-datset basis.
*
* @param dapl_id
* IN: Identifier of the dataset access property list.
@@ -9242,16 +9574,17 @@ public class H5 implements java.io.Serializable {
* IN/OUT: Preemption policy.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - an array is null.
+ * an array is null.
**/
- public synchronized static native void H5Pget_chunk_cache(long dapl_id, long[] rdcc_nslots, long[] rdcc_nbytes,
- double[] rdcc_w0) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native void H5Pget_chunk_cache(long dapl_id, long[] rdcc_nslots,
+ long[] rdcc_nbytes, double[] rdcc_w0)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Pset_chunk_cache sets the number of elements (objects) in the meta data cache and the total number of bytes in
- * the raw data chunk cache on a per-datset basis.
+ * H5Pset_chunk_cache sets the number of elements (objects) in the meta data cache and the total number of
+ * bytes in the raw data chunk cache on a per-datset basis.
*
* @param dapl_id
* IN: Identifier of the dataset access property list.
@@ -9263,10 +9596,11 @@ public class H5 implements java.io.Serializable {
* IN: Preemption policy.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native void H5Pset_chunk_cache(long dapl_id, long rdcc_nslots, long rdcc_nbytes,
- double rdcc_w0) throws HDF5LibraryException;
+ public synchronized static native void H5Pset_chunk_cache(long dapl_id, long rdcc_nslots,
+ long rdcc_nbytes, double rdcc_w0)
+ throws HDF5LibraryException;
/**
* H5Pset_virtual_view takes the access property list for the virtual dataset, dapl_id, and the flag,
@@ -9278,9 +9612,10 @@ public class H5 implements java.io.Serializable {
* IN: Flag specifying the extent of the data to be included in the view.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library
+ * Error from the HDF-5 Library
**/
- public synchronized static native void H5Pset_virtual_view(long dapl_id, int view) throws HDF5LibraryException;
+ public synchronized static native void H5Pset_virtual_view(long dapl_id, int view)
+ throws HDF5LibraryException;
/**
* H5Pget_virtual_view takes the virtual dataset access property list, dapl_id, and retrieves the flag,
@@ -9292,26 +9627,28 @@ public class H5 implements java.io.Serializable {
* @return The flag specifying the view of the virtual dataset.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library
- **/
+ * Error from the HDF-5 Library
+ *
+ */
public synchronized static native int H5Pget_virtual_view(long dapl_id) throws HDF5LibraryException;
/**
- * H5Pset_virtual_printf_gap sets the access property list for the virtual dataset, dapl_id, to instruct the
- * library to stop looking for the mapped data stored in the files and/or datasets with the printf-style names
- * after not finding gap_size files and/or datasets. The found source files and datasets will determine the
- * extent of the unlimited virtual dataset with the printf-style mappings.
+ * H5Pset_virtual_printf_gap sets the access property list for the virtual dataset, dapl_id, to instruct
+ * the library to stop looking for the mapped data stored in the files and/or datasets with the
+ * printf-style names after not finding gap_size files and/or datasets. The found source files and
+ * datasets will determine the extent of the unlimited virtual dataset with the printf-style mappings.
*
* @param dapl_id
* IN: Dataset access property list identifier for the virtual dataset
* @param gap_size
* IN: Maximum number of files and/or datasets allowed to be missing for determining
- * the extent of an unlimited virtual dataset with printf-style mappings.
+ * the extent of an unlimited virtual dataset with printf-style mappings.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library
+ * Error from the HDF-5 Library
**/
- public synchronized static native void H5Pset_virtual_printf_gap(long dapl_id, long gap_size) throws HDF5LibraryException;
+ public synchronized static native void H5Pset_virtual_printf_gap(long dapl_id, long gap_size)
+ throws HDF5LibraryException;
/**
* H5Pget_virtual_printf_gap returns the maximum number of missing printf-style files and/or datasets for
@@ -9325,9 +9662,11 @@ public class H5 implements java.io.Serializable {
* the extent of an unlimited virtual dataset with printf-style mappings.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library
- **/
- public synchronized static native long H5Pget_virtual_printf_gap(long dapl_id) throws HDF5LibraryException;
+ * Error from the HDF-5 Library
+ *
+ */
+ public synchronized static native long H5Pget_virtual_printf_gap(long dapl_id)
+ throws HDF5LibraryException;
/**
* H5Pget_virtual_prefix Retrieves prefix applied to virtual file paths.
@@ -9338,11 +9677,10 @@ public class H5 implements java.io.Serializable {
* @return the prefix to be applied to virtual file paths.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
- public synchronized static native String H5Pget_virtual_prefix(long dapl_id)
- throws HDF5LibraryException;
+ public synchronized static native String H5Pget_virtual_prefix(long dapl_id) throws HDF5LibraryException;
/**
* H5Pset_virtual_prefix Sets prefix to be applied to virtual file paths.
@@ -9353,13 +9691,13 @@ public class H5 implements java.io.Serializable {
* IN: Prefix to be applied to virtual file paths
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - prefix is null.
+ * prefix is null.
*
**/
public synchronized static native void H5Pset_virtual_prefix(long dapl_id, String prefix)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Pget_efile_prefix Retrieves prefix applied to external file paths.
@@ -9370,11 +9708,10 @@ public class H5 implements java.io.Serializable {
* @return the prefix to be applied to external file paths.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
- public synchronized static native String H5Pget_efile_prefix(long dapl_id)
- throws HDF5LibraryException;
+ public synchronized static native String H5Pget_efile_prefix(long dapl_id) throws HDF5LibraryException;
/**
* H5Pset_efile_prefix Sets prefix to be applied to external file paths.
@@ -9385,24 +9722,25 @@ public class H5 implements java.io.Serializable {
* IN: Prefix to be applied to external file paths
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - prefix is null.
+ * prefix is null.
*
**/
public synchronized static native void H5Pset_efile_prefix(long dapl_id, String prefix)
- throws HDF5LibraryException, NullPointerException;
-
- // public synchronized static native void H5Pset_append_flush(long plist_id, int ndims, long[] boundary, H5D_append_cb func, H5D_append_t udata) throws HDF5LibraryException;
+ throws HDF5LibraryException, NullPointerException;
- // public synchronized static native void H5Pget_append_flush(long plist_id, int dims, long[] boundary, H5D_append_cb func, H5D_append_t udata) throws HDF5LibraryException;
+ // public synchronized static native void H5Pset_append_flush(long plist_id, int ndims, long[] boundary,
+ // H5D_append_cb func, H5D_append_t udata) throws HDF5LibraryException;
+ // public synchronized static native void H5Pget_append_flush(long plist_id, int dims, long[] boundary,
+ // H5D_append_cb func, H5D_append_t udata) throws HDF5LibraryException;
// /////// Dataset xfer property list (DXPL) routines ///////
/**
- * H5Pget_data_transform retrieves the data transform expression previously set in the dataset transfer property
- * list plist_id by H5Pset_data_transform.
+ * H5Pget_data_transform retrieves the data transform expression previously set in the dataset transfer
+ * property list plist_id by H5Pset_data_transform.
*
* @param plist_id
* IN: Identifier of the property list or class
@@ -9411,18 +9749,19 @@ public class H5 implements java.io.Serializable {
* @param expression
* OUT: A data transform expression
*
- * @return The size of the transform expression if successful; 0(zero) if no transform expression exists. Otherwise
- * returns a negative value.
+ * @return The size of the transform expression if successful; 0(zero) if no transform expression exists.
+ * Otherwise returns a negative value.
*
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception IllegalArgumentException
- * - Size is &lt;= 0.
+ * Size is &lt;= 0.
*
**/
- public synchronized static native long H5Pget_data_transform(long plist_id, String[] expression, long size)
- throws HDF5LibraryException, IllegalArgumentException;
+ public synchronized static native long H5Pget_data_transform(long plist_id, String[] expression,
+ long size)
+ throws HDF5LibraryException, IllegalArgumentException;
/**
* H5Pset_data_transform sets a data transform expression
@@ -9435,17 +9774,17 @@ public class H5 implements java.io.Serializable {
* @return a non-negative valule if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - expression is null.
+ * expression is null.
*
**/
public synchronized static native int H5Pset_data_transform(long plist_id, String expression)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
- * HH5Pget_buffer gets type conversion and background buffers. Returns buffer size, in bytes, if successful;
- * otherwise 0 on failure.
+ * HH5Pget_buffer gets type conversion and background buffers. Returns buffer size, in bytes, if
+ * successful; otherwise 0 on failure.
*
* @param plist
* Identifier for the dataset transfer property list.
@@ -9457,12 +9796,12 @@ public class H5 implements java.io.Serializable {
* @return buffer size, in bytes, if successful; otherwise 0 on failure
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception IllegalArgumentException
- * - plist is invalid.
+ * plist is invalid.
**/
public synchronized static native int H5Pget_buffer(long plist, byte[] tconv, byte[] bkg)
- throws HDF5LibraryException, IllegalArgumentException;
+ throws HDF5LibraryException, IllegalArgumentException;
/**
* H5Pget_buffer_size gets type conversion and background buffer size, in bytes, if successful;
@@ -9474,26 +9813,27 @@ public class H5 implements java.io.Serializable {
* @return buffer size, in bytes, if successful; otherwise 0 on failure
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception IllegalArgumentException
- * - plist is invalid.
+ * plist is invalid.
**/
public synchronized static native long H5Pget_buffer_size(long plist)
- throws HDF5LibraryException, IllegalArgumentException;
+ throws HDF5LibraryException, IllegalArgumentException;
/**
* H5Pset_buffer sets type conversion and background buffers. status to TRUE or FALSE.
*
- * Given a dataset transfer property list, H5Pset_buffer sets the maximum size for the type conversion buffer and
- * background buffer and optionally supplies pointers to application-allocated buffers. If the buffer size is
- * smaller than the entire amount of data being transferred between the application and the file, and a type
- * conversion buffer or background buffer is required, then strip mining will be used.
+ * Given a dataset transfer property list, H5Pset_buffer sets the maximum size for the type conversion
+ * buffer and background buffer and optionally supplies pointers to application-allocated buffers. If the
+ * buffer size is smaller than the entire amount of data being transferred between the application and the
+ * file, and a type conversion buffer or background buffer is required, then strip mining will be used.
*
- * Note that there are minimum size requirements for the buffer. Strip mining can only break the data up along the
- * first dimension, so the buffer must be large enough to accommodate a complete slice that encompasses all of the
- * remaining dimensions. For example, when strip mining a 100x200x300 hyperslab of a simple data space, the buffer
- * must be large enough to hold 1x200x300 data elements. When strip mining a 100x200x300x150 hyperslab of a simple
- * data space, the buffer must be large enough to hold 1x200x300x150 data elements.
+ * Note that there are minimum size requirements for the buffer. Strip mining can only break the data up
+ * along the first dimension, so the buffer must be large enough to accommodate a complete slice that
+ * encompasses all of the remaining dimensions. For example, when strip mining a 100x200x300 hyperslab of
+ * a simple data space, the buffer must be large enough to hold 1x200x300 data elements. When strip mining
+ * a 100x200x300x150 hyperslab of a simple data space, the buffer must be large enough to hold
+ * 1x200x300x150 data elements.
*
* @param plist
* Identifier for the dataset transfer property list.
@@ -9501,12 +9841,12 @@ public class H5 implements java.io.Serializable {
* Size, in bytes, of the type conversion and background buffers.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception IllegalArgumentException
- * - plist is invalid.
+ * plist is invalid.
**/
- public synchronized static native void H5Pset_buffer_size(long plist, long size) throws HDF5LibraryException,
- IllegalArgumentException;
+ public synchronized static native void H5Pset_buffer_size(long plist, long size)
+ throws HDF5LibraryException, IllegalArgumentException;
/**
* H5Pget_edc_check gets the error-detecting algorithm in use.
@@ -9517,7 +9857,7 @@ public class H5 implements java.io.Serializable {
* @return the error-detecting algorithm
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Pget_edc_check(long plist) throws HDF5LibraryException;
@@ -9532,7 +9872,7 @@ public class H5 implements java.io.Serializable {
* @return non-negative if succeed
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Pset_edc_check(long plist, int check) throws HDF5LibraryException;
@@ -9551,16 +9891,17 @@ public class H5 implements java.io.Serializable {
* @return non-negative if succeed
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - an input array is null.
+ * an input array is null.
**/
public synchronized static native int H5Pget_btree_ratios(long plist_id, double[] left, double[] middle,
- double[] right) throws HDF5LibraryException, NullPointerException;
+ double[] right)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Pset_btree_ratio Sets B-tree split ratios for a dataset transfer property list. The split ratios determine what
- * percent of children go in the first node when a node splits.
+ * H5Pset_btree_ratio Sets B-tree split ratios for a dataset transfer property list. The split ratios
+ * determine what percent of children go in the first node when a node splits.
*
* @param plist_id
* IN Dataset transfer property list
@@ -9574,10 +9915,10 @@ public class H5 implements java.io.Serializable {
* @return non-negative if succeed
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native int H5Pset_btree_ratios(long plist_id, double left, double middle, double right)
- throws HDF5LibraryException;
+ public synchronized static native int H5Pset_btree_ratios(long plist_id, double left, double middle,
+ double right) throws HDF5LibraryException;
/**
* H5Pget_hyper_vector_size reads values previously set with H5Pset_hyper_vector_size.
@@ -9590,11 +9931,11 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
public synchronized static native int H5Pget_hyper_vector_size(long dxpl_id, long[] vector_size)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Pset_hyper_vector_size sets the number of
@@ -9604,7 +9945,7 @@ public class H5 implements java.io.Serializable {
* Increasing the number should give better performance, but use
* more memory during hyperslab I/O. The vector size must be
* greater than 1.
- *,p.
+ *<p>
* The default is to use 1024 vectors for I/O during hyperslab
* reading/writing.
*
@@ -9616,17 +9957,17 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
public synchronized static native int H5Pset_hyper_vector_size(long dxpl_id, long vector_size)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
// /////// Link creation property list (LCPL) routines ///////
/**
- * H5Pget_create_intermediate_group determines whether property is set to enable creating missing intermediate
- * groups.
+ * H5Pget_create_intermediate_group determines whether property is set to enable creating missing
+ * intermediate groups.
*
* @param lcpl_id
* IN: Link creation property list identifier
@@ -9634,14 +9975,15 @@ public class H5 implements java.io.Serializable {
* @return Boolean true or false
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
public synchronized static native boolean H5Pget_create_intermediate_group(long lcpl_id)
- throws HDF5LibraryException;
+ throws HDF5LibraryException;
/**
- * H5Pset_create_intermediate_group specifies in property list whether to create missing intermediate groups
+ * H5Pset_create_intermediate_group specifies in property list whether to create missing intermediate
+ * groups
*
* @param lcpl_id
* IN: Link creation property list identifier
@@ -9651,11 +9993,12 @@ public class H5 implements java.io.Serializable {
* @return a non-negative valule if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
- public synchronized static native int H5Pset_create_intermediate_group(long lcpl_id, boolean crt_intermed_group)
- throws HDF5LibraryException;
+ public synchronized static native int H5Pset_create_intermediate_group(long lcpl_id,
+ boolean crt_intermed_group)
+ throws HDF5LibraryException;
// /////// Group creation property list (GCPL) routines ///////
@@ -9668,10 +10011,11 @@ public class H5 implements java.io.Serializable {
* @return size_hint, the anticipated size of local heap
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
- public synchronized static native long H5Pget_local_heap_size_hint(long gcpl_id) throws HDF5LibraryException;
+ public synchronized static native long H5Pget_local_heap_size_hint(long gcpl_id)
+ throws HDF5LibraryException;
/**
* H5Pset_local_heap_size_hint Specifies the anticipated maximum size of a local heap.
@@ -9684,11 +10028,11 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
public synchronized static native int H5Pset_local_heap_size_hint(long gcpl_id, long size_hint)
- throws HDF5LibraryException;
+ throws HDF5LibraryException;
/**
* H5Pget_link_phase_change Queries the settings for conversion between compact and dense groups.
@@ -9696,7 +10040,8 @@ public class H5 implements java.io.Serializable {
* @param gcpl_id
* IN: Group creation property list identifier
* @param links
- * The max. no. of compact links &amp; the min. no. of dense links, which are used for storing groups
+ * The max. no. of compact links &amp; the min. no. of dense links, which are used for storing
+ * groups
*
* <pre>
* links[0] = The maximum number of links for compact storage
@@ -9706,13 +10051,13 @@ public class H5 implements java.io.Serializable {
* @return Returns a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - size is null.
+ * size is null.
*
**/
public synchronized static native int H5Pget_link_phase_change(long gcpl_id, int[] links)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Pset_link_phase_change Sets the parameters for conversion between compact and dense groups.
@@ -9727,13 +10072,14 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception IllegalArgumentException
- * - Invalid values of max_compact and min_dense.
+ * Invalid values of max_compact and min_dense.
*
**/
- public synchronized static native int H5Pset_link_phase_change(long gcpl_id, int max_compact, int min_dense)
- throws HDF5LibraryException, IllegalArgumentException;
+ public synchronized static native int H5Pset_link_phase_change(long gcpl_id, int max_compact,
+ int min_dense)
+ throws HDF5LibraryException, IllegalArgumentException;
/**
* H5Pget_est_link_info Queries data required to estimate required local heap or object header size.
@@ -9741,7 +10087,8 @@ public class H5 implements java.io.Serializable {
* @param gcpl_id
* IN: Group creation property list identifier
* @param link_info
- * Estimated number of links to be inserted into group And the estimated average length of link names
+ * Estimated number of links to be inserted into group And the estimated average length of link
+ * names
*
* <pre>
* link_info[0] = Estimated number of links to be inserted into group
@@ -9751,13 +10098,13 @@ public class H5 implements java.io.Serializable {
* @return Returns a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - link_info is null.
+ * link_info is null.
*
**/
public synchronized static native int H5Pget_est_link_info(long gcpl_id, int[] link_info)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Pset_est_link_info Sets estimated number of links and length of link names in a group.
@@ -9772,17 +10119,18 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception IllegalArgumentException
- * - Invalid values to est_num_entries and est_name_len.
+ * Invalid values to est_num_entries and est_name_len.
*
**/
- public synchronized static native int H5Pset_est_link_info(long gcpl_id, int est_num_entries, int est_name_len)
- throws HDF5LibraryException, IllegalArgumentException;
+ public synchronized static native int H5Pset_est_link_info(long gcpl_id, int est_num_entries,
+ int est_name_len)
+ throws HDF5LibraryException, IllegalArgumentException;
/**
- * H5Pget_link_creation_order queries the group creation property list, gcpl_id, and returns a flag indicating
- * whether link creation order is tracked and/or indexed in a group.
+ * H5Pget_link_creation_order queries the group creation property list, gcpl_id, and returns a flag
+ * indicating whether link creation order is tracked and/or indexed in a group.
*
* @param gcpl_id
* IN: Group creation property list identifier
@@ -9790,14 +10138,15 @@ public class H5 implements java.io.Serializable {
* @return crt_order_flags -Creation order flag(s)
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
- public synchronized static native int H5Pget_link_creation_order(long gcpl_id) throws HDF5LibraryException;
+ public synchronized static native int H5Pget_link_creation_order(long gcpl_id)
+ throws HDF5LibraryException;
/**
- * H5Pset_link_creation_order Sets flags in a group creation property list, gcpl_id, for tracking and/or indexing
- * links on creation order.
+ * H5Pset_link_creation_order Sets flags in a group creation property list, gcpl_id, for tracking and/or
+ * indexing links on creation order.
*
* @param gcpl_id
* IN: Group creation property list identifier
@@ -9808,11 +10157,11 @@ public class H5 implements java.io.Serializable {
* @return Returns a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
public synchronized static native int H5Pset_link_creation_order(long gcpl_id, int crt_order_flags)
- throws HDF5LibraryException;
+ throws HDF5LibraryException;
// /////// String creation property list (STRCPL) routines ///////
@@ -9825,7 +10174,7 @@ public class H5 implements java.io.Serializable {
* @return Returns the character encoding of the string.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
public synchronized static native int H5Pget_char_encoding(long plist_id) throws HDF5LibraryException;
@@ -9839,18 +10188,18 @@ public class H5 implements java.io.Serializable {
* IN: the character encoding of the string
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
public synchronized static native void H5Pset_char_encoding(long plist_id, int encoding)
- throws HDF5LibraryException;
+ throws HDF5LibraryException;
// /////// Link access property list (LAPL) routines ///////
/**
- * H5Pget_nlinks retrieves the maximum number of soft or user-defined link traversals allowed, nlinks, before the
- * library assumes it has found a cycle and aborts the traversal. This value is retrieved from the link access
- * property list lapl_id.
+ * H5Pget_nlinks retrieves the maximum number of soft or user-defined link traversals allowed, nlinks,
+ * before the library assumes it has found a cycle and aborts the traversal. This value is retrieved from
+ * the link access property list lapl_id.
*
* @param lapl_id
* IN: File access property list identifier
@@ -9858,15 +10207,15 @@ public class H5 implements java.io.Serializable {
* @return Returns a Maximum number of links to traverse.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
public synchronized static native long H5Pget_nlinks(long lapl_id) throws HDF5LibraryException;
/**
- * H5Pset_nlinks sets the maximum number of soft or user-defined link traversals allowed, nlinks, before the library
- * assumes it has found a cycle and aborts the traversal. This value is set in the link access property list
- * lapl_id.
+ * H5Pset_nlinks sets the maximum number of soft or user-defined link traversals allowed, nlinks, before
+ * the library assumes it has found a cycle and aborts the traversal. This value is set in the link access
+ * property list lapl_id.
*
* @param lapl_id
* IN: File access property list identifier
@@ -9876,13 +10225,13 @@ public class H5 implements java.io.Serializable {
* @return Returns a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception IllegalArgumentException
- * - Argument is Illegal
+ * Argument is Illegal
*
**/
- public synchronized static native int H5Pset_nlinks(long lapl_id, long nlinks) throws HDF5LibraryException,
- IllegalArgumentException;
+ public synchronized static native int H5Pset_nlinks(long lapl_id, long nlinks)
+ throws HDF5LibraryException, IllegalArgumentException;
/**
* H5Pget_elink_prefix Retrieves prefix applied to external link paths.
@@ -9892,17 +10241,17 @@ public class H5 implements java.io.Serializable {
* @param prefix
* OUT: Prefix applied to external link paths
*
- * @return If successful, returns a non-negative value specifying the size in bytes of the prefix without the NULL
- * terminator; otherwise returns a negative value.
+ * @return If successful, returns a non-negative value specifying the size in bytes of the prefix without
+ * the NULL terminator; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - prefix is null.
+ * prefix is null.
*
**/
public synchronized static native long H5Pget_elink_prefix(long lapl_id, String[] prefix)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Pset_elink_prefix Sets prefix to be applied to external link paths.
@@ -9915,17 +10264,17 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - prefix is null.
+ * prefix is null.
*
**/
- public synchronized static native int H5Pset_elink_prefix(long lapl_id, String prefix) throws HDF5LibraryException,
- NullPointerException;
+ public synchronized static native int H5Pset_elink_prefix(long lapl_id, String prefix)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Pget_elink_fapl Retrieves the file access property list identifier associated with the link access property
- * list.
+ * H5Pget_elink_fapl Retrieves the file access property list identifier associated with the link access
+ * property list.
*
* @param lapl_id
* IN: Link access property list identifier
@@ -9933,10 +10282,11 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
- public static long H5Pget_elink_fapl(long lapl_id) throws HDF5LibraryException {
+ public static long H5Pget_elink_fapl(long lapl_id) throws HDF5LibraryException
+ {
long id = _H5Pget_elink_fapl(lapl_id);
if (id > 0) {
log.trace("OPEN_IDS: H5Pget_elink_fapl add {}", id);
@@ -9949,7 +10299,8 @@ public class H5 implements java.io.Serializable {
private synchronized static native long _H5Pget_elink_fapl(long lapl_id) throws HDF5LibraryException;
/**
- * H5Pset_elink_fapl sets a file access property list for use in accessing a file pointed to by an external link.
+ * H5Pset_elink_fapl sets a file access property list for use in accessing a file pointed to by an
+ * external link.
*
* @param lapl_id
* IN: Link access property list identifier
@@ -9959,14 +10310,15 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
- public synchronized static native int H5Pset_elink_fapl(long lapl_id, long fapl_id) throws HDF5LibraryException;
+ public synchronized static native int H5Pset_elink_fapl(long lapl_id, long fapl_id)
+ throws HDF5LibraryException;
/**
- * H5Pget_elink_acc_flags retrieves the external link traversal file access flag from the specified link access
- * property list.
+ * H5Pget_elink_acc_flags retrieves the external link traversal file access flag from the specified link
+ * access property list.
*
* @param lapl_id
* IN: Link access property list identifier
@@ -9974,13 +10326,14 @@ public class H5 implements java.io.Serializable {
* @return File access flag for link traversal.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
public synchronized static native int H5Pget_elink_acc_flags(long lapl_id) throws HDF5LibraryException;
/**
- * H5Pset_elink_acc_flags Sets the external link traversal file access flag in a link access property list.
+ * H5Pset_elink_acc_flags Sets the external link traversal file access flag in a link access property
+ * list.
*
* @param lapl_id
* IN: Link access property list identifier
@@ -9990,13 +10343,13 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception IllegalArgumentException
- * - Invalid Flag values.
+ * Invalid Flag values.
*
**/
- public synchronized static native int H5Pset_elink_acc_flags(long lapl_id, int flags) throws HDF5LibraryException,
- IllegalArgumentException;
+ public synchronized static native int H5Pset_elink_acc_flags(long lapl_id, int flags)
+ throws HDF5LibraryException, IllegalArgumentException;
// /////// Object copy property list (OCPYPL) routines ///////
@@ -10009,7 +10362,7 @@ public class H5 implements java.io.Serializable {
* @return Copy option(s) set in the object copy property list
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
public synchronized static native int H5Pget_copy_object(long ocp_plist_id) throws HDF5LibraryException;
@@ -10023,11 +10376,11 @@ public class H5 implements java.io.Serializable {
* IN: Copy option(s) to be set
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
public synchronized static native void H5Pset_copy_object(long ocp_plist_id, int copy_options)
- throws HDF5LibraryException;
+ throws HDF5LibraryException;
// /////// file drivers property list routines ///////
@@ -10042,11 +10395,12 @@ public class H5 implements java.io.Serializable {
* OUT: write to file name on flush setting
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
- public synchronized static native void H5Pget_fapl_core(long fapl_id, long[] increment, boolean[] backing_store)
- throws HDF5LibraryException, NullPointerException;
+ public synchronized static native void H5Pget_fapl_core(long fapl_id, long[] increment,
+ boolean[] backing_store)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Pset_fapl_core modifies the file access property list to use the H5FD_CORE driver.
@@ -10061,11 +10415,12 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
- public synchronized static native int H5Pset_fapl_core(long fapl_id, long increment, boolean backing_store)
- throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Pset_fapl_core(long fapl_id, long increment,
+ boolean backing_store)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Pget_fapl_direct queries properties set by the H5Pset_fapl_direct.
@@ -10080,10 +10435,11 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
- public synchronized static native int H5Pget_fapl_direct(long fapl_id, long[] info) throws HDF5LibraryException;
+ public synchronized static native int H5Pget_fapl_direct(long fapl_id, long[] info)
+ throws HDF5LibraryException;
/**
* H5Pset_fapl_direct Sets up use of the direct I/O driver.
@@ -10100,11 +10456,11 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
public synchronized static native int H5Pset_fapl_direct(long fapl_id, long alignment, long block_size,
- long cbuf_size) throws HDF5LibraryException;
+ long cbuf_size) throws HDF5LibraryException;
/**
* H5Pget_fapl_family Returns information about the family file access property list.
@@ -10119,11 +10475,12 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
- public synchronized static native int H5Pget_fapl_family(long fapl_id, long[] memb_size, long[] memb_fapl_id)
- throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Pget_fapl_family(long fapl_id, long[] memb_size,
+ long[] memb_fapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Pset_fapl_family Sets up use of the direct I/O driver.
@@ -10138,11 +10495,11 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
public synchronized static native int H5Pset_fapl_family(long fapl_id, long memb_size, long memb_fapl_id)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Pset_fapl_hdfs Modify the file access property list to use the H5FD_HDFS driver.
@@ -10155,10 +10512,11 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
- public synchronized static native int H5Pset_fapl_hdfs(long fapl_id, H5FD_hdfs_fapl_t fapl_conf) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Pset_fapl_hdfs(long fapl_id, H5FD_hdfs_fapl_t fapl_conf)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Pget_fapl_hdfs gets the properties hdfs I/O driver.
@@ -10169,10 +10527,11 @@ public class H5 implements java.io.Serializable {
* @return the properties of the hdfs driver.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
- public synchronized static native H5FD_hdfs_fapl_t H5Pget_fapl_hdfs(long fapl_id) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native H5FD_hdfs_fapl_t H5Pget_fapl_hdfs(long fapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Pget_fapl_multi Sets up use of the multi I/O driver.
@@ -10186,19 +10545,21 @@ public class H5 implements java.io.Serializable {
* @param memb_name
* IN: Name generator for names of member files.
* @param memb_addr
- * IN: The offsets within the virtual address space, from 0 (zero) to HADDR_MAX, at which each type of
- * data storage begins.
+ * IN: The offsets within the virtual address space, from 0 (zero) to HADDR_MAX, at which each
+ * type of data storage begins.
*
* @return a boolean value; Allows read-only access to incomplete file sets when TRUE.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - an array is null.
+ * an array is null.
*
**/
- public synchronized static native boolean H5Pget_fapl_multi(long fapl_id, int[] memb_map, long[] memb_fapl,
- String[] memb_name, long[] memb_addr) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native boolean H5Pget_fapl_multi(long fapl_id, int[] memb_map,
+ long[] memb_fapl, String[] memb_name,
+ long[] memb_addr)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Pset_fapl_multi Sets up use of the multi I/O driver.
@@ -10212,25 +10573,27 @@ public class H5 implements java.io.Serializable {
* @param memb_name
* IN: Name generator for names of member files.
* @param memb_addr
- * IN: The offsets within the virtual address space, from 0 (zero) to HADDR_MAX, at which each type of
- * data storage begins.
+ * IN: The offsets within the virtual address space, from 0 (zero) to HADDR_MAX, at which each
+ * type of data storage begins.
* @param relax
* IN: Allows read-only access to incomplete file sets when TRUE.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - an array is null.
+ * an array is null.
*
**/
public synchronized static native void H5Pset_fapl_multi(long fapl_id, int[] memb_map, long[] memb_fapl,
- String[] memb_name, long[] memb_addr, boolean relax) throws HDF5LibraryException, NullPointerException;
-
+ String[] memb_name, long[] memb_addr,
+ boolean relax)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Pset_fapl_log Sets up the logging virtual file driver (H5FD_LOG) for use. H5Pset_fapl_log modifies the file
- * access property list to use the logging driver, H5FD_LOG. The logging virtual file driver (VFD) is a clone of the
- * standard SEC2 (H5FD_SEC2) driver with additional facilities for logging VFD metrics and activity to a file.
+ * H5Pset_fapl_log Sets up the logging virtual file driver (H5FD_LOG) for use. H5Pset_fapl_log modifies
+ * the file access property list to use the logging driver, H5FD_LOG. The logging virtual file driver
+ * (VFD) is a clone of the standard SEC2 (H5FD_SEC2) driver with additional facilities for logging VFD
+ * metrics and activity to a file.
*
* @param fapl_id
* IN: File access property list identifier.
@@ -10242,12 +10605,13 @@ public class H5 implements java.io.Serializable {
* IN: The size of the logging buffers, in bytes.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - logfile is null.
+ * logfile is null.
**/
- public synchronized static native void H5Pset_fapl_log(long fapl_id, String logfile, long flags, long buf_size)
- throws HDF5LibraryException, NullPointerException;
+ public synchronized static native void H5Pset_fapl_log(long fapl_id, String logfile, long flags,
+ long buf_size)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Pset_fapl_sec2 Sets up use of the sec2 I/O driver.
@@ -10258,10 +10622,11 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
- public synchronized static native int H5Pset_fapl_sec2(long fapl_id) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Pset_fapl_sec2(long fapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Pset_fapl_split Sets up use of the split I/O driver. Makes the multi driver act like the
@@ -10280,11 +10645,12 @@ public class H5 implements java.io.Serializable {
* IN: File access property list identifier raw data
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
- public synchronized static native void H5Pset_fapl_split(long fapl_id, String meta_ext, long meta_plist_id,
- String raw_ext, long raw_plist_id) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native void
+ H5Pset_fapl_split(long fapl_id, String meta_ext, long meta_plist_id, String raw_ext, long raw_plist_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Pset_fapl_stdio Sets up use of the stdio I/O driver.
@@ -10295,10 +10661,11 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
- public synchronized static native int H5Pset_fapl_stdio(long fapl_id) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Pset_fapl_stdio(long fapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Pset_fapl_windows Sets up use of the windows I/O driver.
@@ -10309,10 +10676,11 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
- public synchronized static native int H5Pset_fapl_windows(long fapl_id) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Pset_fapl_windows(long fapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Pset_fapl_ros3 Modify the file access property list to use the H5FD_ROS3 driver.
@@ -10325,10 +10693,11 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful; otherwise returns a negative value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
- public synchronized static native int H5Pset_fapl_ros3(long fapl_id, H5FD_ros3_fapl_t fapl_conf) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Pset_fapl_ros3(long fapl_id, H5FD_ros3_fapl_t fapl_conf)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Pget_fapl_ros3 gets the properties of the ros3 I/O driver.
@@ -10339,10 +10708,11 @@ public class H5 implements java.io.Serializable {
* @return the properties of the ros3 driver.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
*
**/
- public synchronized static native H5FD_ros3_fapl_t H5Pget_fapl_ros3(long fapl_id) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native H5FD_ros3_fapl_t H5Pget_fapl_ros3(long fapl_id)
+ throws HDF5LibraryException, NullPointerException;
// /////// unimplemented ////////
@@ -10373,32 +10743,35 @@ public class H5 implements java.io.Serializable {
// #endif /* H5_HAVE_PARALLEL */
// herr_t H5Pset_mdc_image_config(hid_t plist_id, H5AC_cache_image_config_t *config_ptr);
// herr_t H5Pget_mdc_image_config(hid_t plist_id, H5AC_cache_image_config_t *config_ptr /*out*/);
- // herr_t H5Pset_page_buffer_size(hid_t plist_id, size_t buf_size, unsigned min_meta_per, unsigned min_raw_per);
- // herr_t H5Pget_page_buffer_size(hid_t fapl_id, size_t *buf_size, unsigned *min_meta_perc, unsigned *min_raw_perc);
- // herr_t H5Pset_object_flush_cb (hid_t fapl_id, H5F_flush_cb_t func, void *user_data);
+ // herr_t H5Pset_page_buffer_size(hid_t plist_id, size_t buf_size, unsigned min_meta_per, unsigned
+ // min_raw_per);
+ // herr_t H5Pget_page_buffer_size(hid_t fapl_id, size_t *buf_size, unsigned *min_meta_perc, unsigned
+ // *min_raw_perc); herr_t H5Pset_object_flush_cb (hid_t fapl_id, H5F_flush_cb_t func, void *user_data);
// herr_t H5Pget_object_flush_cb (hid_t fapl_id, H5F_flush_cb_t *func, void **user_data);
// Dataset creation property list (DCPL) routines //
// Dataset access property list (DAPL) routines //
- // herr_t H5Pset_append_flush (hid_t dapl_id, int ndims, const hsize_t boundary[], H5D_append_cb_t func, void *user_data);
- // herr_t H5Pget_append_flush(hid_t dapl_id, int ndims, hsize_t boundary[], H5D_append_cb_t *func, void **user_data)
+ // herr_t H5Pset_append_flush (hid_t dapl_id, int ndims, const hsize_t boundary[], H5D_append_cb_t func,
+ // void *user_data); herr_t H5Pget_append_flush(hid_t dapl_id, int ndims, hsize_t boundary[],
+ // H5D_append_cb_t *func, void **user_data)
// Dataset xfer property list (DXPL) routines //
// herr_t H5Pset_buffer(hid_t plist_id, size_t size, void *tconv, void *bkg);
// herr_t H5Pset_preserve(hid_t plist_id, hbool_t status);
// int H5Pget_preserve(hid_t plist_id);
// herr_t H5Pset_filter_callback(hid_t plist, H5Z_filter_func_t func, void *op_data)
- // herr_t H5Pget_vlen_mem_manager(hid_t plist, H5MM_allocate_t *alloc, void **alloc_info, H5MM_free_t *free, void
+ // herr_t H5Pget_vlen_mem_manager(hid_t plist, H5MM_allocate_t *alloc, void **alloc_info, H5MM_free_t
+ // *free, void
// **free_info )
- // herr_t H5Pset_vlen_mem_manager(hid_t plist, H5MM_allocate_t alloc, void *alloc_info, H5MM_free_t free, void
- // *free_info )
- // herr_t H5Pget_type_conv_cb(hid_t plist, H5T_conv_except_func_t *func, void **op_data)
+ // herr_t H5Pset_vlen_mem_manager(hid_t plist, H5MM_allocate_t alloc, void *alloc_info, H5MM_free_t free,
+ // void *free_info ) herr_t H5Pget_type_conv_cb(hid_t plist, H5T_conv_except_func_t *func, void **op_data)
// herr_t H5Pset_type_conv_cb( hid_t plist, H5T_conv_except_func_t func, void *op_data)
// #ifdef H5_HAVE_PARALLEL
- // herr_t H5Pget_mpio_actual_chunk_opt_mode(hid_t plist_id, H5D_mpio_actual_chunk_opt_mode_t *actual_chunk_opt_mode);
- // herr_t H5Pget_mpio_actual_io_mode(hid_t plist_id, H5D_mpio_actual_io_mode_t *actual_io_mode);
- // herr_t H5Pget_mpio_no_collective_cause(hid_t plist_id, uint32_t *local_no_collective_cause, uint32_t *global_no_collective_cause);
+ // herr_t H5Pget_mpio_actual_chunk_opt_mode(hid_t plist_id, H5D_mpio_actual_chunk_opt_mode_t
+ // *actual_chunk_opt_mode); herr_t H5Pget_mpio_actual_io_mode(hid_t plist_id, H5D_mpio_actual_io_mode_t
+ // *actual_io_mode); herr_t H5Pget_mpio_no_collective_cause(hid_t plist_id, uint32_t
+ // *local_no_collective_cause, uint32_t *global_no_collective_cause);
// #endif /* H5_HAVE_PARALLEL */
// Link creation property list (LCPL) routines //
@@ -10444,9 +10817,10 @@ public class H5 implements java.io.Serializable {
*
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native void H5PLset_loading_state(int plugin_flags) throws HDF5LibraryException;
+ public synchronized static native void H5PLset_loading_state(int plugin_flags)
+ throws HDF5LibraryException;
/**
* H5PLget_loading_state retrieves the state of the dynamic plugins flag, plugin_flags..
@@ -10458,7 +10832,7 @@ public class H5 implements java.io.Serializable {
* If the value of plugin_flags is 0 (zero), all dynamic plugins are disabled.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5PLget_loading_state() throws HDF5LibraryException;
@@ -10469,7 +10843,7 @@ public class H5 implements java.io.Serializable {
* IN: Path for location of filter plugin libraries.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native void H5PLappend(String plugin_path) throws HDF5LibraryException;
@@ -10480,7 +10854,7 @@ public class H5 implements java.io.Serializable {
* IN: Path for location of filter plugin libraries.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native void H5PLprepend(String plugin_path) throws HDF5LibraryException;
@@ -10493,9 +10867,10 @@ public class H5 implements java.io.Serializable {
* IN: The table index (0-based).
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native void H5PLreplace(String plugin_path, int index) throws HDF5LibraryException;
+ public synchronized static native void H5PLreplace(String plugin_path, int index)
+ throws HDF5LibraryException;
/**
* H5PLinsert inserts the plugin path at the specified index.
@@ -10506,9 +10881,10 @@ public class H5 implements java.io.Serializable {
* IN: The table index (0-based).
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native void H5PLinsert(String plugin_path, int index) throws HDF5LibraryException;
+ public synchronized static native void H5PLinsert(String plugin_path, int index)
+ throws HDF5LibraryException;
/**
* H5PLremove removes the plugin path at the specified index.
@@ -10517,7 +10893,7 @@ public class H5 implements java.io.Serializable {
* IN: The table index (0-based).
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native void H5PLremove(int index) throws HDF5LibraryException;
@@ -10530,7 +10906,7 @@ public class H5 implements java.io.Serializable {
* @return the current path at the index in plugin path table
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native String H5PLget(int index) throws HDF5LibraryException;
@@ -10540,7 +10916,7 @@ public class H5 implements java.io.Serializable {
* @return the current number of paths in the plugin path table
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5PLsize() throws HDF5LibraryException;
@@ -10565,14 +10941,14 @@ public class H5 implements java.io.Serializable {
* @return the reference (byte[]) if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - an input array is null.
+ * an input array is null.
* @exception IllegalArgumentException
- * - an input array is invalid.
+ * an input array is invalid.
**/
public synchronized static native byte[] H5Rcreate_object(long loc_id, String name, long access_id)
- throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
* H5Rcreate_region creates the reference, pointing to the region represented by
@@ -10590,14 +10966,15 @@ public class H5 implements java.io.Serializable {
* @return the reference (byte[]) if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - an input array is null.
+ * an input array is null.
* @exception IllegalArgumentException
- * - an input array is invalid.
+ * an input array is invalid.
**/
- public synchronized static native byte[] H5Rcreate_region(long loc_id, String name, long space_id, long access_id)
- throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+ public synchronized static native byte[] H5Rcreate_region(long loc_id, String name, long space_id,
+ long access_id)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
* H5Rcreate_attr creates the reference, pointing to the attribute named attr name
@@ -10615,14 +10992,15 @@ public class H5 implements java.io.Serializable {
* @return the reference (byte[]) if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - an input array is null.
+ * an input array is null.
* @exception IllegalArgumentException
- * - an input array is invalid.
+ * an input array is invalid.
**/
- public synchronized static native byte[] H5Rcreate_attr(long loc_id, String name, String attr_name, long access_id)
- throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+ public synchronized static native byte[] H5Rcreate_attr(long loc_id, String name, String attr_name,
+ long access_id)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
* H5Rdestroy destroys a reference and releases resources.
@@ -10631,14 +11009,14 @@ public class H5 implements java.io.Serializable {
* IN: Reference to an object, region or attribute attached to an object.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - an input array is null.
+ * an input array is null.
* @exception IllegalArgumentException
- * - an input array is invalid.
+ * an input array is invalid.
**/
public synchronized static native void H5Rdestroy(byte[] ref_ptr)
- throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
// Info //
@@ -10651,14 +11029,14 @@ public class H5 implements java.io.Serializable {
* @return a valid reference type if successful; otherwise returns H5R UNKNOWN.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - an input array is null.
+ * an input array is null.
* @exception IllegalArgumentException
- * - an input array is invalid.
+ * an input array is invalid.
**/
public synchronized static native int H5Rget_type(byte[] ref_ptr)
- throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
* H5Requal determines whether two references point to the same object, region or attribute.
@@ -10671,14 +11049,14 @@ public class H5 implements java.io.Serializable {
* @return true if equal, else false
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - an input array is null.
+ * an input array is null.
* @exception IllegalArgumentException
- * - an input array is invalid.
+ * an input array is invalid.
**/
public synchronized static native boolean H5Requal(byte[] ref1_ptr, byte[] ref2_ptr)
- throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
* H5Rcopy creates a copy of an existing reference.
@@ -10689,14 +11067,14 @@ public class H5 implements java.io.Serializable {
* @return a valid copy of the reference (byte[]) if successful.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - an input array is null.
+ * an input array is null.
* @exception IllegalArgumentException
- * - an input array is invalid.
+ * an input array is invalid.
**/
public synchronized static native byte[] H5Rcopy(byte[] src_ref_ptr)
- throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
// Dereference //
@@ -10720,14 +11098,15 @@ public class H5 implements java.io.Serializable {
* @return a valid identifier if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - an input array is null.
+ * an input array is null.
* @exception IllegalArgumentException
- * - an input array is invalid.
+ * an input array is invalid.
**/
public static long H5Ropen_object(byte[] ref_ptr, long rapl_id, long oapl_id)
- throws HDF5LibraryException, NullPointerException, IllegalArgumentException {
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException
+ {
long id = _H5Ropen_object(ref_ptr, rapl_id, oapl_id);
if (id > 0) {
log.trace("OPEN_IDS: H5Ropen_object add {}", id);
@@ -10738,12 +11117,13 @@ public class H5 implements java.io.Serializable {
}
private synchronized static native long _H5Ropen_object(byte[] ref_ptr, long rapl_id, long oapl_id)
- throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
* H5Ropen region creates a copy of the dataspace of the dataset pointed to by a region reference,
- * ref ptr, and defines a selection matching the selection pointed to by ref ptr within the dataspace copy.
- * Use H5Sclose to release the dataspace identifier returned by this function when the identifier is no longer needed.
+ * ref ptr, and defines a selection matching the selection pointed to by ref ptr within the dataspace
+ * copy. Use H5Sclose to release the dataspace identifier returned by this function when the identifier is
+ * no longer needed.
*
* @param ref_ptr
* IN: Reference to an object, region or attribute attached to an object.
@@ -10759,14 +11139,15 @@ public class H5 implements java.io.Serializable {
* @return a valid dataspace identifier if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - an input array is null.
+ * an input array is null.
* @exception IllegalArgumentException
- * - an input array is invalid.
+ * an input array is invalid.
**/
public static long H5Ropen_region(byte[] ref_ptr, long rapl_id, long oapl_id)
- throws HDF5LibraryException, NullPointerException, IllegalArgumentException {
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException
+ {
long id = _H5Ropen_region(ref_ptr, rapl_id, oapl_id);
if (id > 0) {
log.trace("OPEN_IDS: H5Ropen_region add {}", id);
@@ -10777,7 +11158,7 @@ public class H5 implements java.io.Serializable {
}
private synchronized static native long _H5Ropen_region(byte[] ref_ptr, long rapl_id, long oapl_id)
- throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
* H5Ropen_attr opens the attribute attached to the object and returns an identifier.
@@ -10798,14 +11179,15 @@ public class H5 implements java.io.Serializable {
* @return a valid attribute identifier if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - an input array is null.
+ * an input array is null.
* @exception IllegalArgumentException
- * - an input array is invalid.
+ * an input array is invalid.
**/
public static long H5Ropen_attr(byte[] ref_ptr, long rapl_id, long aapl_id)
- throws HDF5LibraryException, NullPointerException, IllegalArgumentException {
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException
+ {
long id = _H5Ropen_attr(ref_ptr, rapl_id, aapl_id);
if (id > 0) {
log.trace("OPEN_IDS: H5Ropen_attr add {}", id);
@@ -10816,7 +11198,7 @@ public class H5 implements java.io.Serializable {
}
private synchronized static native long _H5Ropen_attr(byte[] ref_ptr, long rapl_id, long aapl_id)
- throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
// Get type //
@@ -10833,14 +11215,14 @@ public class H5 implements java.io.Serializable {
* @return Returns the object type
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - array is null.
+ * array is null.
* @exception IllegalArgumentException
- * - array is invalid.
+ * array is invalid.
**/
public synchronized static native int H5Rget_obj_type3(byte[] ref_ptr, long rapl_id)
- throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
// Get name //
@@ -10853,14 +11235,14 @@ public class H5 implements java.io.Serializable {
* @return Returns the file name of the reference
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - array is null.
+ * array is null.
* @exception IllegalArgumentException
- * - array is invalid.
+ * array is invalid.
**/
public synchronized static native String H5Rget_file_name(byte[] ref_ptr)
- throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
* H5Rget_obj_name retrieves the object name for the object, region or attribute reference pointed to.
@@ -10875,14 +11257,14 @@ public class H5 implements java.io.Serializable {
* @return Returns the object name of the reference
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - array is null.
+ * array is null.
* @exception IllegalArgumentException
- * - array is invalid.
+ * array is invalid.
**/
public synchronized static native String H5Rget_obj_name(byte[] ref_ptr, long rapl_id)
- throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
* H5Rget_attr_name retrieves the attribute name for the object, region or attribute reference pointed to.
@@ -10893,14 +11275,14 @@ public class H5 implements java.io.Serializable {
* @return Returns the attribute name of the reference
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - array is null.
+ * array is null.
* @exception IllegalArgumentException
- * - array is invalid.
+ * array is invalid.
**/
public synchronized static native String H5Rget_attr_name(byte[] ref_ptr)
- throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
// ////////////////////////////////////////////////////////////
// //
@@ -10908,12 +11290,13 @@ public class H5 implements java.io.Serializable {
// //
// ////////////////////////////////////////////////////////////
- private synchronized static native int H5Rcreate(byte[] ref, long loc_id, String name, int ref_type, long space_id)
- throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+ private synchronized static native int H5Rcreate(byte[] ref, long loc_id, String name, int ref_type,
+ long space_id)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
- * H5Rcreate creates the reference, ref, of the type specified in ref_type, pointing to the object name located at
- * loc_id.
+ * H5Rcreate creates the reference, ref, of the type specified in ref_type, pointing to the object name
+ * located at loc_id.
*
* @param loc_id
* IN: Location identifier used to locate the object being pointed to.
@@ -10927,14 +11310,15 @@ public class H5 implements java.io.Serializable {
* @return the reference (byte[]) if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - an input array is null.
+ * an input array is null.
* @exception IllegalArgumentException
- * - an input array is invalid.
+ * an input array is invalid.
**/
public synchronized static byte[] H5Rcreate(long loc_id, String name, int ref_type, long space_id)
- throws HDF5LibraryException, NullPointerException, IllegalArgumentException {
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException
+ {
/* These sizes are correct for HDF5.1.2 */
int ref_size = 8;
if (ref_type == HDF5Constants.H5R_DATASET_REGION) {
@@ -10963,14 +11347,15 @@ public class H5 implements java.io.Serializable {
* @return valid identifier if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - output array is null.
+ * output array is null.
* @exception IllegalArgumentException
- * - output array is invalid.
+ * output array is invalid.
**/
public static long H5Rdereference(long dataset, long access_list, int ref_type, byte[] ref)
- throws HDF5LibraryException, NullPointerException, IllegalArgumentException {
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException
+ {
long id = _H5Rdereference(dataset, access_list, ref_type, ref);
if (id > 0) {
log.trace("OPEN_IDS: H5Rdereference add {}", id);
@@ -10980,8 +11365,9 @@ public class H5 implements java.io.Serializable {
return id;
}
- private synchronized static native long _H5Rdereference(long dataset, long access_list, int ref_type, byte[] ref)
- throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+ private synchronized static native long _H5Rdereference(long dataset, long access_list, int ref_type,
+ byte[] ref)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
* H5Rget_name retrieves a name for the object identified by ref.
@@ -10997,23 +11383,25 @@ public class H5 implements java.io.Serializable {
* @param size
* IN: The size of the name buffer.
*
- * @return Returns the length of the name if successful, returning 0 (zero) if no name is associated with the
- * identifier. Otherwise returns a negative value.
+ * @return Returns the length of the name if successful, returning 0 (zero) if no name is associated with
+ * the identifier. Otherwise returns a negative value.
*
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - size is null.
+ * size is null.
* @exception IllegalArgumentException
- * - Argument is illegal.
+ * Argument is illegal.
*
**/
- public synchronized static native long H5Rget_name(long loc_id, int ref_type, byte[] ref, String[] name, long size)
- throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+ public synchronized static native long H5Rget_name(long loc_id, int ref_type, byte[] ref, String[] name,
+ long size)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
- * H5Rget_obj_type Given a reference to an object ref, H5Rget_obj_type returns the type of the object pointed to.
+ * H5Rget_obj_type Given a reference to an object ref, H5Rget_obj_type returns the type of the object
+ * pointed to.
*
* @param loc_id
* IN: loc_id of the reference object.
@@ -11025,26 +11413,27 @@ public class H5 implements java.io.Serializable {
* @return Returns the object type
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - array is null.
+ * array is null.
* @exception IllegalArgumentException
- * - array is invalid.
+ * array is invalid.
**/
public synchronized static native int H5Rget_obj_type(long loc_id, int ref_type, byte ref[])
- throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
* H5Rget_obj_type2 Retrieves the type of object that an object reference points to.
*
* @see public static int H5Rget_obj_type(int loc_id, int ref_type, byte ref[])
**/
- private synchronized static native int H5Rget_obj_type2(long loc_id, int ref_type, byte ref[], int[] obj_type)
- throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+ private synchronized static native int H5Rget_obj_type2(long loc_id, int ref_type, byte ref[],
+ int[] obj_type)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
- * Given a reference to an object ref, H5Rget_region creates a copy of the dataspace of the dataset pointed to and
- * defines a selection in the copy which is the region pointed to.
+ * Given a reference to an object ref, H5Rget_region creates a copy of the dataspace of the dataset
+ * pointed to and defines a selection in the copy which is the region pointed to.
*
* @param loc_id
* IN: loc_id of the reference object.
@@ -11056,14 +11445,15 @@ public class H5 implements java.io.Serializable {
* @return a valid identifier if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - output array is null.
+ * output array is null.
* @exception IllegalArgumentException
- * - output array is invalid.
+ * output array is invalid.
**/
- public static long H5Rget_region(long loc_id, int ref_type, byte[] ref) throws HDF5LibraryException,
- NullPointerException, IllegalArgumentException {
+ public static long H5Rget_region(long loc_id, int ref_type, byte[] ref)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException
+ {
long id = _H5Rget_region(loc_id, ref_type, ref);
if (id > 0) {
log.trace("OPEN_IDS: H5Rget_region add {}", id);
@@ -11074,7 +11464,7 @@ public class H5 implements java.io.Serializable {
}
private synchronized static native long _H5Rget_region(long loc_id, int ref_type, byte[] ref)
- throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
// ////////////////////////////////////////////////////////////
// //
@@ -11093,9 +11483,10 @@ public class H5 implements java.io.Serializable {
* @return a dataspace identifier
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public static long H5Screate(int type) throws HDF5LibraryException {
+ public static long H5Screate(int type) throws HDF5LibraryException
+ {
long id = _H5Screate(type);
if (id > 0) {
log.trace("OPEN_IDS: H5Screate add {}", id);
@@ -11120,12 +11511,13 @@ public class H5 implements java.io.Serializable {
* @return a dataspace identifier
*
* @exception HDF5Exception
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - dims or maxdims is null.
+ * dims or maxdims is null.
**/
- public static long H5Screate_simple(int rank, long[] dims, long[] maxdims) throws HDF5Exception,
- NullPointerException {
+ public static long H5Screate_simple(int rank, long[] dims, long[] maxdims)
+ throws HDF5Exception, NullPointerException
+ {
long id = _H5Screate_simple(rank, dims, maxdims);
if (id > 0) {
log.trace("OPEN_IDS: H5Screate_simple add {}", id);
@@ -11136,7 +11528,7 @@ public class H5 implements java.io.Serializable {
}
private synchronized static native long _H5Screate_simple(int rank, long[] dims, long[] maxdims)
- throws HDF5Exception, NullPointerException;
+ throws HDF5Exception, NullPointerException;
/**
* H5Sset_extent_simple sets or resets the size of an existing dataspace.
@@ -11153,10 +11545,11 @@ public class H5 implements java.io.Serializable {
* @return a dataspace identifier if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native long H5Sset_extent_simple(long space_id, int rank, long[] current_size,
- long[] maximum_size) throws HDF5LibraryException, NullPointerException;
+ long[] maximum_size)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Sset_extent_simple sets or resets the size of an existing dataspace.
@@ -11173,14 +11566,16 @@ public class H5 implements java.io.Serializable {
* @return a dataspace identifier if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static long H5Sset_extent_simple(long space_id, int rank, byte[] current_size,
- byte[] maximum_size) throws HDF5LibraryException, NullPointerException {
- ByteBuffer csbb = ByteBuffer.wrap(current_size);
- long[] lacs = (csbb.asLongBuffer()).array();
+ byte[] maximum_size)
+ throws HDF5LibraryException, NullPointerException
+ {
+ ByteBuffer csbb = ByteBuffer.wrap(current_size);
+ long[] lacs = (csbb.asLongBuffer()).array();
ByteBuffer maxsbb = ByteBuffer.wrap(maximum_size);
- long[] lamaxs = (maxsbb.asLongBuffer()).array();
+ long[] lamaxs = (maxsbb.asLongBuffer()).array();
return H5Sset_extent_simple(space_id, rank, lacs, lamaxs);
}
@@ -11193,9 +11588,10 @@ public class H5 implements java.io.Serializable {
* @return a dataspace identifier if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public static long H5Scopy(long space_id) throws HDF5LibraryException {
+ public static long H5Scopy(long space_id) throws HDF5LibraryException
+ {
long id = _H5Scopy(space_id);
if (id > 0) {
log.trace("OPEN_IDS: H5Scopy add {}", id);
@@ -11216,9 +11612,10 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public static int H5Sclose(long space_id) throws HDF5LibraryException {
+ public static int H5Sclose(long space_id) throws HDF5LibraryException
+ {
if (space_id < 0)
return 0; // throw new HDF5LibraryException("Negative ID");;
@@ -11239,9 +11636,10 @@ public class H5 implements java.io.Serializable {
* @return the buffer for the object to be encoded into.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native byte[] H5Sencode(long obj_id) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native byte[] H5Sencode(long obj_id)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Sdecode reconstructs the HDF5 data space object and returns a new object handle for it.
@@ -11252,11 +11650,12 @@ public class H5 implements java.io.Serializable {
* @return a new object handle
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - buf is null.
+ * buf is null.
**/
- public synchronized static native long H5Sdecode(byte[] buf) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native long H5Sdecode(byte[] buf)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Sget_simple_extent_npoints determines the number of elements in a dataspace.
@@ -11266,9 +11665,10 @@ public class H5 implements java.io.Serializable {
* @return the number of elements in the dataspace if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native long H5Sget_simple_extent_npoints(long space_id) throws HDF5LibraryException;
+ public synchronized static native long H5Sget_simple_extent_npoints(long space_id)
+ throws HDF5LibraryException;
/**
* H5Sget_simple_extent_ndims determines the dimensionality (or rank) of a dataspace.
@@ -11279,13 +11679,14 @@ public class H5 implements java.io.Serializable {
* @return the number of dimensions in the dataspace if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native int H5Sget_simple_extent_ndims(long space_id) throws HDF5LibraryException;
+ public synchronized static native int H5Sget_simple_extent_ndims(long space_id)
+ throws HDF5LibraryException;
/**
- * H5Sget_simple_extent_dims returns the size and maximum sizes of each dimension of a dataspace through the dims
- * and maxdims parameters.
+ * H5Sget_simple_extent_dims returns the size and maximum sizes of each dimension of a dataspace through
+ * the dims and maxdims parameters.
*
* @param space_id
* IN: Identifier of the dataspace object to query
@@ -11297,12 +11698,13 @@ public class H5 implements java.io.Serializable {
* @return the number of dimensions in the dataspace if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - dims or maxdims is null.
+ * dims or maxdims is null.
**/
- public synchronized static native int H5Sget_simple_extent_dims(long space_id, long[] dims, long[] maxdims)
- throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Sget_simple_extent_dims(long space_id, long[] dims,
+ long[] maxdims)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Sis_simple determines whether a dataspace is a simple dataspace.
@@ -11313,7 +11715,7 @@ public class H5 implements java.io.Serializable {
* @return true if is a simple dataspace
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native boolean H5Sis_simple(long space_id) throws HDF5LibraryException;
@@ -11326,9 +11728,10 @@ public class H5 implements java.io.Serializable {
* @return a dataspace class name if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native int H5Sget_simple_extent_type(long space_id) throws HDF5LibraryException;
+ public synchronized static native int H5Sget_simple_extent_type(long space_id)
+ throws HDF5LibraryException;
/**
* H5Sset_extent_none removes the extent from a dataspace and sets the type to H5S_NONE.
@@ -11339,13 +11742,13 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Sset_extent_none(long space_id) throws HDF5LibraryException;
/**
- * H5Sextent_copy copies the extent from source_space_id to dest_space_id. This action may change the type of the
- * dataspace.
+ * H5Sextent_copy copies the extent from source_space_id to dest_space_id. This action may change the type
+ * of the dataspace.
*
* @param dest_space_id
* IN: The identifier for the dataspace from which the extent is copied.
@@ -11355,13 +11758,14 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Sextent_copy(long dest_space_id, long source_space_id)
- throws HDF5LibraryException;
+ throws HDF5LibraryException;
/**
- * H5Sextent_equal determines whether the dataspace extents of two dataspaces, space1_id and space2_id, are equal.
+ * H5Sextent_equal determines whether the dataspace extents of two dataspaces, space1_id and space2_id,
+ * are equal.
*
* @param first_space_id
* IN: The identifier for the first dataspace.
@@ -11371,10 +11775,10 @@ public class H5 implements java.io.Serializable {
* @return true if successful, else false
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native boolean H5Sextent_equal(long first_space_id, long second_space_id)
- throws HDF5LibraryException;
+ throws HDF5LibraryException;
/***************** Operations on dataspace selections *****************/
@@ -11387,7 +11791,7 @@ public class H5 implements java.io.Serializable {
* @return the dataspace selection type if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Sget_select_type(long space_id) throws HDF5LibraryException;
@@ -11400,20 +11804,24 @@ public class H5 implements java.io.Serializable {
* @return the number of elements in the selection if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native long H5Sget_select_npoints(long space_id) throws HDF5LibraryException;
/**
* H5Sselect_copy copies all the selection information (including offset) from the source
* dataspace to the destination dataspace.
- * @param dst_id ID of the destination dataspace
- * @param src_id ID of the source dataspace
+ *
+ * @param dst_id
+ * ID of the destination dataspace
+ * @param src_id
+ * ID of the source dataspace
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native void H5Sselect_copy(long dst_id, long src_id) throws HDF5LibraryException;
+ public synchronized static native void H5Sselect_copy(long dst_id, long src_id)
+ throws HDF5LibraryException;
/**
* H5Sselect_valid verifies that the selection for the dataspace.
@@ -11424,7 +11832,7 @@ public class H5 implements java.io.Serializable {
* @return true if the selection is contained within the extent and FALSE if it is not or is an error.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native boolean H5Sselect_valid(long space_id) throws HDF5LibraryException;
@@ -11437,18 +11845,17 @@ public class H5 implements java.io.Serializable {
* Offset to subtract
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - offset is null.
+ * offset is null.
**/
- public synchronized static native void H5Sselect_adjust(long space_id, long[][] offset)
- throws HDF5LibraryException, NullPointerException;
+ public synchronized static native void H5Sselect_adjust(long space_id, long[][] offset)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Sget_select_bounds retrieves the coordinates of the bounding box containing the current selection and places
- * them into user-supplied buffers.
- * <P>
- * The start and end buffers must be large enough to hold the dataspace rank number of coordinates.
+ * H5Sget_select_bounds retrieves the coordinates of the bounding box containing the current selection and
+ * places them into user-supplied buffers. <P> The start and end buffers must be large enough to hold the
+ * dataspace rank number of coordinates.
*
* @param space_id
* Identifier of dataspace to release.
@@ -11460,50 +11867,54 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful,with start and end initialized.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - start or end is null.
+ * start or end is null.
**/
public synchronized static native int H5Sget_select_bounds(long space_id, long[] start, long[] end)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Sselect_shape_same checks to see if the current selection in the dataspaces are the same
* dimensionality and shape.
* This is primarily used for reading the entire selection in one swoop.
*
- * @param space1_id ID of 1st Dataspace pointer to compare
- * @param space2_id ID of 2nd Dataspace pointer to compare
+ * @param space1_id
+ * ID of 1st Dataspace pointer to compare
+ * @param space2_id
+ * ID of 2nd Dataspace pointer to compare
*
* @return true if the selection is the same dimensionality and shape;
* false otherwise
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native boolean H5Sselect_shape_same(long space1_id, long space2_id) throws HDF5LibraryException;
+ public synchronized static native boolean H5Sselect_shape_same(long space1_id, long space2_id)
+ throws HDF5LibraryException;
/**
* H5Sselect_intersect_block checks to see if the current selection in the
* dataspace intersects with the block given.
*
* @param space_id
- * ID of dataspace pointer to compare
+ * ID of dataspace pointer to compare
* @param start
- * Starting coordinate of block
+ * Starting coordinate of block
* @param end
- * Opposite ("ending") coordinate of block
+ * Opposite ("ending") coordinate of block
*
* @return a TRUE if the current selection in the dataspace intersects with the block given
* FALSE otherwise
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - offset is null.
+ * offset is null.
**/
- public synchronized static native boolean H5Sselect_intersect_block(long space_id, long[] start, long[] end)
- throws HDF5LibraryException, NullPointerException;
+ public synchronized static native boolean H5Sselect_intersect_block(long space_id, long[] start,
+ long[] end)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Soffset_simple sets the offset of a simple dataspace space_id.
@@ -11516,12 +11927,12 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - offset array is null.
+ * offset array is null.
**/
- public synchronized static native int H5Soffset_simple(long space_id, byte[] offset) throws HDF5LibraryException,
- NullPointerException;
+ public synchronized static native int H5Soffset_simple(long space_id, byte[] offset)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Soffset_simple sets the offset of a simple dataspace space_id.
@@ -11534,22 +11945,22 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - offset array is null.
+ * offset array is null.
**/
- public synchronized static int H5Soffset_simple(long space_id, long[] offset) throws HDF5Exception,
- NullPointerException {
- if (offset == null) {
+ public synchronized static int H5Soffset_simple(long space_id, long[] offset)
+ throws HDF5Exception, NullPointerException
+ {
+ if (offset == null)
return -1;
- }
HDFArray theArray = new HDFArray(offset);
- byte[] theArr = theArray.byteify();
+ byte[] theArr = theArray.byteify();
int retVal = H5Soffset_simple(space_id, theArr);
- theArr = null;
+ theArr = null;
theArray = null;
return retVal;
}
@@ -11563,7 +11974,7 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Sselect_all(long space_id) throws HDF5LibraryException;
@@ -11575,7 +11986,7 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Sselect_none(long space_id) throws HDF5LibraryException;
@@ -11594,10 +12005,11 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- private synchronized static native int H5Sselect_elements(long space_id, int op, int num_elements, byte[] coord)
- throws HDF5LibraryException, NullPointerException;
+ private synchronized static native int H5Sselect_elements(long space_id, int op, int num_elements,
+ byte[] coord)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Sselect_elements selects array elements to be included in the selection for the space_id dataspace.
@@ -11614,24 +12026,25 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5Exception
- * - Error in the data conversion
+ * Error in the data conversion
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - cord array is
+ * cord array is
**/
- public synchronized static int H5Sselect_elements(long space_id, int op, int num_elements, long[][] coord2D)
- throws HDF5Exception, HDF5LibraryException, NullPointerException {
- if (coord2D == null) {
+ public synchronized static int H5Sselect_elements(long space_id, int op, int num_elements,
+ long[][] coord2D)
+ throws HDF5Exception, HDF5LibraryException, NullPointerException
+ {
+ if (coord2D == null)
return -1;
- }
HDFArray theArray = new HDFArray(coord2D);
- byte[] coord = theArray.byteify();
+ byte[] coord = theArray.byteify();
int retVal = H5Sselect_elements(space_id, op, num_elements, coord);
- coord = null;
+ coord = null;
theArray = null;
return retVal;
}
@@ -11645,14 +12058,15 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native long H5Sget_select_elem_npoints(long spaceid) throws HDF5LibraryException;
+ public synchronized static native long H5Sget_select_elem_npoints(long spaceid)
+ throws HDF5LibraryException;
/**
- * H5Sget_select_elem_pointlist returns an array of of element points in the current dataspace selection. The point
- * coordinates have the same dimensionality (rank) as the dataspace they are located within, one coordinate per
- * point.
+ * H5Sget_select_elem_pointlist returns an array of of element points in the current dataspace selection.
+ * The point coordinates have the same dimensionality (rank) as the dataspace they are located within, one
+ * coordinate per point.
*
* @param spaceid
* Identifier of dataspace to release.
@@ -11666,16 +12080,18 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - buf is null.
+ * buf is null.
**/
- public synchronized static native int H5Sget_select_elem_pointlist(long spaceid, long startpoint, long numpoints,
- long[] buf) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Sget_select_elem_pointlist(long spaceid, long startpoint,
+ long numpoints, long[] buf)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Sselect_hyperslab selects a hyperslab region to add to the current selected region for the dataspace specified
- * by space_id. The start, stride, count, and block arrays must be the same size as the rank of the dataspace.
+ * H5Sselect_hyperslab selects a hyperslab region to add to the current selected region for the dataspace
+ * specified by space_id. The start, stride, count, and block arrays must be the same size as the rank of
+ * the dataspace.
*
* @param space_id
* IN: Identifier of dataspace selection to modify
@@ -11693,29 +12109,32 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - an input array is null.
+ * an input array is null.
* @exception IllegalArgumentException
- * - an input array is invalid.
+ * an input array is invalid.
**/
public synchronized static int H5Sselect_hyperslab(long space_id, int op, byte[] start, byte[] stride,
- byte[] count, byte[] block) throws HDF5LibraryException, NullPointerException, IllegalArgumentException {
- ByteBuffer startbb = ByteBuffer.wrap(start);
- long[] lastart = (startbb.asLongBuffer()).array();
+ byte[] count, byte[] block)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException
+ {
+ ByteBuffer startbb = ByteBuffer.wrap(start);
+ long[] lastart = (startbb.asLongBuffer()).array();
ByteBuffer stridebb = ByteBuffer.wrap(stride);
- long[] lastride = (stridebb.asLongBuffer()).array();
- ByteBuffer countbb = ByteBuffer.wrap(count);
- long[] lacount = (countbb.asLongBuffer()).array();
- ByteBuffer blockbb = ByteBuffer.wrap(block);
- long[] lablock = (blockbb.asLongBuffer()).array();
+ long[] lastride = (stridebb.asLongBuffer()).array();
+ ByteBuffer countbb = ByteBuffer.wrap(count);
+ long[] lacount = (countbb.asLongBuffer()).array();
+ ByteBuffer blockbb = ByteBuffer.wrap(block);
+ long[] lablock = (blockbb.asLongBuffer()).array();
return H5Sselect_hyperslab(space_id, op, lastart, lastride, lacount, lablock);
}
/**
- * H5Sselect_hyperslab selects a hyperslab region to add to the current selected region for the dataspace specified
- * by space_id. The start, stride, count, and block arrays must be the same size as the rank of the dataspace.
+ * H5Sselect_hyperslab selects a hyperslab region to add to the current selected region for the dataspace
+ * specified by space_id. The start, stride, count, and block arrays must be the same size as the rank of
+ * the dataspace.
*
* @param space_id
* IN: Identifier of dataspace selection to modify
@@ -11733,15 +12152,15 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - an input array is null.
+ * an input array is null.
* @exception IllegalArgumentException
- * - an input array is invalid.
+ * an input array is invalid.
**/
- public synchronized static native int H5Sselect_hyperslab(long space_id, int op, long[] start, long[] stride,
- long[] count, long[] block) throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
-
+ public synchronized static native int H5Sselect_hyperslab(long space_id, int op, long[] start,
+ long[] stride, long[] count, long[] block)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
* H5Scombine_hyperslab combines a hyperslab selection with the current selection for a dataspace,
@@ -11767,14 +12186,15 @@ public class H5 implements java.io.Serializable {
* @return a dataspace ID on success / H5I_INVALID_HID on failure
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - an input array is null.
+ * an input array is null.
* @exception IllegalArgumentException
- * - an input array is invalid.
+ * an input array is invalid.
**/
- public synchronized static native long H5Scombine_hyperslab(long space_id, int op, long[] start, long[] stride,
- long[] count, long[] block) throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+ public synchronized static native long H5Scombine_hyperslab(long space_id, int op, long[] start,
+ long[] stride, long[] count, long[] block)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
* H5Smodify_select refine an existing hyperslab selection with an operation, using a second
@@ -11782,16 +12202,17 @@ public class H5 implements java.io.Serializable {
* space1 operated on by space2.
*
* @param space1_id
- * ID of the destination dataspace
+ * ID of the destination dataspace
* @param op
- * Operation to perform on current selection.
+ * Operation to perform on current selection.
* @param space2_id
- * ID of the source dataspace
+ * ID of the source dataspace
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native void H5Smodify_select(long space1_id, int op, long space2_id) throws HDF5LibraryException;
+ public synchronized static native void H5Smodify_select(long space1_id, int op, long space2_id)
+ throws HDF5LibraryException;
/**
* H5Scombine_select combines two existing hyperslab selections with an operation, returning
@@ -11799,18 +12220,19 @@ public class H5 implements java.io.Serializable {
* space1 is copied for the dataspace extent of the newly created dataspace.
*
* @param space1_id
- * ID of the first dataspace
+ * ID of the first dataspace
* @param op
- * Operation to perform on current selection.
+ * Operation to perform on current selection.
* @param space2_id
- * ID of the second dataspace
+ * ID of the second dataspace
*
* @return a dataspace ID on success / H5I_INVALID_HID on failure
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native long H5Scombine_select(long space1_id, int op, long space2_id) throws HDF5LibraryException;
+ public synchronized static native long H5Scombine_select(long space1_id, int op, long space2_id)
+ throws HDF5LibraryException;
/**
* H5Sis_regular_hyperslab retrieves a regular hyperslab selection for the dataspace specified
@@ -11822,50 +12244,56 @@ public class H5 implements java.io.Serializable {
* @return a TRUE/FALSE for hyperslab selection if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native boolean H5Sis_regular_hyperslab(long space_id) throws HDF5LibraryException;
+ public synchronized static native boolean H5Sis_regular_hyperslab(long space_id)
+ throws HDF5LibraryException;
/**
* H5Sget_regular_hyperslab determines if a hyperslab selection is regular for the dataspace specified
- * by space_id. The start, stride, count, and block arrays must be the same size as the rank of the dataspace.
+ * by space_id. The start, stride, count, and block arrays must be the same size as the rank of the
+ * dataspace.
*
* @param space_id
* IN: Identifier of dataspace selection to modify
* @param start
- * OUT: Offset of start of hyperslab
+ * OUT: Offset of start of hyperslab
* @param stride
- * OUT: Hyperslab stride.
+ * OUT: Hyperslab stride.
* @param count
- * OUT: Number of blocks included in hyperslab.
+ * OUT: Number of blocks included in hyperslab.
* @param block
- * OUT: Size of block in hyperslab.
+ * OUT: Size of block in hyperslab.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - an output array is null.
+ * an output array is null.
* @exception IllegalArgumentException
- * - an output array is invalid.
+ * an output array is invalid.
**/
- public synchronized static native void H5Sget_regular_hyperslab(long space_id, long[] start, long[] stride, long[] count, long[] block) throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+ public synchronized static native void H5Sget_regular_hyperslab(long space_id, long[] start,
+ long[] stride, long[] count, long[] block)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
- /**
- * H5Sget_select_hyper_nblocks returns the number of hyperslab blocks in the current dataspace selection.
- *
- * @param spaceid
- * Identifier of dataspace to release.
- *
- * @return a non-negative value if successful
- *
- * @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
- **/
- public synchronized static native long H5Sget_select_hyper_nblocks(long spaceid) throws HDF5LibraryException;
+ /**
+ * H5Sget_select_hyper_nblocks returns the number of hyperslab blocks in the current dataspace selection.
+ *
+ * @param spaceid
+ * Identifier of dataspace to release.
+ *
+ * @return a non-negative value if successful
+ *
+ * @exception HDF5LibraryException
+ * Error from the HDF-5 Library.
+ **/
+ public synchronized static native long H5Sget_select_hyper_nblocks(long spaceid)
+ throws HDF5LibraryException;
/**
* H5Sget_select_hyper_blocklist returns an array of hyperslab blocks. The block coordinates have the same
- * dimensionality (rank) as the dataspace they are located within. The list of blocks is formatted as follows:
+ * dimensionality (rank) as the dataspace they are located within. The list of blocks is formatted as
+ * follows:
*
* <pre>
* &lt;"start" coordinate&gt;, immediately followed by
@@ -11882,17 +12310,19 @@ public class H5 implements java.io.Serializable {
* @param numblocks
* number of blocks to retrieve
* @param buf
- * returns blocks startblock to startblock+num-1, each block is <i>rank</i> * 2 (corners) longs.
+ * returns blocks startblock to startblock+num-1, each block is <i>rank</i> * 2 (corners)
+ * longs.
*
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - buf is null.
+ * buf is null.
**/
- public synchronized static native int H5Sget_select_hyper_blocklist(long spaceid, long startblock, long numblocks,
- long[] buf) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Sget_select_hyper_blocklist(long spaceid, long startblock,
+ long numblocks, long[] buf)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Sselect_project_intersection projects the intersection of the selections of src_space_id and
@@ -11904,30 +12334,30 @@ public class H5 implements java.io.Serializable {
* @param dst_space_id
* Selection that is mapped to src_space_id
* @param src_intersect_space_id
- * Selection whose intersection with src_space_id is projected to dst_space_id to obtain the result
+ * Selection whose intersection with src_space_id is projected to dst_space_id to obtain the
+ * result
*
* @return a dataspace with a selection equal to the intersection of
* src_intersect_space_id and src_space_id projected from src_space to dst_space on success
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native long H5Sselect_project_intersection(long src_space_id, long dst_space_id,
- long src_intersect_space_id) throws HDF5LibraryException;
-
-
- // /////// unimplemented ////////
- ///// Operations on dataspace selections /////
-
- //
- ///// Operations on dataspace selection iterators /////
- //public synchronized static native H5Ssel_iter_create(hid_t spaceid, size_t elmt_size, unsigned flags);
- //public synchronized static native H5Ssel_iter_get_seq_list(hid_t sel_iter_id, size_t maxseq, size_t maxbytes, size_t *nseq,
- // size_t *nbytes, hsize_t *off, size_t *len);
- //public synchronized static native H5Ssel_iter_reset(hid_t sel_iter_id, hid_t space_id);
- //public synchronized static native H5Ssel_iter_close(hid_t sel_iter_id);
+ public synchronized static native long
+ H5Sselect_project_intersection(long src_space_id, long dst_space_id, long src_intersect_space_id)
+ throws HDF5LibraryException;
+ // /////// unimplemented ////////
+ ///// Operations on dataspace selections /////
+ //
+ ///// Operations on dataspace selection iterators /////
+ // public synchronized static native H5Ssel_iter_create(hid_t spaceid, size_t elmt_size, unsigned
+ // flags); public synchronized static native H5Ssel_iter_get_seq_list(hid_t sel_iter_id, size_t maxseq,
+ // size_t maxbytes, size_t *nseq,
+ // size_t *nbytes, hsize_t *off, size_t *len);
+ // public synchronized static native H5Ssel_iter_reset(hid_t sel_iter_id, hid_t space_id);
+ // public synchronized static native H5Ssel_iter_close(hid_t sel_iter_id);
// ////////////////////////////////////////////////////////////
// //
@@ -11948,12 +12378,13 @@ public class H5 implements java.io.Serializable {
* @return a valid datatype identifier
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - dim is null.
+ * dim is null.
**/
- public static long H5Tarray_create(long base_id, int ndims, long[] dim) throws HDF5LibraryException,
- NullPointerException {
+ public static long H5Tarray_create(long base_id, int ndims, long[] dim)
+ throws HDF5LibraryException, NullPointerException
+ {
long id = _H5Tarray_create2(base_id, ndims, dim);
if (id > 0) {
log.trace("OPEN_IDS: H5Tarray_create add {}", id);
@@ -11964,7 +12395,7 @@ public class H5 implements java.io.Serializable {
}
private synchronized static native long _H5Tarray_create2(long base_id, int ndims, long[] dim)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Tclose releases a datatype.
@@ -11975,9 +12406,10 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public static int H5Tclose(long type_id) throws HDF5LibraryException {
+ public static int H5Tclose(long type_id) throws HDF5LibraryException
+ {
if (type_id < 0)
return 0; // throw new HDF5LibraryException("Negative ID");;
@@ -12006,16 +12438,17 @@ public class H5 implements java.io.Serializable {
* IN: Datatype access property list.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
public synchronized static native void H5Tcommit(long loc_id, String name, long type_id, long lcpl_id,
- long tcpl_id, long tapl_id) throws HDF5LibraryException, NullPointerException;
+ long tcpl_id, long tapl_id)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Tcommit_anon commits a transient datatype (not immutable) to a file, turning it into a named datatype with the
- * specified creation and property lists.
+ * H5Tcommit_anon commits a transient datatype (not immutable) to a file, turning it into a named datatype
+ * with the specified creation and property lists.
*
* @param loc_id
* IN: Location identifier.
@@ -12027,14 +12460,14 @@ public class H5 implements java.io.Serializable {
* IN: Datatype access property list.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native void H5Tcommit_anon(long loc_id, long type_id, long tcpl_id, long tapl_id)
- throws HDF5LibraryException;
+ public synchronized static native void H5Tcommit_anon(long loc_id, long type_id, long tcpl_id,
+ long tapl_id) throws HDF5LibraryException;
/**
- * H5Tcommitted queries a type to determine whether the type specified by the type identifier is a named type or a
- * transient type.
+ * H5Tcommitted queries a type to determine whether the type specified by the type identifier is a named
+ * type or a transient type.
*
* @param type_id
* IN: Identifier of datatype.
@@ -12042,13 +12475,13 @@ public class H5 implements java.io.Serializable {
* @return true the datatype has been committed
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native boolean H5Tcommitted(long type_id) throws HDF5LibraryException;
/**
- * H5Tcompiler_conv finds out whether the library's conversion function from type src_id to type dst_id is a
- * compiler (hard) conversion.
+ * H5Tcompiler_conv finds out whether the library's conversion function from type src_id to type dst_id is
+ * a compiler (hard) conversion.
*
* @param src_id
* IN: Identifier of source datatype.
@@ -12056,9 +12489,10 @@ public class H5 implements java.io.Serializable {
* IN: Identifier of destination datatype.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native void H5Tcompiler_conv(long src_id, long dst_id) throws HDF5LibraryException;
+ public synchronized static native void H5Tcompiler_conv(long src_id, long dst_id)
+ throws HDF5LibraryException;
/**
** H5Tconvert converts nelmts elements from the type specified by the src_id identifier to type dst_id.
@@ -12077,12 +12511,13 @@ public class H5 implements java.io.Serializable {
* IN: Dataset transfer property list identifier.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - buf is null.
+ * buf is null.
**/
public synchronized static native void H5Tconvert(long src_id, long dst_id, long nelmts, byte[] buf,
- byte[] background, long plist_id) throws HDF5LibraryException, NullPointerException;
+ byte[] background, long plist_id)
+ throws HDF5LibraryException, NullPointerException;
// int H5Tconvert(int src_id, int dst_id, long nelmts, Pointer buf, Pointer background, int plist_id);
@@ -12090,15 +12525,16 @@ public class H5 implements java.io.Serializable {
* H5Tcopy copies an existing datatype. The returned type is always transient and unlocked.
*
* @param type_id
- * IN: Identifier of datatype to copy. Can be a datatype identifier, a predefined datatype (defined in
- * H5Tpublic.h), or a dataset Identifier.
+ * IN: Identifier of datatype to copy. Can be a datatype identifier, a predefined datatype
+ * (defined in H5Tpublic.h), or a dataset Identifier.
*
* @return a datatype identifier if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public static long H5Tcopy(long type_id) throws HDF5LibraryException {
+ public static long H5Tcopy(long type_id) throws HDF5LibraryException
+ {
long id = _H5Tcopy(type_id);
if (id > 0) {
log.trace("OPEN_IDS: H5Tcopy add {}", id);
@@ -12121,9 +12557,10 @@ public class H5 implements java.io.Serializable {
* @return datatype identifier
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public static long H5Tcreate(int tclass, long size) throws HDF5LibraryException {
+ public static long H5Tcreate(int tclass, long size) throws HDF5LibraryException
+ {
long id = _H5Tcreate(tclass, size);
if (id > 0) {
log.trace("OPEN_IDS: H5Tcreate add {}", id);
@@ -12144,11 +12581,12 @@ public class H5 implements java.io.Serializable {
* @return a new object handle
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - buf is null.
+ * buf is null.
**/
- public static long H5Tdecode(byte[] buf) throws HDF5LibraryException, NullPointerException {
+ public static long H5Tdecode(byte[] buf) throws HDF5LibraryException, NullPointerException
+ {
long id = _H5Tdecode(buf);
if (id > 0) {
log.trace("OPEN_IDS: H5Tdecode add {}", id);
@@ -12158,11 +12596,12 @@ public class H5 implements java.io.Serializable {
return id;
}
- private synchronized static native long _H5Tdecode(byte[] buf) throws HDF5LibraryException, NullPointerException;
+ private synchronized static native long _H5Tdecode(byte[] buf)
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Tdetect_class determines whether the datatype specified in dtype_id contains any datatypes of the datatype
- * class specified in dtype_class.
+ * H5Tdetect_class determines whether the datatype specified in dtype_id contains any datatypes of the
+ * datatype class specified in dtype_class.
*
* @param type_id
* IN: Identifier of datatype to query.
@@ -12172,9 +12611,10 @@ public class H5 implements java.io.Serializable {
* @return true if the datatype specified in dtype_id contains any datatypes of the datatype class
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native boolean H5Tdetect_class(long type_id, int cls) throws HDF5LibraryException;
+ public synchronized static native boolean H5Tdetect_class(long type_id, int cls)
+ throws HDF5LibraryException;
/**
* H5Tencode converts a data type description into binary form in a buffer.
@@ -12182,36 +12622,38 @@ public class H5 implements java.io.Serializable {
* @param obj_id
* IN: Identifier of the object to be encoded.
* @param buf
- * OUT: Buffer for the object to be encoded into. If the provided buffer is NULL, only the size of buffer
- * needed is returned.
+ * OUT: Buffer for the object to be encoded into. If the provided buffer is NULL, only the size
+ * of buffer needed is returned.
* @param nalloc
* IN: The size of the allocated buffer.
*
* @return the size needed for the allocated buffer.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - buf is null.
+ * buf is null.
**/
- public synchronized static native int H5Tencode(long obj_id, byte[] buf, long nalloc) throws HDF5LibraryException,
- NullPointerException;
+ public synchronized static native int H5Tencode(long obj_id, byte[] buf, long nalloc)
+ throws HDF5LibraryException, NullPointerException;
// /**
- // * H5Tencode converts a data type description into binary form in a buffer.
- // *
- // * @param obj_id IN: Identifier of the object to be encoded.
- // *
- // * @return the buffer for the object to be encoded into.
- // *
- // * @exception HDF5LibraryException - Error from the HDF-5 Library.
- // **/
+ // * H5Tencode converts a data type description into binary form in a buffer.
+ // *
+ // * @param obj_id
+ // * IN: Identifier of the object to be encoded.
+ // *
+ // * @return the buffer for the object to be encoded into.
+ // *
+ // * @exception HDF5LibraryException
+ // * Error from the HDF-5 Library.
+ // **/
// public synchronized static native byte[] H5Tencode(int obj_id)
// throws HDF5LibraryException;
/**
- * H5Tenum_create creates a new enumeration datatype based on the specified base datatype, parent_id, which must be
- * an integer type.
+ * H5Tenum_create creates a new enumeration datatype based on the specified base datatype, parent_id,
+ * which must be an integer type.
*
* @param base_id
* IN: Identifier of the parent datatype to release.
@@ -12219,9 +12661,10 @@ public class H5 implements java.io.Serializable {
* @return the datatype identifier for the new enumeration datatype
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public static long H5Tenum_create(long base_id) throws HDF5LibraryException {
+ public static long H5Tenum_create(long base_id) throws HDF5LibraryException
+ {
long id = _H5Tenum_create(base_id);
if (id > 0) {
log.trace("OPEN_IDS: H5Tenum_create add {}", id);
@@ -12244,12 +12687,12 @@ public class H5 implements java.io.Serializable {
* IN: The value of the member, data of the correct type
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
public synchronized static native void H5Tenum_insert(long type, String name, byte[] value)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Tenum_insert inserts a new enumeration datatype member into an enumeration datatype.
@@ -12264,12 +12707,13 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public static int H5Tenum_insert(long type, String name, int[] value) throws HDF5LibraryException,
- NullPointerException {
+ public static int H5Tenum_insert(long type, String name, int[] value)
+ throws HDF5LibraryException, NullPointerException
+ {
return H5Tenum_insert_int(type, name, value);
}
@@ -12286,21 +12730,23 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public static int H5Tenum_insert(long type, String name, int value) throws HDF5LibraryException,
- NullPointerException {
- int[] val = { value };
+ public static int H5Tenum_insert(long type, String name, int value)
+ throws HDF5LibraryException, NullPointerException
+ {
+ int[] val = {value};
return H5Tenum_insert_int(type, name, val);
}
private synchronized static native int H5Tenum_insert_int(long type, String name, int[] value)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Tenum_nameof finds the symbol name that corresponds to the specified value of the enumeration datatype type.
+ * H5Tenum_nameof finds the symbol name that corresponds to the specified value of the enumeration
+ * datatype type.
*
* @param type
* IN: Identifier of datatype.
@@ -12312,17 +12758,18 @@ public class H5 implements java.io.Serializable {
* @return the symbol name.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - value is null.
+ * value is null.
**/
public synchronized static native String H5Tenum_nameof(long type, byte[] value, long size)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
// int H5Tenum_nameof(int type, Pointer value, Buffer name/* out */, long size);
/**
- * H5Tenum_nameof finds the symbol name that corresponds to the specified value of the enumeration datatype type.
+ * H5Tenum_nameof finds the symbol name that corresponds to the specified value of the enumeration
+ * datatype type.
*
* @param type
* IN: Identifier of datatype.
@@ -12336,20 +12783,22 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public static int H5Tenum_nameof(long type, int[] value, String[] name, int size) throws HDF5LibraryException,
- NullPointerException {
+ public static int H5Tenum_nameof(long type, int[] value, String[] name, int size)
+ throws HDF5LibraryException, NullPointerException
+ {
return H5Tenum_nameof_int(type, value, name, size);
}
private synchronized static native int H5Tenum_nameof_int(long type, int[] value, String[] name, int size)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Tenum_valueof finds the value that corresponds to the specified name of the enumeration datatype type.
+ * H5Tenum_valueof finds the value that corresponds to the specified name of the enumeration datatype
+ * type.
*
* @param type
* IN: Identifier of datatype.
@@ -12359,13 +12808,14 @@ public class H5 implements java.io.Serializable {
* OUT: The value of the member
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native void H5Tenum_valueof(long type, String name, byte[] value)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Tenum_valueof finds the value that corresponds to the specified name of the enumeration datatype type.
+ * H5Tenum_valueof finds the value that corresponds to the specified name of the enumeration datatype
+ * type.
*
* @param type
* IN: Identifier of datatype.
@@ -12377,17 +12827,18 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public static int H5Tenum_valueof(long type, String name, int[] value) throws HDF5LibraryException,
- NullPointerException {
+ public static int H5Tenum_valueof(long type, String name, int[] value)
+ throws HDF5LibraryException, NullPointerException
+ {
return H5Tenum_valueof_int(type, name, value);
}
private synchronized static native int H5Tenum_valueof_int(long type, String name, int[] value)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Tequal determines whether two datatype identifiers refer to the same datatype.
@@ -12400,9 +12851,10 @@ public class H5 implements java.io.Serializable {
* @return true if the datatype identifiers refer to the same datatype, else false.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native boolean H5Tequal(long type_id1, long type_id2) throws HDF5LibraryException;
+ public synchronized static native boolean H5Tequal(long type_id1, long type_id2)
+ throws HDF5LibraryException;
/**
* H5Tget_array_dims returns the sizes of the dimensions of the specified array datatype object.
@@ -12415,11 +12867,13 @@ public class H5 implements java.io.Serializable {
* @return the non-negative number of dimensions of the array type
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - dims is null.
+ * dims is null.
**/
- public static int H5Tget_array_dims(long type_id, long[] dims) throws HDF5LibraryException, NullPointerException {
+ public static int H5Tget_array_dims(long type_id, long[] dims)
+ throws HDF5LibraryException, NullPointerException
+ {
return H5Tget_array_dims2(type_id, dims);
}
@@ -12434,12 +12888,12 @@ public class H5 implements java.io.Serializable {
* @return the non-negative number of dimensions of the array type
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - dims is null.
+ * dims is null.
**/
- public synchronized static native int H5Tget_array_dims2(long type_id, long[] dims) throws HDF5LibraryException,
- NullPointerException;
+ public synchronized static native int H5Tget_array_dims2(long type_id, long[] dims)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Tget_array_ndims returns the rank, the number of dimensions, of an array datatype object.
@@ -12450,7 +12904,7 @@ public class H5 implements java.io.Serializable {
* @return the rank of the array
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Tget_array_ndims(long type_id) throws HDF5LibraryException;
@@ -12463,7 +12917,7 @@ public class H5 implements java.io.Serializable {
* @return datatype class identifier if successful; otherwise H5T_NO_CLASS(-1).
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Tget_class(long type_id) throws HDF5LibraryException;
@@ -12476,7 +12930,8 @@ public class H5 implements java.io.Serializable {
* @return class name if successful; otherwise H5T_NO_CLASS.
*
**/
- public static String H5Tget_class_name(long class_id) {
+ public static String H5Tget_class_name(long class_id)
+ {
String retValue = null;
if (HDF5Constants.H5T_INTEGER == class_id) /* integer types */
retValue = "H5T_INTEGER";
@@ -12492,7 +12947,7 @@ public class H5 implements java.io.Serializable {
retValue = "H5T_OPAQUE";
else if (HDF5Constants.H5T_COMPOUND == class_id) /* compound types */
retValue = "H5T_COMPOUND";
- else if (HDF5Constants.H5T_REFERENCE == class_id)/* reference types */
+ else if (HDF5Constants.H5T_REFERENCE == class_id) /* reference types */
retValue = "H5T_REFERENCE";
else if (HDF5Constants.H5T_ENUM == class_id) /* enumeration types */
retValue = "H5T_ENUM";
@@ -12507,8 +12962,8 @@ public class H5 implements java.io.Serializable {
}
/**
- * H5Tget_create_plist returns a property list identifier for the datatype creation property list associated with
- * the datatype specified by type_id.
+ * H5Tget_create_plist returns a property list identifier for the datatype creation property list
+ * associated with the datatype specified by type_id.
*
* @param type_id
* IN: Identifier of datatype.
@@ -12516,9 +12971,10 @@ public class H5 implements java.io.Serializable {
* @return a datatype property list identifier.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public static long H5Tget_create_plist(long type_id) throws HDF5LibraryException {
+ public static long H5Tget_create_plist(long type_id) throws HDF5LibraryException
+ {
long id = _H5Tget_create_plist(type_id);
if (id > 0) {
log.trace("OPEN_IDS: _H5Tget_create_plist add {}", id);
@@ -12539,7 +12995,7 @@ public class H5 implements java.io.Serializable {
* @return a valid character set type if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Tget_cset(long type_id) throws HDF5LibraryException;
@@ -12554,7 +13010,7 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Tset_cset(long type_id, int cset) throws HDF5LibraryException;
@@ -12567,7 +13023,7 @@ public class H5 implements java.io.Serializable {
* @return the bias if successful; otherwise 0.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Tget_ebias(long type_id) throws HDF5LibraryException;
@@ -12582,10 +13038,11 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public static int H5Tset_ebias(long type_id, int ebias) throws HDF5LibraryException {
- H5Tset_ebias(type_id, (long) ebias);
+ public static int H5Tset_ebias(long type_id, int ebias) throws HDF5LibraryException
+ {
+ H5Tset_ebias(type_id, (long)ebias);
return 0;
}
@@ -12598,7 +13055,7 @@ public class H5 implements java.io.Serializable {
* @return the bias
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native long H5Tget_ebias_long(long type_id) throws HDF5LibraryException;
@@ -12611,12 +13068,13 @@ public class H5 implements java.io.Serializable {
* IN: Exponent bias value.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native void H5Tset_ebias(long type_id, long ebias) throws HDF5LibraryException;
/**
- * H5Tget_fields retrieves information about the locations of the various bit fields of a floating point datatype.
+ * H5Tget_fields retrieves information about the locations of the various bit fields of a floating point
+ * datatype.
*
* @param type_id
* IN: Identifier of datatype to query.
@@ -12631,17 +13089,18 @@ public class H5 implements java.io.Serializable {
* </ul>
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - fields is null.
+ * fields is null.
* @exception IllegalArgumentException
- * - fields array is invalid.
+ * fields array is invalid.
**/
- public synchronized static native void H5Tget_fields(long type_id, long[] fields) throws HDF5LibraryException,
- NullPointerException, IllegalArgumentException;
+ public synchronized static native void H5Tget_fields(long type_id, long[] fields)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
- * H5Tget_fields retrieves information about the locations of the various bit fields of a floating point datatype.
+ * H5Tget_fields retrieves information about the locations of the various bit fields of a floating point
+ * datatype.
*
* @param type_id
* IN: Identifier of datatype to query.
@@ -12659,19 +13118,20 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - fields is null.
+ * fields is null.
* @exception IllegalArgumentException
- * - fields array is invalid.
+ * fields array is invalid.
**/
- public static int H5Tget_fields(long type_id, int[] fields) throws HDF5LibraryException, NullPointerException,
- IllegalArgumentException {
+ public static int H5Tget_fields(long type_id, int[] fields)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException
+ {
return H5Tget_fields_int(type_id, fields);
}
- private synchronized static native int H5Tget_fields_int(long type_id, int[] fields) throws HDF5LibraryException,
- NullPointerException, IllegalArgumentException;
+ private synchronized static native int H5Tget_fields_int(long type_id, int[] fields)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
* H5Tset_fields sets the locations and sizes of the various floating point bit fields.
@@ -12690,10 +13150,10 @@ public class H5 implements java.io.Serializable {
* IN: Size of mantissa in bits.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native void H5Tset_fields(long type_id, long spos, long epos, long esize, long mpos,
- long msize) throws HDF5LibraryException;
+ public synchronized static native void H5Tset_fields(long type_id, long spos, long epos, long esize,
+ long mpos, long msize) throws HDF5LibraryException;
/**
* H5Tset_fields sets the locations and sizes of the various floating point bit fields.
@@ -12714,11 +13174,12 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public static int H5Tset_fields(long type_id, int spos, int epos, int esize, int mpos, int msize)
- throws HDF5LibraryException {
- H5Tset_fields(type_id, (long) spos, (long) epos, (long) esize, (long) mpos, (long) msize);
+ throws HDF5LibraryException
+ {
+ H5Tset_fields(type_id, (long)spos, (long)epos, (long)esize, (long)mpos, (long)msize);
return 0;
}
@@ -12731,14 +13192,14 @@ public class H5 implements java.io.Serializable {
* @return a valid padding type if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Tget_inpad(long type_id) throws HDF5LibraryException;
/**
- * If any internal bits of a floating point type are unused (that is, those significant bits which are not part of
- * the sign, exponent, or mantissa), then H5Tset_inpad will be filled according to the value of the padding value
- * property inpad.
+ * If any internal bits of a floating point type are unused (that is, those significant bits which are not
+ * part of the sign, exponent, or mantissa), then H5Tset_inpad will be filled according to the value of
+ * the padding value property inpad.
*
* @param type_id
* IN: Identifier of datatype to modify.
@@ -12748,7 +13209,7 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Tset_inpad(long type_id, int inpad) throws HDF5LibraryException;
@@ -12763,9 +13224,10 @@ public class H5 implements java.io.Serializable {
* @return the class of the datatype of the field if successful;
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native int H5Tget_member_class(long type_id, int membno) throws HDF5LibraryException;
+ public synchronized static native int H5Tget_member_class(long type_id, int membno)
+ throws HDF5LibraryException;
/**
* H5Tget_member_index retrieves the index of a field of a compound datatype.
@@ -12778,12 +13240,14 @@ public class H5 implements java.io.Serializable {
* @return if field is defined, the index; else negative.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native int H5Tget_member_index(long type_id, String field_name) throws HDF5LibraryException;
+ public synchronized static native int H5Tget_member_index(long type_id, String field_name)
+ throws HDF5LibraryException;
/**
- * H5Tget_member_name retrieves the name of a field of a compound datatype or an element of an enumeration datatype.
+ * H5Tget_member_name retrieves the name of a field of a compound datatype or an element of an enumeration
+ * datatype.
*
* @param type_id
* IN: Identifier of datatype to query.
@@ -12793,13 +13257,15 @@ public class H5 implements java.io.Serializable {
* @return a valid pointer to the name if successful; otherwise null.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native String H5Tget_member_name(long type_id, int field_idx) throws HDF5LibraryException;
+ public synchronized static native String H5Tget_member_name(long type_id, int field_idx)
+ throws HDF5LibraryException;
/**
- * H5Tget_member_offset returns the byte offset of the specified member of the compound datatype. This is the byte
- * offset in the HDF-5 file/library, NOT the offset of any Java object which might be mapped to this data item.
+ * H5Tget_member_offset returns the byte offset of the specified member of the compound datatype. This is
+ * the byte offset in the HDF-5 file/library, NOT the offset of any Java object which might be mapped to
+ * this data item.
*
* @param type_id
* IN: Identifier of datatype to query.
@@ -12821,9 +13287,10 @@ public class H5 implements java.io.Serializable {
* @return the identifier of a copy of the datatype of the field if successful;
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public static long H5Tget_member_type(long type_id, int field_idx) throws HDF5LibraryException {
+ public static long H5Tget_member_type(long type_id, int field_idx) throws HDF5LibraryException
+ {
long id = _H5Tget_member_type(type_id, field_idx);
if (id > 0) {
log.trace("OPEN_IDS: H5Tget_member_type add {}", id);
@@ -12834,7 +13301,7 @@ public class H5 implements java.io.Serializable {
}
private synchronized static native long _H5Tget_member_type(long type_id, int field_idx)
- throws HDF5LibraryException;
+ throws HDF5LibraryException;
/**
* H5Tget_member_value returns the value of the enumeration datatype member memb_no.
@@ -12847,12 +13314,12 @@ public class H5 implements java.io.Serializable {
* OUT: The value of the member
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - value is null.
+ * value is null.
**/
public synchronized static native void H5Tget_member_value(long type_id, int membno, byte[] value)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Tget_member_value returns the value of the enumeration datatype member memb_no.
@@ -12867,30 +13334,33 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - value is null.
+ * value is null.
**/
- public static int H5Tget_member_value(long type_id, int membno, int[] value) throws HDF5LibraryException,
- NullPointerException {
+ public static int H5Tget_member_value(long type_id, int membno, int[] value)
+ throws HDF5LibraryException, NullPointerException
+ {
return H5Tget_member_value_int(type_id, membno, value);
}
private synchronized static native int H5Tget_member_value_int(long type_id, int membno, int[] value)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Tget_native_type returns the equivalent native datatype for the datatype specified in type_id.
*
* @param type_id
- * IN: Identifier of datatype to query. Direction of search is assumed to be in ascending order.
+ * IN: Identifier of datatype to query. Direction of search is assumed to be in ascending
+ * order.
*
* @return the native datatype identifier for the specified dataset datatype.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static long H5Tget_native_type(long type_id) throws HDF5LibraryException {
+ public synchronized static long H5Tget_native_type(long type_id) throws HDF5LibraryException
+ {
return H5Tget_native_type(type_id, HDF5Constants.H5T_DIR_ASCEND);
}
@@ -12905,9 +13375,10 @@ public class H5 implements java.io.Serializable {
* @return the native datatype identifier for the specified dataset datatype.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public static long H5Tget_native_type(long type_id, int direction) throws HDF5LibraryException {
+ public static long H5Tget_native_type(long type_id, int direction) throws HDF5LibraryException
+ {
long id = _H5Tget_native_type(type_id, direction);
if (id > 0) {
log.trace("OPEN_IDS: H5Tget_native_type add {}", id);
@@ -12917,7 +13388,8 @@ public class H5 implements java.io.Serializable {
return id;
}
- private synchronized static native long _H5Tget_native_type(long tid, int direction) throws HDF5LibraryException;
+ private synchronized static native long _H5Tget_native_type(long tid, int direction)
+ throws HDF5LibraryException;
/**
* H5Tget_nmembers retrieves the number of fields a compound datatype has.
@@ -12928,7 +13400,7 @@ public class H5 implements java.io.Serializable {
* @return number of members datatype has if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Tget_nmembers(long type_id) throws HDF5LibraryException;
@@ -12941,7 +13413,7 @@ public class H5 implements java.io.Serializable {
* @return a valid normalization type if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Tget_norm(long type_id) throws HDF5LibraryException;
@@ -12956,7 +13428,7 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Tset_norm(long type_id, int norm) throws HDF5LibraryException;
@@ -12969,7 +13441,7 @@ public class H5 implements java.io.Serializable {
* @return a positive offset value if successful; otherwise 0.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Tget_offset(long type_id) throws HDF5LibraryException;
@@ -12984,10 +13456,11 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public static int H5Tset_offset(long type_id, int offset) throws HDF5LibraryException {
- H5Tset_offset(type_id, (long) offset);
+ public static int H5Tset_offset(long type_id, int offset) throws HDF5LibraryException
+ {
+ H5Tset_offset(type_id, (long)offset);
return 0;
}
@@ -13000,9 +13473,10 @@ public class H5 implements java.io.Serializable {
* IN: Offset of first significant bit.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native void H5Tset_offset(long type_id, long offset) throws HDF5LibraryException;
+ public synchronized static native void H5Tset_offset(long type_id, long offset)
+ throws HDF5LibraryException;
/**
* H5Tget_order returns the byte order of an atomic datatype.
@@ -13013,7 +13487,7 @@ public class H5 implements java.io.Serializable {
* @return a byte order constant if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Tget_order(long type_id) throws HDF5LibraryException;
@@ -13028,7 +13502,7 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Tset_order(long type_id, int order) throws HDF5LibraryException;
@@ -13048,12 +13522,12 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - pad is null.
+ * pad is null.
**/
- public synchronized static native int H5Tget_pad(long type_id, int[] pad) throws HDF5LibraryException,
- NullPointerException;
+ public synchronized static native int H5Tget_pad(long type_id, int[] pad)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Tset_pad sets the least and most-significant bits padding types.
@@ -13068,9 +13542,10 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native int H5Tset_pad(long type_id, int lsb, int msb) throws HDF5LibraryException;
+ public synchronized static native int H5Tset_pad(long type_id, int lsb, int msb)
+ throws HDF5LibraryException;
/**
* H5Tget_precision returns the precision of an atomic datatype.
@@ -13081,7 +13556,7 @@ public class H5 implements java.io.Serializable {
* @return the number of significant bits if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Tget_precision(long type_id) throws HDF5LibraryException;
@@ -13096,10 +13571,11 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public static int H5Tset_precision(long type_id, int precision) throws HDF5LibraryException {
- H5Tset_precision(type_id, (long) precision);
+ public static int H5Tset_precision(long type_id, int precision) throws HDF5LibraryException
+ {
+ H5Tset_precision(type_id, (long)precision);
return 0;
}
@@ -13112,7 +13588,7 @@ public class H5 implements java.io.Serializable {
* @return the number of significant bits if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native long H5Tget_precision_long(long type_id) throws HDF5LibraryException;
@@ -13125,9 +13601,10 @@ public class H5 implements java.io.Serializable {
* IN: Number of bits of precision for datatype.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native void H5Tset_precision(long type_id, long precision) throws HDF5LibraryException;
+ public synchronized static native void H5Tset_precision(long type_id, long precision)
+ throws HDF5LibraryException;
/**
* H5Tget_sign retrieves the sign type for an integer type.
@@ -13138,7 +13615,7 @@ public class H5 implements java.io.Serializable {
* @return a valid sign type if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Tget_sign(long type_id) throws HDF5LibraryException;
@@ -13153,7 +13630,7 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Tset_sign(long type_id, int sign) throws HDF5LibraryException;
@@ -13166,13 +13643,13 @@ public class H5 implements java.io.Serializable {
* @return the size of the datatype in bytes
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native long H5Tget_size(long type_id) throws HDF5LibraryException;
/**
- * H5Tset_size sets the total size in bytes, size, for an atomic datatype (this operation is not permitted on
- * compound datatypes).
+ * H5Tset_size sets the total size in bytes, size, for an atomic datatype (this operation is not permitted
+ * on compound datatypes).
*
* @param type_id
* IN: Identifier of datatype to change size.
@@ -13182,7 +13659,7 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Tset_size(long type_id, long size) throws HDF5LibraryException;
@@ -13195,7 +13672,7 @@ public class H5 implements java.io.Serializable {
* @return a valid string padding type if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Tget_strpad(long type_id) throws HDF5LibraryException;
@@ -13210,7 +13687,7 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Tset_strpad(long type_id, int strpad) throws HDF5LibraryException;
@@ -13223,9 +13700,10 @@ public class H5 implements java.io.Serializable {
* @return the parent type
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public static long H5Tget_super(long type) throws HDF5LibraryException {
+ public static long H5Tget_super(long type) throws HDF5LibraryException
+ {
long id = _H5Tget_super(type);
if (id > 0) {
log.trace("OPEN_IDS: H5Tget_super add {}", id);
@@ -13246,7 +13724,7 @@ public class H5 implements java.io.Serializable {
* @return the tag
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native String H5Tget_tag(long type) throws HDF5LibraryException;
@@ -13261,7 +13739,7 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Tset_tag(long type, String tag) throws HDF5LibraryException;
@@ -13280,12 +13758,12 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
public synchronized static native int H5Tinsert(long type_id, String name, long offset, long field_id)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Tis_variable_str determines whether the datatype identified in type_id is a variable-length string.
@@ -13296,12 +13774,13 @@ public class H5 implements java.io.Serializable {
* @return true if type_id is a variable-length string.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native boolean H5Tis_variable_str(long type_id) throws HDF5LibraryException;
/**
- * H5Tlock locks the datatype specified by the type_id identifier, making it read-only and non-destrucible.
+ * H5Tlock locks the datatype specified by the type_id identifier, making it read-only and
+ * non-destrucible.
*
* @param type_id
* IN: Identifier of datatype to lock.
@@ -13309,12 +13788,13 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Tlock(long type_id) throws HDF5LibraryException;
/**
- * H5Topen opens a named datatype at the location specified by loc_id and return an identifier for the datatype.
+ * H5Topen opens a named datatype at the location specified by loc_id and return an identifier for the
+ * datatype.
*
* @param loc_id
* IN: A file, group, or datatype identifier.
@@ -13326,12 +13806,13 @@ public class H5 implements java.io.Serializable {
* @return a named datatype identifier if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - name is null.
+ * name is null.
**/
- public static long H5Topen(long loc_id, String name, long tapl_id) throws HDF5LibraryException,
- NullPointerException {
+ public static long H5Topen(long loc_id, String name, long tapl_id)
+ throws HDF5LibraryException, NullPointerException
+ {
long id = _H5Topen2(loc_id, name, tapl_id);
if (id > 0) {
log.trace("OPEN_IDS: H5Topen add {}", id);
@@ -13342,14 +13823,12 @@ public class H5 implements java.io.Serializable {
}
private synchronized static native long _H5Topen2(long loc_id, String name, long tapl_id)
- throws HDF5LibraryException, NullPointerException;
+ throws HDF5LibraryException, NullPointerException;
/**
- * H5Tpack recursively removes padding from within a compound datatype to make it more efficient (space-wise) to
- * store that data.
- * <P>
- * <b>WARNING:</b> This call only affects the C-data, even if it succeeds, there may be no visible effect on Java
- * objects.
+ * H5Tpack recursively removes padding from within a compound datatype to make it more efficient
+ * (space-wise) to store that data. <P> <b>WARNING:</b> This call only affects the C-data, even if it
+ * succeeds, there may be no visible effect on Java objects.
*
* @param type_id
* IN: Identifier of datatype to modify.
@@ -13357,7 +13836,7 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Tpack(long type_id) throws HDF5LibraryException;
@@ -13374,12 +13853,13 @@ public class H5 implements java.io.Serializable {
* Buffer with data to be reclaimed.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
* @exception NullPointerException
- * - buf is null.
+ * buf is null.
**/
- public synchronized static native void H5Treclaim(long type_id, long space_id, long xfer_plist_id, byte[] buf)
- throws HDF5LibraryException, NullPointerException;
+ public synchronized static native void H5Treclaim(long type_id, long space_id, long xfer_plist_id,
+ byte[] buf)
+ throws HDF5LibraryException, NullPointerException;
/**
* H5Tvlen_create creates a new variable-length (VL) dataype.
@@ -13390,9 +13870,10 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public static long H5Tvlen_create(long base_id) throws HDF5LibraryException {
+ public static long H5Tvlen_create(long base_id) throws HDF5LibraryException
+ {
long id = _H5Tvlen_create(base_id);
if (id > 0) {
log.trace("OPEN_IDS: H5Tvlen_create add {}", id);
@@ -13412,7 +13893,7 @@ public class H5 implements java.io.Serializable {
* IN: Identifier of the committed datatype to be flushed.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native void H5Tflush(long dtype_id) throws HDF5LibraryException;
@@ -13426,7 +13907,7 @@ public class H5 implements java.io.Serializable {
* IN: Identifier of the committed datatype to be refreshed.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native void H5Trefresh(long dtype_id) throws HDF5LibraryException;
@@ -13438,9 +13919,8 @@ public class H5 implements java.io.Serializable {
// H5T_conv_t func)
// throws HDF5LibraryException, NullPointerException;
- // public synchronized static native int H5Tunregister(H5T_pers_t pers, String name, int src_id, int dst_id,
- // H5T_conv_t func)
- // throws HDF5LibraryException, NullPointerException;
+ // public synchronized static native int H5Tunregister(H5T_pers_t pers, String name, int src_id, int
+ // dst_id, H5T_conv_t func) throws HDF5LibraryException, NullPointerException;
// ////////////////////////////////////////////////////////////
// //
@@ -13450,7 +13930,8 @@ public class H5 implements java.io.Serializable {
/// VOL Connector Functionality
/**
- * H5VLregister_connector_by_name registers a new VOL connector as a member of the virtual object layer class.
+ * H5VLregister_connector_by_name registers a new VOL connector as a member of the virtual object layer
+ * class.
*
* @param connector_name
* IN: name of the connector.
@@ -13461,11 +13942,13 @@ public class H5 implements java.io.Serializable {
* @return a VOL connector ID
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native long H5VLregister_connector_by_name(String connector_name, long vipl_id) throws HDF5LibraryException;
+ public synchronized static native long H5VLregister_connector_by_name(String connector_name, long vipl_id)
+ throws HDF5LibraryException;
/**
- * H5VLregister_connector_by_value registers a new VOL connector as a member of the virtual object layer class.
+ * H5VLregister_connector_by_value registers a new VOL connector as a member of the virtual object layer
+ * class.
*
* @param connector_value
* IN: value of the connector.
@@ -13476,9 +13959,10 @@ public class H5 implements java.io.Serializable {
* @return a VOL connector ID
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native long H5VLregister_connector_by_value(int connector_value, long vipl_id) throws HDF5LibraryException;
+ public synchronized static native long H5VLregister_connector_by_value(int connector_value, long vipl_id)
+ throws HDF5LibraryException;
/**
* H5VLis_connector_registered_by_name tests whether a VOL class has been registered.
*
@@ -13488,9 +13972,10 @@ public class H5 implements java.io.Serializable {
* @return true if a VOL connector with that name has been registered
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native boolean H5VLis_connector_registered_by_name(String name) throws HDF5LibraryException;
+ public synchronized static native boolean H5VLis_connector_registered_by_name(String name)
+ throws HDF5LibraryException;
/**
* H5VLis_connector_registered_by_value tests whether a VOL class has been registered.
*
@@ -13500,9 +13985,10 @@ public class H5 implements java.io.Serializable {
* @return true if a VOL connector with that value has been registered
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native boolean H5VLis_connector_registered_by_value(int connector_value) throws HDF5LibraryException;
+ public synchronized static native boolean H5VLis_connector_registered_by_value(int connector_value)
+ throws HDF5LibraryException;
/**
* H5VLget_connector_id retrieves the ID for a registered VOL connector for a given object.
*
@@ -13512,7 +13998,7 @@ public class H5 implements java.io.Serializable {
* @return a VOL connector ID
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native long H5VLget_connector_id(long object_id) throws HDF5LibraryException;
/**
@@ -13524,9 +14010,10 @@ public class H5 implements java.io.Serializable {
* @return a VOL connector ID
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native long H5VLget_connector_id_by_name(String name) throws HDF5LibraryException;
+ public synchronized static native long H5VLget_connector_id_by_name(String name)
+ throws HDF5LibraryException;
/**
* H5VLget_connector_id_by_value retrieves the ID for a registered VOL connector.
*
@@ -13536,12 +14023,13 @@ public class H5 implements java.io.Serializable {
* @return a VOL connector ID
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native long H5VLget_connector_id_by_value(int connector_value) throws HDF5LibraryException;
+ public synchronized static native long H5VLget_connector_id_by_value(int connector_value)
+ throws HDF5LibraryException;
/**
* H5VLget_connector_name returns the connector name for the VOL associated with the
- * object or file ID.
+ * object or file ID.
*
* @param object_id
* IN: Identifier of the object.
@@ -13549,9 +14037,10 @@ public class H5 implements java.io.Serializable {
* @return the connector name
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native String H5VLget_connector_name(long object_id) throws HDF5LibraryException;
+ public synchronized static native String H5VLget_connector_name(long object_id)
+ throws HDF5LibraryException;
/**
* H5VLclose closes a VOL connector ID.
*
@@ -13559,7 +14048,7 @@ public class H5 implements java.io.Serializable {
* IN: Identifier of the connector.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native void H5VLclose(long connector_id) throws HDF5LibraryException;
/**
@@ -13569,14 +14058,14 @@ public class H5 implements java.io.Serializable {
* IN: Identifier of the connector.
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
- public synchronized static native void H5VLunregister_connector(long connector_id) throws HDF5LibraryException;
+ public synchronized static native void H5VLunregister_connector(long connector_id)
+ throws HDF5LibraryException;
// /////// unimplemented ////////
// hid_t H5VLregister_connector(const H5VL_class_t *cls, hid_t vipl_id);
-
// ////////////////////////////////////////////////////////////
// //
// H5Z: Filter Interface Functions //
@@ -13592,7 +14081,7 @@ public class H5 implements java.io.Serializable {
* @return a non-negative(TRUE/FALSE) value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Zfilter_avail(int filter) throws HDF5LibraryException;
@@ -13605,7 +14094,7 @@ public class H5 implements java.io.Serializable {
* @return the filter information flags
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Zget_filter_info(int filter) throws HDF5LibraryException;
@@ -13618,13 +14107,11 @@ public class H5 implements java.io.Serializable {
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
- * - Error from the HDF-5 Library.
+ * Error from the HDF-5 Library.
**/
public synchronized static native int H5Zunregister(int filter) throws HDF5LibraryException;
// /////// unimplemented ////////
// herr_t H5Zregister(const void *cls);
-
}
-
diff --git a/java/src/hdf/hdf5lib/HDF5Constants.java b/java/src/hdf/hdf5lib/HDF5Constants.java
index 4125907..cbdf463 100644
--- a/java/src/hdf/hdf5lib/HDF5Constants.java
+++ b/java/src/hdf/hdf5lib/HDF5Constants.java
@@ -11,7 +11,6 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
package hdf.hdf5lib;
import hdf.hdf5lib.structs.H5O_token_t;
@@ -27,15 +26,13 @@ import hdf.hdf5lib.structs.H5O_token_t;
* <b>See also:</b> hdf.hdf5lib.HDF5Library
*/
public class HDF5Constants {
- static {
- H5.loadH5Lib();
- }
+ static { H5.loadH5Lib(); }
// /////////////////////////////////////////////////////////////////////////
// Get the HDF5 constants from the library //
// /////////////////////////////////////////////////////////////////////////
- //public static final long H5_QUARTER_HADDR_MAX = H5_QUARTER_HADDR_MAX();
+ // public static final long H5_QUARTER_HADDR_MAX = H5_QUARTER_HADDR_MAX();
/** Special parameters for szip compression */
public static final int H5_SZIP_MAX_PIXELS_PER_BLOCK = H5_SZIP_MAX_PIXELS_PER_BLOCK();
@@ -70,9 +67,11 @@ public class HDF5Constants {
/** */
public static final int H5AC_MAX_TRACE_FILE_NAME_LEN = H5AC_MAX_TRACE_FILE_NAME_LEN();
/** */
- public static final int H5AC_METADATA_WRITE_STRATEGY_PROCESS_ZERO_ONLY = H5AC_METADATA_WRITE_STRATEGY_PROCESS_ZERO_ONLY();
+ public static final int H5AC_METADATA_WRITE_STRATEGY_PROCESS_ZERO_ONLY =
+ H5AC_METADATA_WRITE_STRATEGY_PROCESS_ZERO_ONLY();
/** */
- public static final int H5AC_METADATA_WRITE_STRATEGY_DISTRIBUTED = H5AC_METADATA_WRITE_STRATEGY_DISTRIBUTED();
+ public static final int H5AC_METADATA_WRITE_STRATEGY_DISTRIBUTED =
+ H5AC_METADATA_WRITE_STRATEGY_DISTRIBUTED();
/** */
public static final int H5C_incr_off = H5C_incr_off();
/** */
@@ -681,22 +680,22 @@ public class HDF5Constants {
/** */
public static final long H5FD_MEM_DEFAULT_OHDR_SIZE = H5FD_MEM_DEFAULT_OHDR_SIZE();
-// public static final int H5G_DATASET = H5G_DATASET();
-// public static final int H5G_GROUP = H5G_GROUP();
-// public static final int H5G_LINK = H5G_LINK();
-// public static final int H5G_UDLINK = H5G_UDLINK();
-// public static final int H5G_LINK_ERROR = H5G_LINK_ERROR();
-// public static final int H5G_LINK_HARD = H5G_LINK_HARD();
-// public static final int H5G_LINK_SOFT = H5G_LINK_SOFT();
-// public static final int H5G_NLIBTYPES = H5G_NLIBTYPES();
-// public static final int H5G_NTYPES = H5G_NTYPES();
-// public static final int H5G_NUSERTYPES = H5G_NUSERTYPES();
-// public static final int H5G_RESERVED_5 = H5G_RESERVED_5();
-// public static final int H5G_RESERVED_6 = H5G_RESERVED_6();
-// public static final int H5G_RESERVED_7 = H5G_RESERVED_7();
-// public static final int H5G_SAME_LOC = H5G_SAME_LOC();
-// public static final int H5G_TYPE = H5G_TYPE();
-// public static final int H5G_UNKNOWN = H5G_UNKNOWN();
+ // public static final int H5G_DATASET = H5G_DATASET();
+ // public static final int H5G_GROUP = H5G_GROUP();
+ // public static final int H5G_LINK = H5G_LINK();
+ // public static final int H5G_UDLINK = H5G_UDLINK();
+ // public static final int H5G_LINK_ERROR = H5G_LINK_ERROR();
+ // public static final int H5G_LINK_HARD = H5G_LINK_HARD();
+ // public static final int H5G_LINK_SOFT = H5G_LINK_SOFT();
+ // public static final int H5G_NLIBTYPES = H5G_NLIBTYPES();
+ // public static final int H5G_NTYPES = H5G_NTYPES();
+ // public static final int H5G_NUSERTYPES = H5G_NUSERTYPES();
+ // public static final int H5G_RESERVED_5 = H5G_RESERVED_5();
+ // public static final int H5G_RESERVED_6 = H5G_RESERVED_6();
+ // public static final int H5G_RESERVED_7 = H5G_RESERVED_7();
+ // public static final int H5G_SAME_LOC = H5G_SAME_LOC();
+ // public static final int H5G_TYPE = H5G_TYPE();
+ // public static final int H5G_UNKNOWN = H5G_UNKNOWN();
/** */
public static final int H5G_STORAGE_TYPE_UNKNOWN = H5G_STORAGE_TYPE_UNKNOWN();
@@ -756,7 +755,7 @@ public class HDF5Constants {
/** */
public static final int H5O_COPY_SHALLOW_HIERARCHY_FLAG = H5O_COPY_SHALLOW_HIERARCHY_FLAG();
/** */
- public static final int H5O_COPY_EXPAND_SOFT_LINK_FLAG = H5O_COPY_EXPAND_SOFT_LINK_FLAG();
+ public static final int H5O_COPY_EXPAND_SOFT_LINK_FLAG = H5O_COPY_EXPAND_SOFT_LINK_FLAG();
/** */
public static final int H5O_COPY_EXPAND_EXT_LINK_FLAG = H5O_COPY_EXPAND_EXT_LINK_FLAG();
/** */
@@ -1438,23 +1437,35 @@ public class HDF5Constants {
public static final int H5Z_FILTER_SHUFFLE = H5Z_FILTER_SHUFFLE();
/** Filter IDs - szip compression */
public static final int H5Z_FILTER_SZIP = H5Z_FILTER_SZIP();
- /** Flags for filter definition (stored)
- * definition flag mask */
+ /**
+ * Flags for filter definition (stored)
+ * definition flag mask
+ */
public static final int H5Z_FLAG_DEFMASK = H5Z_FLAG_DEFMASK();
- /** Additional flags for filter invocation (not stored)
- * invocation flag mask */
+ /**
+ * Additional flags for filter invocation (not stored)
+ * invocation flag mask
+ */
public static final int H5Z_FLAG_INVMASK = H5Z_FLAG_INVMASK();
- /** Flags for filter definition (stored)
- * filter is mandatory */
+ /**
+ * Flags for filter definition (stored)
+ * filter is mandatory
+ */
public static final int H5Z_FLAG_MANDATORY = H5Z_FLAG_MANDATORY();
- /** Flags for filter definition (stored)
- * filter is optional */
+ /**
+ * Flags for filter definition (stored)
+ * filter is optional
+ */
public static final int H5Z_FLAG_OPTIONAL = H5Z_FLAG_OPTIONAL();
- /** Additional flags for filter invocation (not stored)
- * reverse direction; read */
+ /**
+ * Additional flags for filter invocation (not stored)
+ * reverse direction; read
+ */
public static final int H5Z_FLAG_REVERSE = H5Z_FLAG_REVERSE();
- /** Additional flags for filter invocation (not stored)
- * skip EDC filters for read */
+ /**
+ * Additional flags for filter invocation (not stored)
+ * skip EDC filters for read
+ */
public static final int H5Z_FLAG_SKIP_EDC = H5Z_FLAG_SKIP_EDC();
/** Symbol to remove all filters in H5Premove_filter */
public static final int H5Z_FILTER_ALL = H5Z_FILTER_ALL();
@@ -2953,5 +2964,4 @@ public class HDF5Constants {
private static native final int H5Z_SCALEOFFSET_USER_NPARMS();
private static native final int H5Z_FILTER_ALL();
-
}
diff --git a/java/src/hdf/hdf5lib/HDF5GroupInfo.java b/java/src/hdf/hdf5lib/HDF5GroupInfo.java
index 4c31af7..220cfb6 100644
--- a/java/src/hdf/hdf5lib/HDF5GroupInfo.java
+++ b/java/src/hdf/hdf5lib/HDF5GroupInfo.java
@@ -11,7 +11,6 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
package hdf.hdf5lib;
/**
@@ -41,14 +40,17 @@ public class HDF5GroupInfo {
long mtime;
int linklen;
- /** Container for the information reported about an HDF5 Object
- * from the H5Gget_obj_info() method */
- public HDF5GroupInfo() {
- fileno = new long[2];
- objno = new long[2];
- nlink = -1;
- type = -1;
- mtime = 0;
+ /**
+ * Container for the information reported about an HDF5 Object
+ * from the H5Gget_obj_info() method
+ */
+ public HDF5GroupInfo()
+ {
+ fileno = new long[2];
+ objno = new long[2];
+ nlink = -1;
+ type = -1;
+ mtime = 0;
linklen = 0;
}
@@ -68,84 +70,79 @@ public class HDF5GroupInfo {
* @param len
* Length of link
**/
- public void setGroupInfo(long[] fn, long[] on, int nl, int t, long mt,
- int len) {
- fileno = fn;
- objno = on;
- nlink = nl;
- type = t;
- mtime = mt;
+ public void setGroupInfo(long[] fn, long[] on, int nl, int t, long mt, int len)
+ {
+ fileno = fn;
+ objno = on;
+ nlink = nl;
+ type = t;
+ mtime = mt;
linklen = len;
}
/** Resets all the group information to defaults. */
- public void reset() {
+ public void reset()
+ {
fileno[0] = 0;
fileno[1] = 0;
- objno[0] = 0;
- objno[1] = 0;
- nlink = -1;
- type = -1;
- mtime = 0;
- linklen = 0;
+ objno[0] = 0;
+ objno[1] = 0;
+ nlink = -1;
+ type = -1;
+ mtime = 0;
+ linklen = 0;
}
- /** fileno accessors
+ /**
+ * fileno accessors
* @return the file number if successful
*/
- public long[] getFileno() {
- return fileno;
- }
+ public long[] getFileno() { return fileno; }
- /** accessors
+ /**
+ * accessors
* @return the object number if successful
*/
- public long[] getObjno() {
- return objno;
- }
+ public long[] getObjno() { return objno; }
- /** accessors
+ /**
+ * accessors
* @return type of group if successful
*/
- public int getType() {
- return type;
- }
+ public int getType() { return type; }
- /** accessors
+ /**
+ * accessors
* @return the number of links in the group if successful
*/
- public int getNlink() {
- return nlink;
- }
+ public int getNlink() { return nlink; }
- /** accessors
+ /**
+ * accessors
* @return the modified time value if successful
*/
- public long getMtime() {
- return mtime;
- }
+ public long getMtime() { return mtime; }
- /** accessors
+ /**
+ * accessors
* @return a length of link name if successful
*/
- public int getLinklen() {
- return linklen;
- }
+ public int getLinklen() { return linklen; }
/**
* The fileno and objno fields contain four values which uniquely identify
* an object among those HDF5 files.
*/
@Override
- public boolean equals(Object obj) {
+ public boolean equals(Object obj)
+ {
if (!(obj instanceof HDF5GroupInfo)) {
return false;
}
- HDF5GroupInfo target = (HDF5GroupInfo) obj;
- if ((fileno[0] == target.fileno[0]) && (fileno[1] == target.fileno[1])
- && (objno[0] == target.objno[0])
- && (objno[1] == target.objno[1])) {
+ HDF5GroupInfo target = (HDF5GroupInfo)obj;
+ if ((fileno[0] == target.fileno[0]) && (fileno[1] == target.fileno[1]) &&
+ (objno[0] == target.objno[0]) && (objno[1] == target.objno[1])) {
return true;
}
else {
@@ -158,9 +155,7 @@ public class HDF5GroupInfo {
*
* @return the object id
*/
- public long getOID() {
- return objno[0];
- }
+ public long getOID() { return objno[0]; }
/**
* /** Converts this object to a String representation.
@@ -168,9 +163,10 @@ public class HDF5GroupInfo {
* @return a string representation of this object
*/
@Override
- public String toString() {
+ public String toString()
+ {
String fileStr = "fileno=null";
- String objStr = "objno=null";
+ String objStr = "objno=null";
if (fileno != null) {
fileStr = "fileno[0]=" + fileno[0] + ",fileno[1]=" + fileno[1];
@@ -180,9 +176,7 @@ public class HDF5GroupInfo {
objStr = "objno[0]=" + objno[0] + ",objno[1]=" + objno[1];
}
- return getClass().getName() + "[" + fileStr + "," + objStr + ",type="
- + type + ",nlink=" + nlink + ",mtime=" + mtime + ",linklen="
- + linklen + "]";
+ return getClass().getName() + "[" + fileStr + "," + objStr + ",type=" + type + ",nlink=" + nlink +
+ ",mtime=" + mtime + ",linklen=" + linklen + "]";
}
-
}
diff --git a/java/src/hdf/hdf5lib/HDFArray.java b/java/src/hdf/hdf5lib/HDFArray.java
index 21e2b02..8525fb0 100644
--- a/java/src/hdf/hdf5lib/HDFArray.java
+++ b/java/src/hdf/hdf5lib/HDFArray.java
@@ -13,36 +13,34 @@
package hdf.hdf5lib;
+import java.util.Arrays;
+
import hdf.hdf5lib.exceptions.HDF5Exception;
import hdf.hdf5lib.exceptions.HDF5JavaException;
-import java.util.Arrays;
/**
* This is a class for handling multidimensional arrays for HDF.
* <p>
* The purpose is to allow the storage and retrieval of arbitrary array types containing scientific data.
* <p>
- * The methods support the conversion of an array to and from Java to a one-dimensional array of bytes suitable for I/O
- * by the C library.
- * <p>
- * This class heavily uses the <a href="./hdf.hdf5lib.HDFNativeData.html">HDFNativeData</a> class to convert between
- * Java and C representations.
+ * The methods support the conversion of an array to and from Java to a one-dimensional array of bytes
+ * suitable for I/O by the C library. <p> This class heavily uses the <a
+ * href="./hdf.hdf5lib.HDFNativeData.html">HDFNativeData</a> class to convert between Java and C
+ * representations.
*/
public class HDFArray {
- private Object _theArray = null;
+ private Object _theArray = null;
private ArrayDescriptor _desc = null;
- private byte[] _barray = null;
+ private byte[] _barray = null;
// public HDFArray() {}
/**
- * The input must be a Java Array (possibly multidimensional) of primitive numbers or sub-classes of Number.
- * <p>
- * The input is analysed to determine the number of dimensions and size of each dimension, as well as the type of
- * the elements.
- * <p>
- * The description is saved in private variables, and used to convert data.
+ * The input must be a Java Array (possibly multidimensional) of primitive numbers or sub-classes of
+ * Number. <p> The input is analysed to determine the number of dimensions and size of each dimension, as
+ * well as the type of the elements. <p> The description is saved in private variables, and used to
+ * convert data.
*
* @param anArray
* The array object.
@@ -58,25 +56,26 @@ public class HDFArray {
if (tc.isArray() == false) {
/* exception: not an array */
HDF5JavaException ex = new HDF5JavaException("HDFArray: not an array?: ");
- throw (ex);
+ throw(ex);
}
_theArray = anArray;
- _desc = new ArrayDescriptor(_theArray);
+ _desc = new ArrayDescriptor(_theArray);
/* extra error checking -- probably not needed */
if (_desc == null) {
- HDF5JavaException ex = new HDF5JavaException("HDFArray: internal error: array description failed?: ");
- throw (ex);
+ HDF5JavaException ex =
+ new HDF5JavaException("HDFArray: internal error: array description failed?: ");
+ throw(ex);
}
}
/**
* Allocate a one-dimensional array of bytes sufficient to store the array.
*
- * @return A one-D array of bytes, filled with zeroes. The bytes are sufficient to hold the data of the Array passed
- * to the constructor.
+ * @return A one-D array of bytes, filled with zeroes. The bytes are sufficient to hold the data of the
+ * Array passed to the constructor.
* @exception hdf.hdf5lib.exceptions.HDF5JavaException
- * Allocation failed.
+ * Allocation failed.
*/
public byte[] emptyBytes() throws HDF5JavaException
@@ -84,14 +83,14 @@ public class HDFArray {
byte[] b = null;
if ((ArrayDescriptor.dims == 1) && (ArrayDescriptor.NT == 'B')) {
- b = (byte[]) _theArray;
+ b = (byte[])_theArray;
}
else {
b = new byte[ArrayDescriptor.totalSize];
}
if (b == null) {
HDF5JavaException ex = new HDF5JavaException("HDFArray: emptyBytes: allocation failed");
- throw (ex);
+ throw(ex);
}
return (b);
}
@@ -112,14 +111,14 @@ public class HDFArray {
if (_theArray == null) {
/* exception: not an array */
HDF5JavaException ex = new HDF5JavaException("HDFArray: byteify not an array?: ");
- throw (ex);
+ throw(ex);
}
if (ArrayDescriptor.dims == 1) {
/* special case */
if (ArrayDescriptor.NT == 'B') {
/* really special case! */
- _barray = (byte[]) _theArray;
+ _barray = (byte[])_theArray;
return _barray;
}
else {
@@ -128,54 +127,56 @@ public class HDFArray {
byte[] therow;
if (ArrayDescriptor.NT == 'I') {
- therow = HDFNativeData.intToByte(0, ArrayDescriptor.dimlen[1], (int[]) _theArray);
+ therow = HDFNativeData.intToByte(0, ArrayDescriptor.dimlen[1], (int[])_theArray);
}
else if (ArrayDescriptor.NT == 'S') {
- therow = HDFNativeData.shortToByte(0, ArrayDescriptor.dimlen[1], (short[]) _theArray);
+ therow = HDFNativeData.shortToByte(0, ArrayDescriptor.dimlen[1], (short[])_theArray);
}
else if (ArrayDescriptor.NT == 'F') {
- therow = HDFNativeData.floatToByte(0, ArrayDescriptor.dimlen[1], (float[]) _theArray);
+ therow = HDFNativeData.floatToByte(0, ArrayDescriptor.dimlen[1], (float[])_theArray);
}
else if (ArrayDescriptor.NT == 'J') {
- therow = HDFNativeData.longToByte(0, ArrayDescriptor.dimlen[1], (long[]) _theArray);
+ therow = HDFNativeData.longToByte(0, ArrayDescriptor.dimlen[1], (long[])_theArray);
}
else if (ArrayDescriptor.NT == 'D') {
- therow = HDFNativeData.doubleToByte(0, ArrayDescriptor.dimlen[1], (double[]) _theArray);
+ therow =
+ HDFNativeData.doubleToByte(0, ArrayDescriptor.dimlen[1], (double[])_theArray);
}
else if (ArrayDescriptor.NT == 'L') {
if (ArrayDescriptor.className.equals("java.lang.Byte")) {
- therow = ByteObjToByte((Byte[]) _theArray);
+ therow = ByteObjToByte((Byte[])_theArray);
}
else if (ArrayDescriptor.className.equals("java.lang.Integer")) {
- therow = IntegerToByte((Integer[]) _theArray);
+ therow = IntegerToByte((Integer[])_theArray);
}
else if (ArrayDescriptor.className.equals("java.lang.Short")) {
- therow = ShortToByte((Short[]) _theArray);
+ therow = ShortToByte((Short[])_theArray);
}
else if (ArrayDescriptor.className.equals("java.lang.Float")) {
- therow = FloatObjToByte((Float[]) _theArray);
+ therow = FloatObjToByte((Float[])_theArray);
}
else if (ArrayDescriptor.className.equals("java.lang.Double")) {
- therow = DoubleObjToByte((Double[]) _theArray);
+ therow = DoubleObjToByte((Double[])_theArray);
}
else if (ArrayDescriptor.className.equals("java.lang.Long")) {
- therow = LongObjToByte((Long[]) _theArray);
+ therow = LongObjToByte((Long[])_theArray);
}
else {
HDF5JavaException ex = new HDF5JavaException("HDFArray: unknown type of Object?");
- throw (ex);
+ throw(ex);
}
}
else {
HDF5JavaException ex = new HDF5JavaException("HDFArray: unknown type of data?");
- throw (ex);
+ throw(ex);
}
- System.arraycopy(therow, 0, _barray, 0, (ArrayDescriptor.dimlen[1] * ArrayDescriptor.NTsize));
+ System.arraycopy(therow, 0, _barray, 0,
+ (ArrayDescriptor.dimlen[1] * ArrayDescriptor.NTsize));
return _barray;
}
catch (OutOfMemoryError err) {
HDF5JavaException ex = new HDF5JavaException("HDFArray: byteify array too big?");
- throw (ex);
+ throw(ex);
}
}
}
@@ -185,15 +186,15 @@ public class HDFArray {
}
catch (OutOfMemoryError err) {
HDF5JavaException ex = new HDF5JavaException("HDFArray: byteify array too big?");
- throw (ex);
+ throw(ex);
}
Object oo = _theArray;
- int n = 0; /* the current byte */
+ int n = 0; /* the current byte */
int index = 0;
int i;
while (n < ArrayDescriptor.totalSize) {
- oo = ArrayDescriptor.objs[0];
+ oo = ArrayDescriptor.objs[0];
index = n / ArrayDescriptor.bytetoindex[0];
index %= ArrayDescriptor.dimlen[0];
for (i = 0; i < (ArrayDescriptor.dims); i++) {
@@ -209,9 +210,9 @@ public class HDFArray {
if (index > (ArrayDescriptor.dimlen[i] - 1)) {
throw new java.lang.IndexOutOfBoundsException("HDFArray: byteify index OOB?");
}
- oo = java.lang.reflect.Array.get(oo, index);
+ oo = java.lang.reflect.Array.get(oo, index);
ArrayDescriptor.currentindex[i] = index;
- ArrayDescriptor.objs[i] = oo;
+ ArrayDescriptor.objs[i] = oo;
}
}
@@ -220,85 +221,90 @@ public class HDFArray {
try {
if (ArrayDescriptor.NT == 'J') {
arow = HDFNativeData.longToByte(0, ArrayDescriptor.dimlen[ArrayDescriptor.dims],
- (long[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]);
+ (long[])ArrayDescriptor.objs[ArrayDescriptor.dims - 1]);
}
else if (ArrayDescriptor.NT == 'I') {
arow = HDFNativeData.intToByte(0, ArrayDescriptor.dimlen[ArrayDescriptor.dims],
- (int[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]);
+ (int[])ArrayDescriptor.objs[ArrayDescriptor.dims - 1]);
}
else if (ArrayDescriptor.NT == 'S') {
arow = HDFNativeData.shortToByte(0, ArrayDescriptor.dimlen[ArrayDescriptor.dims],
- (short[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]);
+ (short[])ArrayDescriptor.objs[ArrayDescriptor.dims - 1]);
}
else if (ArrayDescriptor.NT == 'B') {
- arow = (byte[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1];
+ arow = (byte[])ArrayDescriptor.objs[ArrayDescriptor.dims - 1];
}
else if (ArrayDescriptor.NT == 'F') {
/* 32 bit float */
arow = HDFNativeData.floatToByte(0, ArrayDescriptor.dimlen[ArrayDescriptor.dims],
- (float[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]);
+ (float[])ArrayDescriptor.objs[ArrayDescriptor.dims - 1]);
}
else if (ArrayDescriptor.NT == 'D') {
/* 64 bit float */
- arow = HDFNativeData.doubleToByte(0, ArrayDescriptor.dimlen[ArrayDescriptor.dims],
- (double[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]);
+ arow =
+ HDFNativeData.doubleToByte(0, ArrayDescriptor.dimlen[ArrayDescriptor.dims],
+ (double[])ArrayDescriptor.objs[ArrayDescriptor.dims - 1]);
}
else if (ArrayDescriptor.NT == 'L') {
if (ArrayDescriptor.className.equals("java.lang.Byte")) {
- arow = ByteObjToByte((Byte[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]);
+ arow = ByteObjToByte((Byte[])ArrayDescriptor.objs[ArrayDescriptor.dims - 1]);
}
else if (ArrayDescriptor.className.equals("java.lang.Integer")) {
- arow = IntegerToByte((Integer[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]);
+ arow = IntegerToByte((Integer[])ArrayDescriptor.objs[ArrayDescriptor.dims - 1]);
}
else if (ArrayDescriptor.className.equals("java.lang.Short")) {
- arow = ShortToByte((Short[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]);
+ arow = ShortToByte((Short[])ArrayDescriptor.objs[ArrayDescriptor.dims - 1]);
}
else if (ArrayDescriptor.className.equals("java.lang.Float")) {
- arow = FloatObjToByte((Float[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]);
+ arow = FloatObjToByte((Float[])ArrayDescriptor.objs[ArrayDescriptor.dims - 1]);
}
else if (ArrayDescriptor.className.equals("java.lang.Double")) {
- arow = DoubleObjToByte((Double[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]);
+ arow = DoubleObjToByte((Double[])ArrayDescriptor.objs[ArrayDescriptor.dims - 1]);
}
else if (ArrayDescriptor.className.equals("java.lang.Long")) {
- arow = LongObjToByte((Long[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]);
+ arow = LongObjToByte((Long[])ArrayDescriptor.objs[ArrayDescriptor.dims - 1]);
}
else {
- HDF5JavaException ex = new HDF5JavaException("HDFArray: byteify Object type not implemented?");
- throw (ex);
+ HDF5JavaException ex =
+ new HDF5JavaException("HDFArray: byteify Object type not implemented?");
+ throw(ex);
}
}
else {
- HDF5JavaException ex = new HDF5JavaException("HDFArray: byteify unknown type not implemented?");
- throw (ex);
+ HDF5JavaException ex =
+ new HDF5JavaException("HDFArray: byteify unknown type not implemented?");
+ throw(ex);
}
System.arraycopy(arow, 0, _barray, n,
- (ArrayDescriptor.dimlen[ArrayDescriptor.dims] * ArrayDescriptor.NTsize));
+ (ArrayDescriptor.dimlen[ArrayDescriptor.dims] * ArrayDescriptor.NTsize));
n += ArrayDescriptor.bytetoindex[ArrayDescriptor.dims - 1];
}
catch (OutOfMemoryError err) {
HDF5JavaException ex = new HDF5JavaException("HDFArray: byteify array too big?");
- throw (ex);
+ throw(ex);
}
}
/* assert: the whole array is completed--currentindex should == len - 1 */
/* error checks */
if (n < ArrayDescriptor.totalSize) {
- throw new java.lang.InternalError(new String("HDFArray::byteify: Panic didn't complete all input data: n= "
- + n + " size = " + ArrayDescriptor.totalSize));
+ throw new java.lang.InternalError(
+ new String("HDFArray::byteify: Panic didn't complete all input data: n= " + n +
+ " size = " + ArrayDescriptor.totalSize));
}
for (i = 0; i < ArrayDescriptor.dims; i++) {
if (ArrayDescriptor.currentindex[i] != ArrayDescriptor.dimlen[i] - 1) {
- throw new java.lang.InternalError(new String(
- "Panic didn't complete all data: currentindex[" + i + "] = " + ArrayDescriptor.currentindex[i]
- + " (should be " + (ArrayDescriptor.dimlen[i] - 1) + " ?)"));
+ throw new java.lang.InternalError(new String("Panic didn't complete all data: currentindex[" +
+ i + "] = " + ArrayDescriptor.currentindex[i] +
+ " (should be " +
+ (ArrayDescriptor.dimlen[i] - 1) + " ?)"));
}
}
return _barray;
}
/**
- * Given a one-dimensional array of bytes representing numbers, convert it to a java array of the shape and size
- * passed to the constructor.
+ * Given a one-dimensional array of bytes representing numbers, convert it to a java array of the shape
+ * and size passed to the constructor.
*
* @param bytes
* The bytes to construct the Array.
@@ -312,13 +318,13 @@ public class HDFArray {
if (_theArray == null) {
/* exception: not an array */
HDF5JavaException ex = new HDF5JavaException("arrayify: not an array?: ");
- throw (ex);
+ throw(ex);
}
if (java.lang.reflect.Array.getLength(bytes) != ArrayDescriptor.totalSize) {
/* exception: array not right size */
HDF5JavaException ex = new HDF5JavaException("arrayify: array is wrong size?: ");
- throw (ex);
+ throw(ex);
}
_barray = bytes; /* hope that the bytes are correct.... */
@@ -387,74 +393,77 @@ public class HDFArray {
return _theArray;
}
else {
- HDF5JavaException ex = new HDF5JavaException("arrayify: Object type not implemented yet...");
- throw (ex);
+ HDF5JavaException ex =
+ new HDF5JavaException("arrayify: Object type not implemented yet...");
+ throw(ex);
}
}
else {
- HDF5JavaException ex = new HDF5JavaException("arrayify: unknown type not implemented yet...");
- throw (ex);
+ HDF5JavaException ex =
+ new HDF5JavaException("arrayify: unknown type not implemented yet...");
+ throw(ex);
}
}
catch (OutOfMemoryError err) {
HDF5JavaException ex = new HDF5JavaException("HDFArray: arrayify array too big?");
- throw (ex);
+ throw(ex);
}
}
/* Assert dims >= 2 */
Object oo = _theArray;
- int n = 0; /* the current byte */
- int m = 0; /* the current array index */
+ int n = 0; /* the current byte */
+ int m = 0; /* the current array index */
int index = 0;
int i;
Object flattenedArray = null;
switch (ArrayDescriptor.NT) {
case 'J':
- flattenedArray = (Object) HDFNativeData.byteToLong(_barray);
+ flattenedArray = (Object)HDFNativeData.byteToLong(_barray);
break;
case 'S':
- flattenedArray = (Object) HDFNativeData.byteToShort(_barray);
+ flattenedArray = (Object)HDFNativeData.byteToShort(_barray);
break;
case 'I':
- flattenedArray = (Object) HDFNativeData.byteToInt(_barray);
+ flattenedArray = (Object)HDFNativeData.byteToInt(_barray);
break;
case 'F':
- flattenedArray = (Object) HDFNativeData.byteToFloat(_barray);
+ flattenedArray = (Object)HDFNativeData.byteToFloat(_barray);
break;
case 'D':
- flattenedArray = (Object) HDFNativeData.byteToDouble(_barray);
+ flattenedArray = (Object)HDFNativeData.byteToDouble(_barray);
break;
case 'B':
- flattenedArray = (Object) _barray;
+ flattenedArray = (Object)_barray;
break;
- case 'L':
- {
- if (ArrayDescriptor.className.equals("java.lang.Byte"))
- flattenedArray = (Object) ByteToByteObj(_barray);
- else if (ArrayDescriptor.className.equals("java.lang.Short"))
- flattenedArray = (Object) ByteToShort(_barray);
- else if (ArrayDescriptor.className.equals("java.lang.Integer"))
- flattenedArray = (Object) ByteToInteger(_barray);
- else if (ArrayDescriptor.className.equals("java.lang.Long"))
- flattenedArray = (Object) ByteToLongObj(_barray);
- else if (ArrayDescriptor.className.equals("java.lang.Float"))
- flattenedArray = (Object) ByteToFloatObj(_barray);
- else if (ArrayDescriptor.className.equals("java.lang.Double"))
- flattenedArray = (Object) ByteToDoubleObj(_barray);
- else {
- HDF5JavaException ex = new HDF5JavaException("HDFArray: unsupported Object type: " + ArrayDescriptor.NT);
- throw (ex);
- }
- } // end of statement for arrays of boxed objects
+ case 'L': {
+ if (ArrayDescriptor.className.equals("java.lang.Byte"))
+ flattenedArray = (Object)ByteToByteObj(_barray);
+ else if (ArrayDescriptor.className.equals("java.lang.Short"))
+ flattenedArray = (Object)ByteToShort(_barray);
+ else if (ArrayDescriptor.className.equals("java.lang.Integer"))
+ flattenedArray = (Object)ByteToInteger(_barray);
+ else if (ArrayDescriptor.className.equals("java.lang.Long"))
+ flattenedArray = (Object)ByteToLongObj(_barray);
+ else if (ArrayDescriptor.className.equals("java.lang.Float"))
+ flattenedArray = (Object)ByteToFloatObj(_barray);
+ else if (ArrayDescriptor.className.equals("java.lang.Double"))
+ flattenedArray = (Object)ByteToDoubleObj(_barray);
+ else {
+ HDF5JavaException ex =
+ new HDF5JavaException("HDFArray: unsupported Object type: " + ArrayDescriptor.NT);
+ throw(ex);
+ }
+ } // end of statement for arrays of boxed objects
default:
- HDF5JavaException ex = new HDF5JavaException("HDFArray: unknown or unsupported type: " + ArrayDescriptor.NT);
- throw (ex);
+ HDF5JavaException ex =
+ new HDF5JavaException("HDFArray: unknown or unsupported type: " + ArrayDescriptor.NT);
+ throw(ex);
} // end of switch statement for arrays of primitives
while (n < ArrayDescriptor.totalSize) {
- oo = ArrayDescriptor.objs[0];
+ oo = ArrayDescriptor.objs[0];
index = n / ArrayDescriptor.bytetoindex[0];
index %= ArrayDescriptor.dimlen[0];
for (i = 0; i < (ArrayDescriptor.dims); i++) {
@@ -471,86 +480,88 @@ public class HDFArray {
System.out.println("out of bounds?");
return null;
}
- oo = java.lang.reflect.Array.get(oo, index);
+ oo = java.lang.reflect.Array.get(oo, index);
ArrayDescriptor.currentindex[i] = index;
- ArrayDescriptor.objs[i] = oo;
+ ArrayDescriptor.objs[i] = oo;
}
}
/* array-ify */
try {
Object arow = null;
- int mm = m + ArrayDescriptor.dimlen[ArrayDescriptor.dims];
+ int mm = m + ArrayDescriptor.dimlen[ArrayDescriptor.dims];
switch (ArrayDescriptor.NT) {
case 'B':
- arow = (Object) Arrays.copyOfRange((byte[]) flattenedArray, m, mm);
+ arow = (Object)Arrays.copyOfRange((byte[])flattenedArray, m, mm);
break;
case 'S':
- arow = (Object) Arrays.copyOfRange((short[]) flattenedArray, m, mm);
+ arow = (Object)Arrays.copyOfRange((short[])flattenedArray, m, mm);
break;
case 'I':
- arow = (Object) Arrays.copyOfRange((int[]) flattenedArray, m, mm);
+ arow = (Object)Arrays.copyOfRange((int[])flattenedArray, m, mm);
break;
case 'J':
- arow = (Object) Arrays.copyOfRange((long[]) flattenedArray, m, mm);
+ arow = (Object)Arrays.copyOfRange((long[])flattenedArray, m, mm);
break;
case 'F':
- arow = (Object) Arrays.copyOfRange((float[]) flattenedArray, m, mm);
+ arow = (Object)Arrays.copyOfRange((float[])flattenedArray, m, mm);
break;
case 'D':
- arow = (Object) Arrays.copyOfRange((double[]) flattenedArray, m, mm);
+ arow = (Object)Arrays.copyOfRange((double[])flattenedArray, m, mm);
break;
- case 'L':
- {
- if (ArrayDescriptor.className.equals("java.lang.Byte"))
- arow = (Object) Arrays.copyOfRange((Byte[]) flattenedArray, m, mm);
- else if (ArrayDescriptor.className.equals("java.lang.Short"))
- arow = (Object) Arrays.copyOfRange((Short[]) flattenedArray, m, mm);
- else if (ArrayDescriptor.className.equals("java.lang.Integer"))
- arow = (Object) Arrays.copyOfRange((Integer[]) flattenedArray, m, mm);
- else if (ArrayDescriptor.className.equals("java.lang.Long"))
- arow = (Object) Arrays.copyOfRange((Long[]) flattenedArray, m, mm);
- else if (ArrayDescriptor.className.equals("java.lang.Float"))
- arow = (Object) Arrays.copyOfRange((Float[]) flattenedArray, m, mm);
- else if (ArrayDescriptor.className.equals("java.lang.Double"))
- arow = (Object) Arrays.copyOfRange((Double[]) flattenedArray, m, mm);
- else {
- HDF5JavaException ex = new HDF5JavaException("HDFArray: unsupported Object type: " + ArrayDescriptor.NT);
- throw (ex);
- }
- } // end of statement for arrays of boxed numerics
+ case 'L': {
+ if (ArrayDescriptor.className.equals("java.lang.Byte"))
+ arow = (Object)Arrays.copyOfRange((Byte[])flattenedArray, m, mm);
+ else if (ArrayDescriptor.className.equals("java.lang.Short"))
+ arow = (Object)Arrays.copyOfRange((Short[])flattenedArray, m, mm);
+ else if (ArrayDescriptor.className.equals("java.lang.Integer"))
+ arow = (Object)Arrays.copyOfRange((Integer[])flattenedArray, m, mm);
+ else if (ArrayDescriptor.className.equals("java.lang.Long"))
+ arow = (Object)Arrays.copyOfRange((Long[])flattenedArray, m, mm);
+ else if (ArrayDescriptor.className.equals("java.lang.Float"))
+ arow = (Object)Arrays.copyOfRange((Float[])flattenedArray, m, mm);
+ else if (ArrayDescriptor.className.equals("java.lang.Double"))
+ arow = (Object)Arrays.copyOfRange((Double[])flattenedArray, m, mm);
+ else {
+ HDF5JavaException ex =
+ new HDF5JavaException("HDFArray: unsupported Object type: " + ArrayDescriptor.NT);
+ throw(ex);
+ }
+ } // end of statement for arrays of boxed numerics
} // end of switch statement for arrays of primitives
java.lang.reflect.Array.set(ArrayDescriptor.objs[ArrayDescriptor.dims - 2],
- (ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]), arow);
+ (ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]), arow);
n += ArrayDescriptor.bytetoindex[ArrayDescriptor.dims - 1];
ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]++;
m = mm;
}
catch (OutOfMemoryError err) {
HDF5JavaException ex = new HDF5JavaException("HDFArray: arrayify array too big?");
- throw (ex);
+ throw(ex);
}
}
/* assert: the whole array is completed--currentindex should == len - 1 */
/* error checks */
if (n < ArrayDescriptor.totalSize) {
- throw new java.lang.InternalError(new String("HDFArray::arrayify Panic didn't complete all input data: n= "
- + n + " size = " + ArrayDescriptor.totalSize));
+ throw new java.lang.InternalError(
+ new String("HDFArray::arrayify Panic didn't complete all input data: n= " + n +
+ " size = " + ArrayDescriptor.totalSize));
}
for (i = 0; i <= ArrayDescriptor.dims - 2; i++) {
if (ArrayDescriptor.currentindex[i] != ArrayDescriptor.dimlen[i] - 1) {
throw new java.lang.InternalError(
- new String("HDFArray::arrayify Panic didn't complete all data: currentindex[" + i + "] = "
- + ArrayDescriptor.currentindex[i] + " (should be " + (ArrayDescriptor.dimlen[i] - 1)
- + "?"));
+ new String("HDFArray::arrayify Panic didn't complete all data: currentindex[" + i +
+ "] = " + ArrayDescriptor.currentindex[i] + " (should be " +
+ (ArrayDescriptor.dimlen[i] - 1) + "?"));
}
}
- if (ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1] != ArrayDescriptor.dimlen[ArrayDescriptor.dims - 1]) {
- throw new java.lang.InternalError(
- new String("HDFArray::arrayify Panic didn't complete all data: currentindex[" + i + "] = "
- + ArrayDescriptor.currentindex[i] + " (should be " + (ArrayDescriptor.dimlen[i]) + "?"));
+ if (ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1] !=
+ ArrayDescriptor.dimlen[ArrayDescriptor.dims - 1]) {
+ throw new java.lang.InternalError(new String(
+ "HDFArray::arrayify Panic didn't complete all data: currentindex[" + i + "] = " +
+ ArrayDescriptor.currentindex[i] + " (should be " + (ArrayDescriptor.dimlen[i]) + "?"));
}
return _theArray;
@@ -559,7 +570,7 @@ public class HDFArray {
private byte[] IntegerToByte(Integer in[])
{
int nelems = java.lang.reflect.Array.getLength(in);
- int[] out = new int[nelems];
+ int[] out = new int[nelems];
for (int i = 0; i < nelems; i++) {
out[i] = in[i].intValue();
@@ -569,8 +580,8 @@ public class HDFArray {
private Integer[] ByteToInteger(byte[] bin)
{
- int in[] = HDFNativeData.byteToInt(bin);
- int nelems = java.lang.reflect.Array.getLength(in);
+ int in[] = HDFNativeData.byteToInt(bin);
+ int nelems = java.lang.reflect.Array.getLength(in);
Integer[] out = new Integer[nelems];
for (int i = 0; i < nelems; i++) {
@@ -581,8 +592,8 @@ public class HDFArray {
private Integer[] ByteToInteger(int start, int len, byte[] bin)
{
- int in[] = HDFNativeData.byteToInt(start, len, bin);
- int nelems = java.lang.reflect.Array.getLength(in);
+ int in[] = HDFNativeData.byteToInt(start, len, bin);
+ int nelems = java.lang.reflect.Array.getLength(in);
Integer[] out = new Integer[nelems];
for (int i = 0; i < nelems; i++) {
@@ -593,7 +604,7 @@ public class HDFArray {
private byte[] ShortToByte(Short in[])
{
- int nelems = java.lang.reflect.Array.getLength(in);
+ int nelems = java.lang.reflect.Array.getLength(in);
short[] out = new short[nelems];
for (int i = 0; i < nelems; i++) {
@@ -604,8 +615,8 @@ public class HDFArray {
private Short[] ByteToShort(byte[] bin)
{
- short in[] = HDFNativeData.byteToShort(bin);
- int nelems = java.lang.reflect.Array.getLength((Object) in);
+ short in[] = HDFNativeData.byteToShort(bin);
+ int nelems = java.lang.reflect.Array.getLength((Object)in);
Short[] out = new Short[nelems];
for (int i = 0; i < nelems; i++) {
@@ -616,8 +627,8 @@ public class HDFArray {
private Short[] ByteToShort(int start, int len, byte[] bin)
{
- short in[] = (short[]) HDFNativeData.byteToShort(start, len, bin);
- int nelems = java.lang.reflect.Array.getLength((Object) in);
+ short in[] = (short[])HDFNativeData.byteToShort(start, len, bin);
+ int nelems = java.lang.reflect.Array.getLength((Object)in);
Short[] out = new Short[nelems];
for (int i = 0; i < nelems; i++) {
@@ -628,7 +639,7 @@ public class HDFArray {
private byte[] ByteObjToByte(Byte in[])
{
- int nelems = java.lang.reflect.Array.getLength((Object) in);
+ int nelems = java.lang.reflect.Array.getLength((Object)in);
byte[] out = new byte[nelems];
for (int i = 0; i < nelems; i++) {
@@ -639,7 +650,7 @@ public class HDFArray {
private Byte[] ByteToByteObj(byte[] bin)
{
- int nelems = java.lang.reflect.Array.getLength((Object) bin);
+ int nelems = java.lang.reflect.Array.getLength((Object)bin);
Byte[] out = new Byte[nelems];
for (int i = 0; i < nelems; i++) {
@@ -660,7 +671,7 @@ public class HDFArray {
private byte[] FloatObjToByte(Float in[])
{
- int nelems = java.lang.reflect.Array.getLength((Object) in);
+ int nelems = java.lang.reflect.Array.getLength((Object)in);
float[] out = new float[nelems];
for (int i = 0; i < nelems; i++) {
@@ -671,8 +682,8 @@ public class HDFArray {
private Float[] ByteToFloatObj(byte[] bin)
{
- float in[] = (float[]) HDFNativeData.byteToFloat(bin);
- int nelems = java.lang.reflect.Array.getLength((Object) in);
+ float in[] = (float[])HDFNativeData.byteToFloat(bin);
+ int nelems = java.lang.reflect.Array.getLength((Object)in);
Float[] out = new Float[nelems];
for (int i = 0; i < nelems; i++) {
@@ -683,8 +694,8 @@ public class HDFArray {
private Float[] ByteToFloatObj(int start, int len, byte[] bin)
{
- float in[] = (float[]) HDFNativeData.byteToFloat(start, len, bin);
- int nelems = java.lang.reflect.Array.getLength((Object) in);
+ float in[] = (float[])HDFNativeData.byteToFloat(start, len, bin);
+ int nelems = java.lang.reflect.Array.getLength((Object)in);
Float[] out = new Float[nelems];
for (int i = 0; i < nelems; i++) {
@@ -695,7 +706,7 @@ public class HDFArray {
private byte[] DoubleObjToByte(Double in[])
{
- int nelems = java.lang.reflect.Array.getLength((Object) in);
+ int nelems = java.lang.reflect.Array.getLength((Object)in);
double[] out = new double[nelems];
for (int i = 0; i < nelems; i++) {
@@ -706,8 +717,8 @@ public class HDFArray {
private Double[] ByteToDoubleObj(byte[] bin)
{
- double in[] = (double[]) HDFNativeData.byteToDouble(bin);
- int nelems = java.lang.reflect.Array.getLength((Object) in);
+ double in[] = (double[])HDFNativeData.byteToDouble(bin);
+ int nelems = java.lang.reflect.Array.getLength((Object)in);
Double[] out = new Double[nelems];
for (int i = 0; i < nelems; i++) {
@@ -718,8 +729,8 @@ public class HDFArray {
private Double[] ByteToDoubleObj(int start, int len, byte[] bin)
{
- double in[] = (double[]) HDFNativeData.byteToDouble(start, len, bin);
- int nelems = java.lang.reflect.Array.getLength((Object) in);
+ double in[] = (double[])HDFNativeData.byteToDouble(start, len, bin);
+ int nelems = java.lang.reflect.Array.getLength((Object)in);
Double[] out = new Double[nelems];
for (int i = 0; i < nelems; i++) {
@@ -730,7 +741,7 @@ public class HDFArray {
private byte[] LongObjToByte(Long in[])
{
- int nelems = java.lang.reflect.Array.getLength((Object) in);
+ int nelems = java.lang.reflect.Array.getLength((Object)in);
long[] out = new long[nelems];
for (int i = 0; i < nelems; i++) {
@@ -741,8 +752,8 @@ public class HDFArray {
private Long[] ByteToLongObj(byte[] bin)
{
- long in[] = (long[]) HDFNativeData.byteToLong(bin);
- int nelems = java.lang.reflect.Array.getLength((Object) in);
+ long in[] = (long[])HDFNativeData.byteToLong(bin);
+ int nelems = java.lang.reflect.Array.getLength((Object)in);
Long[] out = new Long[nelems];
for (int i = 0; i < nelems; i++) {
@@ -753,8 +764,8 @@ public class HDFArray {
private Long[] ByteToLongObj(int start, int len, byte[] bin)
{
- long in[] = (long[]) HDFNativeData.byteToLong(start, len, bin);
- int nelems = java.lang.reflect.Array.getLength((Object) in);
+ long in[] = (long[])HDFNativeData.byteToLong(start, len, bin);
+ int nelems = java.lang.reflect.Array.getLength((Object)in);
Long[] out = new Long[nelems];
for (int i = 0; i < nelems; i++) {
@@ -770,18 +781,18 @@ public class HDFArray {
* We use java.lang.reflection here.
*/
class ArrayDescriptor {
- static String theType = "";
- static Class theClass = null;
- static int[] dimlen = null;
- static int[] dimstart = null;
+ static String theType = "";
+ static Class theClass = null;
+ static int[] dimlen = null;
+ static int[] dimstart = null;
static int[] currentindex = null;
- static int[] bytetoindex = null;
- static int totalSize = 0;
- static int totalElements = 0;
- static Object[] objs = null;
- static char NT = ' '; /* must be B,S,I,L,F,D, else error */
- static int NTsize = 0;
- static int dims = 0;
+ static int[] bytetoindex = null;
+ static int totalSize = 0;
+ static int totalElements = 0;
+ static Object[] objs = null;
+ static char NT = ' '; /* must be B,S,I,L,F,D, else error */
+ static int NTsize = 0;
+ static int dims = 0;
static String className;
public ArrayDescriptor(Object anArray) throws HDF5JavaException
@@ -790,7 +801,7 @@ class ArrayDescriptor {
if (tc.isArray() == false) {
/* exception: not an array */
HDF5JavaException ex = new HDF5JavaException("ArrayDescriptor: not an array?: ");
- throw (ex);
+ throw(ex);
}
theClass = tc;
@@ -799,10 +810,10 @@ class ArrayDescriptor {
* parse the type descriptor to discover the shape of the array
*/
String ss = tc.toString();
- theType = ss;
- int n = 6;
- dims = 0;
- char c = ' ';
+ theType = ss;
+ int n = 6;
+ dims = 0;
+ char c = ' ';
while (n < ss.length()) {
c = ss.charAt(n);
n++;
@@ -811,10 +822,10 @@ class ArrayDescriptor {
}
}
- String css = ss.substring(ss.lastIndexOf('[') + 1);
+ String css = ss.substring(ss.lastIndexOf('[') + 1);
Class compC = tc.getComponentType();
- String cs = compC.toString();
- NT = c; /* must be B,S,I,L,F,D, else error */
+ String cs = compC.toString();
+ NT = c; /* must be B,S,I,L,F,D, else error */
if (NT == 'B') {
NTsize = 1;
}
@@ -828,68 +839,69 @@ class ArrayDescriptor {
NTsize = 8;
}
else if (css.startsWith("Ljava.lang.Byte")) {
- NT = 'L';
+ NT = 'L';
className = "java.lang.Byte";
- NTsize = 1;
+ NTsize = 1;
}
else if (css.startsWith("Ljava.lang.Short")) {
- NT = 'L';
+ NT = 'L';
className = "java.lang.Short";
- NTsize = 2;
+ NTsize = 2;
}
else if (css.startsWith("Ljava.lang.Integer")) {
- NT = 'L';
+ NT = 'L';
className = "java.lang.Integer";
- NTsize = 4;
+ NTsize = 4;
}
else if (css.startsWith("Ljava.lang.Float")) {
- NT = 'L';
+ NT = 'L';
className = "java.lang.Float";
- NTsize = 4;
+ NTsize = 4;
}
else if (css.startsWith("Ljava.lang.Double")) {
- NT = 'L';
+ NT = 'L';
className = "java.lang.Double";
- NTsize = 8;
+ NTsize = 8;
}
else if (css.startsWith("Ljava.lang.Long")) {
- NT = 'L';
+ NT = 'L';
className = "java.lang.Long";
- NTsize = 8;
+ NTsize = 8;
}
else if (css.startsWith("Ljava.lang.String")) {
- NT = 'L';
+ NT = 'L';
className = "java.lang.String";
- NTsize = 1;
- throw new HDF5JavaException(new String("ArrayDesciptor: Warning: String array not fully supported yet"));
+ NTsize = 1;
+ throw new HDF5JavaException(
+ new String("ArrayDesciptor: Warning: String array not fully supported yet"));
}
else {
/*
* exception: not a numeric type
*/
throw new HDF5JavaException(
- new String("ArrayDesciptor: Error: array is not numeric (type is " + css + ") ?"));
+ new String("ArrayDesciptor: Error: array is not numeric (type is " + css + ") ?"));
}
/* fill in the table */
- dimlen = new int[dims + 1];
- dimstart = new int[dims + 1];
+ dimlen = new int[dims + 1];
+ dimstart = new int[dims + 1];
currentindex = new int[dims + 1];
- bytetoindex = new int[dims + 1];
- objs = new Object[dims + 1];
+ bytetoindex = new int[dims + 1];
+ objs = new Object[dims + 1];
- Object o = anArray;
- objs[0] = o;
- dimlen[0] = 1;
- dimstart[0] = 0;
+ Object o = anArray;
+ objs[0] = o;
+ dimlen[0] = 1;
+ dimstart[0] = 0;
currentindex[0] = 0;
- int elements = 1;
+ int elements = 1;
int i;
for (i = 1; i <= dims; i++) {
- dimlen[i] = java.lang.reflect.Array.getLength((Object) o);
- o = java.lang.reflect.Array.get((Object) o, 0);
- objs[i] = o;
- dimstart[i] = 0;
+ dimlen[i] = java.lang.reflect.Array.getLength((Object)o);
+ o = java.lang.reflect.Array.get((Object)o, 0);
+ objs[i] = o;
+ dimstart[i] = 0;
currentindex[i] = 0;
elements *= dimlen[i];
}
@@ -917,14 +929,15 @@ class ArrayDescriptor {
System.out.println("Type: " + theType);
System.out.println("Class: " + theClass);
System.out.println("NT: " + NT + " NTsize: " + NTsize);
- System.out.println("Array has " + dims + " dimensions (" + totalSize
- + " bytes, " + totalElements + " elements)");
+ System.out.println("Array has " + dims + " dimensions (" + totalSize + " bytes, " + totalElements +
+ " elements)");
int i;
for (i = 0; i <= dims; i++) {
- Class tc = objs[i].getClass();
+ Class tc = objs[i].getClass();
String ss = tc.toString();
- System.out.println(i + ": start " + dimstart[i] + ": len " + dimlen[i] + " current " + currentindex[i]
- + " bytetoindex " + bytetoindex[i] + " object " + objs[i] + " otype " + ss);
+ System.out.println(i + ": start " + dimstart[i] + ": len " + dimlen[i] + " current " +
+ currentindex[i] + " bytetoindex " + bytetoindex[i] + " object " + objs[i] +
+ " otype " + ss);
}
}
}
diff --git a/java/src/hdf/hdf5lib/HDFNativeData.java b/java/src/hdf/hdf5lib/HDFNativeData.java
index 85378db..c497043 100644
--- a/java/src/hdf/hdf5lib/HDFNativeData.java
+++ b/java/src/hdf/hdf5lib/HDFNativeData.java
@@ -95,8 +95,7 @@ public class HDFNativeData {
* The input array of bytes
* @return an array of 'len' int
*/
- public synchronized static native int[] byteToInt(int start, int len,
- byte[] data);
+ public synchronized static native int[] byteToInt(int start, int len, byte[] data);
/**
* Convert 4 bytes from an array of bytes into a single int
@@ -107,9 +106,10 @@ public class HDFNativeData {
* The input array of bytes
* @return The integer value of the bytes.
*/
- public synchronized static int byteToInt(byte[] data, int start) {
+ public synchronized static int byteToInt(byte[] data, int start)
+ {
int[] ival = new int[1];
- ival = byteToInt(start, 1, data);
+ ival = byteToInt(start, 1, data);
return (ival[0]);
}
@@ -124,8 +124,7 @@ public class HDFNativeData {
* The input array of bytes
* @return an array of 'len' short
*/
- public synchronized static native short[] byteToShort(int start, int len,
- byte[] data);
+ public synchronized static native short[] byteToShort(int start, int len, byte[] data);
/**
* Convert 2 bytes from an array of bytes into a single short
@@ -136,9 +135,10 @@ public class HDFNativeData {
* The input array of bytes
* @return The short value of the bytes.
*/
- public synchronized static short byteToShort(byte[] data, int start) {
+ public synchronized static short byteToShort(byte[] data, int start)
+ {
short[] sval = new short[1];
- sval = byteToShort(start, 1, data);
+ sval = byteToShort(start, 1, data);
return (sval[0]);
}
@@ -164,9 +164,10 @@ public class HDFNativeData {
* The input array of bytes
* @return The float value of the bytes.
*/
- public synchronized static float byteToFloat(byte[] data, int start) {
+ public synchronized static float byteToFloat(byte[] data, int start)
+ {
float[] fval = new float[1];
- fval = byteToFloat(start, 1, data);
+ fval = byteToFloat(start, 1, data);
return (fval[0]);
}
@@ -181,8 +182,7 @@ public class HDFNativeData {
* The input array of bytes
* @return an array of 'len' long
*/
- public synchronized static native long[] byteToLong(int start, int len,
- byte[] data);
+ public synchronized static native long[] byteToLong(int start, int len, byte[] data);
/**
* Convert 8 bytes from an array of bytes into a single long
@@ -193,9 +193,10 @@ public class HDFNativeData {
* The input array of bytes
* @return The long value of the bytes.
*/
- public synchronized static long byteToLong(byte[] data, int start) {
+ public synchronized static long byteToLong(byte[] data, int start)
+ {
long[] lval = new long[1];
- lval = byteToLong(start, 1, data);
+ lval = byteToLong(start, 1, data);
return (lval[0]);
}
@@ -210,8 +211,7 @@ public class HDFNativeData {
* The input array of bytes
* @return an array of 'len' double
*/
- public synchronized static native double[] byteToDouble(int start, int len,
- byte[] data);
+ public synchronized static native double[] byteToDouble(int start, int len, byte[] data);
/**
* Convert 8 bytes from an array of bytes into a single double
@@ -222,9 +222,10 @@ public class HDFNativeData {
* The input array of bytes
* @return The double value of the bytes.
*/
- public synchronized static double byteToDouble(byte[] data, int start) {
+ public synchronized static double byteToDouble(byte[] data, int start)
+ {
double[] dval = new double[1];
- dval = byteToDouble(start, 1, data);
+ dval = byteToDouble(start, 1, data);
return (dval[0]);
}
@@ -239,8 +240,7 @@ public class HDFNativeData {
* The input array of int
* @return an array of bytes
*/
- public synchronized static native byte[] intToByte(int start, int len,
- int[] data);
+ public synchronized static native byte[] intToByte(int start, int len, int[] data);
/**
* Convert a range from an array of short into an array of bytes.
@@ -253,8 +253,7 @@ public class HDFNativeData {
* The input array of short
* @return an array of bytes
*/
- public synchronized static native byte[] shortToByte(int start, int len,
- short[] data);
+ public synchronized static native byte[] shortToByte(int start, int len, short[] data);
/**
* Convert a range from an array of float into an array of bytes.
@@ -267,8 +266,7 @@ public class HDFNativeData {
* The input array of float
* @return an array of bytes
*/
- public synchronized static native byte[] floatToByte(int start, int len,
- float[] data);
+ public synchronized static native byte[] floatToByte(int start, int len, float[] data);
/**
* Convert a range from an array of long into an array of bytes.
@@ -281,8 +279,7 @@ public class HDFNativeData {
* The input array of long
* @return an array of bytes
*/
- public synchronized static native byte[] longToByte(int start, int len,
- long[] data);
+ public synchronized static native byte[] longToByte(int start, int len, long[] data);
/**
* Convert a range from an array of double into an array of bytes.
@@ -295,8 +292,7 @@ public class HDFNativeData {
* The input array of double
* @return an array of bytes
*/
- public synchronized static native byte[] doubleToByte(int start, int len,
- double[] data);
+ public synchronized static native byte[] doubleToByte(int start, int len, double[] data);
/**
* Convert a single byte into an array of one byte.
@@ -318,9 +314,7 @@ public class HDFNativeData {
* The input Byte
* @return an array of bytes
*/
- public synchronized static byte[] byteToByte(Byte data) {
- return byteToByte(data.byteValue());
- }
+ public synchronized static byte[] byteToByte(Byte data) { return byteToByte(data.byteValue()); }
/**
* Convert a single int into an array of 4 bytes.
@@ -338,9 +332,7 @@ public class HDFNativeData {
* The input Integer
* @return an array of bytes
*/
- public synchronized static byte[] intToByte(Integer data) {
- return intToByte(data.intValue());
- }
+ public synchronized static byte[] intToByte(Integer data) { return intToByte(data.intValue()); }
/**
* Convert a single short into an array of 2 bytes.
@@ -358,9 +350,7 @@ public class HDFNativeData {
* The input Short
* @return an array of bytes
*/
- public synchronized static byte[] shortToByte(Short data) {
- return shortToByte(data.shortValue());
- }
+ public synchronized static byte[] shortToByte(Short data) { return shortToByte(data.shortValue()); }
/**
* Convert a single float into an array of 4 bytes.
@@ -378,9 +368,7 @@ public class HDFNativeData {
* The input Float
* @return an array of bytes
*/
- public synchronized static byte[] floatToByte(Float data) {
- return floatToByte(data.floatValue());
- };
+ public synchronized static byte[] floatToByte(Float data) { return floatToByte(data.floatValue()); };
/**
* Convert a single long into an array of 8 bytes.
@@ -398,9 +386,7 @@ public class HDFNativeData {
* The input Long
* @return an array of bytes
*/
- public synchronized static byte[] longToByte(Long data) {
- return longToByte(data.longValue());
- }
+ public synchronized static byte[] longToByte(Long data) { return longToByte(data.longValue()); }
/**
* Convert a single double into an array of 8 bytes.
@@ -418,9 +404,7 @@ public class HDFNativeData {
* The input Double
* @return an array of bytes
*/
- public synchronized static byte[] doubleToByte(Double data) {
- return doubleToByte(data.doubleValue());
- }
+ public synchronized static byte[] doubleToByte(Double data) { return doubleToByte(data.doubleValue()); }
/**
* Create a Number object from an array of bytes.
@@ -435,40 +419,39 @@ public class HDFNativeData {
* @exception HDF5Exception
* - Error unsupported type.
*/
- public synchronized static Object byteToNumber(byte[] barray, Object obj)
- throws HDF5Exception
+ public synchronized static Object byteToNumber(byte[] barray, Object obj) throws HDF5Exception
{
Class theClass = obj.getClass();
- String type = theClass.getName();
- Object retobj = null;
+ String type = theClass.getName();
+ Object retobj = null;
if (type.equals("java.lang.Integer")) {
int[] i = hdf.hdf5lib.HDFNativeData.byteToInt(0, 1, barray);
- retobj = Integer.valueOf(i[0]);
+ retobj = Integer.valueOf(i[0]);
}
else if (type.equals("java.lang.Byte")) {
retobj = Byte.valueOf(barray[0]);
}
else if (type.equals("java.lang.Short")) {
short[] f = hdf.hdf5lib.HDFNativeData.byteToShort(0, 1, barray);
- retobj = Short.valueOf(f[0]);
+ retobj = Short.valueOf(f[0]);
}
else if (type.equals("java.lang.Float")) {
float[] f = hdf.hdf5lib.HDFNativeData.byteToFloat(0, 1, barray);
- retobj = Float.valueOf(f[0]);
+ retobj = Float.valueOf(f[0]);
}
else if (type.equals("java.lang.Long")) {
long[] f = hdf.hdf5lib.HDFNativeData.byteToLong(0, 1, barray);
- retobj = Long.valueOf(f[0]);
+ retobj = Long.valueOf(f[0]);
}
else if (type.equals("java.lang.Double")) {
double[] f = hdf.hdf5lib.HDFNativeData.byteToDouble(0, 1, barray);
- retobj = Double.valueOf(f[0]);
+ retobj = Double.valueOf(f[0]);
}
else {
/* exception: unsupported type */
HDF5Exception ex = new HDF5JavaException("byteToNumber: setfield bad type: " + obj + " " + type);
- throw (ex);
+ throw(ex);
}
return (retobj);
}
diff --git a/java/src/hdf/hdf5lib/callbacks/Callbacks.java b/java/src/hdf/hdf5lib/callbacks/Callbacks.java
index 11fa465..86d6193 100644
--- a/java/src/hdf/hdf5lib/callbacks/Callbacks.java
+++ b/java/src/hdf/hdf5lib/callbacks/Callbacks.java
@@ -12,7 +12,8 @@
package hdf.hdf5lib.callbacks;
-/** All callback definitions must derive from this interface. Any
+/**
+ * All callback definitions must derive from this interface. Any
* derived interfaces must define a single public method named "callback".
* You are responsible for deregistering your callback (if necessary)
* in its {@link Object#finalize} method. If native code attempts to call
@@ -26,5 +27,4 @@ package hdf.hdf5lib.callbacks;
* handler.
*/
public interface Callbacks {
-
}
diff --git a/java/src/hdf/hdf5lib/callbacks/H5A_iterate_t.java b/java/src/hdf/hdf5lib/callbacks/H5A_iterate_t.java
index d612db3..45bde9a 100644
--- a/java/src/hdf/hdf5lib/callbacks/H5A_iterate_t.java
+++ b/java/src/hdf/hdf5lib/callbacks/H5A_iterate_t.java
@@ -17,7 +17,8 @@ package hdf.hdf5lib.callbacks;
*
*/
public interface H5A_iterate_t {
-/** public ArrayList iterdata = new ArrayList();
- * Any derived interfaces must define the single public variable as above.
- */
+ /**
+ * public ArrayList iterdata = new ArrayList();
+ * Any derived interfaces must define the single public variable as above.
+ */
}
diff --git a/java/src/hdf/hdf5lib/callbacks/H5D_append_t.java b/java/src/hdf/hdf5lib/callbacks/H5D_append_t.java
index 7fdb454..cb17896 100644
--- a/java/src/hdf/hdf5lib/callbacks/H5D_append_t.java
+++ b/java/src/hdf/hdf5lib/callbacks/H5D_append_t.java
@@ -17,7 +17,8 @@ package hdf.hdf5lib.callbacks;
*
*/
public interface H5D_append_t {
-/** public ArrayList iterdata = new ArrayList();
- * Any derived interfaces must define the single public variable as above.
- */
+ /**
+ * public ArrayList iterdata = new ArrayList();
+ * Any derived interfaces must define the single public variable as above.
+ */
}
diff --git a/java/src/hdf/hdf5lib/callbacks/H5D_iterate_t.java b/java/src/hdf/hdf5lib/callbacks/H5D_iterate_t.java
index 305cf98..fb48c73 100644
--- a/java/src/hdf/hdf5lib/callbacks/H5D_iterate_t.java
+++ b/java/src/hdf/hdf5lib/callbacks/H5D_iterate_t.java
@@ -17,7 +17,8 @@ package hdf.hdf5lib.callbacks;
*
*/
public interface H5D_iterate_t {
-/** public ArrayList iterdata = new ArrayList();
- * Any derived interfaces must define the single public variable as above.
- */
+ /**
+ * public ArrayList iterdata = new ArrayList();
+ * Any derived interfaces must define the single public variable as above.
+ */
}
diff --git a/java/src/hdf/hdf5lib/callbacks/H5E_walk_t.java b/java/src/hdf/hdf5lib/callbacks/H5E_walk_t.java
index 5bf0c8b..131b33f 100644
--- a/java/src/hdf/hdf5lib/callbacks/H5E_walk_t.java
+++ b/java/src/hdf/hdf5lib/callbacks/H5E_walk_t.java
@@ -17,7 +17,8 @@ package hdf.hdf5lib.callbacks;
*
*/
public interface H5E_walk_t {
-/** public ArrayList iterdata = new ArrayList();
- * Any derived interfaces must define the single public variable as above.
- */
+ /**
+ * public ArrayList iterdata = new ArrayList();
+ * Any derived interfaces must define the single public variable as above.
+ */
}
diff --git a/java/src/hdf/hdf5lib/callbacks/H5L_iterate_opdata_t.java b/java/src/hdf/hdf5lib/callbacks/H5L_iterate_opdata_t.java
index d89fd2a..c657dbc 100644
--- a/java/src/hdf/hdf5lib/callbacks/H5L_iterate_opdata_t.java
+++ b/java/src/hdf/hdf5lib/callbacks/H5L_iterate_opdata_t.java
@@ -17,5 +17,4 @@ package hdf.hdf5lib.callbacks;
*
*/
public interface H5L_iterate_opdata_t {
-
}
diff --git a/java/src/hdf/hdf5lib/callbacks/H5O_iterate_opdata_t.java b/java/src/hdf/hdf5lib/callbacks/H5O_iterate_opdata_t.java
index fd643b4..f4a4412 100644
--- a/java/src/hdf/hdf5lib/callbacks/H5O_iterate_opdata_t.java
+++ b/java/src/hdf/hdf5lib/callbacks/H5O_iterate_opdata_t.java
@@ -17,5 +17,4 @@ package hdf.hdf5lib.callbacks;
*
*/
public interface H5O_iterate_opdata_t {
-
}
diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_t.java b/java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_t.java
index 11e3a99..059addf 100644
--- a/java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_t.java
+++ b/java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_t.java
@@ -17,7 +17,8 @@ package hdf.hdf5lib.callbacks;
*
*/
public interface H5P_cls_close_func_t {
-/** public ArrayList iterdata = new ArrayList();
- * Any derived interfaces must define the single public variable as above.
- */
+ /**
+ * public ArrayList iterdata = new ArrayList();
+ * Any derived interfaces must define the single public variable as above.
+ */
}
diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_t.java b/java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_t.java
index 78e5282..4b7cf11 100644
--- a/java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_t.java
+++ b/java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_t.java
@@ -17,7 +17,8 @@ package hdf.hdf5lib.callbacks;
*
*/
public interface H5P_cls_copy_func_t {
-/** public ArrayList iterdata = new ArrayList();
- * Any derived interfaces must define the single public variable as above.
- */
+ /**
+ * public ArrayList iterdata = new ArrayList();
+ * Any derived interfaces must define the single public variable as above.
+ */
}
diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_t.java b/java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_t.java
index d919d97..917264d 100644
--- a/java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_t.java
+++ b/java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_t.java
@@ -17,7 +17,8 @@ package hdf.hdf5lib.callbacks;
*
*/
public interface H5P_cls_create_func_t {
-/** public ArrayList iterdata = new ArrayList();
- * Any derived interfaces must define the single public variable as above.
- */
+ /**
+ * public ArrayList iterdata = new ArrayList();
+ * Any derived interfaces must define the single public variable as above.
+ */
}
diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_iterate_t.java b/java/src/hdf/hdf5lib/callbacks/H5P_iterate_t.java
index 0035619..9c0d0eb 100644
--- a/java/src/hdf/hdf5lib/callbacks/H5P_iterate_t.java
+++ b/java/src/hdf/hdf5lib/callbacks/H5P_iterate_t.java
@@ -17,7 +17,8 @@ package hdf.hdf5lib.callbacks;
*
*/
public interface H5P_iterate_t {
-/** public ArrayList iterdata = new ArrayList();
- * Any derived interfaces must define the single public variable as above.
- */
+ /**
+ * public ArrayList iterdata = new ArrayList();
+ * Any derived interfaces must define the single public variable as above.
+ */
}
diff --git a/java/src/hdf/hdf5lib/callbacks/package-info.java b/java/src/hdf/hdf5lib/callbacks/package-info.java
index 0833162..114045c 100644
--- a/java/src/hdf/hdf5lib/callbacks/package-info.java
+++ b/java/src/hdf/hdf5lib/callbacks/package-info.java
@@ -11,7 +11,8 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/** All callback definitions must derive from the Callbacks interface. Any
+/**
+ * All callback definitions must derive from the Callbacks interface. Any
* derived interfaces must define a single public method named "callback".
* You are responsible for deregistering your callback (if necessary)
* in its {@link Object#finalize} method. If native code attempts to call
diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5AttributeException.java b/java/src/hdf/hdf5lib/exceptions/HDF5AttributeException.java
index 86dad88..4cb7b1d 100644
--- a/java/src/hdf/hdf5lib/exceptions/HDF5AttributeException.java
+++ b/java/src/hdf/hdf5lib/exceptions/HDF5AttributeException.java
@@ -23,9 +23,7 @@ public class HDF5AttributeException extends HDF5LibraryException {
* Constructs an <code>HDF5AttributeException</code> with no specified
* detail message.
*/
- public HDF5AttributeException() {
- super();
- }
+ public HDF5AttributeException() { super(); }
/**
* Constructs an <code>HDF5AttributeException</code> with the specified
@@ -34,7 +32,5 @@ public class HDF5AttributeException extends HDF5LibraryException {
* @param s
* the detail message.
*/
- public HDF5AttributeException(String s) {
- super(s);
- }
+ public HDF5AttributeException(String s) { super(s); }
}
diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5BtreeException.java b/java/src/hdf/hdf5lib/exceptions/HDF5BtreeException.java
index 97585d3..9f70456 100644
--- a/java/src/hdf/hdf5lib/exceptions/HDF5BtreeException.java
+++ b/java/src/hdf/hdf5lib/exceptions/HDF5BtreeException.java
@@ -23,9 +23,7 @@ public class HDF5BtreeException extends HDF5LibraryException {
* Constructs an <code>HDF5BtreeException</code> with no specified detail
* message.
*/
- public HDF5BtreeException() {
- super();
- }
+ public HDF5BtreeException() { super(); }
/**
* Constructs an <code>HDF5BtreeException</code> with the specified detail
@@ -34,7 +32,5 @@ public class HDF5BtreeException extends HDF5LibraryException {
* @param s
* the detail message.
*/
- public HDF5BtreeException(String s) {
- super(s);
- }
+ public HDF5BtreeException(String s) { super(s); }
}
diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5DataFiltersException.java b/java/src/hdf/hdf5lib/exceptions/HDF5DataFiltersException.java
index b02d815..b4397b7 100644
--- a/java/src/hdf/hdf5lib/exceptions/HDF5DataFiltersException.java
+++ b/java/src/hdf/hdf5lib/exceptions/HDF5DataFiltersException.java
@@ -23,9 +23,7 @@ public class HDF5DataFiltersException extends HDF5LibraryException {
* Constructs an <code>HDF5DataFiltersException</code> with no specified
* detail message.
*/
- public HDF5DataFiltersException() {
- super();
- }
+ public HDF5DataFiltersException() { super(); }
/**
* Constructs an <code>HDF5DataFiltersException</code> with the specified
@@ -34,7 +32,5 @@ public class HDF5DataFiltersException extends HDF5LibraryException {
* @param s
* the detail message.
*/
- public HDF5DataFiltersException(String s) {
- super(s);
- }
+ public HDF5DataFiltersException(String s) { super(s); }
}
diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5DataStorageException.java b/java/src/hdf/hdf5lib/exceptions/HDF5DataStorageException.java
index 416b06a..f6993a8 100644
--- a/java/src/hdf/hdf5lib/exceptions/HDF5DataStorageException.java
+++ b/java/src/hdf/hdf5lib/exceptions/HDF5DataStorageException.java
@@ -24,9 +24,7 @@ public class HDF5DataStorageException extends HDF5LibraryException {
* Constructs an <code>HDF5DataStorageExceptionn</code> with no specified
* detail message.
*/
- public HDF5DataStorageException() {
- super();
- }
+ public HDF5DataStorageException() { super(); }
/**
* Constructs an <code>HDF5DataStorageException</code> with the specified
@@ -35,7 +33,5 @@ public class HDF5DataStorageException extends HDF5LibraryException {
* @param s
* the detail message.
*/
- public HDF5DataStorageException(String s) {
- super(s);
- }
+ public HDF5DataStorageException(String s) { super(s); }
}
diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5DatasetInterfaceException.java b/java/src/hdf/hdf5lib/exceptions/HDF5DatasetInterfaceException.java
index 7bb22fa..8fd4ae9 100644
--- a/java/src/hdf/hdf5lib/exceptions/HDF5DatasetInterfaceException.java
+++ b/java/src/hdf/hdf5lib/exceptions/HDF5DatasetInterfaceException.java
@@ -23,9 +23,7 @@ public class HDF5DatasetInterfaceException extends HDF5LibraryException {
* Constructs an <code>HDF5DatasetInterfaceException</code> with no
* specified detail message.
*/
- public HDF5DatasetInterfaceException() {
- super();
- }
+ public HDF5DatasetInterfaceException() { super(); }
/**
* Constructs an <code>HDF5DatasetInterfaceException</code> with the
@@ -34,7 +32,5 @@ public class HDF5DatasetInterfaceException extends HDF5LibraryException {
* @param s
* the detail message.
*/
- public HDF5DatasetInterfaceException(String s) {
- super(s);
- }
+ public HDF5DatasetInterfaceException(String s) { super(s); }
}
diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5DataspaceInterfaceException.java b/java/src/hdf/hdf5lib/exceptions/HDF5DataspaceInterfaceException.java
index 9a85ff0..d0d2a09 100644
--- a/java/src/hdf/hdf5lib/exceptions/HDF5DataspaceInterfaceException.java
+++ b/java/src/hdf/hdf5lib/exceptions/HDF5DataspaceInterfaceException.java
@@ -24,9 +24,7 @@ public class HDF5DataspaceInterfaceException extends HDF5LibraryException {
* Constructs an <code>HDF5DataspaceInterfaceException</code> with no
* specified detail message.
*/
- public HDF5DataspaceInterfaceException() {
- super();
- }
+ public HDF5DataspaceInterfaceException() { super(); }
/**
* Constructs an <code>HDF5DataspaceInterfaceException</code> with the
@@ -35,7 +33,5 @@ public class HDF5DataspaceInterfaceException extends HDF5LibraryException {
* @param s
* the detail message.
*/
- public HDF5DataspaceInterfaceException(String s) {
- super(s);
- }
+ public HDF5DataspaceInterfaceException(String s) { super(s); }
}
diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5DatatypeInterfaceException.java b/java/src/hdf/hdf5lib/exceptions/HDF5DatatypeInterfaceException.java
index 45b0c55..2ab4ff9 100644
--- a/java/src/hdf/hdf5lib/exceptions/HDF5DatatypeInterfaceException.java
+++ b/java/src/hdf/hdf5lib/exceptions/HDF5DatatypeInterfaceException.java
@@ -24,9 +24,7 @@ public class HDF5DatatypeInterfaceException extends HDF5LibraryException {
* Constructs an <code>HDF5DatatypeInterfaceException</code> with no
* specified detail message.
*/
- public HDF5DatatypeInterfaceException() {
- super();
- }
+ public HDF5DatatypeInterfaceException() { super(); }
/**
* Constructs an <code>HDF5DatatypeInterfaceException</code> with the
@@ -35,7 +33,5 @@ public class HDF5DatatypeInterfaceException extends HDF5LibraryException {
* @param s
* the detail message.
*/
- public HDF5DatatypeInterfaceException(String s) {
- super(s);
- }
+ public HDF5DatatypeInterfaceException(String s) { super(s); }
}
diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5Exception.java b/java/src/hdf/hdf5lib/exceptions/HDF5Exception.java
index 0c23af1..b098a12 100644
--- a/java/src/hdf/hdf5lib/exceptions/HDF5Exception.java
+++ b/java/src/hdf/hdf5lib/exceptions/HDF5Exception.java
@@ -40,9 +40,7 @@ public class HDF5Exception extends RuntimeException {
* Constructs an <code>HDF5Exception</code> with no specified detail
* message.
*/
- public HDF5Exception() {
- super();
- }
+ public HDF5Exception() { super(); }
/**
* Constructs an <code>HDF5Exception</code> with the specified detail
@@ -51,7 +49,8 @@ public class HDF5Exception extends RuntimeException {
* @param message
* the detail message.
*/
- public HDF5Exception(String message) {
+ public HDF5Exception(String message)
+ {
super();
detailMessage = message;
}
@@ -63,7 +62,8 @@ public class HDF5Exception extends RuntimeException {
* have a detail message.
*/
@Override
- public String getMessage() {
+ public String getMessage()
+ {
return detailMessage;
}
}
diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5ExternalFileListException.java b/java/src/hdf/hdf5lib/exceptions/HDF5ExternalFileListException.java
index 73bf069..c8df3d0 100644
--- a/java/src/hdf/hdf5lib/exceptions/HDF5ExternalFileListException.java
+++ b/java/src/hdf/hdf5lib/exceptions/HDF5ExternalFileListException.java
@@ -24,9 +24,7 @@ public class HDF5ExternalFileListException extends HDF5LibraryException {
* Constructs an <code>HDF5ExternalFileListException</code> with no
* specified detail message.
*/
- public HDF5ExternalFileListException() {
- super();
- }
+ public HDF5ExternalFileListException() { super(); }
/**
* Constructs an <code>HDF5ExternalFileListException</code> with the
@@ -35,7 +33,5 @@ public class HDF5ExternalFileListException extends HDF5LibraryException {
* @param s
* the detail message.
*/
- public HDF5ExternalFileListException(String s) {
- super(s);
- }
+ public HDF5ExternalFileListException(String s) { super(s); }
}
diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5FileInterfaceException.java b/java/src/hdf/hdf5lib/exceptions/HDF5FileInterfaceException.java
index ac82258..afd6d69 100644
--- a/java/src/hdf/hdf5lib/exceptions/HDF5FileInterfaceException.java
+++ b/java/src/hdf/hdf5lib/exceptions/HDF5FileInterfaceException.java
@@ -24,9 +24,7 @@ public class HDF5FileInterfaceException extends HDF5LibraryException {
* Constructs an <code>HDF5FileInterfaceException</code> with no specified
* detail message.
*/
- public HDF5FileInterfaceException() {
- super();
- }
+ public HDF5FileInterfaceException() { super(); }
/**
* Constructs an <code>HDF5FileInterfaceException</code> with the specified
@@ -35,7 +33,5 @@ public class HDF5FileInterfaceException extends HDF5LibraryException {
* @param s
* the detail message.
*/
- public HDF5FileInterfaceException(String s) {
- super(s);
- }
+ public HDF5FileInterfaceException(String s) { super(s); }
}
diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5FunctionArgumentException.java b/java/src/hdf/hdf5lib/exceptions/HDF5FunctionArgumentException.java
index c4fcf30..58e2980 100644
--- a/java/src/hdf/hdf5lib/exceptions/HDF5FunctionArgumentException.java
+++ b/java/src/hdf/hdf5lib/exceptions/HDF5FunctionArgumentException.java
@@ -24,9 +24,7 @@ public class HDF5FunctionArgumentException extends HDF5LibraryException {
* Constructs an <code>HDF5FunctionArgumentException</code> with no
* specified detail message.
*/
- public HDF5FunctionArgumentException() {
- super();
- }
+ public HDF5FunctionArgumentException() { super(); }
/**
* Constructs an <code>HDF5FunctionArgumentException</code> with the
@@ -35,7 +33,5 @@ public class HDF5FunctionArgumentException extends HDF5LibraryException {
* @param s
* the detail message.
*/
- public HDF5FunctionArgumentException(String s) {
- super(s);
- }
+ public HDF5FunctionArgumentException(String s) { super(s); }
}
diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5FunctionEntryExitException.java b/java/src/hdf/hdf5lib/exceptions/HDF5FunctionEntryExitException.java
index ee34b59..db46aae 100644
--- a/java/src/hdf/hdf5lib/exceptions/HDF5FunctionEntryExitException.java
+++ b/java/src/hdf/hdf5lib/exceptions/HDF5FunctionEntryExitException.java
@@ -24,9 +24,7 @@ public class HDF5FunctionEntryExitException extends HDF5LibraryException {
* Constructs an <code>HDF5FunctionEntryExitException</code> with no
* specified detail message.
*/
- public HDF5FunctionEntryExitException() {
- super();
- }
+ public HDF5FunctionEntryExitException() { super(); }
/**
* Constructs an <code>HDF5FunctionEntryExitException</code> with the
@@ -35,7 +33,5 @@ public class HDF5FunctionEntryExitException extends HDF5LibraryException {
* @param s
* the detail message.
*/
- public HDF5FunctionEntryExitException(String s) {
- super(s);
- }
+ public HDF5FunctionEntryExitException(String s) { super(s); }
}
diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5HeapException.java b/java/src/hdf/hdf5lib/exceptions/HDF5HeapException.java
index 1bb3251..7f1691d 100644
--- a/java/src/hdf/hdf5lib/exceptions/HDF5HeapException.java
+++ b/java/src/hdf/hdf5lib/exceptions/HDF5HeapException.java
@@ -24,9 +24,7 @@ public class HDF5HeapException extends HDF5LibraryException {
* Constructs an <code>HDF5HeapException</code> with no specified detail
* message.
*/
- public HDF5HeapException() {
- super();
- }
+ public HDF5HeapException() { super(); }
/**
* Constructs an <code>HDF5HeapException</code> with the specified detail
@@ -35,7 +33,5 @@ public class HDF5HeapException extends HDF5LibraryException {
* @param s
* the detail message.
*/
- public HDF5HeapException(String s) {
- super(s);
- }
+ public HDF5HeapException(String s) { super(s); }
}
diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5IdException.java b/java/src/hdf/hdf5lib/exceptions/HDF5IdException.java
index 04ee0bc..5ce1f01 100644
--- a/java/src/hdf/hdf5lib/exceptions/HDF5IdException.java
+++ b/java/src/hdf/hdf5lib/exceptions/HDF5IdException.java
@@ -24,9 +24,7 @@ public class HDF5IdException extends HDF5LibraryException {
* Constructs an <code>HDF5IdException</code> with no specified detail
* message.
*/
- public HDF5IdException() {
- super();
- }
+ public HDF5IdException() { super(); }
/**
* Constructs an <code>HDF5IdException</code> with the specified detail
@@ -35,8 +33,5 @@ public class HDF5IdException extends HDF5LibraryException {
* @param s
* the detail message.
*/
- public HDF5IdException(String s) {
- super(s);
- }
-
+ public HDF5IdException(String s) { super(s); }
}
diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5InternalErrorException.java b/java/src/hdf/hdf5lib/exceptions/HDF5InternalErrorException.java
index 810c126..4489486 100644
--- a/java/src/hdf/hdf5lib/exceptions/HDF5InternalErrorException.java
+++ b/java/src/hdf/hdf5lib/exceptions/HDF5InternalErrorException.java
@@ -24,9 +24,7 @@ public class HDF5InternalErrorException extends HDF5LibraryException {
* Constructs an <code>HDF5InternalErrorException</code> with no specified
* detail message.
*/
- public HDF5InternalErrorException() {
- super();
- }
+ public HDF5InternalErrorException() { super(); }
/**
* Constructs an <code>HDF5InternalErrorException</code> with the specified
@@ -35,7 +33,5 @@ public class HDF5InternalErrorException extends HDF5LibraryException {
* @param s
* the detail message.
*/
- public HDF5InternalErrorException(String s) {
- super(s);
- }
+ public HDF5InternalErrorException(String s) { super(s); }
}
diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5JavaException.java b/java/src/hdf/hdf5lib/exceptions/HDF5JavaException.java
index 35720da..ae1cf85 100644
--- a/java/src/hdf/hdf5lib/exceptions/HDF5JavaException.java
+++ b/java/src/hdf/hdf5lib/exceptions/HDF5JavaException.java
@@ -26,9 +26,7 @@ public class HDF5JavaException extends HDF5Exception {
* Constructs an <code>HDF5JavaException</code> with no specified detail
* message.
*/
- public HDF5JavaException() {
- super();
- }
+ public HDF5JavaException() { super(); }
/**
* Constructs an <code>HDF5JavaException</code> with the specified detail
@@ -37,7 +35,5 @@ public class HDF5JavaException extends HDF5Exception {
* @param s
* the detail message.
*/
- public HDF5JavaException(String s) {
- super(s);
- }
+ public HDF5JavaException(String s) { super(s); }
}
diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java b/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java
index 9f94882..2a4c8c7 100644
--- a/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java
+++ b/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java
@@ -39,7 +39,8 @@ public class HDF5LibraryException extends HDF5Exception {
* Constructs an <code>HDF5LibraryException</code> with no specified detail
* message.
*/
- public HDF5LibraryException() {
+ public HDF5LibraryException()
+ {
super();
// this code forces the loading of the HDF-5 library
@@ -52,7 +53,7 @@ public class HDF5LibraryException extends HDF5Exception {
this.majorErrorNumber = _getMajorErrorNumber();
this.minorErrorNumber = _getMinorErrorNumber();
- detailMessage = getMinorError(minorErrorNumber);
+ detailMessage = getMinorError(minorErrorNumber);
}
/**
@@ -62,7 +63,8 @@ public class HDF5LibraryException extends HDF5Exception {
* @param s
* the detail message.
*/
- public HDF5LibraryException(String s) {
+ public HDF5LibraryException(String s)
+ {
super(s);
// this code forces the loading of the HDF-5 library
// to assure that the native methods are available
@@ -81,10 +83,7 @@ public class HDF5LibraryException extends HDF5Exception {
*
* @return the major error number
*/
- public long getMajorErrorNumber()
- {
- return majorErrorNumber;
- }
+ public long getMajorErrorNumber() { return majorErrorNumber; }
private native long _getMajorErrorNumber();
/**
@@ -93,10 +92,7 @@ public class HDF5LibraryException extends HDF5Exception {
*
* @return the minor error number
*/
- public long getMinorErrorNumber()
- {
- return minorErrorNumber;
- }
+ public long getMinorErrorNumber() { return minorErrorNumber; }
private native long _getMinorErrorNumber();
/**
@@ -109,7 +105,8 @@ public class HDF5LibraryException extends HDF5Exception {
*
* @return the string of the minor error
*/
- public String getMinorError(long err_code) {
+ public String getMinorError(long err_code)
+ {
if (err_code == 0) {
return "special zero no error";
}
@@ -356,9 +353,10 @@ public class HDF5LibraryException extends HDF5Exception {
* stack, and and the Java stack trace to the standard error stream.
*/
@Override
- public void printStackTrace() {
+ public void printStackTrace()
+ {
System.err.println(this);
- printStackTrace0(null); // the HDF-5 Library error stack
+ printStackTrace0(null); // the HDF-5 Library error stack
super.printStackTrace(); // the Java stack trace
}
@@ -369,21 +367,21 @@ public class HDF5LibraryException extends HDF5Exception {
* @param f
* the file print stream.
*/
- public void printStackTrace(java.io.File f) {
+ public void printStackTrace(java.io.File f)
+ {
if ((f == null) || !f.exists() || f.isDirectory() || !f.canWrite()) {
printStackTrace();
}
else {
try {
java.io.FileOutputStream o = new java.io.FileOutputStream(f);
- java.io.PrintWriter p = new java.io.PrintWriter(o);
+ java.io.PrintWriter p = new java.io.PrintWriter(o);
p.println(this);
p.close();
}
catch (Exception ex) {
System.err.println(this);
- }
- ;
+ };
// the HDF-5 Library error stack
printStackTrace0(f.getPath());
super.printStackTrace(); // the Java stack trace
@@ -395,5 +393,4 @@ public class HDF5LibraryException extends HDF5Exception {
* and error stack.
*/
private native void printStackTrace0(String s);
-
}
diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5LowLevelIOException.java b/java/src/hdf/hdf5lib/exceptions/HDF5LowLevelIOException.java
index d61f4e9..fef5721 100644
--- a/java/src/hdf/hdf5lib/exceptions/HDF5LowLevelIOException.java
+++ b/java/src/hdf/hdf5lib/exceptions/HDF5LowLevelIOException.java
@@ -24,9 +24,7 @@ public class HDF5LowLevelIOException extends HDF5LibraryException {
* Constructs an <code>HDF5LowLevelIOException</code> with no specified
* detail message.
*/
- public HDF5LowLevelIOException() {
- super();
- }
+ public HDF5LowLevelIOException() { super(); }
/**
* Constructs an <code>HDF5LowLevelIOException</code> with the specified
@@ -35,7 +33,5 @@ public class HDF5LowLevelIOException extends HDF5LibraryException {
* @param s
* the detail message.
*/
- public HDF5LowLevelIOException(String s) {
- super(s);
- }
+ public HDF5LowLevelIOException(String s) { super(s); }
}
diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5MetaDataCacheException.java b/java/src/hdf/hdf5lib/exceptions/HDF5MetaDataCacheException.java
index 3b64b15..4f00006 100644
--- a/java/src/hdf/hdf5lib/exceptions/HDF5MetaDataCacheException.java
+++ b/java/src/hdf/hdf5lib/exceptions/HDF5MetaDataCacheException.java
@@ -24,9 +24,7 @@ public class HDF5MetaDataCacheException extends HDF5LibraryException {
* Constructs an <code>HDF5MetaDataCacheException</code> with no specified
* detail message.
*/
- public HDF5MetaDataCacheException() {
- super();
- }
+ public HDF5MetaDataCacheException() { super(); }
/**
* Constructs an <code>HDF5MetaDataCacheException</code> with the specified
@@ -35,7 +33,5 @@ public class HDF5MetaDataCacheException extends HDF5LibraryException {
* @param s
* the detail message.
*/
- public HDF5MetaDataCacheException(String s) {
- super(s);
- }
+ public HDF5MetaDataCacheException(String s) { super(s); }
}
diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5ObjectHeaderException.java b/java/src/hdf/hdf5lib/exceptions/HDF5ObjectHeaderException.java
index b9f40f8..9675354 100644
--- a/java/src/hdf/hdf5lib/exceptions/HDF5ObjectHeaderException.java
+++ b/java/src/hdf/hdf5lib/exceptions/HDF5ObjectHeaderException.java
@@ -24,9 +24,7 @@ public class HDF5ObjectHeaderException extends HDF5LibraryException {
* Constructs an <code>HDF5ObjectHeaderException</code> with no specified
* detail message.
*/
- public HDF5ObjectHeaderException() {
- super();
- }
+ public HDF5ObjectHeaderException() { super(); }
/**
* Constructs an <code>HDF5ObjectHeaderException</code> with the specified
@@ -35,7 +33,5 @@ public class HDF5ObjectHeaderException extends HDF5LibraryException {
* @param s
* the detail message.
*/
- public HDF5ObjectHeaderException(String s) {
- super(s);
- }
+ public HDF5ObjectHeaderException(String s) { super(s); }
}
diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5PropertyListInterfaceException.java b/java/src/hdf/hdf5lib/exceptions/HDF5PropertyListInterfaceException.java
index d2a20e0..66f0bd1 100644
--- a/java/src/hdf/hdf5lib/exceptions/HDF5PropertyListInterfaceException.java
+++ b/java/src/hdf/hdf5lib/exceptions/HDF5PropertyListInterfaceException.java
@@ -24,9 +24,7 @@ public class HDF5PropertyListInterfaceException extends HDF5LibraryException {
* Constructs an <code>HDF5PropertyListInterfaceException</code> with no
* specified detail message.
*/
- public HDF5PropertyListInterfaceException() {
- super();
- }
+ public HDF5PropertyListInterfaceException() { super(); }
/**
* Constructs an <code>HDF5PropertyListInterfaceException</code> with the
@@ -35,7 +33,5 @@ public class HDF5PropertyListInterfaceException extends HDF5LibraryException {
* @param s
* the detail message.
*/
- public HDF5PropertyListInterfaceException(String s) {
- super(s);
- }
+ public HDF5PropertyListInterfaceException(String s) { super(s); }
}
diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5ReferenceException.java b/java/src/hdf/hdf5lib/exceptions/HDF5ReferenceException.java
index 0701244..4feaba7 100644
--- a/java/src/hdf/hdf5lib/exceptions/HDF5ReferenceException.java
+++ b/java/src/hdf/hdf5lib/exceptions/HDF5ReferenceException.java
@@ -24,9 +24,7 @@ public class HDF5ReferenceException extends HDF5LibraryException {
* Constructs an <code>HDF5ReferenceException</code> with no specified
* detail message.
*/
- public HDF5ReferenceException() {
- super();
- }
+ public HDF5ReferenceException() { super(); }
/**
* Constructs an <code>HDF5ReferenceException</code> with the specified
@@ -35,7 +33,5 @@ public class HDF5ReferenceException extends HDF5LibraryException {
* @param s
* the detail message.
*/
- public HDF5ReferenceException(String s) {
- super(s);
- }
+ public HDF5ReferenceException(String s) { super(s); }
}
diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5ResourceUnavailableException.java b/java/src/hdf/hdf5lib/exceptions/HDF5ResourceUnavailableException.java
index ad052b5..1a007e7 100644
--- a/java/src/hdf/hdf5lib/exceptions/HDF5ResourceUnavailableException.java
+++ b/java/src/hdf/hdf5lib/exceptions/HDF5ResourceUnavailableException.java
@@ -24,9 +24,7 @@ public class HDF5ResourceUnavailableException extends HDF5LibraryException {
* Constructs an <code>HDF5ResourceUnavailableException</code> with no
* specified detail message.
*/
- public HDF5ResourceUnavailableException() {
- super();
- }
+ public HDF5ResourceUnavailableException() { super(); }
/**
* Constructs an <code>HDF5FunctionArgumentException</code> with the
@@ -35,7 +33,5 @@ public class HDF5ResourceUnavailableException extends HDF5LibraryException {
* @param s
* the detail message.
*/
- public HDF5ResourceUnavailableException(String s) {
- super(s);
- }
+ public HDF5ResourceUnavailableException(String s) { super(s); }
}
diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5SymbolTableException.java b/java/src/hdf/hdf5lib/exceptions/HDF5SymbolTableException.java
index ba9150f..4fb8c2e 100644
--- a/java/src/hdf/hdf5lib/exceptions/HDF5SymbolTableException.java
+++ b/java/src/hdf/hdf5lib/exceptions/HDF5SymbolTableException.java
@@ -24,9 +24,7 @@ public class HDF5SymbolTableException extends HDF5LibraryException {
* Constructs an <code>HDF5SymbolTableException</code> with no specified
* detail message.
*/
- public HDF5SymbolTableException() {
- super();
- }
+ public HDF5SymbolTableException() { super(); }
/**
* Constructs an <code>HDF5SymbolTableException</code> with the specified
@@ -35,7 +33,5 @@ public class HDF5SymbolTableException extends HDF5LibraryException {
* @param s
* the detail message.
*/
- public HDF5SymbolTableException(String s) {
- super(s);
- }
+ public HDF5SymbolTableException(String s) { super(s); }
}
diff --git a/java/src/hdf/hdf5lib/package-info.java b/java/src/hdf/hdf5lib/package-info.java
index 2863f5a..c04b862 100644
--- a/java/src/hdf/hdf5lib/package-info.java
+++ b/java/src/hdf/hdf5lib/package-info.java
@@ -11,11 +11,11 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
/**
* This package is the Java interface for the HDF5 library.
* <p>
- * This code is the called by Java programs to access the entry points of the HDF5 library. Each routine wraps a single
+ * This code is the called by Java programs to access the entry points of the HDF5 library. Each routine wraps
+ a single
* HDF5 entry point, generally with the arguments and return codes analogous to the C interface.
* <p>
* For details of the HDF5 library, see the HDF5 Documentation at:
@@ -25,7 +25,8 @@
* <b>Mapping of arguments for Java</b>
*
* <p>
- * In general, arguments to the HDF Java API are straightforward translations from the 'C' API described in the HDF
+ * In general, arguments to the HDF Java API are straightforward translations from the 'C' API described in
+ the HDF
* Reference Manual.
*
* <table border=1>
@@ -66,16 +67,21 @@
* </table>
* <b>General Rules for Passing Arguments and Results</b>
* <p>
- * In general, arguments passed <b>IN</b> to Java are the analogous basic types, as above. The exception is for arrays,
+ * In general, arguments passed <b>IN</b> to Java are the analogous basic types, as above. The exception is
+ for arrays,
* which are discussed below.
* <p>
- * The <i>return value</i> of Java methods is also the analogous type, as above. A major exception to that rule is that
- * all HDF functions that return SUCCEED/FAIL are declared <i>boolean</i> in the Java version, rather than <i>int</i> as
- * in the C. Functions that return a value or else FAIL are declared the equivalent to the C function. However, in most
+ * The <i>return value</i> of Java methods is also the analogous type, as above. A major exception to that
+ rule is that
+ * all HDF functions that return SUCCEED/FAIL are declared <i>boolean</i> in the Java version, rather than
+ <i>int</i> as
+ * in the C. Functions that return a value or else FAIL are declared the equivalent to the C function.
+ However, in most
* cases the Java method will raise an exception instead of returning an error code.
* See <a href="#ERRORS">Errors and Exceptions</a> below.
* <p>
- * Java does not support pass by reference of arguments, so arguments that are returned through <b>OUT</b> parameters
+ * Java does not support pass by reference of arguments, so arguments that are returned through <b>OUT</b>
+ parameters
* must be wrapped in an object or array. The Java API for HDF consistently wraps arguments in arrays.
* <p>
* For instance, a function that returns two integers is declared:
@@ -97,11 +103,13 @@
* </pre>
*
* <p>
- * All the routines where this convention is used will have specific documentation of the details, given below.
+ * All the routines where this convention is used will have specific documentation of the details, given
+ below.
* <p>
* <b>Arrays</b>
* <p>
- * HDF5 needs to read and write multi-dimensional arrays of any number type (and records). The HDF5 API describes the
+ * HDF5 needs to read and write multi-dimensional arrays of any number type (and records). The HDF5 API
+ describes the
* layout of the source and destination, and the data for the array passed as a block of bytes, for instance,
*
* <pre>
@@ -109,39 +117,53 @@
* </pre>
*
* <p>
- * where ``void *'' means that the data may be any valid numeric type, and is a contiguous block of bytes that is the
- * data for a multi-dimensional array. The other parameters describe the dimensions, rank, and datatype of the array on
+ * where ``void *'' means that the data may be any valid numeric type, and is a contiguous block of bytes that
+ is the
+ * data for a multi-dimensional array. The other parameters describe the dimensions, rank, and datatype of the
+ array on
* disk (source) and in memory (destination).
* <p>
- * For Java, this ``ANY'' is a problem, as the type of data must always be declared. Furthermore, multidimensional
- * arrays are definitely <i>not</i> laid out contiguously in memory. It would be infeasible to declare a separate
+ * For Java, this ``ANY'' is a problem, as the type of data must always be declared. Furthermore,
+ multidimensional
+ * arrays are definitely <i>not</i> laid out contiguously in memory. It would be infeasible to declare a
+ separate
* routine for every combination of number type and dimensionality. For that reason, the
- * <a href="./hdf.hdf5lib.HDFArray.html"><b>HDFArray</b></a> class is used to discover the type, shape, and size of the
- * data array at run time, and to convert to and from a contiguous array of bytes in synchronized static native C order.
- * <p>
- * The upshot is that any Java array of numbers (either primitive or sub-classes of type <b>Number</b>) can be passed as
- * an ``Object'', and the Java API will translate to and from the appropriate packed array of bytes needed by the C
+ * <a href="./hdf.hdf5lib.HDFArray.html"><b>HDFArray</b></a> class is used to discover the type, shape, and
+ size of the
+ * data array at run time, and to convert to and from a contiguous array of bytes in synchronized static
+ native C order.
+ * <p>
+ * The upshot is that any Java array of numbers (either primitive or sub-classes of type <b>Number</b>) can be
+ passed as
+ * an ``Object'', and the Java API will translate to and from the appropriate packed array of bytes needed by
+ the C
* library. So the function above would be declared:
*
* <pre>
- * public synchronized static native int H5Dread(long fid, long filetype, long memtype, long memspace, Object data);
+ * public synchronized static native int H5Dread(long fid, long filetype, long memtype, long memspace, Object
+ data);
* </pre>
* OPEN_IDS.addElement(id);
- * and the parameter <i>data</i> can be any multi-dimensional array of numbers, such as float[][], or int[][][], or
+ * and the parameter <i>data</i> can be any multi-dimensional array of numbers, such as float[][], or
+ int[][][], or
* Double[][].
* <p>
* <b>HDF-5 Constants</b>
* <p>
- * The HDF-5 API defines a set of constants and enumerated values. Most of these values are available to Java programs
- * via the class <a href="./hdf.hdf5lib.HDF5Constants.html"> <b>HDF5Constants</b></a>. For example, the parameters for
+ * The HDF-5 API defines a set of constants and enumerated values. Most of these values are available to Java
+ programs
+ * via the class <a href="./hdf.hdf5lib.HDF5Constants.html"> <b>HDF5Constants</b></a>. For example, the
+ parameters for
* the h5open() call include two numeric values, <b><i>HDFConstants.H5F_ACC_RDWR</i></b> and
* <b><i>HDF5Constants.H5P_DEFAULT</i></b>. As would be expected, these numbers correspond to the C constants
* <b><i>H5F_ACC_RDWR</i></b> and <b><i>H5P_DEFAULT</i></b>.
* <p>
- * The HDF-5 API defines a set of values that describe number types and sizes, such as "H5T_NATIVE_INT" and "hsize_t".
+ * The HDF-5 API defines a set of values that describe number types and sizes, such as "H5T_NATIVE_INT" and
+ "hsize_t".
* These values are determined at run time by the HDF-5 C library. To support these parameters, the Java class
- * <a href="./hdf.hdf5lib.HDF5CDataTypes.html"> <b>HDF5CDataTypes</b></a> looks up the values when initiated. The values
+ * <a href="./hdf.hdf5lib.HDF5CDataTypes.html"> <b>HDF5CDataTypes</b></a> looks up the values when initiated.
+ The values
* can be accessed as public variables of the Java class, such as:
*
* <pre>
@@ -153,22 +175,31 @@
* <p>
* <b>Error handling and Exceptions</b>
* <p>
- * The HDF5 error API (H5E) manages the behavior of the error stack in the HDF-5 library. This API is available from the
- * JHI5. Errors are converted into Java exceptions. This is totally different from the C interface, but is very natural
+ * The HDF5 error API (H5E) manages the behavior of the error stack in the HDF-5 library. This API is
+ available from the
+ * JHI5. Errors are converted into Java exceptions. This is totally different from the C interface, but is
+ very natural
* for Java programming.
* <p>
* The exceptions of the JHI5 are organized as sub-classes of the class
- * <a href="./hdf.hdf5lib.exceptions.HDF5Exception.html"> <b>HDF5Exception</b></a>. There are two subclasses of
- * <b>HDF5Exception</b>, <a href="./hdf.hdf5lib.exceptions.HDF5LibraryException.html"> <b>HDF5LibraryException</b></a>
- * and <a href="./hdf.hdf5lib.exceptions.HDF5JavaException.html"> <b>HDF5JavaException</b></a>. The sub-classes of the
- * former represent errors from the HDF-5 C library, while sub-classes of the latter represent errors in the JHI5
+ * <a href="./hdf.hdf5lib.exceptions.HDF5Exception.html"> <b>HDF5Exception</b></a>. There are two subclasses
+ of
+ * <b>HDF5Exception</b>, <a href="./hdf.hdf5lib.exceptions.HDF5LibraryException.html">
+ <b>HDF5LibraryException</b></a>
+ * and <a href="./hdf.hdf5lib.exceptions.HDF5JavaException.html"> <b>HDF5JavaException</b></a>. The
+ sub-classes of the
+ * former represent errors from the HDF-5 C library, while sub-classes of the latter represent errors in the
+ JHI5
* wrapper and support code.
* <p>
- * The super-class <b><i>HDF5LibraryException</i></b> implements the method '<b><i>printStackTrace()</i></b>', which
- * prints out the HDF-5 error stack, as described in the HDF-5 C API <i><b>H5Eprint()</b>.</i> This may be used by Java
+ * The super-class <b><i>HDF5LibraryException</i></b> implements the method '<b><i>printStackTrace()</i></b>',
+ which
+ * prints out the HDF-5 error stack, as described in the HDF-5 C API <i><b>H5Eprint()</b>.</i> This may be
+ used by Java
* exception handlers to print out the HDF-5 error stack.
* <hr>
*
* <b>See also: <a href="http://hdfgroup.org/HDF5/"> http://hdfgroup.org/HDF5"</a></b>
- **/
+ *
+ */
package hdf.hdf5lib;
diff --git a/java/src/hdf/hdf5lib/structs/H5AC_cache_config_t.java b/java/src/hdf/hdf5lib/structs/H5AC_cache_config_t.java
index cf84532..a224124 100644
--- a/java/src/hdf/hdf5lib/structs/H5AC_cache_config_t.java
+++ b/java/src/hdf/hdf5lib/structs/H5AC_cache_config_t.java
@@ -18,7 +18,7 @@ import java.io.Serializable;
* Information struct for H5Pget_mdc_config/H5Pset_mdc_config
*
*/
-public class H5AC_cache_config_t implements Serializable{
+public class H5AC_cache_config_t implements Serializable {
private static final long serialVersionUID = -6748085696476149972L;
// general configuration fields
/**
@@ -27,7 +27,7 @@ public class H5AC_cache_config_t implements Serializable{
* H5AC_cache_config_t passed to the cache must have a known
* version number, or an error will be flagged.
*/
- public int version;
+ public int version;
/**
* rpt_fcn_enabled: Boolean field used to enable and disable the default
* reporting function. This function is invoked every time the
@@ -35,80 +35,80 @@ public class H5AC_cache_config_t implements Serializable{
*
* This is a debugging function, and should normally be turned off.
*/
- public boolean rpt_fcn_enabled;
+ public boolean rpt_fcn_enabled;
/**
* open_trace_file: Boolean field indicating whether the trace_file_name
* field should be used to open a trace file for the cache.
*
* *** DEPRECATED *** Use H5Fstart/stop logging functions instead
*/
- public boolean open_trace_file;
+ public boolean open_trace_file;
/**
* close_trace_file: Boolean field indicating whether the current trace
* file (if any) should be closed.
*
* *** DEPRECATED *** Use H5Fstart/stop logging functions instead
*/
- public boolean close_trace_file;
+ public boolean close_trace_file;
/**
* trace_file_name: Full path of the trace file to be opened if the
* open_trace_file field is TRUE.
*
* *** DEPRECATED *** Use H5Fstart/stop logging functions instead
*/
- public String trace_file_name;
+ public String trace_file_name;
/**
* evictions_enabled: Boolean field used to either report the current
* evictions enabled status of the cache, or to set the cache's
* evictions enabled status.
*/
- public boolean evictions_enabled;
+ public boolean evictions_enabled;
/**
* 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.
*/
- public boolean set_initial_size;
+ public boolean set_initial_size;
/**
* 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].
*/
- public long initial_size;
+ public long initial_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.
*/
- public double min_clean_fraction;
+ public double min_clean_fraction;
/**
* 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.
*/
- public long max_size;
+ public long max_size;
/**
* min_size: Minimum size to which the cache can be adjusted. The
* supplied value must fall in the closed interval
* [H5C__MIN_MAX_CACHE_SIZE, H5C__MAX_MAX_CACHE_SIZE]. Also, min_size
* must be less than or equal to max_size.
*/
- public long min_size;
+ public long min_size;
/**
* epoch_length: Number of accesses on the cache over which to collect
* hit rate stats before running the automatic cache resize code,
* if it is enabled.
*/
- public long epoch_length;
+ public long epoch_length;
// 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.
*/
- public int incr_mode;
+ public int incr_mode;
/**
* lower_hr_threshold: Lower hit rate threshold. If the increment mode
* (incr_mode) is H5C_incr__threshold and the hit rate drops below the
@@ -117,105 +117,106 @@ public class H5AC_cache_config_t implements Serializable{
* max_size, and that the increment may be further restricted by the
* max_increment field if it is enabled.
*/
- public double lower_hr_threshold;
+ public double lower_hr_threshold;
/**
* increment: Double containing the multiplier used to derive the new
* 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.
*/
- public double increment;
+ public double increment;
/**
* apply_max_increment: Boolean flag indicating whether the max_increment
* field should be used to limit the maximum cache size increment.
*/
- public boolean apply_max_increment;
+ public boolean apply_max_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.
*/
- public long max_increment;
+ public long max_increment;
/**
* flash_incr_mode: Instance of the H5C_cache_flash_incr_mode enumerated
* type whose value indicates whether and by which algorithm we should
* make flash increases in the size of the cache to accommodate insertion
* of large entries and large increases in the size of a single entry.
*/
- public int flash_incr_mode;
+ public int flash_incr_mode;
/**
* flash_multiple: Double containing the multiple described above in the
* H5C_flash_incr__add_space section of the discussion of the
* flash_incr_mode section. This field is ignored unless flash_incr_mode
* is H5C_flash_incr__add_space.
*/
- public double flash_multiple;
+ public double flash_multiple;
/**
* 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.
*/
- public double flash_threshold;
+ public double flash_threshold;
// 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.
*/
- public int decr_mode;
+ public int decr_mode;
/**
* upper_hr_threshold: Upper hit rate threshold. The use of this field
* varies according to the current decr_mode.
*/
- public double upper_hr_threshold;
+ public double upper_hr_threshold;
/**
* decrement: This field is only used when the decr_mode is
* H5C_decr__threshold.
*/
- public double decrement;
+ public double decrement;
/**
* apply_max_decrement: Boolean flag used to determine whether decrements
* in cache size are to be limited by the max_decrement field.
*/
- public boolean apply_max_decrement;
+ public boolean apply_max_decrement;
/**
* 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.
*/
- public long max_decrement;
+ public long max_decrement;
/**
* epochs_before_eviction: Integer field used in H5C_decr__age_out and
* H5C_decr__age_out_with_threshold decrement modes.
*/
- public int epochs_before_eviction;
+ public int epochs_before_eviction;
/**
* 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.
*/
- public boolean apply_empty_reserve;
+ public boolean apply_empty_reserve;
/**
* 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.
*/
- public double empty_reserve;
+ public double empty_reserve;
// parallel configuration fields
/**
* dirty_bytes_threshold: Threshold of dirty byte creation used to
* synchronize updates between caches.
*/
- public long dirty_bytes_threshold;
+ public long dirty_bytes_threshold;
/**
* metadata_write_strategy: Integer field containing a code indicating the
* desired metadata write strategy.
*/
- public int metadata_write_strategy;
+ public int metadata_write_strategy;
- /** H5AC_cache_config_t is a public structure intended for use in public APIs.
+ /**
+ * H5AC_cache_config_t is a public structure intended for use in public APIs.
* At least in its initial incarnation, it is basically a copy of struct
* H5C_auto_size_ctl_t, minus the report_fcn field, and plus the
* dirty_bytes_threshold field.
@@ -283,46 +284,47 @@ public class H5AC_cache_config_t implements Serializable{
* synchronize updates between caches.
* @param metadata_write_strategy: Integer field containing a code indicating the
* desired metadata write strategy.
- */
- public H5AC_cache_config_t (int version, boolean rpt_fcn_enabled, boolean open_trace_file,
- boolean close_trace_file, String trace_file_name, boolean evictions_enabled,
- boolean set_initial_size, long initial_size, double min_clean_fraction, long max_size,
- long min_size, long epoch_length, int incr_mode, double lower_hr_threshold,
- double increment, boolean apply_max_increment, long max_increment, int flash_incr_mode,
- double flash_multiple, double flash_threshold, int decr_mode, double upper_hr_threshold,
- double decrement, boolean apply_max_decrement, long max_decrement,
- int epochs_before_eviction, boolean apply_empty_reserve, double empty_reserve,
- long dirty_bytes_threshold, int metadata_write_strategy)
+ */
+ public H5AC_cache_config_t(int version, boolean rpt_fcn_enabled, boolean open_trace_file,
+ boolean close_trace_file, String trace_file_name, boolean evictions_enabled,
+ boolean set_initial_size, long initial_size, double min_clean_fraction,
+ long max_size, long min_size, long epoch_length, int incr_mode,
+ double lower_hr_threshold, double increment, boolean apply_max_increment,
+ long max_increment, int flash_incr_mode, double flash_multiple,
+ double flash_threshold, int decr_mode, double upper_hr_threshold,
+ double decrement, boolean apply_max_decrement, long max_decrement,
+ int epochs_before_eviction, boolean apply_empty_reserve, double empty_reserve,
+ long dirty_bytes_threshold, int metadata_write_strategy)
{
- this.version = version;
- this.rpt_fcn_enabled = rpt_fcn_enabled;
- this.open_trace_file = open_trace_file;
- this.close_trace_file = close_trace_file;
- this.trace_file_name = trace_file_name;
- this.evictions_enabled = evictions_enabled;
- this.set_initial_size = set_initial_size;
- this.initial_size = initial_size;
- this.min_clean_fraction = min_clean_fraction;
- this.max_size = max_size;
- this.min_size = min_size;
- this.epoch_length = epoch_length;
- this.incr_mode = incr_mode;
- this.lower_hr_threshold = lower_hr_threshold;
- this.increment = increment;
- this.apply_max_increment = apply_max_increment;
- this.max_increment = flash_incr_mode;
- this.flash_incr_mode = flash_incr_mode;
- this.flash_multiple = flash_multiple;
- this.flash_threshold = flash_threshold;
- this.decr_mode = decr_mode;
- this.upper_hr_threshold = upper_hr_threshold;
- this.decrement = decrement;
- this.apply_max_decrement = apply_max_decrement;
- this.max_decrement = max_decrement;
- this.epochs_before_eviction = epochs_before_eviction;
- this.apply_empty_reserve = apply_empty_reserve;
- this.empty_reserve = empty_reserve;
- this.dirty_bytes_threshold = dirty_bytes_threshold;
+ this.version = version;
+ this.rpt_fcn_enabled = rpt_fcn_enabled;
+ this.open_trace_file = open_trace_file;
+ this.close_trace_file = close_trace_file;
+ this.trace_file_name = trace_file_name;
+ this.evictions_enabled = evictions_enabled;
+ this.set_initial_size = set_initial_size;
+ this.initial_size = initial_size;
+ this.min_clean_fraction = min_clean_fraction;
+ this.max_size = max_size;
+ this.min_size = min_size;
+ this.epoch_length = epoch_length;
+ this.incr_mode = incr_mode;
+ this.lower_hr_threshold = lower_hr_threshold;
+ this.increment = increment;
+ this.apply_max_increment = apply_max_increment;
+ this.max_increment = flash_incr_mode;
+ this.flash_incr_mode = flash_incr_mode;
+ this.flash_multiple = flash_multiple;
+ this.flash_threshold = flash_threshold;
+ this.decr_mode = decr_mode;
+ this.upper_hr_threshold = upper_hr_threshold;
+ this.decrement = decrement;
+ this.apply_max_decrement = apply_max_decrement;
+ this.max_decrement = max_decrement;
+ this.epochs_before_eviction = epochs_before_eviction;
+ this.apply_empty_reserve = apply_empty_reserve;
+ this.empty_reserve = empty_reserve;
+ this.dirty_bytes_threshold = dirty_bytes_threshold;
this.metadata_write_strategy = metadata_write_strategy;
}
}
diff --git a/java/src/hdf/hdf5lib/structs/H5A_info_t.java b/java/src/hdf/hdf5lib/structs/H5A_info_t.java
index f2c10f0..364e480 100644
--- a/java/src/hdf/hdf5lib/structs/H5A_info_t.java
+++ b/java/src/hdf/hdf5lib/structs/H5A_info_t.java
@@ -18,7 +18,7 @@ import java.io.Serializable;
* Information struct for Attribute (For H5Aget_info/H5Aget_info_by_idx/H5Aget_info_by_name)
*
*/
-public class H5A_info_t implements Serializable{
+public class H5A_info_t implements Serializable {
private static final long serialVersionUID = 2791443594041667613L;
/** Indicate if creation order is valid */
public boolean corder_valid;
@@ -29,10 +29,11 @@ public class H5A_info_t implements Serializable{
/** Size of raw data */
public long data_size;
- H5A_info_t(boolean corder_valid, long corder, int cset, long data_size) {
+ H5A_info_t(boolean corder_valid, long corder, int cset, long data_size)
+ {
this.corder_valid = corder_valid;
- this.corder = corder;
- this.cset = cset;
- this.data_size = data_size;
+ this.corder = corder;
+ this.cset = cset;
+ this.data_size = data_size;
}
}
diff --git a/java/src/hdf/hdf5lib/structs/H5E_error2_t.java b/java/src/hdf/hdf5lib/structs/H5E_error2_t.java
index 5981fc7..1be836f 100644
--- a/java/src/hdf/hdf5lib/structs/H5E_error2_t.java
+++ b/java/src/hdf/hdf5lib/structs/H5E_error2_t.java
@@ -18,16 +18,16 @@ import java.io.Serializable;
* Information struct for Attribute (For H5Ewalk)
*
*/
-public class H5E_error2_t implements Serializable{
+public class H5E_error2_t implements Serializable {
private static final long serialVersionUID = 279144359041667613L;
/** class ID */
- public long cls_id;
+ public long cls_id;
/** major error ID */
- public long maj_num;
+ public long maj_num;
/** minor error number */
- public long min_num;
+ public long min_num;
/** line in file where error occurs */
- public int line;
+ public int line;
/** function in which error occurred */
public String func_name;
/** file in which error occurred */
@@ -35,13 +35,15 @@ public class H5E_error2_t implements Serializable{
/** optional supplied description */
public String desc;
- H5E_error2_t(long cls_id, long maj_num, long min_num, int line, String func_name, String file_name, String desc) {
- this.cls_id = cls_id;
- this.maj_num = maj_num;
- this.min_num = min_num;
- this.line = line;
+ H5E_error2_t(long cls_id, long maj_num, long min_num, int line, String func_name, String file_name,
+ String desc)
+ {
+ this.cls_id = cls_id;
+ this.maj_num = maj_num;
+ this.min_num = min_num;
+ this.line = line;
this.func_name = func_name;
this.file_name = file_name;
- this.desc = desc;
+ this.desc = desc;
}
}
diff --git a/java/src/hdf/hdf5lib/structs/H5FD_hdfs_fapl_t.java b/java/src/hdf/hdf5lib/structs/H5FD_hdfs_fapl_t.java
index 95a9254..181d681 100644
--- a/java/src/hdf/hdf5lib/structs/H5FD_hdfs_fapl_t.java
+++ b/java/src/hdf/hdf5lib/structs/H5FD_hdfs_fapl_t.java
@@ -26,17 +26,17 @@ public class H5FD_hdfs_fapl_t implements Serializable {
private static final long serialVersionUID = 2072473407027648309L;
/** Version number of the H5FD_hdfs_fapl_t structure. */
- private int version;
+ private int version;
/** Name of "Name Node" to access as the HDFS server. */
private String namenode_name;
/** Port number to use to connect with Name Node. */
- private int namenode_port;
+ private int namenode_port;
/** Username to use when accessing file. */
private String user_name;
/** Path to the location of the Kerberos authentication cache. */
private String kerberos_ticket_cache;
/** Size (in bytes) of the file read stream buffer. */
- private int stream_buffer_size;
+ private int stream_buffer_size;
/**
* Create a fapl_t structure with the specified components.
@@ -51,23 +51,20 @@ public class H5FD_hdfs_fapl_t implements Serializable {
* @param stream_buffer_size
* Size (in bytes) of the file read stream buffer.
*/
- public H5FD_hdfs_fapl_t(
- String namenode_name,
- int namenode_port,
- String user_name,
- String kerberos_ticket_cache,
- int stream_buffer_size)
+ public H5FD_hdfs_fapl_t(String namenode_name, int namenode_port, String user_name,
+ String kerberos_ticket_cache, int stream_buffer_size)
{
- this.version = 1;
- this.namenode_name = namenode_name;
- this.namenode_port = namenode_port;
- this.user_name = user_name;
- this.kerberos_ticket_cache = kerberos_ticket_cache;
- this.stream_buffer_size = stream_buffer_size;
+ this.version = 1;
+ this.namenode_name = namenode_name;
+ this.namenode_port = namenode_port;
+ this.user_name = user_name;
+ this.kerberos_ticket_cache = kerberos_ticket_cache;
+ this.stream_buffer_size = stream_buffer_size;
}
@Override
- public boolean equals(Object o) {
+ public boolean equals(Object o)
+ {
if (o == null)
return false;
if (!(o instanceof H5FD_hdfs_fapl_t))
@@ -90,7 +87,8 @@ public class H5FD_hdfs_fapl_t implements Serializable {
}
@Override
- public int hashCode() {
+ public int hashCode()
+ {
/* this is a _very bad_ hash algorithm for purposes of hashing! */
/* implemented to satisfy the "contract" regarding equality */
int k = (int)this.version;
@@ -103,15 +101,11 @@ public class H5FD_hdfs_fapl_t implements Serializable {
}
@Override
- public String toString() {
- return "H5FD_hdfs_fapl_t (Version: " + this.version + ") {" +
- "\n namenode_name: '" + this.namenode_name +
- "'\n namenode_port: " + this.namenode_port +
- "\n user_name: '" + this.user_name +
- "'\n kerberos_ticket_cache: '" + this.kerberos_ticket_cache +
- "'\n stream_buffer_size: " + this.stream_buffer_size +
- "\n}\n";
+ public String toString()
+ {
+ return "H5FD_hdfs_fapl_t (Version: " + this.version + ") {"
+ + "\n namenode_name: '" + this.namenode_name + "'\n namenode_port: " + this.namenode_port +
+ "\n user_name: '" + this.user_name + "'\n kerberos_ticket_cache: '" +
+ this.kerberos_ticket_cache + "'\n stream_buffer_size: " + this.stream_buffer_size + "\n}\n";
}
}
-
-
diff --git a/java/src/hdf/hdf5lib/structs/H5FD_ros3_fapl_t.java b/java/src/hdf/hdf5lib/structs/H5FD_ros3_fapl_t.java
index ad02979..67c2463 100644
--- a/java/src/hdf/hdf5lib/structs/H5FD_ros3_fapl_t.java
+++ b/java/src/hdf/hdf5lib/structs/H5FD_ros3_fapl_t.java
@@ -46,7 +46,7 @@ public class H5FD_ros3_fapl_t implements Serializable {
private static final long serialVersionUID = 8985533001471224030L;
/** Version number of the H5FD_ros3_fapl_t structure */
- private int version;
+ private int version;
/** Flag TRUE or FALSE whether or not requests are to be authenticated with the AWS4 algorithm. */
private boolean authenticate;
/** region "aws region" for authenticating request */
@@ -59,11 +59,12 @@ public class H5FD_ros3_fapl_t implements Serializable {
/**
* Create a "default" fapl_t structure, for anonymous access.
*/
- public H5FD_ros3_fapl_t () {
+ public H5FD_ros3_fapl_t()
+ {
/* H5FD_ros3_fapl_t("", "", ""); */ /* defer */
- this.version = 1;
+ this.version = 1;
this.aws_region = "";
- this.secret_id = "";
+ this.secret_id = "";
this.secret_key = "";
}
@@ -76,16 +77,18 @@ public class H5FD_ros3_fapl_t implements Serializable {
* @param id "secret id" or "access id" for authenticating request
* @param key "secret key" or "access key" for authenticating request
*/
- public H5FD_ros3_fapl_t (String region, String id, String key) {
- this.version = 1; /* must equal H5FD_CURR_ROS3_FAPL_T_VERSION */
- /* as found in H5FDros3.h */
+ public H5FD_ros3_fapl_t(String region, String id, String key)
+ {
+ this.version = 1; /* must equal H5FD_CURR_ROS3_FAPL_T_VERSION */
+ /* as found in H5FDros3.h */
this.aws_region = region;
this.secret_id = id;
this.secret_key = key;
}
@Override
- public boolean equals(Object o) {
+ public boolean equals(Object o)
+ {
if (o == null)
return false;
if (!(o instanceof H5FD_ros3_fapl_t))
@@ -104,7 +107,8 @@ public class H5FD_ros3_fapl_t implements Serializable {
}
@Override
- public int hashCode() {
+ public int hashCode()
+ {
/* this is a _very bad_ hash algorithm for purposes of hashing! */
/* implemented to satisfy the "contract" regarding equality */
int k = (int)this.version;
@@ -115,13 +119,10 @@ public class H5FD_ros3_fapl_t implements Serializable {
}
@Override
- public String toString() {
- return "H5FD_ros3_fapl_t (Version:" + this.version + ") {" +
- "\n aws_region : " + this.aws_region +
- "\n secret_id : " + this.secret_id +
- "\n secret_key : " + this.secret_key +
- "\n}\n";
+ public String toString()
+ {
+ return "H5FD_ros3_fapl_t (Version:" + this.version + ") {"
+ + "\n aws_region : " + this.aws_region + "\n secret_id : " + this.secret_id +
+ "\n secret_key : " + this.secret_key + "\n}\n";
}
}
-
-
diff --git a/java/src/hdf/hdf5lib/structs/H5F_info2_t.java b/java/src/hdf/hdf5lib/structs/H5F_info2_t.java
index 78e6d6c..1961b16 100644
--- a/java/src/hdf/hdf5lib/structs/H5F_info2_t.java
+++ b/java/src/hdf/hdf5lib/structs/H5F_info2_t.java
@@ -18,26 +18,26 @@ import java.io.Serializable;
* Information struct for object (for H5Fget_info)
*
*/
-public class H5F_info2_t implements Serializable{
+public class H5F_info2_t implements Serializable {
private static final long serialVersionUID = 4691681162544054518L;
/** Superblock version number */
- public int super_version;
+ public int super_version;
/** Superblock size */
- public long super_size;
+ public long super_size;
/** Superblock extension size */
- public long super_ext_size;
+ public long super_ext_size;
/** Version number of file free space management */
- public int free_version;
+ public int free_version;
/** Free space manager metadata size */
- public long free_meta_size;
+ public long free_meta_size;
/** Amount of free space in the file */
- public long free_tot_space;
+ public long free_tot_space;
/** Version number of shared object header info */
- public int sohm_version;
+ public int sohm_version;
/** Shared object header message header size */
- public long sohm_hdr_size;
+ public long sohm_hdr_size;
/** Shared object header message index and heap size */
- public H5_ih_info_t sohm_msgs_info;
+ public H5_ih_info_t sohm_msgs_info;
/**
* Constructor for current "global" information about file
@@ -51,18 +51,18 @@ public class H5F_info2_t implements Serializable{
* @param sohm_hdr_size: Shared object header message header size
* @param sohm_msgs_info: Shared object header message index and heap size
*/
- public H5F_info2_t (int super_version, long super_size, long super_ext_size,
- int free_version, long free_meta_size, long free_tot_space,
- int sohm_version, long sohm_hdr_size, H5_ih_info_t sohm_msgs_info)
+ public H5F_info2_t(int super_version, long super_size, long super_ext_size, int free_version,
+ long free_meta_size, long free_tot_space, int sohm_version, long sohm_hdr_size,
+ H5_ih_info_t sohm_msgs_info)
{
- this.super_version = super_version;
- this.super_size = super_size;
+ this.super_version = super_version;
+ this.super_size = super_size;
this.super_ext_size = super_ext_size;
- this.free_version = free_version;
+ this.free_version = free_version;
this.free_meta_size = free_meta_size;
this.free_tot_space = free_tot_space;
- this.sohm_version = sohm_version;
- this.sohm_hdr_size = sohm_hdr_size;
+ this.sohm_version = sohm_version;
+ this.sohm_hdr_size = sohm_hdr_size;
this.sohm_msgs_info = sohm_msgs_info;
}
}
diff --git a/java/src/hdf/hdf5lib/structs/H5G_info_t.java b/java/src/hdf/hdf5lib/structs/H5G_info_t.java
index e79f859..10ae76a 100644
--- a/java/src/hdf/hdf5lib/structs/H5G_info_t.java
+++ b/java/src/hdf/hdf5lib/structs/H5G_info_t.java
@@ -18,7 +18,7 @@ import java.io.Serializable;
* Information struct for group (for H5Gget_info/H5Gget_info_by_name/H5Gget_info_by_idx)
*
*/
-public class H5G_info_t implements Serializable{
+public class H5G_info_t implements Serializable {
private static final long serialVersionUID = -3746463015312132912L;
/** Type of storage for links in group */
public int storage_type;
diff --git a/java/src/hdf/hdf5lib/structs/H5L_info_t.java b/java/src/hdf/hdf5lib/structs/H5L_info_t.java
index a3011c0..38b64d6 100644
--- a/java/src/hdf/hdf5lib/structs/H5L_info_t.java
+++ b/java/src/hdf/hdf5lib/structs/H5L_info_t.java
@@ -23,39 +23,37 @@ import hdf.hdf5lib.HDF5Constants;
public class H5L_info_t implements Serializable {
private static final long serialVersionUID = -4754320605310155033L;
/** Type of link */
- public int type;
+ public int type;
/** Indicate if creation order is valid */
- public boolean corder_valid;
+ public boolean corder_valid;
/** Creation order */
- public long corder;
+ public long corder;
/** Character set of link name */
- public int cset;
+ public int cset;
/** Character set of link name */
public H5O_token_t token;
/** Size of a soft link or user-defined link value */
- public long val_size;
+ public long val_size;
/** Constructor for using object token portion of C union */
- H5L_info_t (int type, boolean corder_valid, long corder,
- int cset, H5O_token_t token)
+ H5L_info_t(int type, boolean corder_valid, long corder, int cset, H5O_token_t token)
{
- this.type = type;
+ this.type = type;
this.corder_valid = corder_valid;
- this.corder = corder;
- this.cset = cset;
- this.token = token;
- this.val_size = -1;
+ this.corder = corder;
+ this.cset = cset;
+ this.token = token;
+ this.val_size = -1;
}
/** Constructor for using val_size portion of C union */
- H5L_info_t (int type, boolean corder_valid, long corder,
- int cset, long val_size)
+ H5L_info_t(int type, boolean corder_valid, long corder, int cset, long val_size)
{
- this.type = type;
+ this.type = type;
this.corder_valid = corder_valid;
- this.corder = corder;
- this.cset = cset;
- this.token = HDF5Constants.H5O_TOKEN_UNDEF;
- this.val_size = val_size;
+ this.corder = corder;
+ this.cset = cset;
+ this.token = HDF5Constants.H5O_TOKEN_UNDEF;
+ this.val_size = val_size;
}
}
diff --git a/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java b/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java
index 2475dd9..16a0eae 100644
--- a/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java
+++ b/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java
@@ -41,31 +41,31 @@ public class H5O_hdr_info_t implements Serializable {
/** Flags to indicate message type is shared in header */
public long mesg_shared;
- H5O_hdr_info_t (int version, int nmesgs, int nchunks, int flags,
- long space_total, long space_meta, long space_mesg, long space_free,
- long mesg_present, long mesg_shared)
+ H5O_hdr_info_t(int version, int nmesgs, int nchunks, int flags, long space_total, long space_meta,
+ long space_mesg, long space_free, long mesg_present, long mesg_shared)
{
- this.version = version;
- this.nmesgs = nmesgs;
- this.nchunks = nchunks;
- this.flags = flags;
- this.space_total = space_total;
- this.space_meta = space_meta;
- this.space_mesg = space_mesg;
- this.space_free = space_free;
+ this.version = version;
+ this.nmesgs = nmesgs;
+ this.nchunks = nchunks;
+ this.flags = flags;
+ this.space_total = space_total;
+ this.space_meta = space_meta;
+ this.space_mesg = space_mesg;
+ this.space_free = space_free;
this.mesg_present = mesg_present;
- this.mesg_shared = mesg_shared;
+ this.mesg_shared = mesg_shared;
}
@Override
- public boolean equals(Object o) {
+ public boolean equals(Object o)
+ {
if (this == o)
return true;
if (!(o instanceof H5O_hdr_info_t))
return false;
- H5O_hdr_info_t info = (H5O_hdr_info_t) o;
+ H5O_hdr_info_t info = (H5O_hdr_info_t)o;
if (this.version != info.version)
return false;
diff --git a/java/src/hdf/hdf5lib/structs/H5O_info_t.java b/java/src/hdf/hdf5lib/structs/H5O_info_t.java
index d2208d2..011a88e 100644
--- a/java/src/hdf/hdf5lib/structs/H5O_info_t.java
+++ b/java/src/hdf/hdf5lib/structs/H5O_info_t.java
@@ -21,25 +21,26 @@ import java.io.Serializable;
public class H5O_info_t implements Serializable {
private static final long serialVersionUID = 4691681163544054518L;
/** File number that object is located in */
- public long fileno;
+ public long fileno;
/** Object token in file */
public H5O_token_t token;
/** Basic object type (group, dataset, etc.) */
- public int type;
+ public int type;
/** Reference count of object */
- public int rc;
+ public int rc;
/** Access time */
- public long atime;
+ public long atime;
/** Modification time */
- public long mtime;
+ public long mtime;
/** Change time */
- public long ctime;
+ public long ctime;
/** Birth time */
- public long btime;
+ public long btime;
/** Number of attributes attached to object */
- public long num_attrs;
+ public long num_attrs;
- /** Constructor for data model information struct for objects
+ /**
+ * Constructor for data model information struct for objects
*
* @param fileno: File number that object is located in
* @param token: Object token in file
@@ -51,17 +52,17 @@ public class H5O_info_t implements Serializable {
* @param btime: Birth time
* @param num_attrs: Number of attributes attached to object
*/
- public H5O_info_t (long fileno, H5O_token_t token, int type,
- int rc, long atime, long mtime, long ctime, long btime, long num_attrs)
+ public H5O_info_t(long fileno, H5O_token_t token, int type, int rc, long atime, long mtime, long ctime,
+ long btime, long num_attrs)
{
- this.fileno = fileno;
- this.token = token;
- this.type = type;
- this.rc = rc;
- this.atime = atime;
- this.mtime = mtime;
- this.ctime = ctime;
- this.btime = btime;
+ this.fileno = fileno;
+ this.token = token;
+ this.type = type;
+ this.rc = rc;
+ this.atime = atime;
+ this.mtime = mtime;
+ this.ctime = ctime;
+ this.btime = btime;
this.num_attrs = num_attrs;
}
}
diff --git a/java/src/hdf/hdf5lib/structs/H5O_native_info_t.java b/java/src/hdf/hdf5lib/structs/H5O_native_info_t.java
index 70e5231..ec01b40 100644
--- a/java/src/hdf/hdf5lib/structs/H5O_native_info_t.java
+++ b/java/src/hdf/hdf5lib/structs/H5O_native_info_t.java
@@ -15,7 +15,8 @@ package hdf.hdf5lib.structs;
import java.io.Serializable;
/**
- * Information struct for native HDF5 object info, such as object header metadata (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx).
+ * Information struct for native HDF5 object info, such as object header metadata (for
+ * H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx).
*
*/
public class H5O_native_info_t implements Serializable {
@@ -29,26 +30,26 @@ public class H5O_native_info_t implements Serializable {
/** v2 B-tree and heap for attributes */
public H5_ih_info_t attr_info;
- H5O_native_info_t (H5O_hdr_info_t oheader_info, H5_ih_info_t obj_info, H5_ih_info_t attr_info)
+ H5O_native_info_t(H5O_hdr_info_t oheader_info, H5_ih_info_t obj_info, H5_ih_info_t attr_info)
{
- this.hdr_info = oheader_info;
- this.obj_info = obj_info;
+ this.hdr_info = oheader_info;
+ this.obj_info = obj_info;
this.attr_info = attr_info;
}
@Override
- public boolean equals(Object o) {
+ public boolean equals(Object o)
+ {
if (this == o)
return true;
if (!(o instanceof H5O_native_info_t))
return false;
- H5O_native_info_t info = (H5O_native_info_t) o;
+ H5O_native_info_t info = (H5O_native_info_t)o;
- if (!this.hdr_info.equals(info.hdr_info)
- || !this.obj_info.equals(info.obj_info)
- || !this.attr_info.equals(info.attr_info))
+ if (!this.hdr_info.equals(info.hdr_info) || !this.obj_info.equals(info.obj_info) ||
+ !this.attr_info.equals(info.attr_info))
return false;
return true;
diff --git a/java/src/hdf/hdf5lib/structs/H5O_token_t.java b/java/src/hdf/hdf5lib/structs/H5O_token_t.java
index f0bb978..8f2b7e2 100644
--- a/java/src/hdf/hdf5lib/structs/H5O_token_t.java
+++ b/java/src/hdf/hdf5lib/structs/H5O_token_t.java
@@ -30,28 +30,25 @@ public class H5O_token_t implements Serializable {
*/
public byte[] data;
- H5O_token_t (byte[] data) {
- this.data = data;
- }
+ H5O_token_t(byte[] data) { this.data = data; }
/**
* Check if token data is undefined
*
* @return true if token data is undefined
*/
- public boolean isUndefined() {
- return this.equals(HDF5Constants.H5O_TOKEN_UNDEF);
- }
+ public boolean isUndefined() { return this.equals(HDF5Constants.H5O_TOKEN_UNDEF); }
@Override
- public boolean equals(Object o) {
+ public boolean equals(Object o)
+ {
if (this == o)
return true;
if (!(o instanceof H5O_token_t))
return false;
- H5O_token_t token = (H5O_token_t) o;
+ H5O_token_t token = (H5O_token_t)o;
return Arrays.equals(this.data, token.data);
}
diff --git a/java/src/hdf/hdf5lib/structs/H5_ih_info_t.java b/java/src/hdf/hdf5lib/structs/H5_ih_info_t.java
index 0c6111b..3213695 100644
--- a/java/src/hdf/hdf5lib/structs/H5_ih_info_t.java
+++ b/java/src/hdf/hdf5lib/structs/H5_ih_info_t.java
@@ -21,25 +21,26 @@ import java.io.Serializable;
public class H5_ih_info_t implements Serializable {
private static final long serialVersionUID = -142238015615462707L;
/** btree and/or list size of index */
- public long index_size;
+ public long index_size;
/** btree and/or list size of hp */
- public long heap_size;
+ public long heap_size;
- H5_ih_info_t (long index_size, long heap_size)
+ H5_ih_info_t(long index_size, long heap_size)
{
this.index_size = index_size;
- this.heap_size = heap_size;
+ this.heap_size = heap_size;
}
@Override
- public boolean equals(Object o) {
+ public boolean equals(Object o)
+ {
if (this == o)
return true;
if (!(o instanceof H5_ih_info_t))
return false;
- H5_ih_info_t info = (H5_ih_info_t) o;
+ H5_ih_info_t info = (H5_ih_info_t)o;
if (this.index_size != info.index_size)
return false;
diff --git a/java/src/hdf/hdf5lib/structs/package-info.java b/java/src/hdf/hdf5lib/structs/package-info.java
index 8a9d97d..a3ec6cd 100644
--- a/java/src/hdf/hdf5lib/structs/package-info.java
+++ b/java/src/hdf/hdf5lib/structs/package-info.java
@@ -11,7 +11,8 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/** All structure definitions define java equivalents of the C structures needed
+/**
+ * All structure definitions define java equivalents of the C structures needed
* by the C API calls. See the C API for information about the structures.
*/
package hdf.hdf5lib.structs;
diff --git a/java/test/CMakeLists.txt b/java/test/CMakeLists.txt
index b1186a4..9d1ed2b 100644
--- a/java/test/CMakeLists.txt
+++ b/java/test/CMakeLists.txt
@@ -86,6 +86,13 @@ foreach (test_file ${HDF5_JAVA_TEST_SOURCES})
add_dependencies (${HDF5_JAVA_TEST_LIB_TARGET}_${test_file} ${HDF5_JAVA_HDF5_LIB_TARGET})
set_target_properties (${HDF5_JAVA_TEST_LIB_TARGET}_${test_file} PROPERTIES FOLDER test/java)
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_JAVA_TEST_${test_file}_SRC_FORMAT ${test_file}.java)
+ endif ()
endforeach ()
foreach (h5_file ${HDF5_JAVA_TEST_SOURCES})
diff --git a/java/test/TestAll.java b/java/test/TestAll.java
index 16414e4..c22fbfe 100644
--- a/java/test/TestAll.java
+++ b/java/test/TestAll.java
@@ -16,21 +16,17 @@ import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Suite.class)
-@Suite.SuiteClasses( { TestH5.class,
- TestH5Eparams.class, TestH5Eregister.class, TestH5Edefault.class, TestH5E.class,
- TestH5Fparams.class, TestH5Fbasic.class, TestH5F.class, TestH5Fswmr.class,
- TestH5Gbasic.class, TestH5G.class, TestH5Giterate.class,
- TestH5Sbasic.class, TestH5S.class,
- TestH5Tparams.class, TestH5Tbasic.class, TestH5T.class,
- TestH5Dparams.class, TestH5D.class, TestH5Dplist.class, TestH5Drw.class,
- TestH5Lparams.class, TestH5Lbasic.class, TestH5Lcreate.class,
- TestH5R.class, TestH5Rref.class,
- TestH5P.class, TestH5PData.class, TestH5Pfapl.class, TestH5Pvirtual.class, TestH5Plist.class,
- TestH5Pfapls3.class, TestH5Pfaplhdfs.class,
- TestH5A.class, TestH5Arw.class,
- TestH5Oparams.class, TestH5Obasic.class, TestH5Ocopy.class, TestH5Ocreate.class,
- TestH5PL.class, TestH5Z.class
-})
+@Suite.SuiteClasses({TestH5.class, TestH5Eparams.class, TestH5Eregister.class, TestH5Edefault.class,
+ TestH5E.class, TestH5Fparams.class, TestH5Fbasic.class, TestH5F.class,
+ TestH5Fswmr.class, TestH5Gbasic.class, TestH5G.class, TestH5Giterate.class,
+ TestH5Sbasic.class, TestH5S.class, TestH5Tparams.class, TestH5Tbasic.class,
+ TestH5T.class, TestH5Dparams.class, TestH5D.class, TestH5Dplist.class,
+ TestH5Drw.class, TestH5Lparams.class, TestH5Lbasic.class, TestH5Lcreate.class,
+ TestH5R.class, TestH5Rref.class, TestH5P.class, TestH5PData.class,
+ TestH5Pfapl.class, TestH5Pvirtual.class, TestH5Plist.class, TestH5Pfapls3.class,
+ TestH5Pfaplhdfs.class, TestH5A.class, TestH5Arw.class, TestH5Oparams.class,
+ TestH5Obasic.class, TestH5Ocopy.class, TestH5Ocreate.class, TestH5PL.class,
+ TestH5Z.class})
public class TestAll {
}
diff --git a/java/test/TestH5.java b/java/test/TestH5.java
index 168f28a..67a522c 100644
--- a/java/test/TestH5.java
+++ b/java/test/TestH5.java
@@ -20,9 +20,9 @@ import static org.junit.Assert.fail;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
+import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
-import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
@@ -46,45 +46,53 @@ import org.junit.rules.TestName;
*
*/
public class TestH5 {
- @Rule public TestName testname = new TestName();
- private static final String H5_FILE = "testData.h5";
- private static final String EXPORT_FILE = "testExport.txt";
- private static final String H5_REGION_FILE = "trefer_reg.h5";
+ @Rule
+ public TestName testname = new TestName();
+ private static final String H5_FILE = "testData.h5";
+ private static final String EXPORT_FILE = "testExport.txt";
+ private static final String H5_REGION_FILE = "trefer_reg.h5";
private static final String EXPORT_REGION_FILE = "testExportReg.txt";
- private static final String H5_ATTR_FILE = "trefer_attr.h5";
- private static final String EXPORT_ATTR_FILE = "testExportAttr.txt";
- private static final String H5_DREG_FILE = "tdatareg.h5";
- private static final String EXPORT_DREG_FILE = "testExportDReg.txt";
- private static final String H5_AREG_FILE = "tattrreg.h5";
- private static final String EXPORT_AREG_FILE = "testExportAReg.txt";
- private static final int DIM_X = 4;
- private static final int DIM_Y = 6;
- private static final int DIM_BLKS = 36;
- private static final int DIM_PNTS = 10;
- private static final int DIM_ATTR = 12;
- private static final int RANK = 2;
- long H5fid = HDF5Constants.H5I_INVALID_HID;
- long H5dsid = HDF5Constants.H5I_INVALID_HID;
- long H5did = HDF5Constants.H5I_INVALID_HID;
- long[] H5dims = { DIM_X, DIM_Y };
-
- private final void _deleteFile(String filename) {
+ private static final String H5_ATTR_FILE = "trefer_attr.h5";
+ private static final String EXPORT_ATTR_FILE = "testExportAttr.txt";
+ private static final String H5_DREG_FILE = "tdatareg.h5";
+ private static final String EXPORT_DREG_FILE = "testExportDReg.txt";
+ private static final String H5_AREG_FILE = "tattrreg.h5";
+ private static final String EXPORT_AREG_FILE = "testExportAReg.txt";
+ private static final int DIM_X = 4;
+ private static final int DIM_Y = 6;
+ private static final int DIM_BLKS = 36;
+ private static final int DIM_PNTS = 10;
+ private static final int DIM_ATTR = 12;
+ private static final int RANK = 2;
+ long H5fid = HDF5Constants.H5I_INVALID_HID;
+ long H5dsid = HDF5Constants.H5I_INVALID_HID;
+ long H5did = HDF5Constants.H5I_INVALID_HID;
+ long[] H5dims = {DIM_X, DIM_Y};
+
+ private final void _deleteFile(String filename)
+ {
File file = null;
try {
file = new File(filename);
}
- catch (Throwable err) {}
+ catch (Throwable err) {
+ }
if (file.exists()) {
- try {file.delete();} catch (SecurityException e) {}
+ try {
+ file.delete();
+ }
+ catch (SecurityException e) {
+ }
}
}
- private final long _createDataset(long fid, long dsid, String name, long dapl) {
+ private final long _createDataset(long fid, long dsid, String name, long dapl)
+ {
long did = HDF5Constants.H5I_INVALID_HID;
try {
- did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32LE, dsid,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, dapl);
+ did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32LE, dsid, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, dapl);
}
catch (Throwable err) {
err.printStackTrace();
@@ -95,12 +103,13 @@ public class TestH5 {
return did;
}
- private final void _createH5File() {
+ private final void _createH5File()
+ {
try {
- H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
H5dsid = H5.H5Screate_simple(2, H5dims, null);
- H5did = _createDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DEFAULT);
+ H5did = _createDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
@@ -118,62 +127,77 @@ public class TestH5 {
}
}
- private final void _closeH5File() {
+ private final void _closeH5File()
+ {
if (H5did >= 0)
- try {H5.H5Dclose(H5did);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5did);
+ }
+ catch (Exception ex) {
+ }
if (H5dsid > 0)
- try {H5.H5Sclose(H5dsid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(H5dsid);
+ }
+ catch (Exception ex) {
+ }
if (H5fid > 0)
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
- H5fid = HDF5Constants.H5I_INVALID_HID;
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
+ H5fid = HDF5Constants.H5I_INVALID_HID;
H5dsid = HDF5Constants.H5I_INVALID_HID;
- H5did = HDF5Constants.H5I_INVALID_HID;
+ H5did = HDF5Constants.H5I_INVALID_HID;
}
- public void _openH5File(String filename, String dsetname) {
- try {
- H5fid = H5.H5Fopen(filename,
- HDF5Constants.H5F_ACC_RDONLY, HDF5Constants.H5P_DEFAULT);
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("TestH5._openH5file: " + err);
- }
- assertTrue("TestH5._openH5file: H5.H5Fopen: ", H5fid >= 0);
- try {
- H5did = H5.H5Dopen(H5fid, dsetname, HDF5Constants.H5P_DEFAULT);
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("TestH5._openH5file: " + err);
- }
- assertTrue("TestH5._openH5file: H5.H5Dopen: ", H5did >= 0);
- try {
- H5dsid = H5.H5Dget_space(H5did);
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("TestH5._openH5file: " + err);
- }
- assertTrue("TestH5._openH5file: H5.H5Screate_simple: ",H5dsid > 0);
+ public void _openH5File(String filename, String dsetname)
+ {
+ try {
+ H5fid = H5.H5Fopen(filename, HDF5Constants.H5F_ACC_RDONLY, HDF5Constants.H5P_DEFAULT);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("TestH5._openH5file: " + err);
+ }
+ assertTrue("TestH5._openH5file: H5.H5Fopen: ", H5fid >= 0);
+ try {
+ H5did = H5.H5Dopen(H5fid, dsetname, HDF5Constants.H5P_DEFAULT);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("TestH5._openH5file: " + err);
+ }
+ assertTrue("TestH5._openH5file: H5.H5Dopen: ", H5did >= 0);
+ try {
+ H5dsid = H5.H5Dget_space(H5did);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("TestH5._openH5file: " + err);
+ }
+ assertTrue("TestH5._openH5file: H5.H5Screate_simple: ", H5dsid > 0);
}
- public final void _deleteH5file() {
+ public final void _deleteH5file()
+ {
_closeH5File();
_deleteFile(H5_FILE);
}
@After
- public void closeH5File() throws HDF5LibraryException {
+ public void closeH5File() throws HDF5LibraryException
+ {
_closeH5File();
- assertTrue("H5 open ids is 0", H5.getOpenIDCount()==0);
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.println();
}
@Before
- public void verifyCount()
- throws NullPointerException, HDF5Exception {
- assertTrue("H5 open ids is 0", H5.getOpenIDCount()==0);
+ public void verifyCount() throws NullPointerException, HDF5Exception
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
}
@@ -184,33 +208,30 @@ public class TestH5 {
* being retained hdf java does not access the symbol.
*/
@Test
- public void testJ2C() {
- int H5F_ACC_RDONLY = 0x0000;
- int H5F_ACC_RDWR = 0x0001;
- int H5F_ACC_TRUNC = 0x0002;
- int H5F_ACC_EXCL = 0x0004;
- int H5F_ACC_CREAT = 0x0010;
- int H5F_OBJ_FILE = 0x0001;
- int H5F_OBJ_DATASET = 0x0002;
- int H5F_OBJ_GROUP = 0x0004;
+ public void testJ2C()
+ {
+ int H5F_ACC_RDONLY = 0x0000;
+ int H5F_ACC_RDWR = 0x0001;
+ int H5F_ACC_TRUNC = 0x0002;
+ int H5F_ACC_EXCL = 0x0004;
+ int H5F_ACC_CREAT = 0x0010;
+ int H5F_OBJ_FILE = 0x0001;
+ int H5F_OBJ_DATASET = 0x0002;
+ int H5F_OBJ_GROUP = 0x0004;
int H5F_OBJ_DATATYPE = 0x0008;
- int H5F_OBJ_ATTR = 0x0010;
- int H5F_OBJ_ALL = H5F_OBJ_FILE | H5F_OBJ_DATASET | H5F_OBJ_GROUP
- | H5F_OBJ_DATATYPE | H5F_OBJ_ATTR;
+ int H5F_OBJ_ATTR = 0x0010;
+ int H5F_OBJ_ALL = H5F_OBJ_FILE | H5F_OBJ_DATASET | H5F_OBJ_GROUP | H5F_OBJ_DATATYPE | H5F_OBJ_ATTR;
int H5F_OBJ_LOCAL = 0x0020;
- int definedValues[] = { H5F_ACC_RDONLY, H5F_ACC_RDWR, H5F_ACC_TRUNC,
- H5F_ACC_EXCL, H5F_ACC_CREAT, H5F_OBJ_FILE,
- H5F_OBJ_DATASET, H5F_OBJ_GROUP, H5F_OBJ_DATATYPE, H5F_OBJ_ATTR,
- H5F_OBJ_ALL, H5F_OBJ_LOCAL };
+ int definedValues[] = {H5F_ACC_RDONLY, H5F_ACC_RDWR, H5F_ACC_TRUNC, H5F_ACC_EXCL,
+ H5F_ACC_CREAT, H5F_OBJ_FILE, H5F_OBJ_DATASET, H5F_OBJ_GROUP,
+ H5F_OBJ_DATATYPE, H5F_OBJ_ATTR, H5F_OBJ_ALL, H5F_OBJ_LOCAL};
- int j2cValues[] = { HDF5Constants.H5F_ACC_RDONLY,
- HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5F_ACC_TRUNC,
- HDF5Constants.H5F_ACC_EXCL,
- HDF5Constants.H5F_ACC_CREAT, HDF5Constants.H5F_OBJ_FILE,
- HDF5Constants.H5F_OBJ_DATASET, HDF5Constants.H5F_OBJ_GROUP,
- HDF5Constants.H5F_OBJ_DATATYPE, HDF5Constants.H5F_OBJ_ATTR,
- HDF5Constants.H5F_OBJ_ALL, HDF5Constants.H5F_OBJ_LOCAL };
+ int j2cValues[] = {
+ HDF5Constants.H5F_ACC_RDONLY, HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5F_ACC_TRUNC,
+ HDF5Constants.H5F_ACC_EXCL, HDF5Constants.H5F_ACC_CREAT, HDF5Constants.H5F_OBJ_FILE,
+ HDF5Constants.H5F_OBJ_DATASET, HDF5Constants.H5F_OBJ_GROUP, HDF5Constants.H5F_OBJ_DATATYPE,
+ HDF5Constants.H5F_OBJ_ATTR, HDF5Constants.H5F_OBJ_ALL, HDF5Constants.H5F_OBJ_LOCAL};
for (int i = 0; i < definedValues.length; i++) {
assertEquals(definedValues[i], j2cValues[i]);
@@ -224,7 +245,8 @@ public class TestH5 {
* Test method for {@link hdf.hdf5lib.H5#H5error_off()}.
*/
@Test
- public void testH5error_off() {
+ public void testH5error_off()
+ {
try {
H5.H5error_off();
}
@@ -237,7 +259,8 @@ public class TestH5 {
* Test method for {@link hdf.hdf5lib.H5#H5open()}.
*/
@Test
- public void testH5open() {
+ public void testH5open()
+ {
try {
H5.H5open();
}
@@ -250,7 +273,8 @@ public class TestH5 {
* Test method for {@link hdf.hdf5lib.H5#H5garbage_collect()}.
*/
@Test
- public void testH5garbage_collect() {
+ public void testH5garbage_collect()
+ {
try {
H5.H5garbage_collect();
}
@@ -265,17 +289,18 @@ public class TestH5 {
* .
*/
@Test
- public void testH5set_free_list_limits() {
+ public void testH5set_free_list_limits()
+ {
int reg_global_lim = 1;
- int reg_list_lim = 1;
+ int reg_list_lim = 1;
int arr_global_lim = 1;
- int arr_list_lim = 1;
+ int arr_list_lim = 1;
int blk_global_lim = 1;
- int blk_list_lim = 1;
+ int blk_list_lim = 1;
try {
- H5.H5set_free_list_limits(reg_global_lim, reg_list_lim,
- arr_global_lim, arr_list_lim, blk_global_lim, blk_list_lim);
+ H5.H5set_free_list_limits(reg_global_lim, reg_list_lim, arr_global_lim, arr_list_lim,
+ blk_global_lim, blk_list_lim);
}
catch (Throwable err) {
fail("H5.H5set_free_list_limits failed: " + err);
@@ -286,8 +311,9 @@ public class TestH5 {
* Test method for {@link hdf.hdf5lib.H5#H5get_libversion(int[])}.
*/
@Test
- public void testH5get_libversion() {
- int libversion[] = { 1, 13, 2 };
+ public void testH5get_libversion()
+ {
+ int libversion[] = {1, 13, 2};
try {
H5.H5get_libversion(libversion);
@@ -309,7 +335,8 @@ public class TestH5 {
* fail.
*/
@Test
- public void testH5get_libversion_null_param() {
+ public void testH5get_libversion_null_param()
+ {
try {
H5.H5get_libversion(null);
}
@@ -325,7 +352,8 @@ public class TestH5 {
* {@link hdf.hdf5lib.H5#H5check_version(int, int, int)}.
*/
@Test
- public void testH5check_version() {
+ public void testH5check_version()
+ {
int majnum = 1, minnum = 13, relnum = 2;
try {
@@ -344,8 +372,9 @@ public class TestH5 {
}
@Test
- public void testIsSerializable() {
- H5 test = new H5();
+ public void testIsSerializable()
+ {
+ H5 test = new H5();
ByteArrayOutputStream out = new ByteArrayOutputStream();
ObjectOutputStream oos;
try {
@@ -358,7 +387,6 @@ public class TestH5 {
fail("ObjectOutputStream failed: " + err);
}
assertTrue(out.toByteArray().length > 0);
-
}
@SuppressWarnings("static-access")
@@ -368,7 +396,7 @@ public class TestH5 {
try {
H5 test = new H5();
- FileOutputStream fos = new FileOutputStream("temph5.ser");
+ FileOutputStream fos = new FileOutputStream("temph5.ser");
ObjectOutputStream oos = new ObjectOutputStream(fos);
oos.writeObject(test);
oos.close();
@@ -378,14 +406,14 @@ public class TestH5 {
}
try {
- FileInputStream fis = new FileInputStream("temph5.ser");
+ FileInputStream fis = new FileInputStream("temph5.ser");
ObjectInputStream ois = new ObjectInputStream(fis);
- H5 test = (hdf.hdf5lib.H5) ois.readObject();
+ H5 test = (hdf.hdf5lib.H5)ois.readObject();
ois.close();
- assertTrue("H5.LIB_VERSION[0]", test.LIB_VERSION[0]==H5.LIB_VERSION[0]);
- assertTrue("H5.LIB_VERSION[1]", test.LIB_VERSION[1]==H5.LIB_VERSION[1]);
-// assertTrue("H5.LIB_VERSION[2]", test.LIB_VERSION[2]==H5.LIB_VERSION[2]);
+ assertTrue("H5.LIB_VERSION[0]", test.LIB_VERSION[0] == H5.LIB_VERSION[0]);
+ assertTrue("H5.LIB_VERSION[1]", test.LIB_VERSION[1] == H5.LIB_VERSION[1]);
+ // assertTrue("H5.LIB_VERSION[2]", test.LIB_VERSION[2]==H5.LIB_VERSION[2]);
// Clean up the file
new File("temph5.ser").delete();
@@ -396,10 +424,11 @@ public class TestH5 {
}
@Test
- public void testH5export_dataset() {
- int[][] dset_data = new int[DIM_X][DIM_Y];
+ public void testH5export_dataset()
+ {
+ int[][] dset_data = new int[DIM_X][DIM_Y];
int[][] dset_indata = new int[DIM_X][DIM_Y];
- int FILLVAL = 99;
+ int FILLVAL = 99;
_createH5File();
@@ -410,9 +439,8 @@ public class TestH5 {
try {
if (H5did >= 0)
- H5.H5Dwrite(H5did, HDF5Constants.H5T_STD_I32LE,
- HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dwrite(H5did, HDF5Constants.H5T_STD_I32LE, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -433,12 +461,12 @@ public class TestH5 {
File file = new File(EXPORT_FILE);
try {
- Reader reader = new FileReader(EXPORT_FILE);
+ Reader reader = new FileReader(EXPORT_FILE);
StreamTokenizer streamTokenizer = new StreamTokenizer(reader);
- int indx = 0;
- int jndx = 0;
- while(streamTokenizer.nextToken() != StreamTokenizer.TT_EOF){
- if(streamTokenizer.ttype == StreamTokenizer.TT_NUMBER) {
+ int indx = 0;
+ int jndx = 0;
+ while (streamTokenizer.nextToken() != StreamTokenizer.TT_EOF) {
+ if (streamTokenizer.ttype == StreamTokenizer.TT_NUMBER) {
dset_indata[indx][jndx] = (int)streamTokenizer.nval;
jndx++;
if (jndx >= DIM_Y) {
@@ -453,21 +481,23 @@ public class TestH5 {
err.printStackTrace();
fail("read file failed: " + err);
}
- for(int row = 0; row < DIM_X; row++)
- for(int col = 0; col < DIM_Y; col++) {
- assertTrue("H5export_dataset: <"+row+","+col+">"+dset_indata[row][col]+"=99", dset_indata[row][col]==99);
+ for (int row = 0; row < DIM_X; row++)
+ for (int col = 0; col < DIM_Y; col++) {
+ assertTrue("H5export_dataset: <" + row + "," + col + ">" + dset_indata[row][col] + "=99",
+ dset_indata[row][col] == 99);
}
_deleteH5file();
}
@Test
- public void testH5export_region() {
- int[] dset_data_expect = {66, 69, 72, 75, 78, 81, 96, 99, 102, 105, 108,
- 111, 126, 129, 132, 135, 138, 141, 156, 159, 162, 165, 168, 171,
- 186, 189, 192, 195, 198, 201, 216, 219, 222, 225, 228, 231,
- 207, 66, 252, 48, 84, 96, 12, 14, 213, 99};
- int[] dset_indata = new int[DIM_BLKS+DIM_PNTS];
- String objName = "/Dataset1";
+ public void testH5export_region()
+ {
+ int[] dset_data_expect = {66, 69, 72, 75, 78, 81, 96, 99, 102, 105, 108, 111,
+ 126, 129, 132, 135, 138, 141, 156, 159, 162, 165, 168, 171,
+ 186, 189, 192, 195, 198, 201, 216, 219, 222, 225, 228, 231,
+ 207, 66, 252, 48, 84, 96, 12, 14, 213, 99};
+ int[] dset_indata = new int[DIM_BLKS + DIM_PNTS];
+ String objName = "/Dataset1";
_openH5File(H5_REGION_FILE, objName);
@@ -482,11 +512,11 @@ public class TestH5 {
File file = new File(EXPORT_REGION_FILE);
try {
- Reader reader = new FileReader(EXPORT_REGION_FILE);
+ Reader reader = new FileReader(EXPORT_REGION_FILE);
StreamTokenizer streamTokenizer = new StreamTokenizer(reader);
- int indx = 0;
- while(streamTokenizer.nextToken() != StreamTokenizer.TT_EOF){
- if(streamTokenizer.ttype == StreamTokenizer.TT_NUMBER) {
+ int indx = 0;
+ while (streamTokenizer.nextToken() != StreamTokenizer.TT_EOF) {
+ if (streamTokenizer.ttype == StreamTokenizer.TT_NUMBER) {
dset_indata[indx] = (int)streamTokenizer.nval;
indx++;
}
@@ -497,15 +527,17 @@ public class TestH5 {
err.printStackTrace();
fail("read file failed: " + err);
}
- for(int row = 0; row < DIM_X; row++)
- assertTrue("testH5export_region: <"+row+">"+dset_indata[row], dset_indata[row]==dset_data_expect[row]);
+ for (int row = 0; row < DIM_X; row++)
+ assertTrue("testH5export_region: <" + row + ">" + dset_indata[row],
+ dset_indata[row] == dset_data_expect[row]);
}
@Test
- public void testH5export_attribute() {
+ public void testH5export_attribute()
+ {
int[] dset_data_expect = {0, 3, 6, 9, 1, 4, 7, 10, 2, 5, 8, 11};
- int[] dset_indata = new int[DIM_ATTR];
- String objName = "/Dataset3";
+ int[] dset_indata = new int[DIM_ATTR];
+ String objName = "/Dataset3";
_openH5File(H5_ATTR_FILE, objName);
@@ -520,12 +552,12 @@ public class TestH5 {
File file = new File(EXPORT_ATTR_FILE);
try {
- Reader reader = new FileReader(EXPORT_ATTR_FILE);
+ Reader reader = new FileReader(EXPORT_ATTR_FILE);
StreamTokenizer streamTokenizer = new StreamTokenizer(reader);
- int indx = 0;
- int jndx = 0;
- while(streamTokenizer.nextToken() != StreamTokenizer.TT_EOF){
- if(streamTokenizer.ttype == StreamTokenizer.TT_NUMBER) {
+ int indx = 0;
+ int jndx = 0;
+ while (streamTokenizer.nextToken() != StreamTokenizer.TT_EOF) {
+ if (streamTokenizer.ttype == StreamTokenizer.TT_NUMBER) {
dset_indata[indx] = (int)streamTokenizer.nval;
indx++;
}
@@ -536,18 +568,20 @@ public class TestH5 {
err.printStackTrace();
fail("read file failed: " + err);
}
- for(int row = 0; row < DIM_X; row++)
- assertTrue("testH5export_attribute: <"+row+">"+dset_indata[row], dset_indata[row]==dset_data_expect[row]);
+ for (int row = 0; row < DIM_X; row++)
+ assertTrue("testH5export_attribute: <" + row + ">" + dset_indata[row],
+ dset_indata[row] == dset_data_expect[row]);
}
@Test
- public void testH5export_regdataset() {
- int[] dset_data_expect = {66, 69, 72, 75, 78, 81, 96, 99, 102, 105, 108,
- 111, 126, 129, 132, 135, 138, 141, 156, 159, 162, 165, 168, 171,
- 186, 189, 192, 195, 198, 201, 216, 219, 222, 225, 228, 231,
- 207, 66, 252, 48, 84, 96, 12, 14, 213, 99};
- int[] dset_indata = new int[DIM_BLKS+DIM_PNTS];
- String objName = "/Dataset1";
+ public void testH5export_regdataset()
+ {
+ int[] dset_data_expect = {66, 69, 72, 75, 78, 81, 96, 99, 102, 105, 108, 111,
+ 126, 129, 132, 135, 138, 141, 156, 159, 162, 165, 168, 171,
+ 186, 189, 192, 195, 198, 201, 216, 219, 222, 225, 228, 231,
+ 207, 66, 252, 48, 84, 96, 12, 14, 213, 99};
+ int[] dset_indata = new int[DIM_BLKS + DIM_PNTS];
+ String objName = "/Dataset1";
_openH5File(H5_DREG_FILE, objName);
@@ -562,11 +596,11 @@ public class TestH5 {
File file = new File(EXPORT_DREG_FILE);
try {
- Reader reader = new FileReader(EXPORT_DREG_FILE);
+ Reader reader = new FileReader(EXPORT_DREG_FILE);
StreamTokenizer streamTokenizer = new StreamTokenizer(reader);
- int indx = 0;
- while(streamTokenizer.nextToken() != StreamTokenizer.TT_EOF){
- if(streamTokenizer.ttype == StreamTokenizer.TT_NUMBER) {
+ int indx = 0;
+ while (streamTokenizer.nextToken() != StreamTokenizer.TT_EOF) {
+ if (streamTokenizer.ttype == StreamTokenizer.TT_NUMBER) {
dset_indata[indx] = (int)streamTokenizer.nval;
indx++;
}
@@ -577,19 +611,21 @@ public class TestH5 {
err.printStackTrace();
fail("read file failed: " + err);
}
- for(int row = 0; row < DIM_X; row++)
- assertTrue("testH5export_regdataset: <"+row+">"+dset_indata[row], dset_indata[row]==dset_data_expect[row]);
+ for (int row = 0; row < DIM_X; row++)
+ assertTrue("testH5export_regdataset: <" + row + ">" + dset_indata[row],
+ dset_indata[row] == dset_data_expect[row]);
}
@Test
- public void testH5export_attrdataset() {
- int[] dset_data_expect = {66, 69, 72, 75, 78, 81, 96, 99, 102, 105, 108,
- 111, 126, 129, 132, 135, 138, 141, 156, 159, 162, 165, 168, 171,
- 186, 189, 192, 195, 198, 201, 216, 219, 222, 225, 228, 231,
- 207, 66, 252, 48, 84, 96, 12, 14, 213, 99};
- int[] dset_indata = new int[DIM_BLKS+DIM_PNTS];
- String dsetName = "/Dataset1";
- String objName = "Attribute1";
+ public void testH5export_attrdataset()
+ {
+ int[] dset_data_expect = {66, 69, 72, 75, 78, 81, 96, 99, 102, 105, 108, 111,
+ 126, 129, 132, 135, 138, 141, 156, 159, 162, 165, 168, 171,
+ 186, 189, 192, 195, 198, 201, 216, 219, 222, 225, 228, 231,
+ 207, 66, 252, 48, 84, 96, 12, 14, 213, 99};
+ int[] dset_indata = new int[DIM_BLKS + DIM_PNTS];
+ String dsetName = "/Dataset1";
+ String objName = "Attribute1";
_openH5File(H5_AREG_FILE, dsetName);
@@ -604,12 +640,12 @@ public class TestH5 {
File file = new File(EXPORT_AREG_FILE);
try {
- Reader reader = new FileReader(EXPORT_AREG_FILE);
+ Reader reader = new FileReader(EXPORT_AREG_FILE);
StreamTokenizer streamTokenizer = new StreamTokenizer(reader);
- int indx = 0;
- int jndx = 0;
- while(streamTokenizer.nextToken() != StreamTokenizer.TT_EOF){
- if(streamTokenizer.ttype == StreamTokenizer.TT_NUMBER) {
+ int indx = 0;
+ int jndx = 0;
+ while (streamTokenizer.nextToken() != StreamTokenizer.TT_EOF) {
+ if (streamTokenizer.ttype == StreamTokenizer.TT_NUMBER) {
dset_indata[indx] = (int)streamTokenizer.nval;
indx++;
}
@@ -620,7 +656,8 @@ public class TestH5 {
err.printStackTrace();
fail("read file failed: " + err);
}
- for(int row = 0; row < DIM_X; row++)
- assertTrue("testH5export_attrdataset: <"+row+">"+dset_indata[row], dset_indata[row]==dset_data_expect[row]);
+ for (int row = 0; row < DIM_X; row++)
+ assertTrue("testH5export_attrdataset: <" + row + ">" + dset_indata[row],
+ dset_indata[row] == dset_data_expect[row]);
}
}
diff --git a/java/test/TestH5A.java b/java/test/TestH5A.java
index f2134d2..fed13ce 100644
--- a/java/test/TestH5A.java
+++ b/java/test/TestH5A.java
@@ -18,9 +18,8 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
-import java.util.ArrayList;
-
import java.io.File;
+import java.util.ArrayList;
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
@@ -38,32 +37,39 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5A {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
private static final String H5_FILE = "testA.h5";
- private static final int DIM_X = 4;
- private static final int DIM_Y = 6;
- long H5fid = HDF5Constants.H5I_INVALID_HID;
- long H5dsid = HDF5Constants.H5I_INVALID_HID;
- long H5did = HDF5Constants.H5I_INVALID_HID;
- long[] H5dims = { DIM_X, DIM_Y };
- long type_id = HDF5Constants.H5I_INVALID_HID;
- long space_id = HDF5Constants.H5I_INVALID_HID;
- long lapl_id = HDF5Constants.H5I_INVALID_HID;
- long aapl_id = HDF5Constants.H5I_INVALID_HID;
-
- private final void _deleteFile(String filename) {
+ private static final int DIM_X = 4;
+ private static final int DIM_Y = 6;
+ long H5fid = HDF5Constants.H5I_INVALID_HID;
+ long H5dsid = HDF5Constants.H5I_INVALID_HID;
+ long H5did = HDF5Constants.H5I_INVALID_HID;
+ long[] H5dims = {DIM_X, DIM_Y};
+ long type_id = HDF5Constants.H5I_INVALID_HID;
+ long space_id = HDF5Constants.H5I_INVALID_HID;
+ long lapl_id = HDF5Constants.H5I_INVALID_HID;
+ long aapl_id = HDF5Constants.H5I_INVALID_HID;
+
+ private final void _deleteFile(String filename)
+ {
File file = new File(filename);
if (file.exists()) {
- try {file.delete();} catch (SecurityException e) {}
+ try {
+ file.delete();
+ }
+ catch (SecurityException e) {
+ }
}
}
- private final long _createDataset(long fid, long dsid, String name, long dapl) {
+ private final long _createDataset(long fid, long dsid, String name, long dapl)
+ {
long did = HDF5Constants.H5I_INVALID_HID;
try {
- did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32BE, dsid,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, dapl);
+ did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32BE, dsid, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, dapl);
}
catch (Throwable err) {
err.printStackTrace();
@@ -75,18 +81,18 @@ public class TestH5A {
}
@Before
- public void createH5file() throws NullPointerException, HDF5Exception {
+ public void createH5file() throws NullPointerException, HDF5Exception
+ {
assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
try {
- H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
assertTrue("TestH5A.createH5file: H5.H5Fcreate: ", H5fid > 0);
H5dsid = H5.H5Screate_simple(2, H5dims, null);
assertTrue("TestH5A.createH5file: H5.H5Screate_simple: ", H5dsid > 0);
- H5did = _createDataset(H5fid, H5dsid, "dset",
- HDF5Constants.H5P_DEFAULT);
+ H5did = _createDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DEFAULT);
assertTrue("TestH5A.createH5file: _createDataset: ", H5did > 0);
space_id = H5.H5Screate(HDF5Constants.H5S_NULL);
assertTrue(space_id > 0);
@@ -108,32 +114,63 @@ public class TestH5A {
}
@After
- public void deleteH5file() throws HDF5LibraryException {
+ public void deleteH5file() throws HDF5LibraryException
+ {
if (H5dsid > 0)
- try {H5.H5Sclose(H5dsid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(H5dsid);
+ }
+ catch (Exception ex) {
+ }
if (H5did > 0)
- try {H5.H5Dclose(H5did);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5did);
+ }
+ catch (Exception ex) {
+ }
if (H5fid > 0)
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
_deleteFile(H5_FILE);
if (type_id > 0)
- try {H5.H5Tclose(type_id);} catch (Exception ex) {}
+ try {
+ H5.H5Tclose(type_id);
+ }
+ catch (Exception ex) {
+ }
if (space_id > 0)
- try {H5.H5Sclose(space_id);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(space_id);
+ }
+ catch (Exception ex) {
+ }
if (lapl_id > 0)
- try {H5.H5Pclose(lapl_id);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(lapl_id);
+ }
+ catch (Exception ex) {
+ }
if (aapl_id > 0)
- try {H5.H5Pclose(aapl_id);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(aapl_id);
+ }
+ catch (Exception ex) {
+ }
System.out.println();
}
@Test
- public void testH5Acreate2() {
+ public void testH5Acreate2()
+ {
long attr_id = HDF5Constants.H5I_INVALID_HID;
try {
- attr_id = H5.H5Acreate(H5did, "dset", type_id, space_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ attr_id = H5.H5Acreate(H5did, "dset", type_id, space_id, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
assertTrue("testH5Acreate2", attr_id >= 0);
}
catch (Throwable err) {
@@ -142,34 +179,40 @@ public class TestH5A {
}
finally {
if (attr_id > 0)
- try {H5.H5Aclose(attr_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr_id);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Acreate2_invalidobject() throws Throwable {
+ public void testH5Acreate2_invalidobject() throws Throwable
+ {
H5.H5Acreate(H5dsid, "dset", type_id, space_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
@Test(expected = NullPointerException.class)
- public void testH5Acreate2_nullname() throws Throwable {
+ public void testH5Acreate2_nullname() throws Throwable
+ {
H5.H5Acreate(H5did, null, type_id, space_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
@Test
- public void testH5Aopen() {
- String attr_name = "dset";
+ public void testH5Aopen()
+ {
+ String attr_name = "dset";
long attribute_id = HDF5Constants.H5I_INVALID_HID;
- long attr_id = HDF5Constants.H5I_INVALID_HID;
+ long attr_id = HDF5Constants.H5I_INVALID_HID;
try {
- attr_id = H5.H5Acreate(H5did, attr_name, type_id, space_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ attr_id = H5.H5Acreate(H5did, attr_name, type_id, space_id, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
// Opening the existing attribute, attr_name(Created by H5ACreate2)
// attached to an object identifier.
- attribute_id = H5.H5Aopen(H5did, attr_name,
- HDF5Constants.H5P_DEFAULT);
+ attribute_id = H5.H5Aopen(H5did, attr_name, HDF5Constants.H5P_DEFAULT);
assertTrue("testH5Aopen: H5Aopen", attribute_id >= 0);
}
catch (Throwable err) {
@@ -178,35 +221,45 @@ public class TestH5A {
}
finally {
if (attr_id > 0)
- try {H5.H5Aclose(attr_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr_id);
+ }
+ catch (Exception ex) {
+ }
if (attribute_id > 0)
- try {H5.H5Aclose(attribute_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attribute_id);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Aopen_invalidname() throws Throwable {
+ public void testH5Aopen_invalidname() throws Throwable
+ {
H5.H5Aopen(H5did, "attr_name", HDF5Constants.H5P_DEFAULT);
}
@Test
- public void testH5Aopen_by_idx() {
- long loc_id = H5did;
- String obj_name = ".";
- int idx_type = HDF5Constants.H5_INDEX_CRT_ORDER;
- int order = HDF5Constants.H5_ITER_INC;
- long n = 0;
- long attr_id = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Aopen_by_idx()
+ {
+ long loc_id = H5did;
+ String obj_name = ".";
+ int idx_type = HDF5Constants.H5_INDEX_CRT_ORDER;
+ int order = HDF5Constants.H5_ITER_INC;
+ long n = 0;
+ long attr_id = HDF5Constants.H5I_INVALID_HID;
long attribute_id = HDF5Constants.H5I_INVALID_HID;
try {
- attr_id = H5.H5Acreate(H5did, "file", type_id, space_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ attr_id = H5.H5Acreate(H5did, "file", type_id, space_id, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
// Opening the existing attribute, obj_name(Created by H5ACreate2)
// by index, attached to an object identifier.
- attribute_id = H5.H5Aopen_by_idx(H5did, ".", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC,
- 0, aapl_id, lapl_id);
+ attribute_id = H5.H5Aopen_by_idx(H5did, ".", HDF5Constants.H5_INDEX_CRT_ORDER,
+ HDF5Constants.H5_ITER_INC, 0, aapl_id, lapl_id);
assertTrue("testH5Aopen_by_idx: H5Aopen_by_idx", attribute_id >= 0);
@@ -215,29 +268,29 @@ public class TestH5A {
// with n=5 and we do not have 5 attributes created.
try {
n = 5;
- H5.H5Aopen_by_idx(loc_id, obj_name, idx_type, order, n,
- aapl_id, lapl_id);
+ H5.H5Aopen_by_idx(loc_id, obj_name, idx_type, order, n, aapl_id, lapl_id);
fail("Negative Test Failed:- Error not Thrown when n is invalid.");
}
catch (AssertionError err) {
fail("H5.H5Aopen_by_idx: " + err);
}
- catch (HDF5LibraryException err) {}
+ catch (HDF5LibraryException err) {
+ }
// Negative test- Error should be thrown when H5Aopen_by_idx is
// called
// with an invalid object name(which hasn't been created).
try {
- n = 0;
+ n = 0;
obj_name = "file";
- H5.H5Aopen_by_idx(loc_id, obj_name, idx_type, order, n,
- aapl_id, lapl_id);
+ H5.H5Aopen_by_idx(loc_id, obj_name, idx_type, order, n, aapl_id, lapl_id);
fail("Negative Test Failed:- Error not Thrown when attribute name is invalid.");
}
catch (AssertionError err) {
fail("H5.H5Aopen_by_idx: " + err);
}
- catch (HDF5LibraryException err) {}
+ catch (HDF5LibraryException err) {
+ }
}
catch (Throwable err) {
err.printStackTrace();
@@ -245,32 +298,37 @@ public class TestH5A {
}
finally {
if (attr_id > 0)
- try {H5.H5Aclose(attr_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr_id);
+ }
+ catch (Exception ex) {
+ }
if (attribute_id > 0)
- try {H5.H5Aclose(attribute_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attribute_id);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Acreate_by_name() {
- String obj_name = ".";
- String attr_name = "DATASET";
+ public void testH5Acreate_by_name()
+ {
+ String obj_name = ".";
+ String attr_name = "DATASET";
long attribute_id = HDF5Constants.H5I_INVALID_HID;
- boolean bool_val = false;
+ boolean bool_val = false;
try {
- attribute_id = H5.H5Acreate_by_name(H5fid, obj_name, attr_name,
- type_id, space_id, HDF5Constants.H5P_DEFAULT,
- aapl_id, lapl_id);
- assertTrue("testH5Acreate_by_name: H5Acreate_by_name",
- attribute_id >= 0);
+ attribute_id = H5.H5Acreate_by_name(H5fid, obj_name, attr_name, type_id, space_id,
+ HDF5Constants.H5P_DEFAULT, aapl_id, lapl_id);
+ assertTrue("testH5Acreate_by_name: H5Acreate_by_name", attribute_id >= 0);
// Check if the name of attribute attached to the object specified
// by loc_id and obj_name exists.It should be true.
- bool_val = H5.H5Aexists_by_name(H5fid, obj_name, attr_name,
- lapl_id);
- assertTrue("testH5Acreate_by_name: H5Aexists_by_name",
- bool_val == true);
+ bool_val = H5.H5Aexists_by_name(H5fid, obj_name, attr_name, lapl_id);
+ assertTrue("testH5Acreate_by_name: H5Aexists_by_name", bool_val == true);
}
catch (Throwable err) {
err.printStackTrace();
@@ -278,21 +336,27 @@ public class TestH5A {
}
finally {
if (attribute_id > 0)
- try {H5.H5Aclose(attribute_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attribute_id);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Arename() throws Throwable, HDF5LibraryException, NullPointerException {
- long loc_id = H5fid;
+ public void testH5Arename() throws Throwable, HDF5LibraryException, NullPointerException
+ {
+ long loc_id = H5fid;
String old_attr_name = "old";
String new_attr_name = "new";
- long attr_id = HDF5Constants.H5I_INVALID_HID;
- int ret_val = -1;
- boolean bool_val = false;
+ long attr_id = HDF5Constants.H5I_INVALID_HID;
+ int ret_val = -1;
+ boolean bool_val = false;
try {
- attr_id = H5.H5Acreate(loc_id, old_attr_name, type_id, space_id, HDF5Constants.H5P_DEFAULT, aapl_id);
+ attr_id =
+ H5.H5Acreate(loc_id, old_attr_name, type_id, space_id, HDF5Constants.H5P_DEFAULT, aapl_id);
ret_val = H5.H5Arename(loc_id, old_attr_name, new_attr_name);
@@ -315,41 +379,42 @@ public class TestH5A {
}
finally {
if (attr_id > 0)
- try {H5.H5Aclose(attr_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr_id);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Arename_by_name() {
- long loc_id = H5fid;
- String obj_name = ".";
+ public void testH5Arename_by_name()
+ {
+ long loc_id = H5fid;
+ String obj_name = ".";
String old_attr_name = "old";
String new_attr_name = "new";
- long attr_id = HDF5Constants.H5I_INVALID_HID;
- int ret_val = -1;
- boolean bool_val = false;
+ long attr_id = HDF5Constants.H5I_INVALID_HID;
+ int ret_val = -1;
+ boolean bool_val = false;
try {
- attr_id = H5.H5Acreate_by_name(loc_id, obj_name, old_attr_name,
- type_id, space_id, HDF5Constants.H5P_DEFAULT, aapl_id, lapl_id);
+ attr_id = H5.H5Acreate_by_name(loc_id, obj_name, old_attr_name, type_id, space_id,
+ HDF5Constants.H5P_DEFAULT, aapl_id, lapl_id);
- ret_val = H5.H5Arename_by_name(loc_id, obj_name, old_attr_name,
- new_attr_name, lapl_id);
+ ret_val = H5.H5Arename_by_name(loc_id, obj_name, old_attr_name, new_attr_name, lapl_id);
// Check the return value.It should be non negative.
assertTrue("testH5Arename_by_name: H5Arename_by_name", ret_val >= 0);
// Check if the new name of attribute attached to the object
// specified by loc_id and obj_name exists.It should be true.
- bool_val = H5.H5Aexists_by_name(loc_id, obj_name, new_attr_name,
- lapl_id);
- assertTrue("testH5Arename_by_name: H5Aexists_by_name",
- bool_val == true);
+ bool_val = H5.H5Aexists_by_name(loc_id, obj_name, new_attr_name, lapl_id);
+ assertTrue("testH5Arename_by_name: H5Aexists_by_name", bool_val == true);
// Check if the old name of attribute attached to the object
// specified by loc_id and obj_name exists. It should equal false.
- bool_val = H5.H5Aexists_by_name(loc_id, obj_name, old_attr_name,
- lapl_id);
+ bool_val = H5.H5Aexists_by_name(loc_id, obj_name, old_attr_name, lapl_id);
assertEquals(bool_val, false);
}
catch (Throwable err) {
@@ -358,21 +423,25 @@ public class TestH5A {
}
finally {
if (attr_id > 0)
- try {H5.H5Aclose(attr_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr_id);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Aget_name() {
- String obj_name = ".";
- String attr_name = "DATASET1";
- String ret_name = null;
+ public void testH5Aget_name()
+ {
+ String obj_name = ".";
+ String attr_name = "DATASET1";
+ String ret_name = null;
long attribute_id = HDF5Constants.H5I_INVALID_HID;
try {
- attribute_id = H5.H5Acreate_by_name(H5fid, obj_name, attr_name,
- type_id, space_id, HDF5Constants.H5P_DEFAULT,
- aapl_id, lapl_id);
+ attribute_id = H5.H5Acreate_by_name(H5fid, obj_name, attr_name, type_id, space_id,
+ HDF5Constants.H5P_DEFAULT, aapl_id, lapl_id);
assertTrue("testH5Aget_name: H5Acreate_by_name ", attribute_id > 0);
ret_name = H5.H5Aget_name(attribute_id);
assertEquals(ret_name, attr_name);
@@ -383,40 +452,40 @@ public class TestH5A {
}
finally {
if (attribute_id > 0)
- try {H5.H5Aclose(attribute_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attribute_id);
+ }
+ catch (Exception ex) {
+ }
}
}
-
@Test
- public void testH5Aget_name_by_idx() {
- long loc_id = H5fid;
- String obj_name = ".";
+ public void testH5Aget_name_by_idx()
+ {
+ long loc_id = H5fid;
+ String obj_name = ".";
String attr_name = "DATASET1", attr2_name = "DATASET2";
String ret_name = null;
- int idx_type = HDF5Constants.H5_INDEX_NAME;
- int order = HDF5Constants.H5_ITER_INC;
- int n = 0;
- long attr1_id = HDF5Constants.H5I_INVALID_HID;
- long attr2_id = HDF5Constants.H5I_INVALID_HID;
+ int idx_type = HDF5Constants.H5_INDEX_NAME;
+ int order = HDF5Constants.H5_ITER_INC;
+ int n = 0;
+ long attr1_id = HDF5Constants.H5I_INVALID_HID;
+ long attr2_id = HDF5Constants.H5I_INVALID_HID;
try {
- attr1_id = H5.H5Acreate_by_name(loc_id, obj_name, attr_name,
- type_id, space_id, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, lapl_id);
- attr2_id = H5.H5Acreate_by_name(loc_id, obj_name, attr2_name,
- type_id, space_id, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, lapl_id);
+ attr1_id = H5.H5Acreate_by_name(loc_id, obj_name, attr_name, type_id, space_id,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, lapl_id);
+ attr2_id = H5.H5Acreate_by_name(loc_id, obj_name, attr2_name, type_id, space_id,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, lapl_id);
// getting the 1st attribute name(n=0).
- ret_name = H5.H5Aget_name_by_idx(loc_id, obj_name, idx_type, order,
- n, lapl_id);
+ ret_name = H5.H5Aget_name_by_idx(loc_id, obj_name, idx_type, order, n, lapl_id);
assertFalse("H5Aget_name_by_idx ", ret_name == null);
assertEquals(ret_name, attr_name);
// getting the second attribute name(n=1)
- ret_name = H5.H5Aget_name_by_idx(loc_id, obj_name, idx_type, order,
- 1, lapl_id);
+ ret_name = H5.H5Aget_name_by_idx(loc_id, obj_name, idx_type, order, 1, lapl_id);
assertFalse("H5Aget_name_by_idx ", ret_name == null);
assertEquals(ret_name, attr2_name);
}
@@ -426,20 +495,29 @@ public class TestH5A {
}
finally {
if (attr1_id > 0)
- try {H5.H5Aclose(attr1_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr1_id);
+ }
+ catch (Exception ex) {
+ }
if (attr2_id > 0)
- try {H5.H5Aclose(attr2_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr2_id);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Aget_storage_size() {
- long attr_id = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Aget_storage_size()
+ {
+ long attr_id = HDF5Constants.H5I_INVALID_HID;
long attr_size = HDF5Constants.H5I_INVALID_HID;
try {
- attr_id = H5.H5Acreate(H5did, "dset", type_id, space_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ attr_id = H5.H5Acreate(H5did, "dset", type_id, space_id, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
attr_size = H5.H5Aget_storage_size(attr_id);
assertTrue("The size of attribute is :", attr_size == 0);
@@ -450,27 +528,31 @@ public class TestH5A {
}
finally {
if (attr_id > 0)
- try {H5.H5Aclose(attr_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr_id);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Aget_info() {
+ public void testH5Aget_info()
+ {
H5A_info_t attr_info = null;
- long attribute_id = HDF5Constants.H5I_INVALID_HID;
- long attr_id = HDF5Constants.H5I_INVALID_HID;
+ long attribute_id = HDF5Constants.H5I_INVALID_HID;
+ long attr_id = HDF5Constants.H5I_INVALID_HID;
try {
- attr_id = H5.H5Acreate(H5did, "dset", type_id, space_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ attr_id = H5.H5Acreate(H5did, "dset", type_id, space_id, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
attribute_id = H5.H5Aopen(H5did, "dset", HDF5Constants.H5P_DEFAULT);
// Calling H5Aget_info with attribute_id returned from H5Aopen.
attr_info = H5.H5Aget_info(attribute_id);
assertFalse("H5Aget_info ", attr_info == null);
- assertTrue("Corder_Valid should be false",
- attr_info.corder_valid == false);
+ assertTrue("Corder_Valid should be false", attr_info.corder_valid == false);
assertTrue("Character set used for attribute name",
- attr_info.cset == HDF5Constants.H5T_CSET_ASCII);
+ attr_info.cset == HDF5Constants.H5T_CSET_ASCII);
assertTrue("Corder ", attr_info.corder == 0);
assertEquals(attr_info.data_size, H5.H5Aget_storage_size(attr_id));
}
@@ -480,34 +562,40 @@ public class TestH5A {
}
finally {
if (attr_id > 0)
- try {H5.H5Aclose(attr_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr_id);
+ }
+ catch (Exception ex) {
+ }
if (attribute_id > 0)
- try {H5.H5Aclose(attribute_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attribute_id);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Aget_info1() {
+ public void testH5Aget_info1()
+ {
H5A_info_t attr_info = null;
- long attribute_id = HDF5Constants.H5I_INVALID_HID;
- long attr_id = HDF5Constants.H5I_INVALID_HID;
- int order = HDF5Constants.H5_ITER_INC;
+ long attribute_id = HDF5Constants.H5I_INVALID_HID;
+ long attr_id = HDF5Constants.H5I_INVALID_HID;
+ int order = HDF5Constants.H5_ITER_INC;
try {
- attr_id = H5.H5Acreate(H5did, ".", type_id, space_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
- attribute_id = H5.H5Aopen_by_idx(H5did, ".",
- HDF5Constants.H5_INDEX_CRT_ORDER, order, 0,
- HDF5Constants.H5P_DEFAULT, lapl_id);
+ attr_id = H5.H5Acreate(H5did, ".", type_id, space_id, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
+ attribute_id = H5.H5Aopen_by_idx(H5did, ".", HDF5Constants.H5_INDEX_CRT_ORDER, order, 0,
+ HDF5Constants.H5P_DEFAULT, lapl_id);
// Calling H5Aget_info with attribute_id returned from
// H5Aopen_by_idx.
attr_info = H5.H5Aget_info(attribute_id);
assertFalse("H5Aget_info ", attr_info == null);
- assertTrue("Corder_Valid should be true",
- attr_info.corder_valid == true);
- assertTrue("Character set",
- attr_info.cset == HDF5Constants.H5T_CSET_ASCII);
+ assertTrue("Corder_Valid should be true", attr_info.corder_valid == true);
+ assertTrue("Character set", attr_info.cset == HDF5Constants.H5T_CSET_ASCII);
assertTrue("Corder ", attr_info.corder == 0);
assertEquals(attr_info.data_size, H5.H5Aget_storage_size(attr_id));
}
@@ -517,55 +605,81 @@ public class TestH5A {
}
finally {
if (attr_id > 0)
- try {H5.H5Aclose(attr_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr_id);
+ }
+ catch (Exception ex) {
+ }
if (attribute_id > 0)
- try {H5.H5Aclose(attribute_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attribute_id);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Aget_info_by_idx() {
- long attr_id = HDF5Constants.H5I_INVALID_HID;
- long attr2_id = HDF5Constants.H5I_INVALID_HID;;
+ public void testH5Aget_info_by_idx()
+ {
+ long attr_id = HDF5Constants.H5I_INVALID_HID;
+ long attr2_id = HDF5Constants.H5I_INVALID_HID;
+ ;
H5A_info_t attr_info = null;
try {
- attr_id = H5.H5Acreate(H5did, "dset1", type_id, space_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
- attr2_id = H5.H5Acreate(H5did, "dataset2", type_id, space_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
-
- //Verify info for 1st attribute, in increasing creation order
- attr_info = H5.H5Aget_info_by_idx(H5did, ".", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 0, lapl_id);
+ attr_id = H5.H5Acreate(H5did, "dset1", type_id, space_id, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
+ attr2_id = H5.H5Acreate(H5did, "dataset2", type_id, space_id, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
+
+ // Verify info for 1st attribute, in increasing creation order
+ attr_info = H5.H5Aget_info_by_idx(H5did, ".", HDF5Constants.H5_INDEX_CRT_ORDER,
+ HDF5Constants.H5_ITER_INC, 0, lapl_id);
assertNotNull(attr_info);
- assertTrue("Corder ", attr_info.corder == 0);//should equal 0 as this is the order of 1st attribute created.
+ assertTrue("Corder ",
+ attr_info.corder ==
+ 0); // should equal 0 as this is the order of 1st attribute created.
assertEquals(attr_info.data_size, H5.H5Aget_storage_size(attr_id));
- //Verify info for 2nd attribute, in increasing creation order
- attr_info = H5.H5Aget_info_by_idx(H5did, ".", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 1, lapl_id);
+ // Verify info for 2nd attribute, in increasing creation order
+ attr_info = H5.H5Aget_info_by_idx(H5did, ".", HDF5Constants.H5_INDEX_CRT_ORDER,
+ HDF5Constants.H5_ITER_INC, 1, lapl_id);
assertNotNull(attr_info);
assertTrue("Corder", attr_info.corder == 1);
assertEquals(attr_info.data_size, H5.H5Aget_storage_size(attr2_id));
- //verify info for 2nd attribute, in decreasing creation order
- attr_info = H5.H5Aget_info_by_idx(H5did, ".", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_DEC, 0, lapl_id);
+ // verify info for 2nd attribute, in decreasing creation order
+ attr_info = H5.H5Aget_info_by_idx(H5did, ".", HDF5Constants.H5_INDEX_CRT_ORDER,
+ HDF5Constants.H5_ITER_DEC, 0, lapl_id);
assertNotNull(attr_info);
- assertTrue("Corder", attr_info.corder == 1); //should equal 1 as this is the order of 2nd attribute created.
+ assertTrue("Corder",
+ attr_info.corder ==
+ 1); // should equal 1 as this is the order of 2nd attribute created.
- //verify info for 1st attribute, in decreasing creation order
- attr_info = H5.H5Aget_info_by_idx(H5did, ".", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_DEC, 1, lapl_id);
+ // verify info for 1st attribute, in decreasing creation order
+ attr_info = H5.H5Aget_info_by_idx(H5did, ".", HDF5Constants.H5_INDEX_CRT_ORDER,
+ HDF5Constants.H5_ITER_DEC, 1, lapl_id);
assertNotNull(attr_info);
- assertTrue("Corder", attr_info.corder == 0); //should equal 0 as this is the order of 1st attribute created.
+ assertTrue("Corder",
+ attr_info.corder ==
+ 0); // should equal 0 as this is the order of 1st attribute created.
- //verify info for 1st attribute, in increasing name order
- attr_info = H5.H5Aget_info_by_idx(H5did, ".", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 1, lapl_id);
+ // verify info for 1st attribute, in increasing name order
+ attr_info = H5.H5Aget_info_by_idx(H5did, ".", HDF5Constants.H5_INDEX_NAME,
+ HDF5Constants.H5_ITER_INC, 1, lapl_id);
assertNotNull(attr_info);
- assertTrue("Corder", attr_info.corder == 0); //should equal 0 as this is the order of 1st attribute created.
+ assertTrue("Corder",
+ attr_info.corder ==
+ 0); // should equal 0 as this is the order of 1st attribute created.
- //verify info for 2nd attribute, in decreasing name order
- attr_info = H5.H5Aget_info_by_idx(H5did, ".", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_DEC, 1, lapl_id);
+ // verify info for 2nd attribute, in decreasing name order
+ attr_info = H5.H5Aget_info_by_idx(H5did, ".", HDF5Constants.H5_INDEX_NAME,
+ HDF5Constants.H5_ITER_DEC, 1, lapl_id);
assertNotNull(attr_info);
- assertTrue("Corder", attr_info.corder == 1); //should equal 1 as this is the order of 2nd attribute created.
+ assertTrue("Corder",
+ attr_info.corder ==
+ 1); // should equal 1 as this is the order of 2nd attribute created.
}
catch (Throwable err) {
err.printStackTrace();
@@ -573,25 +687,32 @@ public class TestH5A {
}
finally {
if (attr_id > 0)
- try {H5.H5Aclose(attr_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr_id);
+ }
+ catch (Exception ex) {
+ }
if (attr2_id > 0)
- try {H5.H5Aclose(attr2_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr2_id);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Aget_info_by_name() {
- long attr_id = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Aget_info_by_name()
+ {
+ long attr_id = HDF5Constants.H5I_INVALID_HID;
H5A_info_t attr_info = null;
- String obj_name = ".";
- String attr_name = "DATASET";
+ String obj_name = ".";
+ String attr_name = "DATASET";
try {
- attr_id = H5.H5Acreate_by_name(H5fid, obj_name, attr_name, type_id,
- space_id, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, lapl_id);
- attr_info = H5.H5Aget_info_by_name(H5fid, obj_name, attr_name,
- lapl_id);
+ attr_id = H5.H5Acreate_by_name(H5fid, obj_name, attr_name, type_id, space_id,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, lapl_id);
+ attr_info = H5.H5Aget_info_by_name(H5fid, obj_name, attr_name, lapl_id);
assertNotNull(attr_info);
}
catch (Throwable err) {
@@ -600,41 +721,45 @@ public class TestH5A {
}
finally {
if (attr_id > 0)
- try {H5.H5Aclose(attr_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr_id);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Adelete_by_name() {
- long attr_id = HDF5Constants.H5I_INVALID_HID;
- int ret_val = -1;
+ public void testH5Adelete_by_name()
+ {
+ long attr_id = HDF5Constants.H5I_INVALID_HID;
+ int ret_val = -1;
boolean bool_val = false;
- boolean exists = false;
+ boolean exists = false;
try {
- attr_id = H5.H5Acreate_by_name(H5fid, ".", "DATASET",
- type_id, space_id, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, lapl_id);
+ attr_id = H5.H5Acreate_by_name(H5fid, ".", "DATASET", type_id, space_id,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, lapl_id);
ret_val = H5.H5Adelete_by_name(H5fid, ".", "DATASET", lapl_id);
assertTrue("H5Adelete_by_name", ret_val >= 0);
// Check if the Attribute still exists.
- bool_val = H5.H5Aexists_by_name(H5fid, ".", "DATASET",
- lapl_id);
+ bool_val = H5.H5Aexists_by_name(H5fid, ".", "DATASET", lapl_id);
assertFalse("testH5Adelete_by_name: H5Aexists_by_name", bool_val);
exists = H5.H5Aexists(H5fid, "DATASET");
- assertFalse("testH5Adelete_by_name: H5Aexists ",exists);
+ assertFalse("testH5Adelete_by_name: H5Aexists ", exists);
// Negative test. Error thrown when we try to delete an attribute
// that has already been deleted.
- try{
+ try {
ret_val = H5.H5Adelete_by_name(H5fid, ".", "DATASET", lapl_id);
fail("Negative Test Failed: Error Not thrown.");
}
catch (AssertionError err) {
fail("H5.H5Adelete_by_name: " + err);
}
- catch (HDF5LibraryException err) {}
+ catch (HDF5LibraryException err) {
+ }
}
catch (Throwable err) {
err.printStackTrace();
@@ -642,14 +767,19 @@ public class TestH5A {
}
finally {
if (attr_id > 0)
- try {H5.H5Aclose(attr_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr_id);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Aexists() {
- boolean exists = false;
- long attr_id = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Aexists()
+ {
+ boolean exists = false;
+ long attr_id = HDF5Constants.H5I_INVALID_HID;
long attribute_id = HDF5Constants.H5I_INVALID_HID;
try {
@@ -662,14 +792,14 @@ public class TestH5A {
assertFalse("H5Aexists ", exists);
try {
- attr_id = H5.H5Acreate(H5fid, "dset", type_id, space_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
- exists = H5.H5Aexists(H5fid, "dset");
+ attr_id = H5.H5Acreate(H5fid, "dset", type_id, space_id, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
+ exists = H5.H5Aexists(H5fid, "dset");
assertTrue("H5Aexists ", exists);
- attribute_id = H5.H5Acreate_by_name(H5fid, ".", "attribute",
- type_id, space_id, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, lapl_id);
+ attribute_id =
+ H5.H5Acreate_by_name(H5fid, ".", "attribute", type_id, space_id, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, lapl_id);
exists = H5.H5Aexists(H5fid, "attribute");
assertTrue("H5Aexists ", exists);
}
@@ -679,35 +809,41 @@ public class TestH5A {
}
finally {
if (attr_id > 0)
- try {H5.H5Aclose(attr_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr_id);
+ }
+ catch (Exception ex) {
+ }
if (attribute_id > 0)
- try {H5.H5Aclose(attribute_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attribute_id);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Adelete_by_idx_order() {
+ public void testH5Adelete_by_idx_order()
+ {
boolean exists = false;
- long attr1_id = HDF5Constants.H5I_INVALID_HID;
- long attr2_id = HDF5Constants.H5I_INVALID_HID;
- long attr3_id = HDF5Constants.H5I_INVALID_HID;
- long attr4_id = HDF5Constants.H5I_INVALID_HID;
+ long attr1_id = HDF5Constants.H5I_INVALID_HID;
+ long attr2_id = HDF5Constants.H5I_INVALID_HID;
+ long attr3_id = HDF5Constants.H5I_INVALID_HID;
+ long attr4_id = HDF5Constants.H5I_INVALID_HID;
try {
- attr1_id = H5.H5Acreate_by_name(H5fid, ".", "attribute1",
- type_id, space_id, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, lapl_id);
- attr2_id = H5.H5Acreate_by_name(H5fid, ".", "attribute2",
- type_id, space_id, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, lapl_id);
- attr3_id = H5.H5Acreate_by_name(H5fid, ".", "attribute3",
- type_id, space_id, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, lapl_id);
- attr4_id = H5.H5Acreate_by_name(H5fid, ".", "attribute4",
- type_id, space_id, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, lapl_id);
-
- H5.H5Adelete_by_idx(H5fid, ".", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 3, lapl_id);
+ attr1_id = H5.H5Acreate_by_name(H5fid, ".", "attribute1", type_id, space_id,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, lapl_id);
+ attr2_id = H5.H5Acreate_by_name(H5fid, ".", "attribute2", type_id, space_id,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, lapl_id);
+ attr3_id = H5.H5Acreate_by_name(H5fid, ".", "attribute3", type_id, space_id,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, lapl_id);
+ attr4_id = H5.H5Acreate_by_name(H5fid, ".", "attribute4", type_id, space_id,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, lapl_id);
+
+ H5.H5Adelete_by_idx(H5fid, ".", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 3,
+ lapl_id);
exists = H5.H5Aexists(H5fid, "attribute4");
assertFalse("H5Adelete_by_idx: H5Aexists", exists);
}
@@ -717,34 +853,49 @@ public class TestH5A {
}
finally {
if (attr1_id > 0)
- try {H5.H5Aclose(attr1_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr1_id);
+ }
+ catch (Exception ex) {
+ }
if (attr2_id > 0)
- try {H5.H5Aclose(attr2_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr2_id);
+ }
+ catch (Exception ex) {
+ }
if (attr3_id > 0)
- try {H5.H5Aclose(attr3_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr3_id);
+ }
+ catch (Exception ex) {
+ }
if (attr4_id > 0)
- try {H5.H5Aclose(attr4_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr4_id);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Adelete_by_idx_name1() {
+ public void testH5Adelete_by_idx_name1()
+ {
boolean exists = false;
- long attr1_id = HDF5Constants.H5I_INVALID_HID;
- long attr2_id = HDF5Constants.H5I_INVALID_HID;
- long attr3_id = HDF5Constants.H5I_INVALID_HID;
+ long attr1_id = HDF5Constants.H5I_INVALID_HID;
+ long attr2_id = HDF5Constants.H5I_INVALID_HID;
+ long attr3_id = HDF5Constants.H5I_INVALID_HID;
try {
- attr1_id = H5.H5Acreate_by_name(H5fid, ".", "attribute1",
- type_id, space_id, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, lapl_id);
- attr2_id = H5.H5Acreate_by_name(H5fid, ".", "attribute2",
- type_id, space_id, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, lapl_id);
- attr3_id = H5.H5Acreate_by_name(H5fid, ".", "attribute3",
- type_id, space_id, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, lapl_id);
- H5.H5Adelete_by_idx(H5fid, ".", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 2, lapl_id);
+ attr1_id = H5.H5Acreate_by_name(H5fid, ".", "attribute1", type_id, space_id,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, lapl_id);
+ attr2_id = H5.H5Acreate_by_name(H5fid, ".", "attribute2", type_id, space_id,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, lapl_id);
+ attr3_id = H5.H5Acreate_by_name(H5fid, ".", "attribute3", type_id, space_id,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, lapl_id);
+ H5.H5Adelete_by_idx(H5fid, ".", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 2,
+ lapl_id);
exists = H5.H5Aexists(H5fid, "attribute3");
assertFalse("H5Adelete_by_idx: H5Aexists", exists);
}
@@ -754,37 +905,47 @@ public class TestH5A {
}
finally {
if (attr1_id > 0)
- try {H5.H5Aclose(attr1_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr1_id);
+ }
+ catch (Exception ex) {
+ }
if (attr2_id > 0)
- try {H5.H5Aclose(attr2_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr2_id);
+ }
+ catch (Exception ex) {
+ }
if (attr3_id > 0)
- try {H5.H5Aclose(attr3_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr3_id);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Adelete_by_idx_name2() {
+ public void testH5Adelete_by_idx_name2()
+ {
boolean exists = false;
- long attr1_id = HDF5Constants.H5I_INVALID_HID;
- long attr2_id = HDF5Constants.H5I_INVALID_HID;
- long attr3_id = HDF5Constants.H5I_INVALID_HID;
- long attr4_id = HDF5Constants.H5I_INVALID_HID;
+ long attr1_id = HDF5Constants.H5I_INVALID_HID;
+ long attr2_id = HDF5Constants.H5I_INVALID_HID;
+ long attr3_id = HDF5Constants.H5I_INVALID_HID;
+ long attr4_id = HDF5Constants.H5I_INVALID_HID;
try {
- attr1_id = H5.H5Acreate_by_name(H5fid, ".", "attribute1",
- type_id, space_id, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, lapl_id);
- attr2_id = H5.H5Acreate_by_name(H5fid, ".", "attribute2",
- type_id, space_id, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, lapl_id);
- attr3_id = H5.H5Acreate_by_name(H5fid, ".", "attribute3",
- type_id, space_id, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, lapl_id);
- attr4_id = H5.H5Acreate_by_name(H5fid, ".", "attribute4",
- type_id, space_id, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, lapl_id);
-
- H5.H5Adelete_by_idx(H5fid, ".", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_DEC, 3, lapl_id);
+ attr1_id = H5.H5Acreate_by_name(H5fid, ".", "attribute1", type_id, space_id,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, lapl_id);
+ attr2_id = H5.H5Acreate_by_name(H5fid, ".", "attribute2", type_id, space_id,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, lapl_id);
+ attr3_id = H5.H5Acreate_by_name(H5fid, ".", "attribute3", type_id, space_id,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, lapl_id);
+ attr4_id = H5.H5Acreate_by_name(H5fid, ".", "attribute4", type_id, space_id,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, lapl_id);
+
+ H5.H5Adelete_by_idx(H5fid, ".", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_DEC, 3,
+ lapl_id);
exists = H5.H5Aexists(H5fid, "attribute1");
assertFalse("H5Adelete_by_idx: H5Aexists", exists);
}
@@ -794,47 +955,66 @@ public class TestH5A {
}
finally {
if (attr1_id > 0)
- try {H5.H5Aclose(attr1_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr1_id);
+ }
+ catch (Exception ex) {
+ }
if (attr2_id > 0)
- try {H5.H5Aclose(attr2_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr2_id);
+ }
+ catch (Exception ex) {
+ }
if (attr3_id > 0)
- try {H5.H5Aclose(attr3_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr3_id);
+ }
+ catch (Exception ex) {
+ }
if (attr4_id > 0)
- try {H5.H5Aclose(attr4_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr4_id);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test(expected = NullPointerException.class)
- public void testH5Adelete_by_idx_null() throws Throwable {
- H5.H5Adelete_by_idx(H5fid, null, HDF5Constants.H5_INDEX_CRT_ORDER,
- HDF5Constants.H5_ITER_INC, 0, lapl_id);
+ public void testH5Adelete_by_idx_null() throws Throwable
+ {
+ H5.H5Adelete_by_idx(H5fid, null, HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 0,
+ lapl_id);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Adelete_by_idx_invalidobject() throws Throwable {
- H5.H5Adelete_by_idx(H5fid, "invalid", HDF5Constants.H5_INDEX_CRT_ORDER,
- HDF5Constants.H5_ITER_INC, 0, lapl_id);
+ public void testH5Adelete_by_idx_invalidobject() throws Throwable
+ {
+ H5.H5Adelete_by_idx(H5fid, "invalid", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 0,
+ lapl_id);
}
@Test
- public void testH5Aopen_by_name() {
- String obj_name = ".";
- String attr_name = "DATASET";
+ public void testH5Aopen_by_name()
+ {
+ String obj_name = ".";
+ String attr_name = "DATASET";
long attribute_id = HDF5Constants.H5I_INVALID_HID;
- long aid = HDF5Constants.H5I_INVALID_HID;
+ long aid = HDF5Constants.H5I_INVALID_HID;
try {
- attribute_id = H5.H5Acreate_by_name(H5fid, obj_name, attr_name,
- type_id, space_id, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, lapl_id);
+ attribute_id =
+ H5.H5Acreate_by_name(H5fid, obj_name, attr_name, type_id, space_id, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, lapl_id);
- //open Attribute by name
- if(attribute_id >= 0) {
+ // open Attribute by name
+ if (attribute_id >= 0) {
try {
aid = H5.H5Aopen_by_name(H5fid, obj_name, attr_name, HDF5Constants.H5P_DEFAULT, lapl_id);
- assertTrue("testH5Aopen_by_name: ", aid>=0);
+ assertTrue("testH5Aopen_by_name: ", aid >= 0);
}
- catch(Throwable err) {
+ catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Aopen_by_name " + err);
}
@@ -846,21 +1026,30 @@ public class TestH5A {
}
finally {
if (aid > 0)
- try {H5.H5Aclose(aid);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(aid);
+ }
+ catch (Exception ex) {
+ }
if (attribute_id > 0)
- try {H5.H5Aclose(attribute_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attribute_id);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Awrite_readVL() {
- String attr_name = "VLdata";
- long attr_id = HDF5Constants.H5I_INVALID_HID;
- long atype_id = HDF5Constants.H5I_INVALID_HID;
- long aspace_id = HDF5Constants.H5I_INVALID_HID;
- String[] str_data = { "Parting", "is such", "sweet", "sorrow." };
- long[] dims = { str_data.length };
- long lsize = 1;
+ public void testH5Awrite_readVL()
+ {
+ String attr_name = "VLdata";
+ long attr_id = HDF5Constants.H5I_INVALID_HID;
+ long atype_id = HDF5Constants.H5I_INVALID_HID;
+ long aspace_id = HDF5Constants.H5I_INVALID_HID;
+ String[] str_data = {"Parting", "is such", "sweet", "sorrow."};
+ long[] dims = {str_data.length};
+ long lsize = 1;
try {
atype_id = H5.H5Tcopy(HDF5Constants.H5T_C_S1);
@@ -870,7 +1059,11 @@ public class TestH5A {
}
catch (Exception err) {
if (atype_id > 0)
- try {H5.H5Tclose(atype_id);} catch (Exception ex) {}
+ try {
+ H5.H5Tclose(atype_id);
+ }
+ catch (Exception ex) {
+ }
err.printStackTrace();
fail("H5.testH5Awrite_readVL: " + err);
}
@@ -878,8 +1071,8 @@ public class TestH5A {
try {
aspace_id = H5.H5Screate_simple(1, dims, null);
assertTrue(aspace_id > 0);
- attr_id = H5.H5Acreate(H5did, attr_name, atype_id, aspace_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ attr_id = H5.H5Acreate(H5did, attr_name, atype_id, aspace_id, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
assertTrue("testH5Awrite_readVL: ", attr_id >= 0);
H5.H5AwriteVL(attr_id, atype_id, str_data);
@@ -889,7 +1082,7 @@ public class TestH5A {
for (int j = 0; j < dims.length; j++) {
lsize *= dims[j];
}
- String[] strs = new String[(int) lsize];
+ String[] strs = new String[(int)lsize];
for (int j = 0; j < lsize; j++) {
strs[j] = "";
}
@@ -910,19 +1103,32 @@ public class TestH5A {
}
finally {
if (attr_id > 0)
- try {H5.H5Aclose(attr_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr_id);
+ }
+ catch (Exception ex) {
+ }
if (aspace_id > 0)
- try {H5.H5Sclose(aspace_id);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(aspace_id);
+ }
+ catch (Exception ex) {
+ }
if (atype_id > 0)
- try {H5.H5Tclose(atype_id);} catch (Exception ex) {}
+ try {
+ H5.H5Tclose(atype_id);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Aget_create_plist() {
- String attr_name = "DATASET1";
+ public void testH5Aget_create_plist()
+ {
+ String attr_name = "DATASET1";
int char_encoding = 0;
- long plist_id = HDF5Constants.H5I_INVALID_HID;
+ long plist_id = HDF5Constants.H5I_INVALID_HID;
long attribute_id = HDF5Constants.H5I_INVALID_HID;
try {
@@ -942,11 +1148,13 @@ public class TestH5A {
err.printStackTrace();
fail("H5Pget_char_encoding: " + err);
}
- assertTrue("testH5Aget_create_plist: get_char_encoding", char_encoding == HDF5Constants.H5T_CSET_ASCII);
+ assertTrue("testH5Aget_create_plist: get_char_encoding",
+ char_encoding == HDF5Constants.H5T_CSET_ASCII);
// Create an attribute for the dataset using the property list
try {
- attribute_id = H5.H5Acreate(H5fid, attr_name, type_id, space_id, plist_id, HDF5Constants.H5P_DEFAULT);
+ attribute_id =
+ H5.H5Acreate(H5fid, attr_name, type_id, space_id, plist_id, HDF5Constants.H5P_DEFAULT);
assertTrue("testH5Aget_create_plist: H5Acreate", attribute_id >= 0);
}
catch (Throwable err) {
@@ -967,7 +1175,8 @@ public class TestH5A {
err.printStackTrace();
fail("H5Pget_char_encoding: " + err);
}
- assertTrue("testH5Aget_create_plist: get_char_encoding", char_encoding == HDF5Constants.H5T_CSET_ASCII);
+ assertTrue("testH5Aget_create_plist: get_char_encoding",
+ char_encoding == HDF5Constants.H5T_CSET_ASCII);
}
catch (Throwable err) {
err.printStackTrace();
@@ -975,14 +1184,23 @@ public class TestH5A {
}
finally {
if (plist_id > 0)
- try {H5.H5Pclose(plist_id);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(plist_id);
+ }
+ catch (Exception ex) {
+ }
if (attribute_id > 0)
- try {H5.H5Aclose(attribute_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attribute_id);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Aiterate() {
+ public void testH5Aiterate()
+ {
long attr1_id = HDF5Constants.H5I_INVALID_HID;
long attr2_id = HDF5Constants.H5I_INVALID_HID;
long attr3_id = HDF5Constants.H5I_INVALID_HID;
@@ -990,48 +1208,56 @@ public class TestH5A {
class idata {
public String attr_name = null;
- idata(String name) {
- this.attr_name = name;
- }
+ idata(String name) { this.attr_name = name; }
}
class H5A_iter_data implements H5A_iterate_t {
public ArrayList<idata> iterdata = new ArrayList<idata>();
}
H5A_iterate_t iter_data = new H5A_iter_data();
class H5A_iter_callback implements H5A_iterate_cb {
- public int callback(long group, String name, H5A_info_t info, H5A_iterate_t op_data) {
+ public int callback(long group, String name, H5A_info_t info, H5A_iterate_t op_data)
+ {
idata id = new idata(name);
((H5A_iter_data)op_data).iterdata.add(id);
return 0;
}
}
try {
- attr1_id = H5.H5Acreate_by_name(H5fid, ".", "attribute1",
- type_id, space_id, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, lapl_id);
- attr2_id = H5.H5Acreate_by_name(H5fid, ".", "attribute2",
- type_id, space_id, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, lapl_id);
- attr3_id = H5.H5Acreate_by_name(H5fid, ".", "attribute3",
- type_id, space_id, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, lapl_id);
- attr4_id = H5.H5Acreate_by_name(H5fid, ".", "attribute4",
- type_id, space_id, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, lapl_id);
+ attr1_id = H5.H5Acreate_by_name(H5fid, ".", "attribute1", type_id, space_id,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, lapl_id);
+ attr2_id = H5.H5Acreate_by_name(H5fid, ".", "attribute2", type_id, space_id,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, lapl_id);
+ attr3_id = H5.H5Acreate_by_name(H5fid, ".", "attribute3", type_id, space_id,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, lapl_id);
+ attr4_id = H5.H5Acreate_by_name(H5fid, ".", "attribute4", type_id, space_id,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, lapl_id);
H5A_iterate_cb iter_cb = new H5A_iter_callback();
try {
- H5.H5Aiterate(H5fid, HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 0L, iter_cb, iter_data);
+ H5.H5Aiterate(H5fid, HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 0L, iter_cb,
+ iter_data);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Aiterate: " + err);
}
- assertFalse("H5Aiterate ",((H5A_iter_data)iter_data).iterdata.isEmpty());
- assertTrue("H5Aiterate "+((H5A_iter_data)iter_data).iterdata.size(),((H5A_iter_data)iter_data).iterdata.size()==4);
- assertTrue("H5Aiterate "+(((H5A_iter_data)iter_data).iterdata.get(0)).attr_name,(((H5A_iter_data)iter_data).iterdata.get(0)).attr_name.compareToIgnoreCase("attribute1")==0);
- assertTrue("H5Aiterate "+(((H5A_iter_data)iter_data).iterdata.get(1)).attr_name,(((H5A_iter_data)iter_data).iterdata.get(1)).attr_name.compareToIgnoreCase("attribute2")==0);
- assertTrue("H5Aiterate "+((idata)((H5A_iter_data)iter_data).iterdata.get(2)).attr_name,(((H5A_iter_data)iter_data).iterdata.get(2)).attr_name.compareToIgnoreCase("attribute3")==0);
- assertTrue("H5Aiterate "+((idata)((H5A_iter_data)iter_data).iterdata.get(3)).attr_name,((idata)((H5A_iter_data)iter_data).iterdata.get(3)).attr_name.compareToIgnoreCase("attribute4")==0);
+ assertFalse("H5Aiterate ", ((H5A_iter_data)iter_data).iterdata.isEmpty());
+ assertTrue("H5Aiterate " + ((H5A_iter_data)iter_data).iterdata.size(),
+ ((H5A_iter_data)iter_data).iterdata.size() == 4);
+ assertTrue(
+ "H5Aiterate " + (((H5A_iter_data)iter_data).iterdata.get(0)).attr_name,
+ (((H5A_iter_data)iter_data).iterdata.get(0)).attr_name.compareToIgnoreCase("attribute1") ==
+ 0);
+ assertTrue(
+ "H5Aiterate " + (((H5A_iter_data)iter_data).iterdata.get(1)).attr_name,
+ (((H5A_iter_data)iter_data).iterdata.get(1)).attr_name.compareToIgnoreCase("attribute2") ==
+ 0);
+ assertTrue(
+ "H5Aiterate " + ((idata)((H5A_iter_data)iter_data).iterdata.get(2)).attr_name,
+ (((H5A_iter_data)iter_data).iterdata.get(2)).attr_name.compareToIgnoreCase("attribute3") ==
+ 0);
+ assertTrue("H5Aiterate " + ((idata)((H5A_iter_data)iter_data).iterdata.get(3)).attr_name,
+ ((idata)((H5A_iter_data)iter_data).iterdata.get(3))
+ .attr_name.compareToIgnoreCase("attribute4") == 0);
}
catch (Throwable err) {
err.printStackTrace();
@@ -1039,18 +1265,35 @@ public class TestH5A {
}
finally {
if (attr1_id > 0)
- try {H5.H5Aclose(attr1_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr1_id);
+ }
+ catch (Exception ex) {
+ }
if (attr2_id > 0)
- try {H5.H5Aclose(attr2_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr2_id);
+ }
+ catch (Exception ex) {
+ }
if (attr3_id > 0)
- try {H5.H5Aclose(attr3_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr3_id);
+ }
+ catch (Exception ex) {
+ }
if (attr4_id > 0)
- try {H5.H5Aclose(attr4_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr4_id);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Aiterate_by_name() {
+ public void testH5Aiterate_by_name()
+ {
long attr1_id = HDF5Constants.H5I_INVALID_HID;
long attr2_id = HDF5Constants.H5I_INVALID_HID;
long attr3_id = HDF5Constants.H5I_INVALID_HID;
@@ -1058,45 +1301,44 @@ public class TestH5A {
class idata {
public String attr_name = null;
- idata(String name) {
- this.attr_name = name;
- }
+ idata(String name) { this.attr_name = name; }
}
class H5A_iter_data implements H5A_iterate_t {
public ArrayList<idata> iterdata = new ArrayList<idata>();
}
H5A_iterate_t iter_data = new H5A_iter_data();
class H5A_iter_callback implements H5A_iterate_cb {
- public int callback(long group, String name, H5A_info_t info, H5A_iterate_t op_data) {
+ public int callback(long group, String name, H5A_info_t info, H5A_iterate_t op_data)
+ {
idata id = new idata(name);
((H5A_iter_data)op_data).iterdata.add(id);
return 0;
}
}
try {
- attr1_id = H5.H5Acreate_by_name(H5fid, ".", "attribute4",
- type_id, space_id, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, lapl_id);
- attr2_id = H5.H5Acreate_by_name(H5fid, ".", "attribute3",
- type_id, space_id, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, lapl_id);
- attr3_id = H5.H5Acreate_by_name(H5fid, ".", "attribute2",
- type_id, space_id, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, lapl_id);
- attr4_id = H5.H5Acreate_by_name(H5fid, ".", "attribute1",
- type_id, space_id, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, lapl_id);
+ attr1_id = H5.H5Acreate_by_name(H5fid, ".", "attribute4", type_id, space_id,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, lapl_id);
+ attr2_id = H5.H5Acreate_by_name(H5fid, ".", "attribute3", type_id, space_id,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, lapl_id);
+ attr3_id = H5.H5Acreate_by_name(H5fid, ".", "attribute2", type_id, space_id,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, lapl_id);
+ attr4_id = H5.H5Acreate_by_name(H5fid, ".", "attribute1", type_id, space_id,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, lapl_id);
H5A_iterate_cb iter_cb = new H5A_iter_callback();
try {
- H5.H5Aiterate_by_name(H5fid, ".", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 0L, iter_cb, iter_data, HDF5Constants.H5P_DEFAULT);
+ H5.H5Aiterate_by_name(H5fid, ".", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 0L,
+ iter_cb, iter_data, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Aiterate_by_name: " + err);
}
- assertFalse("H5Aiterate_by_name ",((H5A_iter_data)iter_data).iterdata.isEmpty());
- assertTrue("H5Aiterate_by_name "+((H5A_iter_data)iter_data).iterdata.size(),((H5A_iter_data)iter_data).iterdata.size()==4);
- assertTrue("H5Aiterate_by_name "+((idata)((H5A_iter_data)iter_data).iterdata.get(1)).attr_name,((idata)((H5A_iter_data)iter_data).iterdata.get(1)).attr_name.compareToIgnoreCase("attribute2")==0);
+ assertFalse("H5Aiterate_by_name ", ((H5A_iter_data)iter_data).iterdata.isEmpty());
+ assertTrue("H5Aiterate_by_name " + ((H5A_iter_data)iter_data).iterdata.size(),
+ ((H5A_iter_data)iter_data).iterdata.size() == 4);
+ assertTrue("H5Aiterate_by_name " + ((idata)((H5A_iter_data)iter_data).iterdata.get(1)).attr_name,
+ ((idata)((H5A_iter_data)iter_data).iterdata.get(1))
+ .attr_name.compareToIgnoreCase("attribute2") == 0);
}
catch (Throwable err) {
err.printStackTrace();
@@ -1104,17 +1346,29 @@ public class TestH5A {
}
finally {
if (attr1_id > 0)
- try {H5.H5Aclose(attr1_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr1_id);
+ }
+ catch (Exception ex) {
+ }
if (attr2_id > 0)
- try {H5.H5Aclose(attr2_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr2_id);
+ }
+ catch (Exception ex) {
+ }
if (attr3_id > 0)
- try {H5.H5Aclose(attr3_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr3_id);
+ }
+ catch (Exception ex) {
+ }
if (attr4_id > 0)
- try {H5.H5Aclose(attr4_id);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(attr4_id);
+ }
+ catch (Exception ex) {
+ }
}
}
-
}
-
-
-
diff --git a/java/test/TestH5Arw.java b/java/test/TestH5Arw.java
index 8ce2fee..56ac7f4 100644
--- a/java/test/TestH5Arw.java
+++ b/java/test/TestH5Arw.java
@@ -33,76 +33,103 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5Arw {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
private static final String H5_INTS_FILE = "tintsattrs.h5";
private static final String H5_FLTS_FILE = "tfloatsattrs.h5";
- private static final int DIM_X = 8;
- private static final int DIM8_Y = 8;
- private static final int DIM16_Y = 16;
- private static final int DIM32_Y = 32;
- private static final int DIM64_Y = 64;
- private static final int DIM128_Y = 128;
- private static final String DATASETU08 = "DU08BITS";
- private static final String DATASETS08 = "DS08BITS";
- private static final String DATASETU16 = "DU16BITS";
- private static final String DATASETS16 = "DS16BITS";
- private static final String DATASETU32 = "DU32BITS";
- private static final String DATASETS32 = "DS32BITS";
- private static final String DATASETU64 = "DU64BITS";
- private static final String DATASETS64 = "DS64BITS";
- private static final String DATASETF32 = "DS32BITS";
- private static final String DATASETF64 = "DS64BITS";
- private static final String DATASETF128 = "DS128BITS";
- private static final int RANK = 2;
- long H5fid = HDF5Constants.H5I_INVALID_HID;
- long H5aid = HDF5Constants.H5I_INVALID_HID;
- long H5did = HDF5Constants.H5I_INVALID_HID;
-
- private final void _closeH5file() throws HDF5LibraryException {
+ private static final int DIM_X = 8;
+ private static final int DIM8_Y = 8;
+ private static final int DIM16_Y = 16;
+ private static final int DIM32_Y = 32;
+ private static final int DIM64_Y = 64;
+ private static final int DIM128_Y = 128;
+ private static final String DATASETU08 = "DU08BITS";
+ private static final String DATASETS08 = "DS08BITS";
+ private static final String DATASETU16 = "DU16BITS";
+ private static final String DATASETS16 = "DS16BITS";
+ private static final String DATASETU32 = "DU32BITS";
+ private static final String DATASETS32 = "DS32BITS";
+ private static final String DATASETU64 = "DU64BITS";
+ private static final String DATASETS64 = "DS64BITS";
+ private static final String DATASETF32 = "DS32BITS";
+ private static final String DATASETF64 = "DS64BITS";
+ private static final String DATASETF128 = "DS128BITS";
+ private static final int RANK = 2;
+ long H5fid = HDF5Constants.H5I_INVALID_HID;
+ long H5aid = HDF5Constants.H5I_INVALID_HID;
+ long H5did = HDF5Constants.H5I_INVALID_HID;
+
+ private final void _closeH5file() throws HDF5LibraryException
+ {
if (H5aid >= 0)
- try {H5.H5Aclose(H5aid);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(H5aid);
+ }
+ catch (Exception ex) {
+ }
if (H5did >= 0)
- try {H5.H5Dclose(H5did);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5did);
+ }
+ catch (Exception ex) {
+ }
if (H5fid > 0)
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
}
- public void openH5file(String filename, String dsetname) {
- try {
- H5fid = H5.H5Fopen(filename,
- HDF5Constants.H5F_ACC_RDONLY, HDF5Constants.H5P_DEFAULT);
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("TestH5Arw._openH5file: " + err);
- }
- assertTrue("TestH5Arw._openH5file: H5.H5Fopen: ", H5fid >= 0);
- try {
- H5did = H5.H5Dopen(H5fid, dsetname, HDF5Constants.H5P_DEFAULT);
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("TestH5Arw._openH5file: " + err);
- }
- assertTrue("TestH5Arw._openH5file: H5.H5Dopen: ", H5did >= 0);
- try {
- H5aid = H5.H5Aopen(H5did, dsetname, HDF5Constants.H5P_DEFAULT);
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("TestH5Arw._openH5file: " + err);
- }
- assertTrue("TestH5Arw._openH5file: H5.H5Aopen: ", H5aid >= 0);
+ public void openH5file(String filename, String dsetname)
+ {
+ try {
+ H5fid = H5.H5Fopen(filename, HDF5Constants.H5F_ACC_RDONLY, HDF5Constants.H5P_DEFAULT);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("TestH5Arw._openH5file: " + err);
+ }
+ assertTrue("TestH5Arw._openH5file: H5.H5Fopen: ", H5fid >= 0);
+ try {
+ H5did = H5.H5Dopen(H5fid, dsetname, HDF5Constants.H5P_DEFAULT);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("TestH5Arw._openH5file: " + err);
+ }
+ assertTrue("TestH5Arw._openH5file: H5.H5Dopen: ", H5did >= 0);
+ try {
+ H5aid = H5.H5Aopen(H5did, dsetname, HDF5Constants.H5P_DEFAULT);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("TestH5Arw._openH5file: " + err);
+ }
+ assertTrue("TestH5Arw._openH5file: H5.H5Aopen: ", H5aid >= 0);
}
@After
- public void closeH5file() throws HDF5LibraryException {
+ public void closeH5file() throws HDF5LibraryException
+ {
if (H5aid >= 0)
- try {H5.H5Aclose(H5aid);} catch (Exception ex) {}
+ try {
+ H5.H5Aclose(H5aid);
+ }
+ catch (Exception ex) {
+ }
if (H5did >= 0)
- try {H5.H5Dclose(H5did);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5did);
+ }
+ catch (Exception ex) {
+ }
if (H5fid > 0)
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
H5fid = HDF5Constants.H5I_INVALID_HID;
H5did = HDF5Constants.H5I_INVALID_HID;
H5aid = HDF5Constants.H5I_INVALID_HID;
@@ -110,14 +137,15 @@ public class TestH5Arw {
}
@Before
- public void verifyCount()
- throws NullPointerException, HDF5Exception {
- assertTrue("H5 open ids is 0", H5.getOpenIDCount()==0);
+ public void verifyCount() throws NullPointerException, HDF5Exception
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
}
@Test
- public void testH5Aread_8bit_ints() {
+ public void testH5Aread_8bit_ints()
+ {
byte[][] attr_data = new byte[DIM_X][DIM8_Y];
try {
@@ -182,7 +210,8 @@ public class TestH5Arw {
}
@Test
- public void testH5Aread_16bit_ints() {
+ public void testH5Aread_16bit_ints()
+ {
short[][] attr_data = new short[DIM_X][DIM16_Y];
try {
@@ -247,7 +276,8 @@ public class TestH5Arw {
}
@Test
- public void testH5Aread_32bit_ints() {
+ public void testH5Aread_32bit_ints()
+ {
int[][] attr_data = new int[DIM_X][DIM16_Y];
try {
@@ -312,7 +342,8 @@ public class TestH5Arw {
}
@Test
- public void testH5Aread_64bit_ints() {
+ public void testH5Aread_64bit_ints()
+ {
long[][] attr_data = new long[DIM_X][DIM64_Y];
try {
@@ -377,7 +408,8 @@ public class TestH5Arw {
}
@Test
- public void testH5Aread_32bit_floats() {
+ public void testH5Aread_32bit_floats()
+ {
float[][] attr_data = new float[DIM_X][DIM32_Y];
try {
@@ -401,7 +433,8 @@ public class TestH5Arw {
}
@Test
- public void testH5Aread_64bit_floats() {
+ public void testH5Aread_64bit_floats()
+ {
double[][] attr_data = new double[DIM_X][DIM64_Y];
try {
@@ -425,7 +458,8 @@ public class TestH5Arw {
}
@Test
- public void testH5Aread_128bit_floats() {
+ public void testH5Aread_128bit_floats()
+ {
byte[][][] attr_data = new byte[DIM_X][DIM128_Y][8];
try {
@@ -445,5 +479,4 @@ public class TestH5Arw {
fail("testH5Aread_128bit_floats: H5Aread: " + err);
}
}
-
}
diff --git a/java/test/TestH5D.java b/java/test/TestH5D.java
index dac3a9c..4bab1a9 100644
--- a/java/test/TestH5D.java
+++ b/java/test/TestH5D.java
@@ -33,46 +33,50 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5D {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
private static final String H5_FILE = "testD.h5";
- private static final int DIM_X = 4;
- private static final int DIM_Y = 6;
- private static final int RANK = 2;
- long H5fid = HDF5Constants.H5I_INVALID_HID;
- long H5faplid = HDF5Constants.H5I_INVALID_HID;
- long H5dsid = HDF5Constants.H5I_INVALID_HID;
- long H5dtid = HDF5Constants.H5I_INVALID_HID;
- long H5did = HDF5Constants.H5I_INVALID_HID;
- long H5did0 = HDF5Constants.H5I_INVALID_HID;
- long H5dcpl_id = HDF5Constants.H5I_INVALID_HID;
- long[] H5dims = { DIM_X, DIM_Y };
+ private static final int DIM_X = 4;
+ private static final int DIM_Y = 6;
+ private static final int RANK = 2;
+ long H5fid = HDF5Constants.H5I_INVALID_HID;
+ long H5faplid = HDF5Constants.H5I_INVALID_HID;
+ long H5dsid = HDF5Constants.H5I_INVALID_HID;
+ long H5dtid = HDF5Constants.H5I_INVALID_HID;
+ long H5did = HDF5Constants.H5I_INVALID_HID;
+ long H5did0 = HDF5Constants.H5I_INVALID_HID;
+ long H5dcpl_id = HDF5Constants.H5I_INVALID_HID;
+ long[] H5dims = {DIM_X, DIM_Y};
// Values for the status of space allocation
enum H5D_space_status {
- H5D_SPACE_STATUS_ERROR(-1), H5D_SPACE_STATUS_NOT_ALLOCATED(0), H5D_SPACE_STATUS_PART_ALLOCATED(
- 1), H5D_SPACE_STATUS_ALLOCATED(2);
+ H5D_SPACE_STATUS_ERROR(-1),
+ H5D_SPACE_STATUS_NOT_ALLOCATED(0),
+ H5D_SPACE_STATUS_PART_ALLOCATED(1),
+ H5D_SPACE_STATUS_ALLOCATED(2);
private int code;
- H5D_space_status(int space_status) {
- this.code = space_status;
- }
+ H5D_space_status(int space_status) { this.code = space_status; }
- public int getCode() {
- return this.code;
- }
+ public int getCode() { return this.code; }
}
- private final void _deleteFile(String filename) {
+ private final void _deleteFile(String filename)
+ {
File file = new File(filename);
if (file.exists()) {
- try {file.delete();}
- catch (SecurityException e) {}
+ try {
+ file.delete();
+ }
+ catch (SecurityException e) {
+ }
}
}
- private final void _createPDataset(long fid, long dsid, String name, long dcpl_val) {
+ private final void _createPDataset(long fid, long dsid, String name, long dcpl_val)
+ {
try {
H5dcpl_id = H5.H5Pcreate(dcpl_val);
@@ -94,9 +98,8 @@ public class TestH5D {
}
try {
- H5did0 = H5.H5Dcreate(fid, name,
- HDF5Constants.H5T_STD_I32BE, dsid,
- HDF5Constants.H5P_DEFAULT, H5dcpl_id, HDF5Constants.H5P_DEFAULT);
+ H5did0 = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32BE, dsid, HDF5Constants.H5P_DEFAULT,
+ H5dcpl_id, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
@@ -105,7 +108,8 @@ public class TestH5D {
assertTrue("TestH5D._createPDataset.H5Dcreate: ", H5did0 >= 0);
}
- private final void _createChunkDataset(long fid, long dsid, String name, long dapl) {
+ private final void _createChunkDataset(long fid, long dsid, String name, long dapl)
+ {
try {
H5dcpl_id = H5.H5Pcreate(HDF5Constants.H5P_DATASET_CREATE);
@@ -127,9 +131,8 @@ public class TestH5D {
}
try {
- H5did = H5.H5Dcreate(fid, name,
- HDF5Constants.H5T_STD_I32BE, dsid,
- HDF5Constants.H5P_DEFAULT, H5dcpl_id, dapl);
+ H5did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32BE, dsid, HDF5Constants.H5P_DEFAULT,
+ H5dcpl_id, dapl);
}
catch (Throwable err) {
err.printStackTrace();
@@ -138,11 +141,11 @@ public class TestH5D {
assertTrue("TestH5D._createChunkDataset.H5Dcreate: ", H5did >= 0);
}
- private final void _createDataset(long fid, long dsid, String name, long dapl) {
+ private final void _createDataset(long fid, long dsid, String name, long dapl)
+ {
try {
- H5did = H5.H5Dcreate(fid, name,
- HDF5Constants.H5T_STD_I32BE, dsid,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, dapl);
+ H5did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32BE, dsid, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, dapl);
}
catch (Throwable err) {
err.printStackTrace();
@@ -151,7 +154,8 @@ public class TestH5D {
assertTrue("TestH5D._createDataset.H5Dcreate: ", H5did >= 0);
}
- private final void _createVLDataset(long fid, long dsid, String name, long dapl) {
+ private final void _createVLDataset(long fid, long dsid, String name, long dapl)
+ {
try {
H5dtid = H5.H5Tcopy(HDF5Constants.H5T_C_S1);
}
@@ -169,8 +173,8 @@ public class TestH5D {
fail("H5.H5Tset_size: " + err);
}
try {
- H5did = H5.H5Dcreate(fid, name, H5dtid, dsid,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, dapl);
+ H5did = H5.H5Dcreate(fid, name, H5dtid, dsid, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, dapl);
}
catch (Throwable err) {
err.printStackTrace();
@@ -179,99 +183,153 @@ public class TestH5D {
assertTrue("TestH5D._createVLDataset.H5Dcreate: ", H5did >= 0);
}
- private final void _closeH5file() throws HDF5LibraryException {
+ private final void _closeH5file() throws HDF5LibraryException
+ {
if (H5dcpl_id >= 0)
- try {H5.H5Pclose(H5dcpl_id);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(H5dcpl_id);
+ }
+ catch (Exception ex) {
+ }
if (H5did0 >= 0)
- try {H5.H5Dclose(H5did0);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5did0);
+ }
+ catch (Exception ex) {
+ }
if (H5did >= 0)
- try {H5.H5Dclose(H5did);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5did);
+ }
+ catch (Exception ex) {
+ }
if (H5dtid > 0)
- try {H5.H5Tclose(H5dtid);} catch (Exception ex) {}
+ try {
+ H5.H5Tclose(H5dtid);
+ }
+ catch (Exception ex) {
+ }
if (H5dsid > 0)
- try {H5.H5Sclose(H5dsid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(H5dsid);
+ }
+ catch (Exception ex) {
+ }
if (H5fid > 0)
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
}
- private final void _openH5file(String filename, String dsetname, long dapl) {
- try {
- H5fid = H5.H5Fopen(filename,
- HDF5Constants.H5F_ACC_RDONLY, HDF5Constants.H5P_DEFAULT);
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("TestH5D._openH5file: " + err);
- }
- assertTrue("TestH5D._openH5file: H5.H5Fopen: ",H5fid >= 0);
- try {
- H5did = H5.H5Dopen(H5fid, dsetname, dapl);
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("TestH5D._openH5file: " + err);
- }
- assertTrue("TestH5D._openH5file: H5.H5Dopen: ",H5did >= 0);
- try {
- H5dsid = H5.H5Dget_space(H5did);
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("TestH5D._openH5file: " + err);
- }
- assertTrue("TestH5D._openH5file: H5.H5Screate_simple: ",H5dsid > 0);
+ private final void _openH5file(String filename, String dsetname, long dapl)
+ {
+ try {
+ H5fid = H5.H5Fopen(filename, HDF5Constants.H5F_ACC_RDONLY, HDF5Constants.H5P_DEFAULT);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("TestH5D._openH5file: " + err);
+ }
+ assertTrue("TestH5D._openH5file: H5.H5Fopen: ", H5fid >= 0);
+ try {
+ H5did = H5.H5Dopen(H5fid, dsetname, dapl);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("TestH5D._openH5file: " + err);
+ }
+ assertTrue("TestH5D._openH5file: H5.H5Dopen: ", H5did >= 0);
+ try {
+ H5dsid = H5.H5Dget_space(H5did);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("TestH5D._openH5file: " + err);
+ }
+ assertTrue("TestH5D._openH5file: H5.H5Screate_simple: ", H5dsid > 0);
}
@Before
- public void createH5file()
- throws NullPointerException, HDF5Exception {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
- System.out.print(testname.getMethodName());
+ public void createH5file() throws NullPointerException, HDF5Exception
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
+ System.out.print(testname.getMethodName());
try {
H5faplid = H5.H5Pcreate(HDF5Constants.H5P_FILE_ACCESS);
- H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC,
- HDF5Constants.H5P_DEFAULT, H5faplid);
+ H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT, H5faplid);
H5dsid = H5.H5Screate_simple(RANK, H5dims, null);
}
catch (Throwable err) {
err.printStackTrace();
fail("TestH5D.createH5file: " + err);
}
- assertTrue("TestH5D.createH5file: H5.H5Fcreate: ",H5fid >= 0);
- assertTrue("TestH5D.createH5file: H5.H5Screate_simple: ",H5dsid >= 0);
+ assertTrue("TestH5D.createH5file: H5.H5Fcreate: ", H5fid >= 0);
+ assertTrue("TestH5D.createH5file: H5.H5Screate_simple: ", H5dsid >= 0);
H5.H5Fflush(H5fid, HDF5Constants.H5F_SCOPE_LOCAL);
}
@After
- public void deleteH5file() throws HDF5LibraryException {
+ public void deleteH5file() throws HDF5LibraryException
+ {
if (H5dcpl_id >= 0)
- try {H5.H5Pclose(H5dcpl_id);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(H5dcpl_id);
+ }
+ catch (Exception ex) {
+ }
if (H5did0 >= 0)
- try {H5.H5Dclose(H5did0);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5did0);
+ }
+ catch (Exception ex) {
+ }
if (H5did >= 0)
- try {H5.H5Dclose(H5did);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5did);
+ }
+ catch (Exception ex) {
+ }
if (H5dtid > 0)
- try {H5.H5Tclose(H5dtid);} catch (Exception ex) {}
+ try {
+ H5.H5Tclose(H5dtid);
+ }
+ catch (Exception ex) {
+ }
if (H5dsid > 0)
- try {H5.H5Sclose(H5dsid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(H5dsid);
+ }
+ catch (Exception ex) {
+ }
if (H5faplid >= 0)
- try {H5.H5Pclose(H5faplid);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(H5faplid);
+ }
+ catch (Exception ex) {
+ }
if (H5fid > 0)
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
_deleteFile(H5_FILE);
System.out.println();
}
@Test
- public void testH5Dcreate() {
+ public void testH5Dcreate()
+ {
long dataset_id = HDF5Constants.H5I_INVALID_HID;
try {
- dataset_id = H5.H5Dcreate(H5fid, "dset",
- HDF5Constants.H5T_STD_I32BE, H5dsid,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ dataset_id =
+ H5.H5Dcreate(H5fid, "dset", HDF5Constants.H5T_STD_I32BE, H5dsid, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
catch (Exception err) {
err.printStackTrace();
@@ -290,11 +348,12 @@ public class TestH5D {
}
@Test
- public void testH5Dcreate_anon() {
+ public void testH5Dcreate_anon()
+ {
long dataset_id = HDF5Constants.H5I_INVALID_HID;
try {
- dataset_id = H5.H5Dcreate_anon(H5fid, HDF5Constants.H5T_STD_I32BE,
- H5dsid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ dataset_id = H5.H5Dcreate_anon(H5fid, HDF5Constants.H5T_STD_I32BE, H5dsid,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
catch (Exception err) {
err.printStackTrace();
@@ -313,13 +372,14 @@ public class TestH5D {
}
@Test
- public void testH5Dopen() {
+ public void testH5Dopen()
+ {
long dataset_id = HDF5Constants.H5I_INVALID_HID;
_createDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DEFAULT);
try {
H5.H5Dclose(H5did);
- H5did = HDF5Constants.H5I_INVALID_HID;
+ H5did = HDF5Constants.H5I_INVALID_HID;
dataset_id = H5.H5Dopen(H5fid, "dset", HDF5Constants.H5P_DEFAULT);
}
catch (Exception err) {
@@ -339,7 +399,8 @@ public class TestH5D {
}
@Test
- public void testH5Dget_storage_size_empty() {
+ public void testH5Dget_storage_size_empty()
+ {
long storage_size = 0;
_createDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DEFAULT);
@@ -354,10 +415,11 @@ public class TestH5D {
}
@Test
- public void testH5Dget_storage_size() {
+ public void testH5Dget_storage_size()
+ {
long storage_size = 0;
int[][] dset_data = new int[DIM_X][DIM_Y];
- int FILLVAL = 99;
+ int FILLVAL = 99;
_createDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DEFAULT);
// Initialize the dataset.
@@ -367,9 +429,8 @@ public class TestH5D {
try {
if (H5did >= 0)
- H5.H5Dwrite(H5did, HDF5Constants.H5T_NATIVE_INT,
- HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data[0]);
+ H5.H5Dwrite(H5did, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5P_DEFAULT, dset_data[0]);
}
catch (Exception e) {
e.printStackTrace();
@@ -382,21 +443,22 @@ public class TestH5D {
err.printStackTrace();
fail("testH5Dget_storage_size: " + err);
}
- assertTrue("testH5Dget_storage_size: "+storage_size, storage_size == DIM_X*DIM_Y*4);
+ assertTrue("testH5Dget_storage_size: " + storage_size, storage_size == DIM_X * DIM_Y * 4);
}
@Test
- public void testH5Dget_access_plist() {
- long dapl_id = HDF5Constants.H5I_INVALID_HID;
- long test_dapl_id = HDF5Constants.H5I_INVALID_HID;
- int[] mdc_nelmts1 = {0};
- int[] mdc_nelmts2 = {0};
+ public void testH5Dget_access_plist()
+ {
+ long dapl_id = HDF5Constants.H5I_INVALID_HID;
+ long test_dapl_id = HDF5Constants.H5I_INVALID_HID;
+ int[] mdc_nelmts1 = {0};
+ int[] mdc_nelmts2 = {0};
long[] rdcc_nelmts1 = {0};
long[] rdcc_nelmts2 = {0};
long[] rdcc_nbytes1 = {0};
long[] rdcc_nbytes2 = {0};
- double[] rdcc_w01 = {0};
- double[] rdcc_w02 = {0};
+ double[] rdcc_w01 = {0};
+ double[] rdcc_w02 = {0};
try {
test_dapl_id = H5.H5Pcreate(HDF5Constants.H5P_DATASET_ACCESS);
@@ -442,14 +504,15 @@ public class TestH5D {
catch (Exception err) {
err.printStackTrace();
}
- assertTrue("testH5Dget_access_plist: ", rdcc_nelmts2==rdcc_nelmts2 && rdcc_nbytes2==rdcc_nbytes2);
+ assertTrue("testH5Dget_access_plist: ", rdcc_nelmts2 == rdcc_nelmts2 && rdcc_nbytes2 == rdcc_nbytes2);
}
@Test
- public void testH5Dget_space_status() {
+ public void testH5Dget_space_status()
+ {
int[][] write_dset_data = new int[DIM_X][DIM_Y];
- int space_status = -1;
- int space_status0 = -1;
+ int space_status = -1;
+ int space_status0 = -1;
// Initialize the dataset.
for (int indx = 0; indx < DIM_X; indx++)
@@ -466,7 +529,8 @@ public class TestH5D {
catch (Exception e) {
e.printStackTrace();
}
- assertTrue("testH5Dget_space_status0 - H5.H5Dget_space_status: ", space_status0 == H5D_space_status.H5D_SPACE_STATUS_ALLOCATED.getCode());
+ assertTrue("testH5Dget_space_status0 - H5.H5Dget_space_status: ",
+ space_status0 == H5D_space_status.H5D_SPACE_STATUS_ALLOCATED.getCode());
// Retrieve and print space status and storage size for dset.
try {
@@ -475,12 +539,12 @@ public class TestH5D {
catch (Exception e) {
e.printStackTrace();
}
- assertFalse("testH5Dget_space_status - H5.H5Dget_space_status: ", space_status == H5D_space_status.H5D_SPACE_STATUS_ALLOCATED.getCode());
+ assertFalse("testH5Dget_space_status - H5.H5Dget_space_status: ",
+ space_status == H5D_space_status.H5D_SPACE_STATUS_ALLOCATED.getCode());
// Write the data to the dataset.
try {
- H5.H5Dwrite(H5did, HDF5Constants.H5T_NATIVE_INT,
- HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
+ H5.H5Dwrite(H5did, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
HDF5Constants.H5P_DEFAULT, write_dset_data);
}
catch (Exception e) {
@@ -494,16 +558,18 @@ public class TestH5D {
catch (Exception e) {
e.printStackTrace();
}
- assertTrue("testH5Dget_space_status - H5.H5Dget_space_status: ", space_status == H5D_space_status.H5D_SPACE_STATUS_ALLOCATED.getCode());
+ assertTrue("testH5Dget_space_status - H5.H5Dget_space_status: ",
+ space_status == H5D_space_status.H5D_SPACE_STATUS_ALLOCATED.getCode());
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Dget_space_closed() throws Throwable {
+ public void testH5Dget_space_closed() throws Throwable
+ {
long dataset_id = HDF5Constants.H5I_INVALID_HID;
try {
- dataset_id = H5.H5Dcreate(H5fid, "dset",
- HDF5Constants.H5T_STD_I32BE, H5dsid,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ dataset_id =
+ H5.H5Dcreate(H5fid, "dset", HDF5Constants.H5T_STD_I32BE, H5dsid, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
@@ -516,7 +582,8 @@ public class TestH5D {
}
@Test
- public void testH5Dget_space() {
+ public void testH5Dget_space()
+ {
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
_createDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DEFAULT);
@@ -540,12 +607,13 @@ public class TestH5D {
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Dget_type_closed() throws Throwable {
+ public void testH5Dget_type_closed() throws Throwable
+ {
long dataset_id = HDF5Constants.H5I_INVALID_HID;
try {
- dataset_id = H5.H5Dcreate(H5fid, "dset",
- HDF5Constants.H5T_STD_I32BE, H5dsid,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ dataset_id =
+ H5.H5Dcreate(H5fid, "dset", HDF5Constants.H5T_STD_I32BE, H5dsid, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
@@ -558,7 +626,8 @@ public class TestH5D {
}
@Test
- public void testH5Dget_type() {
+ public void testH5Dget_type()
+ {
long datatype_id = HDF5Constants.H5I_INVALID_HID;
_createDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DEFAULT);
@@ -582,9 +651,10 @@ public class TestH5D {
}
@Test
- public void testH5Dget_offset() {
+ public void testH5Dget_offset()
+ {
int[][] write_dset_data = new int[DIM_X][DIM_Y];
- long dset_address = 0;
+ long dset_address = 0;
_createDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DEFAULT);
try {
@@ -600,8 +670,7 @@ public class TestH5D {
}
// Write the data to the dataset.
try {
- H5.H5Dwrite(H5did, HDF5Constants.H5T_NATIVE_INT,
- HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
+ H5.H5Dwrite(H5did, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
HDF5Constants.H5P_DEFAULT, write_dset_data);
}
catch (Exception e) {
@@ -621,15 +690,16 @@ public class TestH5D {
}
@Test
- public void testH5Dfill_null() {
- int[] buf_data = new int[DIM_X*DIM_Y];
+ public void testH5Dfill_null()
+ {
+ int[] buf_data = new int[DIM_X * DIM_Y];
// Initialize memory buffer
for (int indx = 0; indx < DIM_X; indx++)
for (int jndx = 0; jndx < DIM_Y; jndx++) {
buf_data[(indx * DIM_Y) + jndx] = indx * jndx - jndx;
}
- byte[] buf_array = HDFNativeData.intToByte(0, DIM_X*DIM_Y, buf_data);
+ byte[] buf_array = HDFNativeData.intToByte(0, DIM_X * DIM_Y, buf_data);
// Fill selection in memory
try {
@@ -644,12 +714,13 @@ public class TestH5D {
// Verify memory buffer the hard way
for (int indx = 0; indx < DIM_X; indx++)
for (int jndx = 0; jndx < DIM_Y; jndx++)
- assertTrue("H5.H5Dfill: [" + indx+","+jndx + "] ", buf_data[(indx * DIM_Y) + jndx] == 0);
+ assertTrue("H5.H5Dfill: [" + indx + "," + jndx + "] ", buf_data[(indx * DIM_Y) + jndx] == 0);
}
@Test
- public void testH5Dfill() {
- int[] buf_data = new int[DIM_X*DIM_Y];
+ public void testH5Dfill()
+ {
+ int[] buf_data = new int[DIM_X * DIM_Y];
byte[] fill_value = HDFNativeData.intToByte(254);
// Initialize memory buffer
@@ -657,11 +728,12 @@ public class TestH5D {
for (int jndx = 0; jndx < DIM_Y; jndx++) {
buf_data[(indx * DIM_Y) + jndx] = indx * jndx - jndx;
}
- byte[] buf_array = HDFNativeData.intToByte(0, DIM_X*DIM_Y, buf_data);
+ byte[] buf_array = HDFNativeData.intToByte(0, DIM_X * DIM_Y, buf_data);
// Fill selection in memory
try {
- H5.H5Dfill(fill_value, HDF5Constants.H5T_NATIVE_UINT, buf_array, HDF5Constants.H5T_NATIVE_UINT, H5dsid);
+ H5.H5Dfill(fill_value, HDF5Constants.H5T_NATIVE_UINT, buf_array, HDF5Constants.H5T_NATIVE_UINT,
+ H5dsid);
}
catch (Exception err) {
err.printStackTrace();
@@ -672,46 +744,51 @@ public class TestH5D {
// Verify memory buffer the hard way
for (int indx = 0; indx < DIM_X; indx++)
for (int jndx = 0; jndx < DIM_Y; jndx++)
- assertTrue("H5.H5Dfill: [" + indx+","+jndx + "] ", buf_data[(indx * DIM_Y) + jndx] == 254);
+ assertTrue("H5.H5Dfill: [" + indx + "," + jndx + "] ",
+ buf_data[(indx * DIM_Y) + jndx] == 254);
}
@Test
- public void testH5Diterate() {
+ public void testH5Diterate()
+ {
final int SPACE_RANK = 2;
final int SPACE_FILL = 254;
class H5D_iter_data implements H5D_iterate_t {
- public int fill_value; /* The fill value to check */
- public long fill_curr_coord; /* Current coordinate to examine */
- public long[] fill_coords; /* Pointer to selection's coordinates */
+ public int fill_value; /* The fill value to check */
+ public long fill_curr_coord; /* Current coordinate to examine */
+ public long[] fill_coords; /* Pointer to selection's coordinates */
}
H5D_iterate_t iter_data = new H5D_iter_data();
class H5D_iter_callback implements H5D_iterate_cb {
- public int callback(byte[] elem_buf, long elem_id, int ndim, long[] point, H5D_iterate_t op_data) {
- //Check value in current buffer location
+ public int callback(byte[] elem_buf, long elem_id, int ndim, long[] point, H5D_iterate_t op_data)
+ {
+ // Check value in current buffer location
int element = HDFNativeData.byteToInt(elem_buf, 0);
- if(element != ((H5D_iter_data)op_data).fill_value)
+ if (element != ((H5D_iter_data)op_data).fill_value)
return -1;
- //Check number of dimensions
- if(ndim != SPACE_RANK)
- return(-1);
- //Check Coordinates
+ // Check number of dimensions
+ if (ndim != SPACE_RANK)
+ return (-1);
+ // Check Coordinates
long[] fill_coords = new long[2];
- fill_coords[0] = ((H5D_iter_data)op_data).fill_coords[(int) (2 * ((H5D_iter_data)op_data).fill_curr_coord)];
- fill_coords[1] = ((H5D_iter_data)op_data).fill_coords[(int) (2 * ((H5D_iter_data)op_data).fill_curr_coord) + 1];
+ fill_coords[0] =
+ ((H5D_iter_data)op_data).fill_coords[(int)(2 * ((H5D_iter_data)op_data).fill_curr_coord)];
+ fill_coords[1] = ((H5D_iter_data)op_data)
+ .fill_coords[(int)(2 * ((H5D_iter_data)op_data).fill_curr_coord) + 1];
((H5D_iter_data)op_data).fill_curr_coord++;
- if(fill_coords[0] != point[0])
- return(-1);
- if(fill_coords[1] != point[1])
- return(-1);
+ if (fill_coords[0] != point[0])
+ return (-1);
+ if (fill_coords[1] != point[1])
+ return (-1);
- return(0);
+ return (0);
}
}
- int[] buf_data = new int[DIM_X*DIM_Y];
+ int[] buf_data = new int[DIM_X * DIM_Y];
byte[] fill_value = HDFNativeData.intToByte(SPACE_FILL);
// Initialize memory buffer
@@ -719,11 +796,12 @@ public class TestH5D {
for (int jndx = 0; jndx < DIM_Y; jndx++) {
buf_data[(indx * DIM_Y) + jndx] = indx * jndx - jndx;
}
- byte[] buf_array = HDFNativeData.intToByte(0, DIM_X*DIM_Y, buf_data);
+ byte[] buf_array = HDFNativeData.intToByte(0, DIM_X * DIM_Y, buf_data);
// Fill selection in memory
try {
- H5.H5Dfill(fill_value, HDF5Constants.H5T_NATIVE_UINT, buf_array, HDF5Constants.H5T_NATIVE_UINT, H5dsid);
+ H5.H5Dfill(fill_value, HDF5Constants.H5T_NATIVE_UINT, buf_array, HDF5Constants.H5T_NATIVE_UINT,
+ H5dsid);
}
catch (Exception err) {
err.printStackTrace();
@@ -731,19 +809,20 @@ public class TestH5D {
}
// Initialize the iterator structure
- ((H5D_iter_data)iter_data).fill_value = SPACE_FILL;
+ ((H5D_iter_data)iter_data).fill_value = SPACE_FILL;
((H5D_iter_data)iter_data).fill_curr_coord = 0;
// Set the coordinates of the selection
- ((H5D_iter_data)iter_data).fill_coords = new long[DIM_X*DIM_Y*SPACE_RANK]; /* Coordinates of selection */
+ ((H5D_iter_data)iter_data).fill_coords =
+ new long[DIM_X * DIM_Y * SPACE_RANK]; /* Coordinates of selection */
for (int indx = 0; indx < DIM_X; indx++)
for (int jndx = 0; jndx < DIM_Y; jndx++) {
- ((H5D_iter_data)iter_data).fill_coords[2*(indx * DIM_Y + jndx)] = indx;
- ((H5D_iter_data)iter_data).fill_coords[2*(indx * DIM_Y + jndx) + 1] = jndx;
+ ((H5D_iter_data)iter_data).fill_coords[2 * (indx * DIM_Y + jndx)] = indx;
+ ((H5D_iter_data)iter_data).fill_coords[2 * (indx * DIM_Y + jndx) + 1] = jndx;
} /* end for */
// Iterate through selection, verifying correct data
H5D_iterate_cb iter_cb = new H5D_iter_callback();
- int op_status = -1;
+ int op_status = -1;
try {
op_status = H5.H5Diterate(buf_array, HDF5Constants.H5T_NATIVE_UINT, H5dsid, iter_cb, iter_data);
}
@@ -755,47 +834,51 @@ public class TestH5D {
}
@Test
- public void testH5Diterate_write() {
+ public void testH5Diterate_write()
+ {
final int SPACE_RANK = 2;
final int SPACE_FILL = 254;
class H5D_iter_data implements H5D_iterate_t {
- public int fill_value; /* The fill value to check */
- public long fill_curr_coord; /* Current coordinate to examine */
- public long[] fill_coords; /* Pointer to selection's coordinates */
+ public int fill_value; /* The fill value to check */
+ public long fill_curr_coord; /* Current coordinate to examine */
+ public long[] fill_coords; /* Pointer to selection's coordinates */
}
H5D_iterate_t iter_data = new H5D_iter_data();
class H5D_iter_callback implements H5D_iterate_cb {
- public int callback(byte[] elem_buf, long elem_id, int ndim, long[] point, H5D_iterate_t op_data) {
- //Check value in current buffer location
+ public int callback(byte[] elem_buf, long elem_id, int ndim, long[] point, H5D_iterate_t op_data)
+ {
+ // Check value in current buffer location
int element = HDFNativeData.byteToInt(elem_buf, 0);
- if(element != ((H5D_iter_data)op_data).fill_value)
+ if (element != ((H5D_iter_data)op_data).fill_value)
return -1;
- //Check number of dimensions
- if(ndim != SPACE_RANK)
- return(-1);
- //Check Coordinates
+ // Check number of dimensions
+ if (ndim != SPACE_RANK)
+ return (-1);
+ // Check Coordinates
long[] fill_coords = new long[2];
- fill_coords[0] = ((H5D_iter_data)op_data).fill_coords[(int) (2 * ((H5D_iter_data)op_data).fill_curr_coord)];
- fill_coords[1] = ((H5D_iter_data)op_data).fill_coords[(int) (2 * ((H5D_iter_data)op_data).fill_curr_coord) + 1];
+ fill_coords[0] =
+ ((H5D_iter_data)op_data).fill_coords[(int)(2 * ((H5D_iter_data)op_data).fill_curr_coord)];
+ fill_coords[1] = ((H5D_iter_data)op_data)
+ .fill_coords[(int)(2 * ((H5D_iter_data)op_data).fill_curr_coord) + 1];
((H5D_iter_data)op_data).fill_curr_coord++;
- if(fill_coords[0] != point[0])
- return(-1);
- if(fill_coords[1] != point[1])
- return(-1);
+ if (fill_coords[0] != point[0])
+ return (-1);
+ if (fill_coords[1] != point[1])
+ return (-1);
element -= 128;
byte[] new_elembuf = HDFNativeData.intToByte(element);
- elem_buf[0] = new_elembuf[0];
- elem_buf[1] = new_elembuf[1];
- elem_buf[2] = new_elembuf[2];
- elem_buf[3] = new_elembuf[3];
- return(0);
+ elem_buf[0] = new_elembuf[0];
+ elem_buf[1] = new_elembuf[1];
+ elem_buf[2] = new_elembuf[2];
+ elem_buf[3] = new_elembuf[3];
+ return (0);
}
}
- int[] buf_data = new int[DIM_X*DIM_Y];
+ int[] buf_data = new int[DIM_X * DIM_Y];
byte[] fill_value = HDFNativeData.intToByte(SPACE_FILL);
// Initialize memory buffer
@@ -803,11 +886,12 @@ public class TestH5D {
for (int jndx = 0; jndx < DIM_Y; jndx++) {
buf_data[(indx * DIM_Y) + jndx] = indx * jndx - jndx;
}
- byte[] buf_array = HDFNativeData.intToByte(0, DIM_X*DIM_Y, buf_data);
+ byte[] buf_array = HDFNativeData.intToByte(0, DIM_X * DIM_Y, buf_data);
// Fill selection in memory
try {
- H5.H5Dfill(fill_value, HDF5Constants.H5T_NATIVE_UINT, buf_array, HDF5Constants.H5T_NATIVE_UINT, H5dsid);
+ H5.H5Dfill(fill_value, HDF5Constants.H5T_NATIVE_UINT, buf_array, HDF5Constants.H5T_NATIVE_UINT,
+ H5dsid);
}
catch (Exception err) {
err.printStackTrace();
@@ -815,19 +899,20 @@ public class TestH5D {
}
// Initialize the iterator structure
- ((H5D_iter_data)iter_data).fill_value = SPACE_FILL;
+ ((H5D_iter_data)iter_data).fill_value = SPACE_FILL;
((H5D_iter_data)iter_data).fill_curr_coord = 0;
// Set the coordinates of the selection
- ((H5D_iter_data)iter_data).fill_coords = new long[DIM_X*DIM_Y*SPACE_RANK]; /* Coordinates of selection */
+ ((H5D_iter_data)iter_data).fill_coords =
+ new long[DIM_X * DIM_Y * SPACE_RANK]; /* Coordinates of selection */
for (int indx = 0; indx < DIM_X; indx++)
for (int jndx = 0; jndx < DIM_Y; jndx++) {
- ((H5D_iter_data)iter_data).fill_coords[2*(indx * DIM_Y + jndx)] = indx;
- ((H5D_iter_data)iter_data).fill_coords[2*(indx * DIM_Y + jndx) + 1] = jndx;
+ ((H5D_iter_data)iter_data).fill_coords[2 * (indx * DIM_Y + jndx)] = indx;
+ ((H5D_iter_data)iter_data).fill_coords[2 * (indx * DIM_Y + jndx) + 1] = jndx;
} /* end for */
// Iterate through selection, verifying correct data
H5D_iterate_cb iter_cb = new H5D_iter_callback();
- int op_status = -1;
+ int op_status = -1;
try {
op_status = H5.H5Diterate(buf_array, HDF5Constants.H5T_NATIVE_UINT, H5dsid, iter_cb, iter_data);
}
@@ -842,29 +927,27 @@ public class TestH5D {
// Verify memory buffer the hard way
for (int indx = 0; indx < DIM_X; indx++)
for (int jndx = 0; jndx < DIM_Y; jndx++)
- assertTrue("H5.H5Diterate: [" + indx+","+jndx + "] "+buf_data[(indx * DIM_Y) + jndx], buf_data[(indx * DIM_Y) + jndx] == 126);
+ assertTrue("H5.H5Diterate: [" + indx + "," + jndx + "] " + buf_data[(indx * DIM_Y) + jndx],
+ buf_data[(indx * DIM_Y) + jndx] == 126);
}
@Test
- public void testH5Dvlen_get_buf_size() {
- String[] str_data = { "Parting", "is such", "sweet", "sorrow.",
- "Testing", "one", "two", "three.",
- "Dog,", "man's", "best", "friend.",
- "Diamonds", "are", "a", "girls!",
- "S A", "T U R", "D A Y", "night",
- "That's", "all", "folks", "!!!" };
- long vl_size = -1; /* Number of bytes used */
+ public void testH5Dvlen_get_buf_size()
+ {
+ String[] str_data = {"Parting", "is such", "sweet", "sorrow.", "Testing", "one", "two", "three.",
+ "Dog,", "man's", "best", "friend.", "Diamonds", "are", "a", "girls!",
+ "S A", "T U R", "D A Y", "night", "That's", "all", "folks", "!!!"};
+ long vl_size = -1; /* Number of bytes used */
long str_data_bytes = 0;
for (int idx = 0; idx < str_data.length; idx++)
- str_data_bytes += str_data[idx].length() + 1; //Account for terminating null
+ str_data_bytes += str_data[idx].length() + 1; // Account for terminating null
_createVLDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DEFAULT);
try {
if ((H5did >= 0) && (H5dtid >= 0))
- H5.H5Dwrite_VLStrings(H5did, H5dtid,
- HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, str_data);
+ H5.H5Dwrite_VLStrings(H5did, H5dtid, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5P_DEFAULT, str_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -879,63 +962,55 @@ public class TestH5D {
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Dvlen_read_invalid_buffer() throws Throwable {
- String[] str_data = { "Parting", "is such", "sweet", "sorrow.",
- "Testing", "one", "two", "three.",
- "Dog,", "man's", "best", "friend.",
- "Diamonds", "are", "a", "girls!",
- "S A", "T U R", "D A Y", "night",
- "That's", "all", "folks", "!!!" };
- byte[] read_data = new byte[512];
+ public void testH5Dvlen_read_invalid_buffer() throws Throwable
+ {
+ String[] str_data = {"Parting", "is such", "sweet", "sorrow.", "Testing", "one", "two", "three.",
+ "Dog,", "man's", "best", "friend.", "Diamonds", "are", "a", "girls!",
+ "S A", "T U R", "D A Y", "night", "That's", "all", "folks", "!!!"};
+ byte[] read_data = new byte[512];
_createVLDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DEFAULT);
try {
- H5.H5Dwrite_VLStrings(H5did, H5dtid,
- HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, str_data);
+ H5.H5Dwrite_VLStrings(H5did, H5dtid, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5P_DEFAULT, str_data);
}
catch (Exception e) {
e.printStackTrace();
}
- H5.H5Dread(H5did, H5dtid,
- HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, read_data);
+ H5.H5Dread(H5did, H5dtid, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT,
+ read_data);
}
@Test
- public void testH5Dvlen_write_read() {
- String[] str_wdata = { "Parting", "is such", "sweet", "sorrow.",
- "Testing", "one", "two", "three.",
- "Dog,", "man's", "best", "friend.",
- "Diamonds", "are", "a", "girls!",
- "S A", "T U R", "D A Y", "night",
- "That's", "all", "folks", "!!!" };
+ public void testH5Dvlen_write_read()
+ {
+ String[] str_wdata = {"Parting", "is such", "sweet", "sorrow.", "Testing", "one", "two", "three.",
+ "Dog,", "man's", "best", "friend.", "Diamonds", "are", "a", "girls!",
+ "S A", "T U R", "D A Y", "night", "That's", "all", "folks", "!!!"};
String[] str_rdata = new String[DIM_X * DIM_Y];
_createVLDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DEFAULT);
try {
if ((H5did >= 0) && (H5dtid >= 0))
- H5.H5Dwrite_VLStrings(H5did, H5dtid,
- HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, str_wdata);
+ H5.H5Dwrite_VLStrings(H5did, H5dtid, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5P_DEFAULT, str_wdata);
}
catch (Exception e) {
e.printStackTrace();
}
try {
if ((H5did >= 0) && (H5dtid >= 0))
- H5.H5Dread_VLStrings(H5did, H5dtid,
- HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, str_rdata);
+ H5.H5Dread_VLStrings(H5did, H5dtid, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5P_DEFAULT, str_rdata);
}
catch (Exception e) {
e.printStackTrace();
}
for (int v = 0; v < DIM_X * DIM_Y; v++)
- assertTrue("testH5Dvlen_write_read " + str_wdata[v] + " == " + str_rdata[v], str_wdata[v] == str_wdata[v]);
+ assertTrue("testH5Dvlen_write_read " + str_wdata[v] + " == " + str_rdata[v],
+ str_wdata[v] == str_wdata[v]);
}
-
}
diff --git a/java/test/TestH5Dparams.java b/java/test/TestH5Dparams.java
index 3661139..e42e10b 100644
--- a/java/test/TestH5Dparams.java
+++ b/java/test/TestH5Dparams.java
@@ -13,6 +13,7 @@
package test;
import static org.junit.Assert.assertTrue;
+
import hdf.hdf5lib.H5;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
@@ -23,108 +24,128 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5Dparams {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
@Before
- public void checkOpenIDs() {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ public void checkOpenIDs()
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
}
@After
- public void nextTestName() {
+ public void nextTestName()
+ {
System.out.println();
}
- @Test//(expected = HDF5LibraryException.class)
- public void testH5Dclose_invalid() throws Throwable {
+ @Test //(expected = HDF5LibraryException.class)
+ public void testH5Dclose_invalid() throws Throwable
+ {
long did = H5.H5Dclose(-1);
assertTrue(did == 0);
}
@Test(expected = NullPointerException.class)
- public void testH5Dcreate_null() throws Throwable {
+ public void testH5Dcreate_null() throws Throwable
+ {
H5.H5Dcreate(-1, null, 0, 0, 0, 0, 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Dcreate_invalid() throws Throwable {
+ public void testH5Dcreate_invalid() throws Throwable
+ {
H5.H5Dcreate(-1, "Bogus", -1, -1, -1, -1, -1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Dcreate_anon_invalid() throws Throwable {
+ public void testH5Dcreate_anon_invalid() throws Throwable
+ {
H5.H5Dcreate_anon(-1, -1, -1, -1, -1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Dget_access_plist_invalid() throws Throwable {
+ public void testH5Dget_access_plist_invalid() throws Throwable
+ {
H5.H5Dget_access_plist(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Dget_create_plist_invalid() throws Throwable {
+ public void testH5Dget_create_plist_invalid() throws Throwable
+ {
H5.H5Dget_create_plist(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Dget_offset_invalid() throws Throwable {
+ public void testH5Dget_offset_invalid() throws Throwable
+ {
H5.H5Dget_offset(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Dget_space_invalid() throws Throwable {
+ public void testH5Dget_space_invalid() throws Throwable
+ {
H5.H5Dget_space(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Dget_type_invalid() throws Throwable {
+ public void testH5Dget_type_invalid() throws Throwable
+ {
H5.H5Dget_type(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Dget_space_status_invalid() throws Throwable {
+ public void testH5Dget_space_status_invalid() throws Throwable
+ {
int status = H5.H5Dget_space_status(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Dset_extent_status_invalid() throws Throwable {
+ public void testH5Dset_extent_status_invalid() throws Throwable
+ {
long[] size = new long[2];
H5.H5Dset_extent(-1, size);
}
@Test(expected = NullPointerException.class)
- public void testH5Dset_extent_status_null() throws Throwable {
+ public void testH5Dset_extent_status_null() throws Throwable
+ {
H5.H5Dset_extent(-1, null);
}
@Test(expected = NullPointerException.class)
- public void testH5Dopen_null() throws Throwable {
+ public void testH5Dopen_null() throws Throwable
+ {
H5.H5Dopen(-1, null, 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Dopen_invalid() throws Throwable {
+ public void testH5Dopen_invalid() throws Throwable
+ {
H5.H5Dopen(-1, "Bogus", 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Dvlen_get_buf_size_invalid() throws Throwable {
+ public void testH5Dvlen_get_buf_size_invalid() throws Throwable
+ {
H5.H5Dvlen_get_buf_size(-1, -1, -1);
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Dget_storage_size_invalid() throws Throwable {
+ public void testH5Dget_storage_size_invalid() throws Throwable
+ {
H5.H5Dget_storage_size(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Dflush_invalid() throws Throwable {
+ public void testH5Dflush_invalid() throws Throwable
+ {
H5.H5Dflush(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Drefresh_invalid() throws Throwable {
+ public void testH5Drefresh_invalid() throws Throwable
+ {
H5.H5Drefresh(-1);
}
-
}
diff --git a/java/test/TestH5Dplist.java b/java/test/TestH5Dplist.java
index 774b9dd..b9e97f4 100644
--- a/java/test/TestH5Dplist.java
+++ b/java/test/TestH5Dplist.java
@@ -30,35 +30,42 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5Dplist {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
private static final String H5_FILE = "testDp.h5";
- private static final int DIM_X = 4;
- private static final int DIM_Y = 7;
- private static final int EDIM_X = 6;
- private static final int EDIM_Y = 10;
- private static final int CHUNK_X = 4;
- private static final int CHUNK_Y = 4;
- private static final int NDIMS = 2;
- private static final int FILLVAL = 99;
- private static final int RANK = 2;
- long H5fid = HDF5Constants.H5I_INVALID_HID;
- long H5dsid = HDF5Constants.H5I_INVALID_HID;
- long H5did = HDF5Constants.H5I_INVALID_HID;
- long H5dcpl_id = HDF5Constants.H5I_INVALID_HID;
- long[] H5dims = { DIM_X, DIM_Y };
- long[] H5extdims = { EDIM_X, EDIM_Y };
- long[] H5chunk_dims = { CHUNK_X, CHUNK_Y };
- long[] H5maxdims = { HDF5Constants.H5S_UNLIMITED, HDF5Constants.H5S_UNLIMITED };
-
- private final void _deleteFile(String filename) {
+ private static final int DIM_X = 4;
+ private static final int DIM_Y = 7;
+ private static final int EDIM_X = 6;
+ private static final int EDIM_Y = 10;
+ private static final int CHUNK_X = 4;
+ private static final int CHUNK_Y = 4;
+ private static final int NDIMS = 2;
+ private static final int FILLVAL = 99;
+ private static final int RANK = 2;
+ long H5fid = HDF5Constants.H5I_INVALID_HID;
+ long H5dsid = HDF5Constants.H5I_INVALID_HID;
+ long H5did = HDF5Constants.H5I_INVALID_HID;
+ long H5dcpl_id = HDF5Constants.H5I_INVALID_HID;
+ long[] H5dims = {DIM_X, DIM_Y};
+ long[] H5extdims = {EDIM_X, EDIM_Y};
+ long[] H5chunk_dims = {CHUNK_X, CHUNK_Y};
+ long[] H5maxdims = {HDF5Constants.H5S_UNLIMITED, HDF5Constants.H5S_UNLIMITED};
+
+ private final void _deleteFile(String filename)
+ {
File file = new File(filename);
if (file.exists()) {
- try {file.delete();} catch (SecurityException e) {}
+ try {
+ file.delete();
+ }
+ catch (SecurityException e) {
+ }
}
}
- private final void _createPDataset(long fid, long dsid, String name, long dcpl_val) {
+ private final void _createPDataset(long fid, long dsid, String name, long dcpl_val)
+ {
try {
H5dcpl_id = H5.H5Pcreate(dcpl_val);
}
@@ -78,7 +85,7 @@ public class TestH5Dplist {
// Set the fill value for the dataset
try {
- int[] fill_value = { FILLVAL };
+ int[] fill_value = {FILLVAL};
H5.H5Pset_fill_value(H5dcpl_id, HDF5Constants.H5T_NATIVE_INT, fill_value);
}
catch (Exception e) {
@@ -98,136 +105,151 @@ public class TestH5Dplist {
_createDataset(H5fid, H5dsid, "dset", H5dcpl_id, HDF5Constants.H5P_DEFAULT);
}
- private final void _createDataset(long fid, long dsid, String name, long dcpl, long dapl) {
+ private final void _createDataset(long fid, long dsid, String name, long dcpl, long dapl)
+ {
try {
- H5did = H5.H5Dcreate(fid, name,
- HDF5Constants.H5T_STD_I32BE, dsid,
- HDF5Constants.H5P_DEFAULT, dcpl, dapl);
+ H5did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32BE, dsid, HDF5Constants.H5P_DEFAULT,
+ dcpl, dapl);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Dcreate: " + err);
}
- assertTrue("TestH5Dplist._createDataset: ",H5did > 0);
+ assertTrue("TestH5Dplist._createDataset: ", H5did > 0);
}
@Before
- public void createH5file() throws NullPointerException, HDF5Exception {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ public void createH5file() throws NullPointerException, HDF5Exception
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
try {
- H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
H5dsid = H5.H5Screate_simple(RANK, H5dims, H5maxdims);
}
catch (Throwable err) {
err.printStackTrace();
fail("TestH5Dplist.createH5file: " + err);
}
- assertTrue("TestH5Dplist.createH5file: H5.H5Fcreate: ",H5fid > 0);
- assertTrue("TestH5Dplist.createH5file: H5.H5Screate_simple: ",H5dsid > 0);
+ assertTrue("TestH5Dplist.createH5file: H5.H5Fcreate: ", H5fid > 0);
+ assertTrue("TestH5Dplist.createH5file: H5.H5Screate_simple: ", H5dsid > 0);
H5.H5Fflush(H5fid, HDF5Constants.H5F_SCOPE_LOCAL);
}
@After
- public void deleteH5file() throws HDF5LibraryException {
+ public void deleteH5file() throws HDF5LibraryException
+ {
if (H5dcpl_id >= 0)
- try {H5.H5Pclose(H5dcpl_id);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(H5dcpl_id);
+ }
+ catch (Exception ex) {
+ }
if (H5did > 0)
- try {H5.H5Dclose(H5did);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5did);
+ }
+ catch (Exception ex) {
+ }
if (H5dsid > 0)
- try {H5.H5Sclose(H5dsid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(H5dsid);
+ }
+ catch (Exception ex) {
+ }
if (H5fid > 0)
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
_deleteFile(H5_FILE);
System.out.println();
}
- @Test
- public void testH5Dset_extent() {
- int[][] write_dset_data = new int[DIM_X][DIM_Y];
- int[][] read_dset_data = new int[DIM_X][DIM_Y];
- int[][] extend_dset_data = new int[EDIM_X][EDIM_Y];
-
- // Initialize the dataset.
- for (int indx = 0; indx < DIM_X; indx++)
- for (int jndx = 0; jndx < DIM_Y; jndx++)
- write_dset_data[indx][jndx] = indx * jndx - jndx;
-
- _createPDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DATASET_CREATE);
-
- // Read values from the dataset, which has not been written to yet.
- try {
- H5.H5Dread(H5did, HDF5Constants.H5T_NATIVE_INT,
- HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, read_dset_data);
- }
- catch (Exception e) {
- e.printStackTrace();
- }
- assertTrue("testH5Dset_extent - H5.H5Dread: ", read_dset_data[0][0] == 99);
-
- // Write the data to the dataset.
- try {
- H5.H5Dwrite(H5did, HDF5Constants.H5T_NATIVE_INT,
- HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, write_dset_data);
- }
- catch (Exception e) {
- e.printStackTrace();
- }
-
- // Read the data back.
- try {
- H5.H5Dread(H5did, HDF5Constants.H5T_NATIVE_INT,
- HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, read_dset_data);
- }
- catch (Exception e) {
- e.printStackTrace();
- }
- assertTrue("testH5Dset_extent - H5.H5Dread: ", read_dset_data[3][6] == 12);
-
- // Extend the dataset.
- try {
- H5.H5Dset_extent(H5did, H5extdims);
- }
- catch (Exception e) {
- e.printStackTrace();
- }
-
- // Read from the extended dataset.
- try {
- H5.H5Dread(H5did, HDF5Constants.H5T_NATIVE_INT,
- HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, extend_dset_data);
- }
- catch (Exception e) {
- e.printStackTrace();
- }
- assertTrue("testH5Dset_extent - H5.H5Dread: ", extend_dset_data[3][6] == 12);
- assertTrue("testH5Dset_extent - H5.H5Dread: ", extend_dset_data[4][8] == 99);
- }
-
- @Test
- public void testH5P_dset_no_attrs_hint() {
- boolean ret_val_id = true;
-
- _createPDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DATASET_CREATE);
-
- try {
- ret_val_id = H5.H5Pget_dset_no_attrs_hint(H5dcpl_id);
- assertFalse("H5P_dset_no_attrs_hint", ret_val_id);
- H5.H5Pset_dset_no_attrs_hint(H5dcpl_id, true);
- ret_val_id = H5.H5Pget_dset_no_attrs_hint(H5dcpl_id);
- assertTrue("H5P_dset_no_attrs_hint", ret_val_id);
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("H5P_dset_no_attrs_hint: " + err);
- }
- }
+ @Test
+ public void testH5Dset_extent()
+ {
+ int[][] write_dset_data = new int[DIM_X][DIM_Y];
+ int[][] read_dset_data = new int[DIM_X][DIM_Y];
+ int[][] extend_dset_data = new int[EDIM_X][EDIM_Y];
+ // Initialize the dataset.
+ for (int indx = 0; indx < DIM_X; indx++)
+ for (int jndx = 0; jndx < DIM_Y; jndx++)
+ write_dset_data[indx][jndx] = indx * jndx - jndx;
+
+ _createPDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DATASET_CREATE);
+
+ // Read values from the dataset, which has not been written to yet.
+ try {
+ H5.H5Dread(H5did, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5P_DEFAULT, read_dset_data);
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ }
+ assertTrue("testH5Dset_extent - H5.H5Dread: ", read_dset_data[0][0] == 99);
+
+ // Write the data to the dataset.
+ try {
+ H5.H5Dwrite(H5did, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5P_DEFAULT, write_dset_data);
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ // Read the data back.
+ try {
+ H5.H5Dread(H5did, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5P_DEFAULT, read_dset_data);
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ }
+ assertTrue("testH5Dset_extent - H5.H5Dread: ", read_dset_data[3][6] == 12);
+
+ // Extend the dataset.
+ try {
+ H5.H5Dset_extent(H5did, H5extdims);
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ // Read from the extended dataset.
+ try {
+ H5.H5Dread(H5did, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5P_DEFAULT, extend_dset_data);
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ }
+ assertTrue("testH5Dset_extent - H5.H5Dread: ", extend_dset_data[3][6] == 12);
+ assertTrue("testH5Dset_extent - H5.H5Dread: ", extend_dset_data[4][8] == 99);
+ }
+
+ @Test
+ public void testH5P_dset_no_attrs_hint()
+ {
+ boolean ret_val_id = true;
+
+ _createPDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DATASET_CREATE);
+
+ try {
+ ret_val_id = H5.H5Pget_dset_no_attrs_hint(H5dcpl_id);
+ assertFalse("H5P_dset_no_attrs_hint", ret_val_id);
+ H5.H5Pset_dset_no_attrs_hint(H5dcpl_id, true);
+ ret_val_id = H5.H5Pget_dset_no_attrs_hint(H5dcpl_id);
+ assertTrue("H5P_dset_no_attrs_hint", ret_val_id);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("H5P_dset_no_attrs_hint: " + err);
+ }
+ }
}
diff --git a/java/test/TestH5Drw.java b/java/test/TestH5Drw.java
index 69fb9d7..b18bed7 100644
--- a/java/test/TestH5Drw.java
+++ b/java/test/TestH5Drw.java
@@ -33,77 +33,97 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5Drw {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
private static final String H5_INTS_FILE = "tintsattrs.h5";
private static final String H5_FLTS_FILE = "tfloatsattrs.h5";
- private static final int DIM_X = 8;
- private static final int DIM8_Y = 8;
- private static final int DIM16_Y = 16;
- private static final int DIM32_Y = 32;
- private static final int DIM64_Y = 64;
- private static final int DIM128_Y = 128;
- private static final String DATASETU08 = "DU08BITS";
- private static final String DATASETS08 = "DS08BITS";
- private static final String DATASETU16 = "DU16BITS";
- private static final String DATASETS16 = "DS16BITS";
- private static final String DATASETU32 = "DU32BITS";
- private static final String DATASETS32 = "DS32BITS";
- private static final String DATASETU64 = "DU64BITS";
- private static final String DATASETS64 = "DS64BITS";
- private static final String DATASETF32 = "DS32BITS";
- private static final String DATASETF64 = "DS64BITS";
- private static final String DATASETF128 = "DS128BITS";
- private static final int RANK = 2;
- long H5fid = HDF5Constants.H5I_INVALID_HID;
- long H5did = HDF5Constants.H5I_INVALID_HID;
-
- private final void _closeH5file() throws HDF5LibraryException {
+ private static final int DIM_X = 8;
+ private static final int DIM8_Y = 8;
+ private static final int DIM16_Y = 16;
+ private static final int DIM32_Y = 32;
+ private static final int DIM64_Y = 64;
+ private static final int DIM128_Y = 128;
+ private static final String DATASETU08 = "DU08BITS";
+ private static final String DATASETS08 = "DS08BITS";
+ private static final String DATASETU16 = "DU16BITS";
+ private static final String DATASETS16 = "DS16BITS";
+ private static final String DATASETU32 = "DU32BITS";
+ private static final String DATASETS32 = "DS32BITS";
+ private static final String DATASETU64 = "DU64BITS";
+ private static final String DATASETS64 = "DS64BITS";
+ private static final String DATASETF32 = "DS32BITS";
+ private static final String DATASETF64 = "DS64BITS";
+ private static final String DATASETF128 = "DS128BITS";
+ private static final int RANK = 2;
+ long H5fid = HDF5Constants.H5I_INVALID_HID;
+ long H5did = HDF5Constants.H5I_INVALID_HID;
+
+ private final void _closeH5file() throws HDF5LibraryException
+ {
if (H5did >= 0)
- try {H5.H5Dclose(H5did);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5did);
+ }
+ catch (Exception ex) {
+ }
if (H5fid > 0)
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
}
- public void openH5file(String filename, String dsetname) {
- try {
- H5fid = H5.H5Fopen(filename,
- HDF5Constants.H5F_ACC_RDONLY, HDF5Constants.H5P_DEFAULT);
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("TestH5Drw._openH5file: " + err);
- }
- assertTrue("TestH5Drw._openH5file: H5.H5Fopen: ", H5fid >= 0);
- try {
- H5did = H5.H5Dopen(H5fid, dsetname, HDF5Constants.H5P_DEFAULT);
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("TestH5Drw._openH5file: " + err);
- }
- assertTrue("TestH5Drw._openH5file: H5.H5Dopen: ", H5did >= 0);
+ public void openH5file(String filename, String dsetname)
+ {
+ try {
+ H5fid = H5.H5Fopen(filename, HDF5Constants.H5F_ACC_RDONLY, HDF5Constants.H5P_DEFAULT);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("TestH5Drw._openH5file: " + err);
+ }
+ assertTrue("TestH5Drw._openH5file: H5.H5Fopen: ", H5fid >= 0);
+ try {
+ H5did = H5.H5Dopen(H5fid, dsetname, HDF5Constants.H5P_DEFAULT);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("TestH5Drw._openH5file: " + err);
+ }
+ assertTrue("TestH5Drw._openH5file: H5.H5Dopen: ", H5did >= 0);
}
@After
- public void closeH5file() throws HDF5LibraryException {
+ public void closeH5file() throws HDF5LibraryException
+ {
if (H5did >= 0)
- try {H5.H5Dclose(H5did);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5did);
+ }
+ catch (Exception ex) {
+ }
if (H5fid > 0)
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
H5fid = HDF5Constants.H5I_INVALID_HID;
H5did = HDF5Constants.H5I_INVALID_HID;
System.out.println();
}
@Before
- public void verifyCount()
- throws NullPointerException, HDF5Exception {
- assertTrue("H5 open ids is 0", H5.getOpenIDCount()==0);
+ public void verifyCount() throws NullPointerException, HDF5Exception
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
}
@Test
- public void testH5Dread_8bit_ints() {
+ public void testH5Dread_8bit_ints()
+ {
byte[][] dset_data = new byte[DIM_X][DIM8_Y];
try {
@@ -117,7 +137,7 @@ public class TestH5Drw {
// Read data.
try {
H5.H5Dread(H5did, HDF5Constants.H5T_NATIVE_UINT8, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception err) {
err.printStackTrace();
@@ -144,7 +164,7 @@ public class TestH5Drw {
// Read data.
try {
H5.H5Dread(H5did, HDF5Constants.H5T_NATIVE_INT8, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception err) {
err.printStackTrace();
@@ -153,7 +173,8 @@ public class TestH5Drw {
}
@Test
- public void testH5Dread_16bit_ints() {
+ public void testH5Dread_16bit_ints()
+ {
short[][] dset_data = new short[DIM_X][DIM16_Y];
try {
@@ -167,7 +188,7 @@ public class TestH5Drw {
// Read data.
try {
H5.H5Dread(H5did, HDF5Constants.H5T_NATIVE_UINT16, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception err) {
err.printStackTrace();
@@ -194,7 +215,7 @@ public class TestH5Drw {
// Read data.
try {
H5.H5Dread(H5did, HDF5Constants.H5T_NATIVE_INT16, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception err) {
err.printStackTrace();
@@ -203,7 +224,8 @@ public class TestH5Drw {
}
@Test
- public void testH5Dread_32bit_ints() {
+ public void testH5Dread_32bit_ints()
+ {
int[][] dset_data = new int[DIM_X][DIM16_Y];
try {
@@ -217,7 +239,7 @@ public class TestH5Drw {
// Read data.
try {
H5.H5Dread(H5did, HDF5Constants.H5T_NATIVE_UINT32, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception err) {
err.printStackTrace();
@@ -244,7 +266,7 @@ public class TestH5Drw {
// Read data.
try {
H5.H5Dread(H5did, HDF5Constants.H5T_NATIVE_INT32, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception err) {
err.printStackTrace();
@@ -253,7 +275,8 @@ public class TestH5Drw {
}
@Test
- public void testH5Dread_64bit_ints() {
+ public void testH5Dread_64bit_ints()
+ {
long[][] dset_data = new long[DIM_X][DIM64_Y];
try {
@@ -267,7 +290,7 @@ public class TestH5Drw {
// Read data.
try {
H5.H5Dread(H5did, HDF5Constants.H5T_NATIVE_UINT64, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception err) {
err.printStackTrace();
@@ -294,7 +317,7 @@ public class TestH5Drw {
// Read data.
try {
H5.H5Dread(H5did, HDF5Constants.H5T_NATIVE_INT64, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception err) {
err.printStackTrace();
@@ -303,7 +326,8 @@ public class TestH5Drw {
}
@Test
- public void testH5Dread_32bit_floats() {
+ public void testH5Dread_32bit_floats()
+ {
float[][] dset_data = new float[DIM_X][DIM32_Y];
try {
@@ -317,7 +341,7 @@ public class TestH5Drw {
// Read data.
try {
H5.H5Dread(H5did, HDF5Constants.H5T_NATIVE_FLOAT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception err) {
err.printStackTrace();
@@ -328,7 +352,8 @@ public class TestH5Drw {
}
@Test
- public void testH5Dread_64bit_floats() {
+ public void testH5Dread_64bit_floats()
+ {
double[][] dset_data = new double[DIM_X][DIM64_Y];
try {
@@ -342,7 +367,7 @@ public class TestH5Drw {
// Read data.
try {
H5.H5Dread(H5did, HDF5Constants.H5T_NATIVE_DOUBLE, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception err) {
err.printStackTrace();
@@ -353,7 +378,8 @@ public class TestH5Drw {
}
@Test
- public void testH5Dread_128bit_floats() {
+ public void testH5Dread_128bit_floats()
+ {
byte[][][] dset_data = new byte[DIM_X][DIM128_Y][8];
try {
@@ -367,12 +393,11 @@ public class TestH5Drw {
// Read data.
try {
H5.H5Dread(H5did, HDF5Constants.H5T_NATIVE_LDOUBLE, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Exception err) {
err.printStackTrace();
fail("testH5Dread_128bit_floats: H5Dread: " + err);
}
}
-
}
diff --git a/java/test/TestH5E.java b/java/test/TestH5E.java
index cad0a06..bdd6802 100644
--- a/java/test/TestH5E.java
+++ b/java/test/TestH5E.java
@@ -22,9 +22,9 @@ import java.util.ArrayList;
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
-import hdf.hdf5lib.exceptions.HDF5LibraryException;
import hdf.hdf5lib.callbacks.H5E_walk_cb;
import hdf.hdf5lib.callbacks.H5E_walk_t;
+import hdf.hdf5lib.exceptions.HDF5LibraryException;
import hdf.hdf5lib.structs.H5E_error2_t;
import org.junit.After;
@@ -35,20 +35,22 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5E {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
long hdf_java_classid = -1;
- long current_stackid = -1;
+ long current_stackid = -1;
@Before
- public void H5Eget_stack_class() {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ public void H5Eget_stack_class()
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
hdf_java_classid = -1;
try {
hdf_java_classid = H5.H5Eregister_class("HDF-Java-Error", "hdf-java", "2.5");
- current_stackid = H5.H5Eget_current_stack();
+ current_stackid = H5.H5Eget_current_stack();
}
catch (Throwable err) {
err.printStackTrace();
@@ -57,7 +59,8 @@ public class TestH5E {
}
@After
- public void H5Erestore_stack_class() {
+ public void H5Erestore_stack_class()
+ {
try {
H5.H5Eunregister_class(hdf_java_classid);
hdf_java_classid = -1;
@@ -72,14 +75,15 @@ public class TestH5E {
}
@Test
- public void testH5Eget_msg_major() {
+ public void testH5Eget_msg_major()
+ {
try {
H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (HDF5LibraryException hdferr) {
- long errnum = hdferr.getMajorErrorNumber();
- int[] error_msg_type = { HDF5Constants.H5E_MAJOR };
- String msg = null;
+ long errnum = hdferr.getMajorErrorNumber();
+ int[] error_msg_type = {HDF5Constants.H5E_MAJOR};
+ String msg = null;
try {
msg = H5.H5Eget_msg(errnum, error_msg_type);
@@ -92,11 +96,11 @@ public class TestH5E {
assertEquals("H5.H5Eget_msg: ", HDF5Constants.H5E_MAJOR, error_msg_type[0]);
/*
- * If HDF5_VOL_CONNECTOR is set, this might not be the
- * native connector and the error string might be different.
- * Only check for the specific error message if the native
- * connector is being used.
- */
+ * If HDF5_VOL_CONNECTOR is set, this might not be the
+ * native connector and the error string might be different.
+ * Only check for the specific error message if the native
+ * connector is being used.
+ */
String connector = System.getenv("HDF5_VOL_CONNECTOR");
if (connector == null)
assertTrue("H5.H5Eget_msg: ", msg.contains("File accessibility"));
@@ -108,14 +112,15 @@ public class TestH5E {
}
@Test
- public void testH5Eget_msg_minor() {
+ public void testH5Eget_msg_minor()
+ {
try {
H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (HDF5LibraryException hdferr) {
- long errnum = hdferr.getMinorErrorNumber();
- int[] error_msg_type = { HDF5Constants.H5E_MINOR };
- String msg = null;
+ long errnum = hdferr.getMinorErrorNumber();
+ int[] error_msg_type = {HDF5Constants.H5E_MINOR};
+ String msg = null;
try {
msg = H5.H5Eget_msg(errnum, error_msg_type);
@@ -128,11 +133,11 @@ public class TestH5E {
assertEquals("H5.H5Eget_msg: ", HDF5Constants.H5E_MINOR, error_msg_type[0]);
/*
- * If HDF5_VOL_CONNECTOR is set, this might not be the
- * native connector and the error string might be different.
- * Only check for the specific error message if the native
- * connector is being used.
- */
+ * If HDF5_VOL_CONNECTOR is set, this might not be the
+ * native connector and the error string might be different.
+ * Only check for the specific error message if the native
+ * connector is being used.
+ */
String connector = System.getenv("HDF5_VOL_CONNECTOR");
if (connector == null)
assertTrue("H5.H5Eget_msg: ", msg.contains("Unable to open file"));
@@ -144,9 +149,10 @@ public class TestH5E {
}
@Test
- public void testH5Epop() {
+ public void testH5Epop()
+ {
- long num_msg = -1;
+ long num_msg = -1;
long saved_num_msg = -1;
try {
@@ -213,13 +219,14 @@ public class TestH5E {
}
@Test
- public void testH5Epush() {
- String err_func = "testH5Epush";
- String err_msg = "Error message";
- long estack_id = -1;
- long maj_err_id = -1;
- long min_err_id = -1;
- long num_msg = -1;
+ public void testH5Epush()
+ {
+ String err_func = "testH5Epush";
+ String err_msg = "Error message";
+ long estack_id = -1;
+ long maj_err_id = -1;
+ long min_err_id = -1;
+ long num_msg = -1;
try {
try {
@@ -231,7 +238,8 @@ public class TestH5E {
fail("testH5Epush: H5.H5Ecreate_msg_major: " + err);
}
try {
- min_err_id = H5.H5Ecreate_msg(hdf_java_classid, HDF5Constants.H5E_MINOR, "Error in Test Function");
+ min_err_id =
+ H5.H5Ecreate_msg(hdf_java_classid, HDF5Constants.H5E_MINOR, "Error in Test Function");
assertFalse("H5.H5Ecreate_msg_minor: " + min_err_id, min_err_id < 0);
}
catch (Throwable err) {
@@ -257,7 +265,8 @@ public class TestH5E {
fail("testH5Epush: H5.H5Eget_num: " + err);
}
- H5.H5Epush(estack_id, "TestH5E.java", err_func, 354, hdf_java_classid, maj_err_id, min_err_id, err_msg);
+ H5.H5Epush(estack_id, "TestH5E.java", err_func, 354, hdf_java_classid, maj_err_id, min_err_id,
+ err_msg);
try {
num_msg = H5.H5Eget_num(estack_id);
@@ -274,24 +283,38 @@ public class TestH5E {
}
finally {
if (estack_id >= 0)
- try {H5.H5Eclose_stack(estack_id);} catch (Exception ex) {}
+ try {
+ H5.H5Eclose_stack(estack_id);
+ }
+ catch (Exception ex) {
+ }
if (maj_err_id >= 0)
- try {H5.H5Eclose_msg(maj_err_id);} catch (Exception ex) {}
+ try {
+ H5.H5Eclose_msg(maj_err_id);
+ }
+ catch (Exception ex) {
+ }
if (min_err_id >= 0)
- try {H5.H5Eclose_msg(min_err_id);} catch (Exception ex) {}
+ try {
+ H5.H5Eclose_msg(min_err_id);
+ }
+ catch (Exception ex) {
+ }
}
} /* end test_create() */
@Test
- public void testH5Ewalk() {
+ public void testH5Ewalk()
+ {
class wdata {
- public String err_desc = null;
+ public String err_desc = null;
public String func_name = null;
- public int line = -1;
- wdata(String desc, String func, int lineno) {
- this.err_desc = new String(desc);
+ public int line = -1;
+ wdata(String desc, String func, int lineno)
+ {
+ this.err_desc = new String(desc);
this.func_name = new String(func);
- this.line = lineno;
+ this.line = lineno;
}
}
class H5E_walk_data implements H5E_walk_t {
@@ -299,14 +322,15 @@ public class TestH5E {
}
H5E_walk_t walk_data = new H5E_walk_data();
class H5E_walk_callback implements H5E_walk_cb {
- public int callback(int nidx, H5E_error2_t info, H5E_walk_t op_data) {
+ public int callback(int nidx, H5E_error2_t info, H5E_walk_t op_data)
+ {
wdata wd = new wdata(info.desc, info.func_name, info.line);
((H5E_walk_data)op_data).walkdata.add(wd);
return 0;
}
}
H5E_walk_cb walk_cb = new H5E_walk_callback();
- long num_msg = -1;
+ long num_msg = -1;
try {
H5.H5Eset_current_stack(current_stackid);
@@ -346,9 +370,8 @@ public class TestH5E {
err.printStackTrace();
fail("testH5Ewalk:H5Ewalk2 " + err);
}
- assertFalse("testH5Ewalk:H5Ewalk2 ",((H5E_walk_data)walk_data).walkdata.isEmpty());
- assertTrue("testH5Ewalk:H5Ewalk2 "+((H5E_walk_data)walk_data).walkdata.size(),((H5E_walk_data)walk_data).walkdata.size() > 0);
+ assertFalse("testH5Ewalk:H5Ewalk2 ", ((H5E_walk_data)walk_data).walkdata.isEmpty());
+ assertTrue("testH5Ewalk:H5Ewalk2 " + ((H5E_walk_data)walk_data).walkdata.size(),
+ ((H5E_walk_data)walk_data).walkdata.size() > 0);
}
-
}
-
diff --git a/java/test/TestH5Edefault.java b/java/test/TestH5Edefault.java
index 9e93cea..c412cf2 100644
--- a/java/test/TestH5Edefault.java
+++ b/java/test/TestH5Edefault.java
@@ -15,25 +15,28 @@ package test;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
+
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
import org.junit.After;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
-import org.junit.Ignore;
import org.junit.rules.TestName;
public class TestH5Edefault {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
public static final int ERRSTACK_CNT = 6;
@Before
- public void H5Eset_default_stack() {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ public void H5Eset_default_stack()
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
try {
@@ -46,23 +49,26 @@ public class TestH5Edefault {
}
}
@After
- public void nextTestName() {
+ public void nextTestName()
+ {
System.out.println();
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Eprint2_invalid_classid() throws Throwable {
+ public void testH5Eprint2_invalid_classid() throws Throwable
+ {
H5.H5Eprint2(-1, null);
}
@Ignore
- public void testH5Eprint() {
+ public void testH5Eprint()
+ {
/*
- * If HDF5_VOL_CONNECTOR is set, this might not be the
- * native connector and the error stack might be different.
- * Only check for the specific error stack if the native
- * connector is being used.
- */
+ * If HDF5_VOL_CONNECTOR is set, this might not be the
+ * native connector and the error stack might be different.
+ * Only check for the specific error stack if the native
+ * connector is being used.
+ */
String connector = System.getenv("HDF5_VOL_CONNECTOR");
if (connector == null) {
try {
@@ -81,19 +87,20 @@ public class TestH5Edefault {
}
@Test
- public void testH5Eget_current_stack() {
- long num_msg = -1;
- long num_msg_default = -1;
- long saved_num_msg = -1;
- long stack_id = -1;
+ public void testH5Eget_current_stack()
+ {
+ long num_msg = -1;
+ long num_msg_default = -1;
+ long saved_num_msg = -1;
+ long stack_id = -1;
long stack_id_default = HDF5Constants.H5E_DEFAULT;
try {
H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
- //default stack id will be different after exception
+ // default stack id will be different after exception
stack_id_default = HDF5Constants.H5E_DEFAULT;
- //err.printStackTrace(); //This will clear the error stack
+ // err.printStackTrace(); //This will clear the error stack
}
// Verify we have messages on the error stack
try {
@@ -147,16 +154,17 @@ public class TestH5Edefault {
}
@Test
- public void testH5Eget_current_stack_pop() {
- long num_msg = -1;
+ public void testH5Eget_current_stack_pop()
+ {
+ long num_msg = -1;
long num_msg_default = -1;
- long saved_num_msg = -1;
- long stack_id = -1;
+ long saved_num_msg = -1;
+ long stack_id = -1;
try {
H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
- //err.printStackTrace(); //This will clear the error stack
+ // err.printStackTrace(); //This will clear the error stack
}
// Verify there are error messages on the stack and save it
@@ -179,7 +187,8 @@ public class TestH5Edefault {
fail("H5.H5Eget_current_stack: " + err);
}
assertFalse("H5.H5Eget_current_stack: get_current_stack - " + stack_id, stack_id < 0);
- assertFalse("H5.H5Eget_current_stack: get_current_stack - " + stack_id, stack_id == HDF5Constants.H5E_DEFAULT);
+ assertFalse("H5.H5Eget_current_stack: get_current_stack - " + stack_id,
+ stack_id == HDF5Constants.H5E_DEFAULT);
// Verify the stack is empty
try {
@@ -206,7 +215,7 @@ public class TestH5Edefault {
H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
- //err.printStackTrace(); //This will clear the error stack
+ // err.printStackTrace(); //This will clear the error stack
}
// Verify we have a nonzero number of messages and save it
@@ -243,37 +252,44 @@ public class TestH5Edefault {
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Eclose_stack_invalid_stackid() throws Throwable {
+ public void testH5Eclose_stack_invalid_stackid() throws Throwable
+ {
H5.H5Eclose_stack(-1);
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Eget_class_name_invalid_classid() throws Throwable {
+ public void testH5Eget_class_name_invalid_classid() throws Throwable
+ {
H5.H5Eget_class_name(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Eget_class_name_invalid_classname() throws Throwable {
+ public void testH5Eget_class_name_invalid_classname() throws Throwable
+ {
H5.H5Eget_class_name(HDF5Constants.H5E_DEFAULT);
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Eclose_msg_invalid_errid() throws Throwable {
+ public void testH5Eclose_msg_invalid_errid() throws Throwable
+ {
H5.H5Eclose_msg(-1);
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Ecreate_msg_invalid_errid() throws Throwable {
+ public void testH5Ecreate_msg_invalid_errid() throws Throwable
+ {
H5.H5Ecreate_msg(-1, HDF5Constants.H5E_MAJOR, "null");
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Eget_msg_invalid_msgid() throws Throwable {
+ public void testH5Eget_msg_invalid_msgid() throws Throwable
+ {
H5.H5Eget_msg(-1, null);
}
@Test
- public void testH5Ecreate_stack() {
+ public void testH5Ecreate_stack()
+ {
try {
long stack_id = H5.H5Ecreate_stack();
assertTrue("H5.H5Ecreate_stack", stack_id > 0);
@@ -286,14 +302,16 @@ public class TestH5Edefault {
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Eset_current_stack_invalid_stkid() throws Throwable {
+ public void testH5Eset_current_stack_invalid_stkid() throws Throwable
+ {
H5.H5Eset_current_stack(-1);
}
@Test
- public void testH5Eset_current_stack() {
- long num_msg = -1;
- long stack_id = -1;
+ public void testH5Eset_current_stack()
+ {
+ long num_msg = -1;
+ long stack_id = -1;
long saved_num_msg = -1;
// Generate errors on the default stack
@@ -301,7 +319,7 @@ public class TestH5Edefault {
H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
- //err.printStackTrace(); //This will clear the error stack
+ // err.printStackTrace(); //This will clear the error stack
}
// Verify we have a nonzero number of messages and save it
@@ -324,7 +342,8 @@ public class TestH5Edefault {
fail("H5.H5Eset_current_stack: " + err);
}
assertFalse("H5.H5Eset_current_stack: get_current_stack - " + stack_id, stack_id < 0);
- assertFalse("H5.H5Eset_current_stack: get_current_stack - " + stack_id, stack_id == HDF5Constants.H5E_DEFAULT);
+ assertFalse("H5.H5Eset_current_stack: get_current_stack - " + stack_id,
+ stack_id == HDF5Constants.H5E_DEFAULT);
// Verify the copy has the same number of messages as the original stack
try {
@@ -341,7 +360,7 @@ public class TestH5Edefault {
H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
- //err.printStackTrace(); //This will clear the error stack
+ // err.printStackTrace(); //This will clear the error stack
}
// Verify we have the same number of messages as before
@@ -388,13 +407,15 @@ public class TestH5Edefault {
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Epop_invalid_stkid() throws Throwable {
+ public void testH5Epop_invalid_stkid() throws Throwable
+ {
H5.H5Epop(-1, 0);
}
@Test
- public void testH5Epop() throws Throwable {
- long num_msg = -1;
+ public void testH5Epop() throws Throwable
+ {
+ long num_msg = -1;
long saved_num_msg = -1;
try {
H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
@@ -422,28 +443,33 @@ public class TestH5Edefault {
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Epush_invalid_stkid() throws Throwable {
+ public void testH5Epush_invalid_stkid() throws Throwable
+ {
H5.H5Epush(-1, "Invalid", "Invalid", 0, -1, -1, -1, "Invalid message");
}
@Test(expected = NullPointerException.class)
- public void testH5Epush_null_name() throws Throwable {
- H5.H5Epush(HDF5Constants.H5E_DEFAULT, null, "Invalid", 0, HDF5Constants.H5E_DEFAULT, HDF5Constants.H5E_DEFAULT, HDF5Constants.H5E_DEFAULT, "Invalid message");
+ public void testH5Epush_null_name() throws Throwable
+ {
+ H5.H5Epush(HDF5Constants.H5E_DEFAULT, null, "Invalid", 0, HDF5Constants.H5E_DEFAULT,
+ HDF5Constants.H5E_DEFAULT, HDF5Constants.H5E_DEFAULT, "Invalid message");
}
@Test(expected = IllegalArgumentException.class)
- public void testH5EprintInt_invalid_classid() throws Throwable {
+ public void testH5EprintInt_invalid_classid() throws Throwable
+ {
H5.H5Eprint2(-1, null);
}
@Ignore
- public void testH5EprintInt() {
+ public void testH5EprintInt()
+ {
/*
- * If HDF5_VOL_CONNECTOR is set, this might not be the
- * native connector and the error stack might be different.
- * Only check for the specific error stack if the native
- * connector is being used.
- */
+ * If HDF5_VOL_CONNECTOR is set, this might not be the
+ * native connector and the error stack might be different.
+ * Only check for the specific error stack if the native
+ * connector is being used.
+ */
String connector = System.getenv("HDF5_VOL_CONNECTOR");
if (connector == null) {
try {
@@ -462,7 +488,8 @@ public class TestH5Edefault {
}
@Test
- public void testH5EclearInt() {
+ public void testH5EclearInt()
+ {
try {
H5.H5Eclear(HDF5Constants.H5E_DEFAULT);
}
@@ -473,12 +500,14 @@ public class TestH5Edefault {
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Eclear2_invalid_stkid() throws Throwable {
+ public void testH5Eclear2_invalid_stkid() throws Throwable
+ {
H5.H5Eclear2(-1);
}
@Test
- public void testH5Eclear() {
+ public void testH5Eclear()
+ {
try {
H5.H5Eclear2(HDF5Constants.H5E_DEFAULT);
}
@@ -489,7 +518,8 @@ public class TestH5Edefault {
}
@Test
- public void testH5Eclear2_with_msg() {
+ public void testH5Eclear2_with_msg()
+ {
long num_msg = -1;
try {
H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
@@ -516,12 +546,14 @@ public class TestH5Edefault {
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Eauto_is_v2_invalid_stkid() throws Throwable {
+ public void testH5Eauto_is_v2_invalid_stkid() throws Throwable
+ {
H5.H5Eauto_is_v2(-1);
}
@Test
- public void testH5Eauto_is_v2() {
+ public void testH5Eauto_is_v2()
+ {
boolean is_v2 = false;
try {
is_v2 = H5.H5Eauto_is_v2(HDF5Constants.H5E_DEFAULT);
@@ -534,12 +566,14 @@ public class TestH5Edefault {
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Eget_num_invalid_stkid() throws Throwable {
+ public void testH5Eget_num_invalid_stkid() throws Throwable
+ {
H5.H5Eget_num(-1);
}
@Test
- public void testH5Eget_num() {
+ public void testH5Eget_num()
+ {
long num_msg = -1;
try {
num_msg = H5.H5Eget_num(HDF5Constants.H5E_DEFAULT);
@@ -552,7 +586,8 @@ public class TestH5Edefault {
}
@Test
- public void testH5Eget_num_with_msg() {
+ public void testH5Eget_num_with_msg()
+ {
long num_msg = -1;
try {
H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
@@ -568,6 +603,4 @@ public class TestH5Edefault {
}
assertTrue("H5.H5Eget_num_with_msg #:" + num_msg, num_msg > 0);
}
-
}
-
diff --git a/java/test/TestH5Eparams.java b/java/test/TestH5Eparams.java
index e55f1fc..4300ae6 100644
--- a/java/test/TestH5Eparams.java
+++ b/java/test/TestH5Eparams.java
@@ -22,9 +22,9 @@ import java.util.ArrayList;
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
-import hdf.hdf5lib.exceptions.HDF5LibraryException;
import hdf.hdf5lib.callbacks.H5E_walk_cb;
import hdf.hdf5lib.callbacks.H5E_walk_t;
+import hdf.hdf5lib.exceptions.HDF5LibraryException;
import hdf.hdf5lib.structs.H5E_error2_t;
import org.junit.After;
@@ -35,19 +35,21 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5Eparams {
- @Rule public TestName testname = new TestName();
- long hdf_java_classid = -1;
- long current_stackid = -1;
+ @Rule
+ public TestName testname = new TestName();
+ long hdf_java_classid = -1;
+ long current_stackid = -1;
@Before
- public void H5Eget_stack_class() {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ public void H5Eget_stack_class()
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
hdf_java_classid = -1;
try {
hdf_java_classid = H5.H5Eregister_class("HDF-Java-Error", "hdf-java", "2.5");
- current_stackid = H5.H5Eget_current_stack();
+ current_stackid = H5.H5Eget_current_stack();
}
catch (Throwable err) {
err.printStackTrace();
@@ -56,7 +58,8 @@ public class TestH5Eparams {
}
@After
- public void H5Erestore_stack_class() {
+ public void H5Erestore_stack_class()
+ {
try {
H5.H5Eunregister_class(hdf_java_classid);
hdf_java_classid = -1;
@@ -71,7 +74,8 @@ public class TestH5Eparams {
}
@Test
- public void testH5Eget_class_name() {
+ public void testH5Eget_class_name()
+ {
try {
String class_name = H5.H5Eget_class_name(hdf_java_classid);
assertNotNull("H5.H5Eget_class_name: " + class_name, class_name);
@@ -84,7 +88,8 @@ public class TestH5Eparams {
}
@Test
- public void testH5Eprint2() {
+ public void testH5Eprint2()
+ {
try {
assertFalse(current_stackid < 0);
H5.H5Eprint2(current_stackid, null);
@@ -96,17 +101,20 @@ public class TestH5Eparams {
}
@Ignore("Tested with create_msg_major[minor]")
- public void testH5Eclose_msg() {
+ public void testH5Eclose_msg()
+ {
fail("Not yet implemented");
}
@Test(expected = NullPointerException.class)
- public void testH5Ecreate_msg_name_null() throws Throwable {
+ public void testH5Ecreate_msg_name_null() throws Throwable
+ {
H5.H5Ecreate_msg(hdf_java_classid, HDF5Constants.H5E_MAJOR, null);
}
@Test
- public void testH5Ecreate_msg_major() {
+ public void testH5Ecreate_msg_major()
+ {
try {
long err_id = H5.H5Ecreate_msg(hdf_java_classid, HDF5Constants.H5E_MAJOR, "Error in Test");
assertFalse("H5.H5Ecreate_msg_major: " + err_id, err_id < 0);
@@ -119,9 +127,11 @@ public class TestH5Eparams {
}
@Test
- public void testH5Ecreate_msg_minor() {
+ public void testH5Ecreate_msg_minor()
+ {
try {
- long err_id = H5.H5Ecreate_msg(hdf_java_classid, HDF5Constants.H5E_MINOR, "Error in Test Function");
+ long err_id =
+ H5.H5Ecreate_msg(hdf_java_classid, HDF5Constants.H5E_MINOR, "Error in Test Function");
assertFalse("H5.H5Ecreate_msg_minor: " + err_id, err_id < 0);
H5.H5Eclose_msg(err_id);
}
@@ -132,10 +142,11 @@ public class TestH5Eparams {
}
@Test
- public void testH5Eget_msg() {
- int[] error_msg_type = { HDF5Constants.H5E_MINOR };
- long err_id = -1;
- String msg = null;
+ public void testH5Eget_msg()
+ {
+ int[] error_msg_type = {HDF5Constants.H5E_MINOR};
+ long err_id = -1;
+ String msg = null;
try {
err_id = H5.H5Ecreate_msg(hdf_java_classid, HDF5Constants.H5E_MAJOR, "Error in Test");
}
@@ -164,7 +175,8 @@ public class TestH5Eparams {
}
@Test
- public void testH5Ecreate_stack() {
+ public void testH5Ecreate_stack()
+ {
long stk_id = -1;
try {
stk_id = H5.H5Ecreate_stack();
@@ -184,7 +196,8 @@ public class TestH5Eparams {
}
@Test
- public void testH5EprintInt() {
+ public void testH5EprintInt()
+ {
assertFalse(current_stackid < 0);
try {
H5.H5Eprint2(current_stackid, null);
@@ -196,7 +209,8 @@ public class TestH5Eparams {
}
@Test
- public void testH5EclearInt() {
+ public void testH5EclearInt()
+ {
try {
H5.H5Eclear(current_stackid);
}
@@ -207,7 +221,8 @@ public class TestH5Eparams {
}
@Test
- public void testH5Eclear2() {
+ public void testH5Eclear2()
+ {
try {
H5.H5Eclear2(current_stackid);
}
@@ -218,7 +233,8 @@ public class TestH5Eparams {
}
@Test
- public void testH5Eauto_is_v2() {
+ public void testH5Eauto_is_v2()
+ {
boolean is_v2 = false;
try {
is_v2 = H5.H5Eauto_is_v2(current_stackid);
@@ -231,7 +247,8 @@ public class TestH5Eparams {
}
@Test
- public void testH5Eget_num() {
+ public void testH5Eget_num()
+ {
long num_msg = -1;
try {
num_msg = H5.H5Eget_num(current_stackid);
@@ -244,7 +261,8 @@ public class TestH5Eparams {
}
@Test
- public void testH5Eget_num_with_msg() {
+ public void testH5Eget_num_with_msg()
+ {
try {
H5.H5Eset_current_stack(current_stackid);
}
@@ -277,5 +295,4 @@ public class TestH5Eparams {
}
assertTrue("H5.H5Eget_num_with_msg #:" + num_msg, num_msg > 0);
}
-
}
diff --git a/java/test/TestH5Eregister.java b/java/test/TestH5Eregister.java
index 99e8e5f..b4c63e0 100644
--- a/java/test/TestH5Eregister.java
+++ b/java/test/TestH5Eregister.java
@@ -14,6 +14,7 @@ package test;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
+
import hdf.hdf5lib.H5;
import org.junit.After;
@@ -23,40 +24,48 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5Eregister {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
@Before
- public void checkOpenIDs() {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ public void checkOpenIDs()
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
}
@After
- public void nextTestName() {
+ public void nextTestName()
+ {
System.out.println();
}
@Test(expected = NullPointerException.class)
- public void testH5Eregister_class_cls_name_null() throws Throwable {
+ public void testH5Eregister_class_cls_name_null() throws Throwable
+ {
H5.H5Eregister_class(null, "libname", "version");
}
@Test(expected = NullPointerException.class)
- public void testH5Eregister_class_lib_name_null() throws Throwable {
+ public void testH5Eregister_class_lib_name_null() throws Throwable
+ {
H5.H5Eregister_class("clsname", null, "version");
}
@Test(expected = NullPointerException.class)
- public void testH5Eregister_class_version_null() throws Throwable {
+ public void testH5Eregister_class_version_null() throws Throwable
+ {
H5.H5Eregister_class("clsname", "libname", null);
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Eunregister_class_invalid_classid() throws Throwable {
+ public void testH5Eunregister_class_invalid_classid() throws Throwable
+ {
H5.H5Eunregister_class(-1);
}
@Test
- public void testH5Eregister_class() {
+ public void testH5Eregister_class()
+ {
long hdf_java_classid = -1;
try {
hdf_java_classid = H5.H5Eregister_class("HDF-Java-Error", "hdf-java", "2.5");
diff --git a/java/test/TestH5F.java b/java/test/TestH5F.java
index 16786b9..fde2739 100644
--- a/java/test/TestH5F.java
+++ b/java/test/TestH5F.java
@@ -30,49 +30,58 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5F {
- @Rule public TestName testname = new TestName();
- private static final String H5_FILE = "testF.h5";
+ @Rule
+ public TestName testname = new TestName();
+ private static final String H5_FILE = "testF.h5";
private static final String H5_FILE2 = "testF2.h5";
- private static final int COUNT_OBJ_FILE = 1;
- private static final int COUNT_OBJ_DATASET = 0;
- private static final int COUNT_OBJ_GROUP = 0;
+ private static final int COUNT_OBJ_FILE = 1;
+ private static final int COUNT_OBJ_DATASET = 0;
+ private static final int COUNT_OBJ_GROUP = 0;
private static final int COUNT_OBJ_DATATYPE = 0;
- private static final int COUNT_OBJ_ATTR = 0;
- private static final int COUNT_OBJ_ALL = (COUNT_OBJ_FILE
- + COUNT_OBJ_DATASET + COUNT_OBJ_GROUP + COUNT_OBJ_DATATYPE + COUNT_OBJ_ATTR);
- private static final int[] OBJ_COUNTS = { COUNT_OBJ_FILE,
- COUNT_OBJ_DATASET, COUNT_OBJ_GROUP, COUNT_OBJ_DATATYPE,
- COUNT_OBJ_ATTR, COUNT_OBJ_ALL };
- private static final int[] OBJ_TYPES = { HDF5Constants.H5F_OBJ_FILE,
- HDF5Constants.H5F_OBJ_DATASET, HDF5Constants.H5F_OBJ_GROUP,
- HDF5Constants.H5F_OBJ_DATATYPE, HDF5Constants.H5F_OBJ_ATTR,
- HDF5Constants.H5F_OBJ_ALL };
- long H5fid = HDF5Constants.H5I_INVALID_HID;
-
- private final void _deleteFile(String filename) {
+ private static final int COUNT_OBJ_ATTR = 0;
+ private static final int COUNT_OBJ_ALL =
+ (COUNT_OBJ_FILE + COUNT_OBJ_DATASET + COUNT_OBJ_GROUP + COUNT_OBJ_DATATYPE + COUNT_OBJ_ATTR);
+ private static final int[] OBJ_COUNTS = {COUNT_OBJ_FILE, COUNT_OBJ_DATASET, COUNT_OBJ_GROUP,
+ COUNT_OBJ_DATATYPE, COUNT_OBJ_ATTR, COUNT_OBJ_ALL};
+ private static final int[] OBJ_TYPES = {HDF5Constants.H5F_OBJ_FILE, HDF5Constants.H5F_OBJ_DATASET,
+ HDF5Constants.H5F_OBJ_GROUP, HDF5Constants.H5F_OBJ_DATATYPE,
+ HDF5Constants.H5F_OBJ_ATTR, HDF5Constants.H5F_OBJ_ALL};
+ long H5fid = HDF5Constants.H5I_INVALID_HID;
+
+ private final void _deleteFile(String filename)
+ {
File file = new File(filename);
if (file.exists()) {
- try {file.delete();} catch (SecurityException e) {}
+ try {
+ file.delete();
+ }
+ catch (SecurityException e) {
+ }
}
}
@Before
- public void createH5file()
- throws HDF5LibraryException, NullPointerException {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ public void createH5file() throws HDF5LibraryException, NullPointerException
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
- H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
H5.H5Fflush(H5fid, HDF5Constants.H5F_SCOPE_LOCAL);
}
@After
- public void deleteH5file() throws HDF5LibraryException {
+ public void deleteH5file() throws HDF5LibraryException
+ {
if (H5fid > 0) {
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
H5fid = HDF5Constants.H5I_INVALID_HID;
}
_deleteFile(H5_FILE);
@@ -80,7 +89,8 @@ public class TestH5F {
}
@Test
- public void testH5Fget_create_plist() {
+ public void testH5Fget_create_plist()
+ {
long plist = HDF5Constants.H5I_INVALID_HID;
try {
@@ -90,13 +100,23 @@ public class TestH5F {
fail("H5.H5Fget_create_plist: " + err);
}
assertTrue(plist > 0);
- try {H5.H5Pclose(plist);} catch (HDF5LibraryException e) {e.printStackTrace();}
+ try {
+ H5.H5Pclose(plist);
+ }
+ catch (HDF5LibraryException e) {
+ e.printStackTrace();
+ }
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Fget_create_plist_closed() throws Throwable {
+ public void testH5Fget_create_plist_closed() throws Throwable
+ {
if (H5fid > 0) {
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
}
// it should fail because the file was closed.
@@ -104,7 +124,8 @@ public class TestH5F {
}
@Test
- public void testH5Fget_access_plist() {
+ public void testH5Fget_access_plist()
+ {
long plist = HDF5Constants.H5I_INVALID_HID;
try {
@@ -114,13 +135,23 @@ public class TestH5F {
fail("H5.H5Fget_access_plist: " + err);
}
assertTrue(plist > 0);
- try {H5.H5Pclose(plist);} catch (HDF5LibraryException e) {e.printStackTrace();}
+ try {
+ H5.H5Pclose(plist);
+ }
+ catch (HDF5LibraryException e) {
+ e.printStackTrace();
+ }
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Fget_access_plist_closed() throws Throwable {
+ public void testH5Fget_access_plist_closed() throws Throwable
+ {
if (H5fid > 0) {
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
}
// it should fail because the file was closed.
@@ -128,17 +159,21 @@ public class TestH5F {
}
@Test
- public void testH5Fget_intent_rdwr() {
+ public void testH5Fget_intent_rdwr()
+ {
int intent = 0;
if (H5fid > 0) {
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
H5fid = HDF5Constants.H5I_INVALID_HID;
}
try {
- H5fid = H5.H5Fopen(H5_FILE, HDF5Constants.H5F_ACC_RDWR,
- HDF5Constants.H5P_DEFAULT);
+ H5fid = H5.H5Fopen(H5_FILE, HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
fail("H5.H5Fopen: " + err);
@@ -153,17 +188,21 @@ public class TestH5F {
}
@Test
- public void testH5Fget_intent_rdonly() {
+ public void testH5Fget_intent_rdonly()
+ {
int intent = 0;
if (H5fid > 0) {
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
H5fid = HDF5Constants.H5I_INVALID_HID;
}
try {
- H5fid = H5.H5Fopen(H5_FILE, HDF5Constants.H5F_ACC_RDONLY,
- HDF5Constants.H5P_DEFAULT);
+ H5fid = H5.H5Fopen(H5_FILE, HDF5Constants.H5F_ACC_RDONLY, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
fail("H5.H5Fopen: " + err);
@@ -178,26 +217,26 @@ public class TestH5F {
}
@Test
- public void testH5Fget_fileno_same() {
+ public void testH5Fget_fileno_same()
+ {
long fileno1 = 0;
long fileno2 = 0;
- long fid1 = HDF5Constants.H5I_INVALID_HID;
- long fid2 = HDF5Constants.H5I_INVALID_HID;
+ long fid1 = HDF5Constants.H5I_INVALID_HID;
+ long fid2 = HDF5Constants.H5I_INVALID_HID;
try {
- fid1 = H5.H5Fcreate(H5_FILE2, HDF5Constants.H5F_ACC_TRUNC,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ fid1 = H5.H5Fcreate(H5_FILE2, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
H5.H5Fflush(fid1, HDF5Constants.H5F_SCOPE_LOCAL);
assertTrue("H5Fcreate failed", fid1 > 0);
- fid2 = H5.H5Fopen(H5_FILE2, HDF5Constants.H5F_ACC_RDWR,
- HDF5Constants.H5P_DEFAULT);
+ fid2 = H5.H5Fopen(H5_FILE2, HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
assertTrue("H5Fopen failed", fid2 > 0);
fileno1 = H5.H5Fget_fileno(fid1);
- assertTrue("H5Fget_fileno1="+fileno1, fileno1 > 0);
+ assertTrue("H5Fget_fileno1=" + fileno1, fileno1 > 0);
fileno2 = H5.H5Fget_fileno(fid2);
- assertTrue("H5Fget_fileno2="+fileno2, fileno2 > 0);
+ assertTrue("H5Fget_fileno2=" + fileno2, fileno2 > 0);
- assertEquals("fileno1["+fileno1+"]!=fileno2["+fileno2+"]", fileno1, fileno2);
+ assertEquals("fileno1[" + fileno1 + "]!=fileno2[" + fileno2 + "]", fileno1, fileno2);
}
catch (Throwable err) {
fail("testH5Fget_fileno_same: " + err);
@@ -209,23 +248,24 @@ public class TestH5F {
}
@Test
- public void testH5Fget_fileno_diff() {
+ public void testH5Fget_fileno_diff()
+ {
long fileno1 = 0;
long fileno2 = 0;
- long fid2 = HDF5Constants.H5I_INVALID_HID;
+ long fid2 = HDF5Constants.H5I_INVALID_HID;
try {
- fid2 = H5.H5Fcreate(H5_FILE2, HDF5Constants.H5F_ACC_TRUNC,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ fid2 = H5.H5Fcreate(H5_FILE2, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
H5.H5Fflush(fid2, HDF5Constants.H5F_SCOPE_LOCAL);
assertTrue("H5Fcreate failed", fid2 > 0);
fileno1 = H5.H5Fget_fileno(H5fid);
- assertTrue("H5Fget_fileno1="+fileno1, fileno1 > 0);
+ assertTrue("H5Fget_fileno1=" + fileno1, fileno1 > 0);
fileno2 = H5.H5Fget_fileno(fid2);
- assertTrue("H5Fget_fileno2="+fileno2, fileno2 > 0);
+ assertTrue("H5Fget_fileno2=" + fileno2, fileno2 > 0);
- assertNotEquals("fileno1["+fileno1+"]==fileno2["+fileno2+"]", fileno1, fileno2);
+ assertNotEquals("fileno1[" + fileno1 + "]==fileno2[" + fileno2 + "]", fileno1, fileno2);
}
catch (Throwable err) {
fail("testH5Fget_fileno_diff: " + err);
@@ -236,7 +276,8 @@ public class TestH5F {
}
@Test
- public void testH5Fget_obj_count() {
+ public void testH5Fget_obj_count()
+ {
long count = -1;
for (int i = 0; i < OBJ_TYPES.length; i++) {
@@ -252,10 +293,11 @@ public class TestH5F {
}
@Test
- public void testH5Fget_obj_ids() {
- long count = 0;
- long max_objs = 100;
- long[] obj_id_list = new long[(int)max_objs];
+ public void testH5Fget_obj_ids()
+ {
+ long count = 0;
+ long max_objs = 100;
+ long[] obj_id_list = new long[(int)max_objs];
int[] open_obj_counts = new int[OBJ_TYPES.length];
for (int i = 0; i < OBJ_TYPES.length; i++)
@@ -267,8 +309,7 @@ public class TestH5F {
for (int i = 0; i < OBJ_TYPES.length; i++) {
try {
- count = H5.H5Fget_obj_ids(H5fid, OBJ_TYPES[i], max_objs,
- obj_id_list);
+ count = H5.H5Fget_obj_ids(H5fid, OBJ_TYPES[i], max_objs, obj_id_list);
}
catch (Throwable err) {
fail("H5.H5Fget_obj_ids: " + err);
diff --git a/java/test/TestH5Fbasic.java b/java/test/TestH5Fbasic.java
index 4f3d928..37be943 100644
--- a/java/test/TestH5Fbasic.java
+++ b/java/test/TestH5Fbasic.java
@@ -31,45 +31,59 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5Fbasic {
- @Rule public TestName testname = new TestName();
- private static final String H5_FILE = "testFb.h5";
+ @Rule
+ public TestName testname = new TestName();
+ private static final String H5_FILE = "testFb.h5";
private static final String TXT_FILE = "testFb.txt";
- long H5fid = HDF5Constants.H5I_INVALID_HID;
+ long H5fid = HDF5Constants.H5I_INVALID_HID;
- private final void _deleteFile(String filename) {
+ private final void _deleteFile(String filename)
+ {
File file = new File(filename);
if (file.exists()) {
- try {file.delete();} catch (SecurityException e) {}
+ try {
+ file.delete();
+ }
+ catch (SecurityException e) {
+ }
}
}
@Before
- public void createH5file() throws HDF5LibraryException, NullPointerException {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ public void createH5file() throws HDF5LibraryException, NullPointerException
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
- H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
H5.H5Fflush(H5fid, HDF5Constants.H5F_SCOPE_LOCAL);
}
@After
- public void deleteH5file() throws HDF5LibraryException {
+ public void deleteH5file() throws HDF5LibraryException
+ {
if (H5fid > 0) {
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
}
_deleteFile(H5_FILE);
System.out.println();
}
@Test
- public void testH5Fcreate() {
+ public void testH5Fcreate()
+ {
assertTrue(H5fid > 0);
}
@Test
- public void testH5Fis_accessible() {
+ public void testH5Fis_accessible()
+ {
boolean isH5 = false;
try {
@@ -82,18 +96,19 @@ public class TestH5Fbasic {
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Fcreate_EXCL() throws Throwable {
- H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_EXCL,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ public void testH5Fcreate_EXCL() throws Throwable
+ {
+ H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_EXCL, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Fopen_read_only() throws Throwable {
+ public void testH5Fopen_read_only() throws Throwable
+ {
long fid = HDF5Constants.H5I_INVALID_HID;
try {
- fid = H5.H5Fopen(H5_FILE, HDF5Constants.H5F_ACC_RDWR,
- HDF5Constants.H5P_DEFAULT);
+ fid = H5.H5Fopen(H5_FILE, HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
fail("H5.H5Fopen: " + err);
@@ -108,8 +123,7 @@ public class TestH5Fbasic {
File file = new File(H5_FILE);
if (file.setWritable(false)) {
// this should fail.
- fid = H5.H5Fopen(H5_FILE, HDF5Constants.H5F_ACC_RDWR,
- HDF5Constants.H5P_DEFAULT);
+ fid = H5.H5Fopen(H5_FILE, HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
try {
H5.H5Fclose(fid);
@@ -123,13 +137,13 @@ public class TestH5Fbasic {
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Freopen_closed() throws Throwable {
- long fid = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Freopen_closed() throws Throwable
+ {
+ long fid = HDF5Constants.H5I_INVALID_HID;
long fid2 = HDF5Constants.H5I_INVALID_HID;
try {
- fid = H5.H5Fopen(H5_FILE, HDF5Constants.H5F_ACC_RDWR,
- HDF5Constants.H5P_DEFAULT);
+ fid = H5.H5Fopen(H5_FILE, HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
fail("H5.H5Fopen: " + err);
@@ -146,13 +160,13 @@ public class TestH5Fbasic {
}
@Test
- public void testH5Freopen() {
- long fid = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Freopen()
+ {
+ long fid = HDF5Constants.H5I_INVALID_HID;
long fid2 = HDF5Constants.H5I_INVALID_HID;
try {
- fid = H5.H5Fopen(H5_FILE, HDF5Constants.H5F_ACC_RDWR,
- HDF5Constants.H5P_DEFAULT);
+ fid = H5.H5Fopen(H5_FILE, HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
fail("H5.H5Fopen: " + err);
@@ -180,12 +194,12 @@ public class TestH5Fbasic {
}
@Test
- public void testH5Fclose() {
+ public void testH5Fclose()
+ {
long fid = HDF5Constants.H5I_INVALID_HID;
try {
- fid = H5.H5Fopen(H5_FILE, HDF5Constants.H5F_ACC_RDWR,
- HDF5Constants.H5P_DEFAULT);
+ fid = H5.H5Fopen(H5_FILE, HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
fail("H5.H5Fopen: " + err);
@@ -200,12 +214,12 @@ public class TestH5Fbasic {
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Fclose_twice() throws Throwable {
+ public void testH5Fclose_twice() throws Throwable
+ {
long fid = HDF5Constants.H5I_INVALID_HID;
try {
- fid = H5.H5Fopen(H5_FILE, HDF5Constants.H5F_ACC_RDWR,
- HDF5Constants.H5P_DEFAULT);
+ fid = H5.H5Fopen(H5_FILE, HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
fail("H5.H5Fopen: " + err);
@@ -223,7 +237,8 @@ public class TestH5Fbasic {
}
@Test
- public void testH5Fget_freespace() {
+ public void testH5Fget_freespace()
+ {
long freeSpace = 0;
try {
@@ -238,7 +253,8 @@ public class TestH5Fbasic {
// TODO add/and delete objects and test freespace
@Test
- public void testH5Fget_filesize() {
+ public void testH5Fget_filesize()
+ {
long fileSize = 0;
try {
@@ -253,7 +269,8 @@ public class TestH5Fbasic {
// TODO add/and delete objects and test freespace
@Test
- public void testH5Fget_mdc_hit_rate() {
+ public void testH5Fget_mdc_hit_rate()
+ {
double rate;
try {
@@ -265,8 +282,9 @@ public class TestH5Fbasic {
}
@Test
- public void testH5Fget_mdc_size() {
- int nentries = -1;
+ public void testH5Fget_mdc_size()
+ {
+ int nentries = -1;
long cache_sizes[] = new long[3];
try {
@@ -281,7 +299,8 @@ public class TestH5Fbasic {
// TODO: test more cases of different cache sizes.
@Test
- public void testH5Freset_mdc_hit_rate_stats() {
+ public void testH5Freset_mdc_hit_rate_stats()
+ {
try {
H5.H5Freset_mdc_hit_rate_stats(H5fid);
@@ -292,7 +311,8 @@ public class TestH5Fbasic {
}
@Test
- public void testH5Fget_name() {
+ public void testH5Fget_name()
+ {
String fname = null;
try {
@@ -306,7 +326,8 @@ public class TestH5Fbasic {
}
@Test
- public void testH5Fclear_elink_file_cache() {
+ public void testH5Fclear_elink_file_cache()
+ {
try {
H5.H5Fclear_elink_file_cache(H5fid);
@@ -317,7 +338,8 @@ public class TestH5Fbasic {
}
@Test
- public void testH5F_dset_no_attrs_hint() {
+ public void testH5F_dset_no_attrs_hint()
+ {
boolean ret_val_id = true;
try {
ret_val_id = H5.H5Fget_dset_no_attrs_hint(H5fid);
diff --git a/java/test/TestH5Fparams.java b/java/test/TestH5Fparams.java
index 0376485..6accc3b 100644
--- a/java/test/TestH5Fparams.java
+++ b/java/test/TestH5Fparams.java
@@ -32,46 +32,54 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5Fparams {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
@Before
- public void checkOpenIDs() {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ public void checkOpenIDs()
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
}
@After
- public void nextTestName() {
+ public void nextTestName()
+ {
System.out.println();
}
@Test(expected = NullPointerException.class)
- public void testH5Fcreate_null() throws Throwable {
- H5.H5Fcreate(null, HDF5Constants.H5F_ACC_TRUNC,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ public void testH5Fcreate_null() throws Throwable
+ {
+ H5.H5Fcreate(null, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
@Test(expected = NullPointerException.class)
- public void testH5Fopen_null() throws Throwable {
+ public void testH5Fopen_null() throws Throwable
+ {
H5.H5Fopen(null, HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
@Test(expected = NullPointerException.class)
- public void testH5Fis_accessible_null() throws Throwable {
+ public void testH5Fis_accessible_null() throws Throwable
+ {
H5.H5Fis_accessible(null, -1);
}
@Test(expected = NullPointerException.class)
- public void testH5Fmount_null() throws Throwable {
+ public void testH5Fmount_null() throws Throwable
+ {
H5.H5Fmount(-1, null, -1, HDF5Constants.H5P_DEFAULT);
}
@Test(expected = NullPointerException.class)
- public void testH5Funmount_null() throws Throwable {
+ public void testH5Funmount_null() throws Throwable
+ {
H5.H5Funmount(-1, null);
}
@Ignore
- public void testH5Fis_hdf5_text() {
+ public void testH5Fis_hdf5_text()
+ {
File txtFile = null;
boolean isH5 = false;
@@ -91,25 +99,27 @@ public class TestH5Fparams {
txtFile.delete();
}
catch (SecurityException e) {
- ;// e.printStackTrace();
+ ; // e.printStackTrace();
}
}
- @Test//(expected = HDF5LibraryException.class)
- public void testH5Fclose_negative() throws Throwable {
+ @Test //(expected = HDF5LibraryException.class)
+ public void testH5Fclose_negative() throws Throwable
+ {
// cannot close a file with negative id.
int fid = H5.H5Fclose(-1);
assertTrue(fid == 0);
}
@Test
- public void testH5Fcreate() {
- long fid = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Fcreate()
+ {
+ long fid = HDF5Constants.H5I_INVALID_HID;
File file = null;
try {
- fid = H5.H5Fcreate("test.h5", HDF5Constants.H5F_ACC_TRUNC,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ fid = H5.H5Fcreate("test.h5", HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
if (fid > 0) {
H5.H5Fclose(fid);
}
@@ -124,18 +134,19 @@ public class TestH5Fparams {
file.delete();
}
catch (SecurityException e) {
- ;// e.printStackTrace();
+ ; // e.printStackTrace();
}
}
}
@Test
- public void testH5Fflush_global() {
+ public void testH5Fflush_global()
+ {
long fid = HDF5Constants.H5I_INVALID_HID;
try {
- fid = H5.H5Fcreate("test.h5", HDF5Constants.H5F_ACC_TRUNC,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ fid = H5.H5Fcreate("test.h5", HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
fail("H5.H5Fopen: " + err);
@@ -156,12 +167,13 @@ public class TestH5Fparams {
}
@Test
- public void testH5Fflush_local() {
+ public void testH5Fflush_local()
+ {
long fid = HDF5Constants.H5I_INVALID_HID;
try {
- fid = H5.H5Fcreate("test.h5", HDF5Constants.H5F_ACC_TRUNC,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ fid = H5.H5Fcreate("test.h5", HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
fail("H5.H5Fopen: " + err);
@@ -182,13 +194,14 @@ public class TestH5Fparams {
}
@Test
- public void testH5Fget_info() {
+ public void testH5Fget_info()
+ {
long fid = HDF5Constants.H5I_INVALID_HID;
try {
try {
- fid = H5.H5Fcreate("test.h5", HDF5Constants.H5F_ACC_TRUNC,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ fid = H5.H5Fcreate("test.h5", HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
fail("H5.H5Fcreate: " + err);
@@ -205,21 +218,26 @@ public class TestH5Fparams {
}
}
catch (Exception e) {
- e.printStackTrace();
+ e.printStackTrace();
}
finally {
- try {H5.H5Fclose(fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(fid);
+ }
+ catch (Exception ex) {
+ }
}
}
- @Ignore//(expected = HDF5FunctionArgumentException.class)
- public void testH5Fset_libver_bounds_invalidlow() throws Throwable {
+ @Ignore //(expected = HDF5FunctionArgumentException.class)
+ public void testH5Fset_libver_bounds_invalidlow() throws Throwable
+ {
long fid = HDF5Constants.H5I_INVALID_HID;
try {
try {
- fid = H5.H5Fcreate("test.h5", HDF5Constants.H5F_ACC_TRUNC,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ fid = H5.H5Fcreate("test.h5", HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
fail("H5.H5Fcreate: " + err);
@@ -227,26 +245,36 @@ public class TestH5Fparams {
H5.H5Fset_libver_bounds(fid, 5, HDF5Constants.H5F_LIBVER_LATEST);
}
finally {
- try {H5.H5Fclose(fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(fid);
+ }
+ catch (Exception ex) {
+ }
}
}
- @Ignore//(expected = HDF5FunctionArgumentException.class)
- public void testH5Fset_libver_bounds_invalidhigh() throws Throwable {
+ @Ignore //(expected = HDF5FunctionArgumentException.class)
+ public void testH5Fset_libver_bounds_invalidhigh() throws Throwable
+ {
long fid = HDF5Constants.H5I_INVALID_HID;
try {
try {
- fid = H5.H5Fcreate("test.h5", HDF5Constants.H5F_ACC_TRUNC,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ fid = H5.H5Fcreate("test.h5", HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
fail("H5.H5Fcreate: " + err);
}
- H5.H5Fset_libver_bounds(fid, HDF5Constants.H5F_LIBVER_LATEST, HDF5Constants.H5F_LIBVER_LATEST+1);
+ H5.H5Fset_libver_bounds(fid, HDF5Constants.H5F_LIBVER_LATEST,
+ HDF5Constants.H5F_LIBVER_LATEST + 1);
}
finally {
- try {H5.H5Fclose(fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(fid);
+ }
+ catch (Exception ex) {
+ }
}
}
}
diff --git a/java/test/TestH5Fswmr.java b/java/test/TestH5Fswmr.java
index 1ec78fe..823640d 100644
--- a/java/test/TestH5Fswmr.java
+++ b/java/test/TestH5Fswmr.java
@@ -29,25 +29,31 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5Fswmr {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
private static final String H5_FILE = "testswmr.h5";
- long H5fid = HDF5Constants.H5I_INVALID_HID;
+ long H5fid = HDF5Constants.H5I_INVALID_HID;
long H5fapl = HDF5Constants.H5I_INVALID_HID;
long H5fcpl = HDF5Constants.H5I_INVALID_HID;
- private final void _deleteFile(String filename) {
+ private final void _deleteFile(String filename)
+ {
File file = new File(filename);
if (file.exists()) {
- try {file.delete();} catch (SecurityException e) {}
+ try {
+ file.delete();
+ }
+ catch (SecurityException e) {
+ }
}
}
@Before
- public void createH5file()
- throws HDF5LibraryException, NullPointerException {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ public void createH5file() throws HDF5LibraryException, NullPointerException
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
H5fapl = H5.H5Pcreate(HDF5Constants.H5P_FILE_ACCESS);
@@ -59,17 +65,30 @@ public class TestH5Fswmr {
}
@After
- public void deleteH5file() throws HDF5LibraryException {
+ public void deleteH5file() throws HDF5LibraryException
+ {
if (H5fapl > 0) {
- try {H5.H5Pclose(H5fapl);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(H5fapl);
+ }
+ catch (Exception ex) {
+ }
H5fapl = HDF5Constants.H5I_INVALID_HID;
}
if (H5fcpl > 0) {
- try {H5.H5Pclose(H5fcpl);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(H5fcpl);
+ }
+ catch (Exception ex) {
+ }
H5fcpl = HDF5Constants.H5I_INVALID_HID;
}
- if (H5fid > 0) {
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
+ if (H5fid > 0) {
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
H5fid = HDF5Constants.H5I_INVALID_HID;
}
_deleteFile(H5_FILE);
@@ -77,7 +96,8 @@ public class TestH5Fswmr {
}
@Test
- public void testH5Fstart_swmr_write() {
+ public void testH5Fstart_swmr_write()
+ {
try {
H5.H5Fstart_swmr_write(H5fid);
}
@@ -87,7 +107,8 @@ public class TestH5Fswmr {
}
@Test
- public void testH5Fswmr_read_attempts() {
+ public void testH5Fswmr_read_attempts()
+ {
long read_attempts = 0;
try {
diff --git a/java/test/TestH5G.java b/java/test/TestH5G.java
index edf2cbe..1f6da31 100644
--- a/java/test/TestH5G.java
+++ b/java/test/TestH5G.java
@@ -32,20 +32,22 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5G {
- @Rule public TestName testname = new TestName();
- private static final String H5_FILE = "testG.h5";
- private static final String H5_FILE2 = "testG2.h5";
- private static final String[] GROUPS = { "/G1", "/G1/G11", "/G1/G12",
- "/G1/G11/G111", "/G1/G11/G112", "/G1/G11/G113", "/G1/G11/G114" };
- private static final String[] GROUPS2 = { "/G1", "/G1/G14", "/G1/G12", "/G1/G13", "/G1/G11"};
- long H5fid = HDF5Constants.H5I_INVALID_HID;
- long H5fid2 = HDF5Constants.H5I_INVALID_HID;
-
- private final long _createGroup(long fid, String name) {
+ @Rule
+ public TestName testname = new TestName();
+ private static final String H5_FILE = "testG.h5";
+ private static final String H5_FILE2 = "testG2.h5";
+ private static final String[] GROUPS = {"/G1", "/G1/G11", "/G1/G12", "/G1/G11/G111",
+ "/G1/G11/G112", "/G1/G11/G113", "/G1/G11/G114"};
+ private static final String[] GROUPS2 = {"/G1", "/G1/G14", "/G1/G12", "/G1/G13", "/G1/G11"};
+ long H5fid = HDF5Constants.H5I_INVALID_HID;
+ long H5fid2 = HDF5Constants.H5I_INVALID_HID;
+
+ private final long _createGroup(long fid, String name)
+ {
long gid = HDF5Constants.H5I_INVALID_HID;
try {
- gid = H5.H5Gcreate(fid, name, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ gid = H5.H5Gcreate(fid, name, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
@@ -56,41 +58,51 @@ public class TestH5G {
return gid;
}
- private final long _createGroup2(long fid, String name) {
- long gid = HDF5Constants.H5I_INVALID_HID;
+ private final long _createGroup2(long fid, String name)
+ {
+ long gid = HDF5Constants.H5I_INVALID_HID;
long gcpl = HDF5Constants.H5I_INVALID_HID;
try {
- gcpl = H5.H5Pcreate(HDF5Constants.H5P_GROUP_CREATE); //create gcpl
+ gcpl = H5.H5Pcreate(HDF5Constants.H5P_GROUP_CREATE); // create gcpl
}
catch (final Exception ex) {
fail("H5.H5Pcreate(): " + ex);
}
assertTrue("TestH5G._createGroup2: ", gcpl >= 0);
try {
- H5.H5Pset_link_creation_order(gcpl, HDF5Constants.H5P_CRT_ORDER_TRACKED
- + HDF5Constants.H5P_CRT_ORDER_INDEXED); // Set link creation order
+ H5.H5Pset_link_creation_order(gcpl,
+ HDF5Constants.H5P_CRT_ORDER_TRACKED +
+ HDF5Constants.H5P_CRT_ORDER_INDEXED); // Set link creation order
}
catch (final Exception ex) {
- try {H5.H5Pclose(gcpl);} catch (final Exception exx) {}
+ try {
+ H5.H5Pclose(gcpl);
+ }
+ catch (final Exception exx) {
+ }
fail("H5.H5Pset_link_creation_order: " + ex);
}
try {
- gid = H5.H5Gcreate(fid, name, HDF5Constants.H5P_DEFAULT,
- gcpl, HDF5Constants.H5P_DEFAULT);
+ gid = H5.H5Gcreate(fid, name, HDF5Constants.H5P_DEFAULT, gcpl, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Gcreate: " + err);
}
finally {
- try {H5.H5Pclose(gcpl);} catch (final Exception ex) {}
+ try {
+ H5.H5Pclose(gcpl);
+ }
+ catch (final Exception ex) {
+ }
}
assertTrue("TestH5G._createGroup2: ", gid > 0);
return gid;
}
- private final long _openGroup(long fid, String name) {
+ private final long _openGroup(long fid, String name)
+ {
long gid = HDF5Constants.H5I_INVALID_HID;
try {
gid = H5.H5Gopen(fid, name, HDF5Constants.H5P_DEFAULT);
@@ -105,26 +117,31 @@ public class TestH5G {
return gid;
}
- private final void _deleteFile(String filename) {
+ private final void _deleteFile(String filename)
+ {
File file = new File(filename);
if (file.exists()) {
- try {file.delete();} catch (SecurityException e) {}
+ try {
+ file.delete();
+ }
+ catch (SecurityException e) {
+ }
}
}
@Before
- public void createH5file()
- throws HDF5LibraryException, NullPointerException {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ public void createH5file() throws HDF5LibraryException, NullPointerException
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
try {
H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
H5fid2 = H5.H5Fcreate(H5_FILE2, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
@@ -137,12 +154,20 @@ public class TestH5G {
for (int i = 0; i < GROUPS.length; i++) {
gid = _createGroup(H5fid, GROUPS[i]);
- try {H5.H5Gclose(gid);} catch (Exception ex) {}
+ try {
+ H5.H5Gclose(gid);
+ }
+ catch (Exception ex) {
+ }
}
for (int i = 0; i < GROUPS2.length; i++) {
gid = _createGroup2(H5fid2, GROUPS2[i]);
- try {H5.H5Gclose(gid);} catch (Exception ex) {}
+ try {
+ H5.H5Gclose(gid);
+ }
+ catch (Exception ex) {
+ }
}
H5.H5Fflush(H5fid, HDF5Constants.H5F_SCOPE_LOCAL);
@@ -150,20 +175,30 @@ public class TestH5G {
}
@After
- public void deleteH5file() throws HDF5LibraryException {
+ public void deleteH5file() throws HDF5LibraryException
+ {
if (H5fid > 0) {
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
}
if (H5fid2 > 0) {
- try {H5.H5Fclose(H5fid2);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(H5fid2);
+ }
+ catch (Exception ex) {
+ }
}
- _deleteFile(H5_FILE);
- _deleteFile(H5_FILE2);
- System.out.println();
+ _deleteFile(H5_FILE);
+ _deleteFile(H5_FILE2);
+ System.out.println();
}
@Test
- public void testH5Gopen() {
+ public void testH5Gopen()
+ {
long gid = HDF5Constants.H5I_INVALID_HID;
for (int i = 0; i < GROUPS.length; i++) {
try {
@@ -183,7 +218,8 @@ public class TestH5G {
}
@Test
- public void testH5Gget_create_plist() {
+ public void testH5Gget_create_plist()
+ {
long gid = HDF5Constants.H5I_INVALID_HID;
long pid = HDF5Constants.H5I_INVALID_HID;
@@ -215,7 +251,8 @@ public class TestH5G {
}
@Test
- public void testH5Gget_info() {
+ public void testH5Gget_info()
+ {
H5G_info_t info = null;
for (int i = 0; i < GROUPS.length; i++) {
@@ -232,13 +269,13 @@ public class TestH5G {
}
@Test
- public void testH5Gget_info_by_name() {
+ public void testH5Gget_info_by_name()
+ {
H5G_info_t info = null;
for (int i = 0; i < GROUPS.length; i++) {
try {
- info = H5.H5Gget_info_by_name(H5fid, GROUPS[i],
- HDF5Constants.H5P_DEFAULT);
+ info = H5.H5Gget_info_by_name(H5fid, GROUPS[i], HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
@@ -249,13 +286,13 @@ public class TestH5G {
}
@Test
- public void testH5Gget_info_by_idx() {
+ public void testH5Gget_info_by_idx()
+ {
H5G_info_t info = null;
for (int i = 0; i < 2; i++) {
try {
- info = H5.H5Gget_info_by_idx(H5fid, "/G1",
- HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC,
- i, HDF5Constants.H5P_DEFAULT);
+ info = H5.H5Gget_info_by_idx(H5fid, "/G1", HDF5Constants.H5_INDEX_NAME,
+ HDF5Constants.H5_ITER_INC, i, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
@@ -266,7 +303,8 @@ public class TestH5G {
}
@Test
- public void testH5Gget_obj_info_all() {
+ public void testH5Gget_obj_info_all()
+ {
H5G_info_t info = null;
long gid = _openGroup(H5fid, GROUPS[0]);
@@ -279,27 +317,31 @@ public class TestH5G {
fail("TestH5G.testH5Gget_obj_info_all: H5.H5Gget_info: " + err);
}
finally {
- try {H5.H5Gclose(gid);} catch (Exception ex) { }
+ try {
+ H5.H5Gclose(gid);
+ }
+ catch (Exception ex) {
+ }
}
assertNotNull("TestH5G.testH5Gget_obj_info_all: ", info);
assertTrue("TestH5G.testH5Gget_obj_info_all: number of links is empty", info.nlinks > 0);
- String objNames[] = new String[(int) info.nlinks];
- int objTypes[] = new int[(int) info.nlinks];
- int lnkTypes[] = new int[(int) info.nlinks];
- H5O_token_t objTokens[] = new H5O_token_t[(int) info.nlinks];
+ String objNames[] = new String[(int)info.nlinks];
+ int objTypes[] = new int[(int)info.nlinks];
+ int lnkTypes[] = new int[(int)info.nlinks];
+ H5O_token_t objTokens[] = new H5O_token_t[(int)info.nlinks];
int names_found = 0;
try {
- names_found = H5.H5Gget_obj_info_all(H5fid, GROUPS[0], objNames,
- objTypes, lnkTypes, objTokens, HDF5Constants.H5_INDEX_NAME);
+ names_found = H5.H5Gget_obj_info_all(H5fid, GROUPS[0], objNames, objTypes, lnkTypes, objTokens,
+ HDF5Constants.H5_INDEX_NAME);
}
catch (Throwable err) {
err.printStackTrace();
fail("TestH5G.testH5Gget_obj_info_all: H5.H5Gget_obj_info_all: " + err);
}
- assertTrue("number found[" + names_found + "] different than expected["
- + objNames.length + "]", names_found == objNames.length);
+ assertTrue("number found[" + names_found + "] different than expected[" + objNames.length + "]",
+ names_found == objNames.length);
for (int i = 0; i < objNames.length; i++) {
assertNotNull("name #" + i + " does not exist", objNames[i]);
assertTrue("TestH5G.testH5Gget_obj_info_all: ", objNames[i].length() > 0);
@@ -307,7 +349,8 @@ public class TestH5G {
}
@Test
- public void testH5Gget_obj_info_all_gid() {
+ public void testH5Gget_obj_info_all_gid()
+ {
H5G_info_t info = null;
long gid = _openGroup(H5fid, GROUPS[0]);
@@ -316,25 +359,27 @@ public class TestH5G {
info = H5.H5Gget_info(gid);
assertNotNull("TestH5G.testH5Gget_obj_info_all_gid: ", info);
assertTrue("TestH5G.testH5Gget_obj_info_all_gid: number of links is empty", info.nlinks > 0);
- String objNames[] = new String[(int) info.nlinks];
- H5O_token_t objTokens[] = new H5O_token_t[(int) info.nlinks];
- int lnkTypes[] = new int[(int) info.nlinks];
- int objTypes[] = new int[(int) info.nlinks];
+ String objNames[] = new String[(int)info.nlinks];
+ H5O_token_t objTokens[] = new H5O_token_t[(int)info.nlinks];
+ int lnkTypes[] = new int[(int)info.nlinks];
+ int objTypes[] = new int[(int)info.nlinks];
int names_found = 0;
try {
- names_found = H5.H5Gget_obj_info_all(gid, null, objNames, objTypes, lnkTypes,
- objTokens, HDF5Constants.H5_INDEX_NAME);
+ names_found = H5.H5Gget_obj_info_all(gid, null, objNames, objTypes, lnkTypes, objTokens,
+ HDF5Constants.H5_INDEX_NAME);
}
catch (Throwable err) {
err.printStackTrace();
fail("TestH5G.testH5Gget_obj_info_all_gid: H5.H5Gget_obj_info_all: " + err);
}
- assertTrue("TestH5G.testH5Gget_obj_info_all_gid: number found[" + names_found + "] different than expected["
- + objNames.length + "]", names_found == objNames.length);
+ assertTrue("TestH5G.testH5Gget_obj_info_all_gid: number found[" + names_found +
+ "] different than expected[" + objNames.length + "]",
+ names_found == objNames.length);
for (int i = 0; i < objNames.length; i++) {
- assertNotNull("TestH5G.testH5Gget_obj_info_all_gid: name #" + i + " does not exist", objNames[i]);
+ assertNotNull("TestH5G.testH5Gget_obj_info_all_gid: name #" + i + " does not exist",
+ objNames[i]);
assertTrue("TestH5G.testH5Gget_obj_info_all_gid: ", objNames[i].length() > 0);
}
}
@@ -343,12 +388,17 @@ public class TestH5G {
fail("TestH5G.testH5Gget_obj_info_all_gid: H5.H5Gget_info: " + err);
}
finally {
- try {H5.H5Gclose(gid);} catch (Exception ex) { }
+ try {
+ H5.H5Gclose(gid);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Gget_obj_info_all_gid2() {
+ public void testH5Gget_obj_info_all_gid2()
+ {
H5G_info_t info = null;
long gid = _openGroup(H5fid, GROUPS[1]);
@@ -357,25 +407,27 @@ public class TestH5G {
info = H5.H5Gget_info(gid);
assertNotNull("TestH5G.testH5Gget_obj_info_all_gid2: ", info);
assertTrue("TestH5G.testH5Gget_obj_info_all_gid2: number of links is empty", info.nlinks > 0);
- String objNames[] = new String[(int) info.nlinks];
- H5O_token_t objTokens[] = new H5O_token_t[(int) info.nlinks];
- int lnkTypes[] = new int[(int) info.nlinks];
- int objTypes[] = new int[(int) info.nlinks];
+ String objNames[] = new String[(int)info.nlinks];
+ H5O_token_t objTokens[] = new H5O_token_t[(int)info.nlinks];
+ int lnkTypes[] = new int[(int)info.nlinks];
+ int objTypes[] = new int[(int)info.nlinks];
int names_found = 0;
try {
- names_found = H5.H5Gget_obj_info_all(gid, null, objNames, objTypes, lnkTypes,
- objTokens, HDF5Constants.H5_INDEX_NAME);
+ names_found = H5.H5Gget_obj_info_all(gid, null, objNames, objTypes, lnkTypes, objTokens,
+ HDF5Constants.H5_INDEX_NAME);
}
catch (Throwable err) {
err.printStackTrace();
fail("TestH5G.testH5Gget_obj_info_all_gid2: H5.H5Gget_obj_info_all: " + err);
}
- assertTrue("TestH5G.testH5Gget_obj_info_all_gid2: number found[" + names_found + "] different than expected["
- + objNames.length + "]", names_found == objNames.length);
+ assertTrue("TestH5G.testH5Gget_obj_info_all_gid2: number found[" + names_found +
+ "] different than expected[" + objNames.length + "]",
+ names_found == objNames.length);
for (int i = 0; i < objNames.length; i++) {
- assertNotNull("TestH5G.testH5Gget_obj_info_all_gid2: name #" + i + " does not exist", objNames[i]);
+ assertNotNull("TestH5G.testH5Gget_obj_info_all_gid2: name #" + i + " does not exist",
+ objNames[i]);
assertTrue("TestH5G.testH5Gget_obj_info_all_gid2: ", objNames[i].length() > 0);
}
}
@@ -384,73 +436,91 @@ public class TestH5G {
fail("TestH5G.testH5Gget_obj_info_all_gid2: H5.H5Gget_info: " + err);
}
finally {
- try {H5.H5Gclose(gid);} catch (Exception ex) { }
+ try {
+ H5.H5Gclose(gid);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Gget_obj_info_max() {
- long gid = _openGroup(H5fid, GROUPS[0]);
- long groups_max_size = GROUPS.length + 1;
- String objNames[] = new String[(int)groups_max_size];
- int objTypes[] = new int[(int)groups_max_size];
- int lnkTypes[] = new int[(int)groups_max_size];
+ public void testH5Gget_obj_info_max()
+ {
+ long gid = _openGroup(H5fid, GROUPS[0]);
+ long groups_max_size = GROUPS.length + 1;
+ String objNames[] = new String[(int)groups_max_size];
+ int objTypes[] = new int[(int)groups_max_size];
+ int lnkTypes[] = new int[(int)groups_max_size];
H5O_token_t objTokens[] = new H5O_token_t[(int)groups_max_size];
int names_found = 0;
try {
- names_found = H5.H5Gget_obj_info_max(gid, objNames, objTypes, lnkTypes,
- objTokens, groups_max_size);
+ names_found =
+ H5.H5Gget_obj_info_max(gid, objNames, objTypes, lnkTypes, objTokens, groups_max_size);
}
catch (Throwable err) {
err.printStackTrace();
fail("TestH5G.testH5Gget_obj_info_max: H5.H5Gget_obj_info_max: " + err);
}
finally {
- try {H5.H5Gclose(gid);} catch (Exception ex) { }
+ try {
+ H5.H5Gclose(gid);
+ }
+ catch (Exception ex) {
+ }
}
// expected number does not include root group
- assertTrue("TestH5G.testH5Gget_obj_info_max: number found[" + names_found + "] different than expected["
- + (GROUPS.length - 1) + "]", names_found == (GROUPS.length - 1));
- for (int i = 0; i < GROUPS.length-1; i++) {
- assertNotNull("TestH5G.testH5Gget_obj_info_max: name #"+i+" does not exist",objNames[i]);
- assertTrue("TestH5G.testH5Gget_obj_info_max: ", objNames[i].length()>0);
+ assertTrue("TestH5G.testH5Gget_obj_info_max: number found[" + names_found +
+ "] different than expected[" + (GROUPS.length - 1) + "]",
+ names_found == (GROUPS.length - 1));
+ for (int i = 0; i < GROUPS.length - 1; i++) {
+ assertNotNull("TestH5G.testH5Gget_obj_info_max: name #" + i + " does not exist", objNames[i]);
+ assertTrue("TestH5G.testH5Gget_obj_info_max: ", objNames[i].length() > 0);
}
}
@Test
- public void testH5Gget_obj_info_max_limit() {
- long gid = _openGroup(H5fid, GROUPS[0]);
- long groups_max_size = GROUPS.length - 3;
- String objNames[] = new String[(int)groups_max_size];
- int objTypes[] = new int[(int)groups_max_size];
- int lnkTypes[] = new int[(int)groups_max_size];
+ public void testH5Gget_obj_info_max_limit()
+ {
+ long gid = _openGroup(H5fid, GROUPS[0]);
+ long groups_max_size = GROUPS.length - 3;
+ String objNames[] = new String[(int)groups_max_size];
+ int objTypes[] = new int[(int)groups_max_size];
+ int lnkTypes[] = new int[(int)groups_max_size];
H5O_token_t objTokens[] = new H5O_token_t[(int)groups_max_size];
int names_found = 0;
try {
- names_found = H5.H5Gget_obj_info_max(gid, objNames, objTypes, lnkTypes,
- objTokens, groups_max_size);
+ names_found =
+ H5.H5Gget_obj_info_max(gid, objNames, objTypes, lnkTypes, objTokens, groups_max_size);
}
catch (Throwable err) {
err.printStackTrace();
fail("TestH5G.testH5Gget_obj_info_max_limit: H5.H5Gget_obj_info_max: " + err);
}
finally {
- try {H5.H5Gclose(gid);} catch (Exception ex) { }
+ try {
+ H5.H5Gclose(gid);
+ }
+ catch (Exception ex) {
+ }
}
- assertTrue("TestH5G.testH5Gget_obj_info_max_limit: number found[" + names_found + "] different than expected["
- + groups_max_size + "]", names_found == groups_max_size);
+ assertTrue("TestH5G.testH5Gget_obj_info_max_limit: number found[" + names_found +
+ "] different than expected[" + groups_max_size + "]",
+ names_found == groups_max_size);
for (int i = 0; i < objNames.length; i++) {
- assertNotNull("TestH5G.testH5Gget_obj_info_max_limit: name #" + i + " does not exist", objNames[i]);
+ assertNotNull("TestH5G.testH5Gget_obj_info_max_limit: name #" + i + " does not exist",
+ objNames[i]);
assertTrue("TestH5G.testH5Gget_obj_info_max_limit: ", objNames[i].length() > 0);
}
}
@Test
- public void testH5Gget_obj_info_all_byIndexType() {
+ public void testH5Gget_obj_info_all_byIndexType()
+ {
H5G_info_t info = null;
long gid = _openGroup(H5fid2, GROUPS2[0]);
@@ -463,41 +533,44 @@ public class TestH5G {
fail("TestH5G.testH5Gget_obj_info_all_byIndexType: H5.H5Gget_info: " + err);
}
finally {
- try {H5.H5Gclose(gid);} catch (Exception ex) { }
+ try {
+ H5.H5Gclose(gid);
+ }
+ catch (Exception ex) {
+ }
}
assertNotNull("TestH5G.testH5Gget_obj_info_all_byIndexType: ", info);
assertTrue("TestH5G.testH5Gget_obj_info_all_byIndexType: number of links is empty", info.nlinks > 0);
- String objNames[] = new String[(int) info.nlinks];
- int objTypes[] = new int[(int) info.nlinks];
- int lnkTypes[] = new int[(int) info.nlinks];
- H5O_token_t objTokens[] = new H5O_token_t[(int) info.nlinks];
+ String objNames[] = new String[(int)info.nlinks];
+ int objTypes[] = new int[(int)info.nlinks];
+ int lnkTypes[] = new int[(int)info.nlinks];
+ H5O_token_t objTokens[] = new H5O_token_t[(int)info.nlinks];
try {
- H5.H5Gget_obj_info_all(H5fid2, GROUPS2[0], objNames,
- objTypes, lnkTypes, objTokens, HDF5Constants.H5_INDEX_CRT_ORDER);
+ H5.H5Gget_obj_info_all(H5fid2, GROUPS2[0], objNames, objTypes, lnkTypes, objTokens,
+ HDF5Constants.H5_INDEX_CRT_ORDER);
}
catch (Throwable err) {
err.printStackTrace();
fail("TestH5G.testH5Gget_obj_info_all_byIndexType: H5.H5Gget_obj_info_all: " + err);
}
- assertEquals("G12",objNames[1]);
- assertEquals("G13", objNames[2] );
- assertEquals("G11", objNames[3] );
+ assertEquals("G12", objNames[1]);
+ assertEquals("G13", objNames[2]);
+ assertEquals("G11", objNames[3]);
try {
- H5.H5Gget_obj_info_all(H5fid2, GROUPS2[0], objNames,
- objTypes, lnkTypes, objTokens, HDF5Constants.H5_INDEX_NAME);
+ H5.H5Gget_obj_info_all(H5fid2, GROUPS2[0], objNames, objTypes, lnkTypes, objTokens,
+ HDF5Constants.H5_INDEX_NAME);
}
catch (Throwable err) {
err.printStackTrace();
fail("TestH5G.testH5Gget_obj_info_all_byIndexType: H5.H5Gget_obj_info_all: " + err);
}
- assertEquals("G12",objNames[1]);
- assertEquals("G13", objNames[2] );
- assertEquals("G14", objNames[3] );
+ assertEquals("G12", objNames[1]);
+ assertEquals("G13", objNames[2]);
+ assertEquals("G14", objNames[3]);
}
-
}
diff --git a/java/test/TestH5Gbasic.java b/java/test/TestH5Gbasic.java
index 6e2e450..8ec04dd 100644
--- a/java/test/TestH5Gbasic.java
+++ b/java/test/TestH5Gbasic.java
@@ -30,15 +30,17 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5Gbasic {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
private static final String H5_FILE = "testGb.h5";
- long H5fid = HDF5Constants.H5I_INVALID_HID;
+ long H5fid = HDF5Constants.H5I_INVALID_HID;
- private final long _createGroup(long fid, String name) {
+ private final long _createGroup(long fid, String name)
+ {
long gid = HDF5Constants.H5I_INVALID_HID;
try {
- gid = H5.H5Gcreate(fid, name, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ gid = H5.H5Gcreate(fid, name, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
@@ -48,64 +50,81 @@ public class TestH5Gbasic {
return gid;
}
- private final void _deleteFile(String filename) {
+ private final void _deleteFile(String filename)
+ {
File file = new File(filename);
if (file.exists()) {
- try {file.delete();} catch (SecurityException e) {}
+ try {
+ file.delete();
+ }
+ catch (SecurityException e) {
+ }
}
}
@Before
- public void createH5file()
- throws HDF5LibraryException, NullPointerException {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ public void createH5file() throws HDF5LibraryException, NullPointerException
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
- H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
H5.H5Fflush(H5fid, HDF5Constants.H5F_SCOPE_LOCAL);
}
@After
- public void deleteH5file() throws HDF5LibraryException {
+ public void deleteH5file() throws HDF5LibraryException
+ {
if (H5fid > 0) {
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
}
_deleteFile(H5_FILE);
System.out.println();
}
- @Test//(expected = HDF5LibraryException.class)
- public void testH5Gclose_invalid() throws Throwable {
+ @Test //(expected = HDF5LibraryException.class)
+ public void testH5Gclose_invalid() throws Throwable
+ {
long gid = H5.H5Gclose(-1);
assertTrue(gid == 0);
}
@Test(expected = NullPointerException.class)
- public void testH5Gcreate_null() throws Throwable {
+ public void testH5Gcreate_null() throws Throwable
+ {
long gid = HDF5Constants.H5I_INVALID_HID;
// it should fail because the group name is null
- gid = H5.H5Gcreate(H5fid, null, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ gid = H5.H5Gcreate(H5fid, null, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
- try {H5.H5Gclose(gid);} catch (Exception ex) {}
+ try {
+ H5.H5Gclose(gid);
+ }
+ catch (Exception ex) {
+ }
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Gcreate_invalid() throws Throwable {
- H5.H5Gcreate(-1, "Invalid ID", HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ public void testH5Gcreate_invalid() throws Throwable
+ {
+ H5.H5Gcreate(-1, "Invalid ID", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
}
@Test
- public void testH5Gcreate() {
+ public void testH5Gcreate()
+ {
long gid = HDF5Constants.H5I_INVALID_HID;
try {
- gid = H5.H5Gcreate(H5fid, "/testH5Gcreate",
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ gid = H5.H5Gcreate(H5fid, "/testH5Gcreate", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
@@ -113,11 +132,16 @@ public class TestH5Gbasic {
}
assertTrue(gid > 0);
- try {H5.H5Gclose(gid);} catch (Exception ex) {}
+ try {
+ H5.H5Gclose(gid);
+ }
+ catch (Exception ex) {
+ }
}
@Test
- public void testH5Gclose() {
+ public void testH5Gclose()
+ {
long gid = _createGroup(H5fid, "/testH5Gcreate");
assertTrue(gid > 0);
@@ -130,24 +154,28 @@ public class TestH5Gbasic {
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Gcreate_exists() throws Throwable {
+ public void testH5Gcreate_exists() throws Throwable
+ {
long gid = _createGroup(H5fid, "/testH5Gcreate");
assertTrue(gid > 0);
- try {H5.H5Gclose(gid);} catch (Exception ex) {}
+ try {
+ H5.H5Gclose(gid);
+ }
+ catch (Exception ex) {
+ }
// it should failed now because the group already exists in file
- gid = H5.H5Gcreate(H5fid, "/testH5Gcreate",
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ gid = H5.H5Gcreate(H5fid, "/testH5Gcreate", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
}
@Test
- public void testH5Gcreate_anon() {
+ public void testH5Gcreate_anon()
+ {
long gid = HDF5Constants.H5I_INVALID_HID;
try {
- gid = H5.H5Gcreate_anon(H5fid, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ gid = H5.H5Gcreate_anon(H5fid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
@@ -155,42 +183,61 @@ public class TestH5Gbasic {
}
assertTrue(gid > 0);
- try {H5.H5Gclose(gid);} catch (Exception ex) {}
+ try {
+ H5.H5Gclose(gid);
+ }
+ catch (Exception ex) {
+ }
}
@Test(expected = NullPointerException.class)
- public void testH5Gopen_null() throws Throwable {
+ public void testH5Gopen_null() throws Throwable
+ {
long gid = HDF5Constants.H5I_INVALID_HID;
gid = H5.H5Gopen(H5fid, null, HDF5Constants.H5P_DEFAULT);
- try {H5.H5Gclose(gid);} catch (Exception ex) {}
+ try {
+ H5.H5Gclose(gid);
+ }
+ catch (Exception ex) {
+ }
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Gopen_invalid() throws Throwable {
+ public void testH5Gopen_invalid() throws Throwable
+ {
H5.H5Gopen(-1, "Invalid ID", HDF5Constants.H5P_DEFAULT);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Gopen_not_exists() throws Throwable {
+ public void testH5Gopen_not_exists() throws Throwable
+ {
long gid = HDF5Constants.H5I_INVALID_HID;
- gid = H5.H5Gopen(H5fid, "Never_created", HDF5Constants.H5P_DEFAULT);
+ gid = H5.H5Gopen(H5fid, "Never_created", HDF5Constants.H5P_DEFAULT);
- try {H5.H5Gclose(gid);} catch (Exception ex) {}
+ try {
+ H5.H5Gclose(gid);
+ }
+ catch (Exception ex) {
+ }
}
@Test
- public void testH5Gopen() {
+ public void testH5Gopen()
+ {
long gid = _createGroup(H5fid, "/testH5Gcreate");
assertTrue(gid > 0);
- try {H5.H5Gclose(gid);} catch (Exception ex) {}
+ try {
+ H5.H5Gclose(gid);
+ }
+ catch (Exception ex) {
+ }
try {
- gid = H5.H5Gopen(H5fid, "/testH5Gcreate",
- HDF5Constants.H5P_DEFAULT);
+ gid = H5.H5Gopen(H5fid, "/testH5Gcreate", HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
@@ -198,16 +245,22 @@ public class TestH5Gbasic {
}
assertTrue(gid > 0);
- try {H5.H5Gclose(gid);} catch (Exception ex) {}
+ try {
+ H5.H5Gclose(gid);
+ }
+ catch (Exception ex) {
+ }
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Gget_create_plist_invalid() throws Throwable {
+ public void testH5Gget_create_plist_invalid() throws Throwable
+ {
H5.H5Gget_create_plist(-1);
}
@Test
- public void testH5Gget_create_plist() {
+ public void testH5Gget_create_plist()
+ {
long pid = HDF5Constants.H5I_INVALID_HID;
long gid = _createGroup(H5fid, "/testH5Gcreate");
assertTrue(gid > 0);
@@ -216,126 +269,173 @@ public class TestH5Gbasic {
pid = H5.H5Gget_create_plist(gid);
}
catch (Throwable err) {
- try {H5.H5Gclose(gid);} catch (Exception ex) {}
+ try {
+ H5.H5Gclose(gid);
+ }
+ catch (Exception ex) {
+ }
err.printStackTrace();
fail("H5.H5Gget_create_plist: " + err);
}
assertTrue(pid > 0);
- try {H5.H5Pclose(pid);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(pid);
+ }
+ catch (Exception ex) {
+ }
- try {H5.H5Gclose(gid);} catch (Exception ex) {}
+ try {
+ H5.H5Gclose(gid);
+ }
+ catch (Exception ex) {
+ }
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Gget_info_invalid() throws Throwable {
+ public void testH5Gget_info_invalid() throws Throwable
+ {
H5.H5Gget_info(-1);
}
@Test
- public void testH5Gget_info() {
+ public void testH5Gget_info()
+ {
H5G_info_t info = null;
- long gid = _createGroup(H5fid, "/testH5Gcreate");
+ long gid = _createGroup(H5fid, "/testH5Gcreate");
assertTrue(gid > 0);
try {
info = H5.H5Gget_info(gid);
}
catch (Throwable err) {
- try {H5.H5Gclose(gid);} catch (Exception ex) {}
+ try {
+ H5.H5Gclose(gid);
+ }
+ catch (Exception ex) {
+ }
err.printStackTrace();
fail("H5.H5Gget_info: " + err);
}
assertNotNull(info);
- try {H5.H5Gclose(gid);} catch (Exception ex) {}
+ try {
+ H5.H5Gclose(gid);
+ }
+ catch (Exception ex) {
+ }
}
@Test(expected = NullPointerException.class)
- public void testH5Gget_info_by_name_null() throws Throwable {
+ public void testH5Gget_info_by_name_null() throws Throwable
+ {
H5.H5Gget_info_by_name(-1, null, HDF5Constants.H5P_DEFAULT);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Gget_info_by_name_invalid() throws Throwable {
+ public void testH5Gget_info_by_name_invalid() throws Throwable
+ {
H5.H5Gget_info_by_name(-1, "/testH5Gcreate", HDF5Constants.H5P_DEFAULT);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Gget_info_by_name_not_exists() throws Throwable {
- H5.H5Gget_info_by_name(H5fid, "/testH5Gcreate",
- HDF5Constants.H5P_DEFAULT);
+ public void testH5Gget_info_by_name_not_exists() throws Throwable
+ {
+ H5.H5Gget_info_by_name(H5fid, "/testH5Gcreate", HDF5Constants.H5P_DEFAULT);
}
@Test
- public void testH5Gget_info_by_name() {
+ public void testH5Gget_info_by_name()
+ {
H5G_info_t info = null;
- long gid = _createGroup(H5fid, "/testH5Gcreate");
+ long gid = _createGroup(H5fid, "/testH5Gcreate");
assertTrue(gid > 0);
try {
- info = H5.H5Gget_info_by_name(gid, "/testH5Gcreate",
- HDF5Constants.H5P_DEFAULT);
+ info = H5.H5Gget_info_by_name(gid, "/testH5Gcreate", HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
- try {H5.H5Gclose(gid);} catch (Exception ex) {}
+ try {
+ H5.H5Gclose(gid);
+ }
+ catch (Exception ex) {
+ }
err.printStackTrace();
fail("H5.H5Gget_info_by_name: " + err);
}
assertNotNull(info);
- try {H5.H5Gclose(gid);} catch (Exception ex) {}
+ try {
+ H5.H5Gclose(gid);
+ }
+ catch (Exception ex) {
+ }
}
@Test
- public void testH5Gget_info_by_name_fileid() {
+ public void testH5Gget_info_by_name_fileid()
+ {
H5G_info_t info = null;
- long gid = _createGroup(H5fid, "/testH5Gcreate");
+ long gid = _createGroup(H5fid, "/testH5Gcreate");
assertTrue(gid > 0);
- try {H5.H5Gclose(gid);} catch (Exception ex) {}
+ try {
+ H5.H5Gclose(gid);
+ }
+ catch (Exception ex) {
+ }
try {
- info = H5.H5Gget_info_by_name(H5fid, "/testH5Gcreate",
- HDF5Constants.H5P_DEFAULT);
+ info = H5.H5Gget_info_by_name(H5fid, "/testH5Gcreate", HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
- try {H5.H5Gclose(gid);} catch (Exception ex) {}
+ try {
+ H5.H5Gclose(gid);
+ }
+ catch (Exception ex) {
+ }
err.printStackTrace();
fail("H5.H5Gget_info_by_name: " + err);
}
assertNotNull(info);
- try {H5.H5Gclose(gid);} catch (Exception ex) {}
+ try {
+ H5.H5Gclose(gid);
+ }
+ catch (Exception ex) {
+ }
}
@Test(expected = NullPointerException.class)
- public void testH5Gget_info_by_idx_null() throws Throwable {
- H5.H5Gget_info_by_idx(-1, null, HDF5Constants.H5_INDEX_NAME,
- HDF5Constants.H5_ITER_INC, 1L, HDF5Constants.H5P_DEFAULT);
+ public void testH5Gget_info_by_idx_null() throws Throwable
+ {
+ H5.H5Gget_info_by_idx(-1, null, HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 1L,
+ HDF5Constants.H5P_DEFAULT);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Gget_info_by_idx_invalid() throws Throwable {
- H5.H5Gget_info_by_idx(-1, "/testH5Gcreate", HDF5Constants.H5_INDEX_NAME,
- HDF5Constants.H5_ITER_INC, 1L, HDF5Constants.H5P_DEFAULT);
+ public void testH5Gget_info_by_idx_invalid() throws Throwable
+ {
+ H5.H5Gget_info_by_idx(-1, "/testH5Gcreate", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC,
+ 1L, HDF5Constants.H5P_DEFAULT);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Gget_info_by_idx_not_exists() throws Throwable {
- H5.H5Gget_info_by_idx(H5fid, "/testH5Gcreate",
- HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 1L,
- HDF5Constants.H5P_DEFAULT);
+ public void testH5Gget_info_by_idx_not_exists() throws Throwable
+ {
+ H5.H5Gget_info_by_idx(H5fid, "/testH5Gcreate", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC,
+ 1L, HDF5Constants.H5P_DEFAULT);
}
@Test
- public void testH5Gget_info_by_idx() {
+ public void testH5Gget_info_by_idx()
+ {
H5G_info_t info = null;
- long gid = _createGroup(H5fid, "/testH5Gcreate");
+ long gid = _createGroup(H5fid, "/testH5Gcreate");
assertTrue(gid > 0);
try {
- info = H5.H5Gget_info_by_idx(gid, "/", HDF5Constants.H5_INDEX_NAME,
- HDF5Constants.H5_ITER_INC, 0, HDF5Constants.H5P_DEFAULT);
+ info = H5.H5Gget_info_by_idx(gid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 0,
+ HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
@@ -343,20 +443,28 @@ public class TestH5Gbasic {
}
assertNotNull(info);
- try {H5.H5Gclose(gid);} catch (Exception ex) {}
+ try {
+ H5.H5Gclose(gid);
+ }
+ catch (Exception ex) {
+ }
}
@Test
- public void testH5Gget_info_by_idx_fileid() {
+ public void testH5Gget_info_by_idx_fileid()
+ {
H5G_info_t info = null;
- long gid = _createGroup(H5fid, "/testH5Gcreate");
+ long gid = _createGroup(H5fid, "/testH5Gcreate");
assertTrue(gid > 0);
- try {H5.H5Gclose(gid);} catch (Exception ex) {}
+ try {
+ H5.H5Gclose(gid);
+ }
+ catch (Exception ex) {
+ }
try {
- info = H5.H5Gget_info_by_idx(H5fid, "/",
- HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 0,
- HDF5Constants.H5P_DEFAULT);
+ info = H5.H5Gget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC,
+ 0, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
@@ -366,13 +474,14 @@ public class TestH5Gbasic {
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Gflush_invalid() throws Throwable {
+ public void testH5Gflush_invalid() throws Throwable
+ {
H5.H5Gflush(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Grefresh_invalid() throws Throwable {
+ public void testH5Grefresh_invalid() throws Throwable
+ {
H5.H5Grefresh(-1);
}
-
}
diff --git a/java/test/TestH5Giterate.java b/java/test/TestH5Giterate.java
index 388d2ac..eb4b5bf 100644
--- a/java/test/TestH5Giterate.java
+++ b/java/test/TestH5Giterate.java
@@ -15,6 +15,7 @@ package test;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
+
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
@@ -28,11 +29,13 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5Giterate {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
private static final String H5_FILE = "h5ex_g_iterate.hdf";
- long H5fid = HDF5Constants.H5I_INVALID_HID;
+ long H5fid = HDF5Constants.H5I_INVALID_HID;
- private final long _openGroup(long fid, String name) {
+ private final long _openGroup(long fid, String name)
+ {
long gid = HDF5Constants.H5I_INVALID_HID;
try {
gid = H5.H5Gopen(fid, name, HDF5Constants.H5P_DEFAULT);
@@ -47,14 +50,13 @@ public class TestH5Giterate {
}
@Before
- public void openH5file()
- throws HDF5LibraryException, NullPointerException {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ public void openH5file() throws HDF5LibraryException, NullPointerException
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
try {
- H5fid = H5.H5Fopen(H5_FILE, HDF5Constants.H5F_ACC_RDONLY,
- HDF5Constants.H5P_DEFAULT);
+ H5fid = H5.H5Fopen(H5_FILE, HDF5Constants.H5F_ACC_RDONLY, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
@@ -63,15 +65,21 @@ public class TestH5Giterate {
}
@After
- public void deleteH5file() throws HDF5LibraryException {
+ public void deleteH5file() throws HDF5LibraryException
+ {
if (H5fid > 0) {
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
}
System.out.println();
}
@Test
- public void testH5Gget_obj_info_all() {
+ public void testH5Gget_obj_info_all()
+ {
H5G_info_t info = null;
long gid = _openGroup(H5fid, "/");
@@ -90,45 +98,46 @@ public class TestH5Giterate {
}
assertNotNull(info);
assertTrue("number of links is empty", info.nlinks > 0);
- String objNames[] = new String[(int) info.nlinks];
- int objTypes[] = new int[(int) info.nlinks];
- int lnkTypes[] = new int[(int) info.nlinks];
- H5O_token_t objTokens[] = new H5O_token_t[(int) info.nlinks];
+ String objNames[] = new String[(int)info.nlinks];
+ int objTypes[] = new int[(int)info.nlinks];
+ int lnkTypes[] = new int[(int)info.nlinks];
+ H5O_token_t objTokens[] = new H5O_token_t[(int)info.nlinks];
int names_found = 0;
try {
- names_found = H5.H5Gget_obj_info_all(H5fid, "/", objNames,
- objTypes, lnkTypes, objTokens, HDF5Constants.H5_INDEX_NAME);
+ names_found = H5.H5Gget_obj_info_all(H5fid, "/", objNames, objTypes, lnkTypes, objTokens,
+ HDF5Constants.H5_INDEX_NAME);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Gget_obj_info_all: " + err);
}
- assertTrue("number found[" + names_found + "] different than expected["
- + objNames.length + "]", names_found == objNames.length);
+ assertTrue("number found[" + names_found + "] different than expected[" + objNames.length + "]",
+ names_found == objNames.length);
for (int i = 0; i < objNames.length; i++) {
assertNotNull("name #" + i + " does not exist", objNames[i]);
assertTrue(objNames[i].length() > 0);
- if (objTypes[i]==HDF5Constants.H5O_TYPE_GROUP) {
- assertTrue("Group is index: "+i + " ",i==2);
- assertTrue("Group is : "+objNames[i] + " ",objNames[i].compareToIgnoreCase("G1")==0);
+ if (objTypes[i] == HDF5Constants.H5O_TYPE_GROUP) {
+ assertTrue("Group is index: " + i + " ", i == 2);
+ assertTrue("Group is : " + objNames[i] + " ", objNames[i].compareToIgnoreCase("G1") == 0);
}
- else if (objTypes[i]==HDF5Constants.H5O_TYPE_DATASET) {
- assertTrue("Dataset is index: "+i + " ",(i==0)||(i==3));
- if(i==0)
- assertTrue("Dataset is : "+objNames[i] + " ",objNames[i].compareToIgnoreCase("DS1")==0);
+ else if (objTypes[i] == HDF5Constants.H5O_TYPE_DATASET) {
+ assertTrue("Dataset is index: " + i + " ", (i == 0) || (i == 3));
+ if (i == 0)
+ assertTrue("Dataset is : " + objNames[i] + " ",
+ objNames[i].compareToIgnoreCase("DS1") == 0);
else
- assertTrue("Dataset is : "+objNames[i] + " ",objNames[i].compareToIgnoreCase("L1")==0);
+ assertTrue("Dataset is : " + objNames[i] + " ",
+ objNames[i].compareToIgnoreCase("L1") == 0);
}
- else if (objTypes[i]==HDF5Constants.H5O_TYPE_NAMED_DATATYPE) {
- assertTrue("Datatype is index: "+i + " ",i==1);
- assertTrue("Datatype is : "+objNames[i] + " ",objNames[i].compareToIgnoreCase("DT1")==0);
+ else if (objTypes[i] == HDF5Constants.H5O_TYPE_NAMED_DATATYPE) {
+ assertTrue("Datatype is index: " + i + " ", i == 1);
+ assertTrue("Datatype is : " + objNames[i] + " ", objNames[i].compareToIgnoreCase("DT1") == 0);
}
else {
fail(" Unknown at index: " + i + " " + objNames[i]);
}
}
}
-
}
diff --git a/java/test/TestH5Lbasic.java b/java/test/TestH5Lbasic.java
index a28fc3d..c81545b 100644
--- a/java/test/TestH5Lbasic.java
+++ b/java/test/TestH5Lbasic.java
@@ -20,8 +20,8 @@ import java.util.ArrayList;
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
-import hdf.hdf5lib.callbacks.H5L_iterate_t;
import hdf.hdf5lib.callbacks.H5L_iterate_opdata_t;
+import hdf.hdf5lib.callbacks.H5L_iterate_t;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
import hdf.hdf5lib.structs.H5L_info_t;
@@ -32,19 +32,19 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5Lbasic {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
private static final String H5_FILE = "h5ex_g_iterateL1.hdf";
- long H5fid = HDF5Constants.H5I_INVALID_HID;
+ long H5fid = HDF5Constants.H5I_INVALID_HID;
@Before
- public void openH5file()
- throws HDF5LibraryException, NullPointerException {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ public void openH5file() throws HDF5LibraryException, NullPointerException
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
try {
- H5fid = H5.H5Fopen(H5_FILE, HDF5Constants.H5F_ACC_RDONLY,
- HDF5Constants.H5P_DEFAULT);
+ H5fid = H5.H5Fopen(H5_FILE, HDF5Constants.H5F_ACC_RDONLY, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
@@ -53,15 +53,21 @@ public class TestH5Lbasic {
}
@After
- public void closeH5file() throws HDF5LibraryException {
+ public void closeH5file() throws HDF5LibraryException
+ {
if (H5fid > 0) {
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
}
System.out.println();
}
@Test
- public void testH5Lexists() {
+ public void testH5Lexists()
+ {
boolean link_exists = false;
try {
link_exists = H5.H5Lexists(H5fid, "None", HDF5Constants.H5P_DEFAULT);
@@ -70,7 +76,7 @@ public class TestH5Lbasic {
err.printStackTrace();
fail("H5.H5Lexists: " + err);
}
- assertFalse("H5Lexists ",link_exists);
+ assertFalse("H5Lexists ", link_exists);
try {
link_exists = H5.H5Lexists(H5fid, "DS1", HDF5Constants.H5P_DEFAULT);
}
@@ -78,7 +84,7 @@ public class TestH5Lbasic {
err.printStackTrace();
fail("H5.H5Lexists: " + err);
}
- assertTrue("H5Lexists ",link_exists);
+ assertTrue("H5Lexists ", link_exists);
try {
link_exists = H5.H5Lexists(H5fid, "G1/DS2", HDF5Constants.H5P_DEFAULT);
}
@@ -86,16 +92,18 @@ public class TestH5Lbasic {
err.printStackTrace();
fail("H5.H5Lexists: " + err);
}
- assertTrue("H5Lexists ",link_exists);
+ assertTrue("H5Lexists ", link_exists);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Lget_info_not_exist() throws Throwable {
+ public void testH5Lget_info_not_exist() throws Throwable
+ {
H5.H5Lget_info(H5fid, "None", HDF5Constants.H5P_DEFAULT);
}
@Test
- public void testH5Lget_info_dataset() {
+ public void testH5Lget_info_dataset()
+ {
H5L_info_t link_info = null;
try {
link_info = H5.H5Lget_info(H5fid, "DS1", HDF5Constants.H5P_DEFAULT);
@@ -104,12 +112,13 @@ public class TestH5Lbasic {
err.printStackTrace();
fail("H5.H5Lget_info: " + err);
}
- assertFalse("H5Lget_info ",link_info==null);
- assertTrue("H5Lget_info link type",link_info.type==HDF5Constants.H5L_TYPE_HARD);
+ assertFalse("H5Lget_info ", link_info == null);
+ assertTrue("H5Lget_info link type", link_info.type == HDF5Constants.H5L_TYPE_HARD);
}
@Test
- public void testH5Lget_info_hardlink() {
+ public void testH5Lget_info_hardlink()
+ {
H5L_info_t link_info = null;
try {
link_info = H5.H5Lget_info(H5fid, "L1", HDF5Constants.H5P_DEFAULT);
@@ -118,43 +127,53 @@ public class TestH5Lbasic {
err.printStackTrace();
fail("H5.H5Lget_info: " + err);
}
- assertFalse("H5Lget_info",link_info==null);
- assertTrue("H5Lget_info link type",link_info.type==HDF5Constants.H5L_TYPE_HARD);
+ assertFalse("H5Lget_info", link_info == null);
+ assertTrue("H5Lget_info link type", link_info.type == HDF5Constants.H5L_TYPE_HARD);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Lget_info_by_idx_name_not_exist_name() throws Throwable {
- H5.H5Lget_info_by_idx(H5fid, "None", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 0, HDF5Constants.H5P_DEFAULT);
+ public void testH5Lget_info_by_idx_name_not_exist_name() throws Throwable
+ {
+ H5.H5Lget_info_by_idx(H5fid, "None", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 0,
+ HDF5Constants.H5P_DEFAULT);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Lget_info_by_idx_name_not_exist_create() throws Throwable {
- H5.H5Lget_info_by_idx(H5fid, "None", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 0, HDF5Constants.H5P_DEFAULT);
+ public void testH5Lget_info_by_idx_name_not_exist_create() throws Throwable
+ {
+ H5.H5Lget_info_by_idx(H5fid, "None", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 0,
+ HDF5Constants.H5P_DEFAULT);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Lget_info_by_idx_not_exist_name() throws Throwable {
- H5.H5Lget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 5, HDF5Constants.H5P_DEFAULT);
+ public void testH5Lget_info_by_idx_not_exist_name() throws Throwable
+ {
+ H5.H5Lget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 5,
+ HDF5Constants.H5P_DEFAULT);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Lget_info_by_idx_not_exist_create() throws Throwable {
- H5.H5Lget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 5, HDF5Constants.H5P_DEFAULT);
+ public void testH5Lget_info_by_idx_not_exist_create() throws Throwable
+ {
+ H5.H5Lget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 5,
+ HDF5Constants.H5P_DEFAULT);
}
@Test
- public void testH5Lget_info_by_idx_n0() {
- H5L_info_t link_info = null;
+ public void testH5Lget_info_by_idx_n0()
+ {
+ H5L_info_t link_info = null;
H5L_info_t link_info2 = null;
try {
- link_info = H5.H5Lget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 0, HDF5Constants.H5P_DEFAULT);
+ link_info = H5.H5Lget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME,
+ HDF5Constants.H5_ITER_INC, 0, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Lget_info_by_idx: " + err);
}
- assertFalse("H5Lget_info_by_idx",link_info==null);
- assertTrue("H5Lget_info_by_idx link type",link_info.type==HDF5Constants.H5L_TYPE_HARD);
+ assertFalse("H5Lget_info_by_idx", link_info == null);
+ assertTrue("H5Lget_info_by_idx link type", link_info.type == HDF5Constants.H5L_TYPE_HARD);
try {
link_info2 = H5.H5Lget_info(H5fid, "DS1", HDF5Constants.H5P_DEFAULT);
}
@@ -166,18 +185,20 @@ public class TestH5Lbasic {
}
@Test
- public void testH5Lget_info_by_idx_n3() {
- H5L_info_t link_info = null;
+ public void testH5Lget_info_by_idx_n3()
+ {
+ H5L_info_t link_info = null;
H5L_info_t link_info2 = null;
try {
- link_info = H5.H5Lget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 3, HDF5Constants.H5P_DEFAULT);
+ link_info = H5.H5Lget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME,
+ HDF5Constants.H5_ITER_INC, 3, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Lget_info_by_idx: " + err);
}
- assertFalse("H5Lget_info_by_idx",link_info==null);
- assertTrue("H5Lget_info_by_idx link type",link_info.type==HDF5Constants.H5L_TYPE_HARD);
+ assertFalse("H5Lget_info_by_idx", link_info == null);
+ assertTrue("H5Lget_info_by_idx link type", link_info.type == HDF5Constants.H5L_TYPE_HARD);
try {
link_info2 = H5.H5Lget_info(H5fid, "L1", HDF5Constants.H5P_DEFAULT);
}
@@ -189,44 +210,52 @@ public class TestH5Lbasic {
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Lget_name_by_idx_not_exist() throws Throwable {
- H5.H5Lget_name_by_idx(H5fid, "None", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 0, HDF5Constants.H5P_DEFAULT);
+ public void testH5Lget_name_by_idx_not_exist() throws Throwable
+ {
+ H5.H5Lget_name_by_idx(H5fid, "None", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 0,
+ HDF5Constants.H5P_DEFAULT);
}
@Test
- public void testH5Lget_name_by_idx_n0() {
+ public void testH5Lget_name_by_idx_n0()
+ {
String link_name = null;
try {
- link_name = H5.H5Lget_name_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 0, HDF5Constants.H5P_DEFAULT);
+ link_name = H5.H5Lget_name_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME,
+ HDF5Constants.H5_ITER_INC, 0, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Lget_name_by_idx: " + err);
}
- assertFalse("H5Lget_name_by_idx ",link_name==null);
- assertTrue("Link Name ",link_name.compareTo("DS1")==0);
+ assertFalse("H5Lget_name_by_idx ", link_name == null);
+ assertTrue("Link Name ", link_name.compareTo("DS1") == 0);
}
@Test
- public void testH5Lget_name_by_idx_n3() {
+ public void testH5Lget_name_by_idx_n3()
+ {
String link_name = null;
try {
- link_name = H5.H5Lget_name_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 3, HDF5Constants.H5P_DEFAULT);
+ link_name = H5.H5Lget_name_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME,
+ HDF5Constants.H5_ITER_INC, 3, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Lget_name_by_idx: " + err);
}
- assertFalse("H5Lget_name_by_idx ",link_name==null);
- assertTrue("Link Name ",link_name.compareTo("L1")==0);
+ assertFalse("H5Lget_name_by_idx ", link_name == null);
+ assertTrue("Link Name ", link_name.compareTo("L1") == 0);
}
@Test
- public void testH5Lvisit() {
+ public void testH5Lvisit()
+ {
class idata {
public String link_name = null;
- public int link_type = -1;
- idata(String name, int type) {
+ public int link_type = -1;
+ idata(String name, int type)
+ {
this.link_name = name;
this.link_type = type;
}
@@ -236,7 +265,8 @@ public class TestH5Lbasic {
}
H5L_iterate_opdata_t iter_data = new H5L_iter_data();
class H5L_iter_callback implements H5L_iterate_t {
- public int callback(long group, String name, H5L_info_t info, H5L_iterate_opdata_t op_data) {
+ public int callback(long group, String name, H5L_info_t info, H5L_iterate_opdata_t op_data)
+ {
idata id = new idata(name, info.type);
((H5L_iter_data)op_data).iterdata.add(id);
return 0;
@@ -250,21 +280,29 @@ public class TestH5Lbasic {
err.printStackTrace();
fail("H5.H5Lvisit: " + err);
}
- assertFalse("H5Lvisit ",((H5L_iter_data)iter_data).iterdata.isEmpty());
- assertTrue("H5Lvisit "+((H5L_iter_data)iter_data).iterdata.size(),((H5L_iter_data)iter_data).iterdata.size()==5);
- assertTrue("H5Lvisit "+(((H5L_iter_data)iter_data).iterdata.get(0)).link_name,(((H5L_iter_data)iter_data).iterdata.get(0)).link_name.compareToIgnoreCase("DS1")==0);
- assertTrue("H5Lvisit "+(((H5L_iter_data)iter_data).iterdata.get(1)).link_name,(((H5L_iter_data)iter_data).iterdata.get(1)).link_name.compareToIgnoreCase("DT1")==0);
- assertTrue("H5Lvisit "+(((H5L_iter_data)iter_data).iterdata.get(2)).link_name,(((H5L_iter_data)iter_data).iterdata.get(2)).link_name.compareToIgnoreCase("G1")==0);
- assertTrue("H5Lvisit "+(((H5L_iter_data)iter_data).iterdata.get(3)).link_name,(((H5L_iter_data)iter_data).iterdata.get(3)).link_name.compareToIgnoreCase("G1/DS2")==0);
- assertTrue("H5Lvisit "+(((H5L_iter_data)iter_data).iterdata.get(4)).link_name,(((H5L_iter_data)iter_data).iterdata.get(4)).link_name.compareToIgnoreCase("L1")==0);
+ assertFalse("H5Lvisit ", ((H5L_iter_data)iter_data).iterdata.isEmpty());
+ assertTrue("H5Lvisit " + ((H5L_iter_data)iter_data).iterdata.size(),
+ ((H5L_iter_data)iter_data).iterdata.size() == 5);
+ assertTrue("H5Lvisit " + (((H5L_iter_data)iter_data).iterdata.get(0)).link_name,
+ (((H5L_iter_data)iter_data).iterdata.get(0)).link_name.compareToIgnoreCase("DS1") == 0);
+ assertTrue("H5Lvisit " + (((H5L_iter_data)iter_data).iterdata.get(1)).link_name,
+ (((H5L_iter_data)iter_data).iterdata.get(1)).link_name.compareToIgnoreCase("DT1") == 0);
+ assertTrue("H5Lvisit " + (((H5L_iter_data)iter_data).iterdata.get(2)).link_name,
+ (((H5L_iter_data)iter_data).iterdata.get(2)).link_name.compareToIgnoreCase("G1") == 0);
+ assertTrue("H5Lvisit " + (((H5L_iter_data)iter_data).iterdata.get(3)).link_name,
+ (((H5L_iter_data)iter_data).iterdata.get(3)).link_name.compareToIgnoreCase("G1/DS2") == 0);
+ assertTrue("H5Lvisit " + (((H5L_iter_data)iter_data).iterdata.get(4)).link_name,
+ (((H5L_iter_data)iter_data).iterdata.get(4)).link_name.compareToIgnoreCase("L1") == 0);
}
@Test
- public void testH5Lvisit_by_name() {
+ public void testH5Lvisit_by_name()
+ {
class idata {
public String link_name = null;
- public int link_type = -1;
- idata(String name, int type) {
+ public int link_type = -1;
+ idata(String name, int type)
+ {
this.link_name = name;
this.link_type = type;
}
@@ -274,7 +312,8 @@ public class TestH5Lbasic {
}
H5L_iterate_opdata_t iter_data = new H5L_iter_data();
class H5L_iter_callback implements H5L_iterate_t {
- public int callback(long group, String name, H5L_info_t info, H5L_iterate_opdata_t op_data) {
+ public int callback(long group, String name, H5L_info_t info, H5L_iterate_opdata_t op_data)
+ {
idata id = new idata(name, info.type);
((H5L_iter_data)op_data).iterdata.add(id);
return 0;
@@ -282,23 +321,28 @@ public class TestH5Lbasic {
}
H5L_iterate_t iter_cb = new H5L_iter_callback();
try {
- H5.H5Lvisit_by_name(H5fid, "G1", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, iter_cb, iter_data, HDF5Constants.H5P_DEFAULT);
+ H5.H5Lvisit_by_name(H5fid, "G1", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, iter_cb,
+ iter_data, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Lvisit_by_name: " + err);
}
- assertFalse("H5Lvisit_by_name ",((H5L_iter_data)iter_data).iterdata.isEmpty());
- assertTrue("H5Lvisit_by_name "+((H5L_iter_data)iter_data).iterdata.size(),((H5L_iter_data)iter_data).iterdata.size()==1);
- assertTrue("H5Lvisit_by_name "+(((H5L_iter_data)iter_data).iterdata.get(0)).link_name,(((H5L_iter_data)iter_data).iterdata.get(0)).link_name.compareToIgnoreCase("DS2")==0);
+ assertFalse("H5Lvisit_by_name ", ((H5L_iter_data)iter_data).iterdata.isEmpty());
+ assertTrue("H5Lvisit_by_name " + ((H5L_iter_data)iter_data).iterdata.size(),
+ ((H5L_iter_data)iter_data).iterdata.size() == 1);
+ assertTrue("H5Lvisit_by_name " + (((H5L_iter_data)iter_data).iterdata.get(0)).link_name,
+ (((H5L_iter_data)iter_data).iterdata.get(0)).link_name.compareToIgnoreCase("DS2") == 0);
}
@Test
- public void testH5Literate() {
+ public void testH5Literate()
+ {
class idata {
public String link_name = null;
- public int link_type = -1;
- idata(String name, int type) {
+ public int link_type = -1;
+ idata(String name, int type)
+ {
this.link_name = name;
this.link_type = type;
}
@@ -308,7 +352,8 @@ public class TestH5Lbasic {
}
H5L_iterate_opdata_t iter_data = new H5L_iter_data();
class H5L_iter_callback implements H5L_iterate_t {
- public int callback(long group, String name, H5L_info_t info, H5L_iterate_opdata_t op_data) {
+ public int callback(long group, String name, H5L_info_t info, H5L_iterate_opdata_t op_data)
+ {
idata id = new idata(name, info.type);
((H5L_iter_data)op_data).iterdata.add(id);
return 0;
@@ -316,26 +361,35 @@ public class TestH5Lbasic {
}
H5L_iterate_t iter_cb = new H5L_iter_callback();
try {
- H5.H5Literate(H5fid, HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 0L, iter_cb, iter_data);
+ H5.H5Literate(H5fid, HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 0L, iter_cb,
+ iter_data);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Literate: " + err);
}
- assertFalse("H5Literate ",((H5L_iter_data)iter_data).iterdata.isEmpty());
- assertTrue("H5Literate "+((H5L_iter_data)iter_data).iterdata.size(),((H5L_iter_data)iter_data).iterdata.size()==4);
- assertTrue("H5Literate "+(((H5L_iter_data)iter_data).iterdata.get(0)).link_name,(((H5L_iter_data)iter_data).iterdata.get(0)).link_name.compareToIgnoreCase("DS1")==0);
- assertTrue("H5Literate "+(((H5L_iter_data)iter_data).iterdata.get(1)).link_name,(((H5L_iter_data)iter_data).iterdata.get(1)).link_name.compareToIgnoreCase("DT1")==0);
- assertTrue("H5Literate "+((idata)((H5L_iter_data)iter_data).iterdata.get(2)).link_name,(((H5L_iter_data)iter_data).iterdata.get(2)).link_name.compareToIgnoreCase("G1")==0);
- assertTrue("H5Literate "+((idata)((H5L_iter_data)iter_data).iterdata.get(3)).link_name,((idata)((H5L_iter_data)iter_data).iterdata.get(3)).link_name.compareToIgnoreCase("L1")==0);
+ assertFalse("H5Literate ", ((H5L_iter_data)iter_data).iterdata.isEmpty());
+ assertTrue("H5Literate " + ((H5L_iter_data)iter_data).iterdata.size(),
+ ((H5L_iter_data)iter_data).iterdata.size() == 4);
+ assertTrue("H5Literate " + (((H5L_iter_data)iter_data).iterdata.get(0)).link_name,
+ (((H5L_iter_data)iter_data).iterdata.get(0)).link_name.compareToIgnoreCase("DS1") == 0);
+ assertTrue("H5Literate " + (((H5L_iter_data)iter_data).iterdata.get(1)).link_name,
+ (((H5L_iter_data)iter_data).iterdata.get(1)).link_name.compareToIgnoreCase("DT1") == 0);
+ assertTrue("H5Literate " + ((idata)((H5L_iter_data)iter_data).iterdata.get(2)).link_name,
+ (((H5L_iter_data)iter_data).iterdata.get(2)).link_name.compareToIgnoreCase("G1") == 0);
+ assertTrue("H5Literate " + ((idata)((H5L_iter_data)iter_data).iterdata.get(3)).link_name,
+ ((idata)((H5L_iter_data)iter_data).iterdata.get(3)).link_name.compareToIgnoreCase("L1") ==
+ 0);
}
@Test
- public void testH5Literate_by_name() {
+ public void testH5Literate_by_name()
+ {
class idata {
public String link_name = null;
- public int link_type = -1;
- idata(String name, int type) {
+ public int link_type = -1;
+ idata(String name, int type)
+ {
this.link_name = name;
this.link_type = type;
}
@@ -345,7 +399,8 @@ public class TestH5Lbasic {
}
H5L_iterate_opdata_t iter_data = new H5L_iter_data();
class H5L_iter_callback implements H5L_iterate_t {
- public int callback(long group, String name, H5L_info_t info, H5L_iterate_opdata_t op_data) {
+ public int callback(long group, String name, H5L_info_t info, H5L_iterate_opdata_t op_data)
+ {
idata id = new idata(name, info.type);
((H5L_iter_data)op_data).iterdata.add(id);
return 0;
@@ -353,15 +408,18 @@ public class TestH5Lbasic {
}
H5L_iterate_t iter_cb = new H5L_iter_callback();
try {
- H5.H5Literate_by_name(H5fid, "G1", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 0L, iter_cb, iter_data, HDF5Constants.H5P_DEFAULT);
+ H5.H5Literate_by_name(H5fid, "G1", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 0L,
+ iter_cb, iter_data, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Literate_by_name: " + err);
}
- assertFalse("H5Literate_by_name ",((H5L_iter_data)iter_data).iterdata.isEmpty());
- assertTrue("H5Literate_by_name "+((H5L_iter_data)iter_data).iterdata.size(),((H5L_iter_data)iter_data).iterdata.size()==1);
- assertTrue("H5Literate_by_name "+((idata)((H5L_iter_data)iter_data).iterdata.get(0)).link_name,((idata)((H5L_iter_data)iter_data).iterdata.get(0)).link_name.compareToIgnoreCase("DS2")==0);
+ assertFalse("H5Literate_by_name ", ((H5L_iter_data)iter_data).iterdata.isEmpty());
+ assertTrue("H5Literate_by_name " + ((H5L_iter_data)iter_data).iterdata.size(),
+ ((H5L_iter_data)iter_data).iterdata.size() == 1);
+ assertTrue("H5Literate_by_name " + ((idata)((H5L_iter_data)iter_data).iterdata.get(0)).link_name,
+ ((idata)((H5L_iter_data)iter_data).iterdata.get(0)).link_name.compareToIgnoreCase("DS2") ==
+ 0);
}
-
}
diff --git a/java/test/TestH5Lcreate.java b/java/test/TestH5Lcreate.java
index 44af2e5..822323e 100644
--- a/java/test/TestH5Lcreate.java
+++ b/java/test/TestH5Lcreate.java
@@ -21,8 +21,8 @@ import java.util.ArrayList;
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
-import hdf.hdf5lib.callbacks.H5L_iterate_t;
import hdf.hdf5lib.callbacks.H5L_iterate_opdata_t;
+import hdf.hdf5lib.callbacks.H5L_iterate_t;
import hdf.hdf5lib.exceptions.HDF5Exception;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
import hdf.hdf5lib.structs.H5L_info_t;
@@ -35,21 +35,23 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5Lcreate {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
private static final String H5_EXTFILE = "h5ex_g_iterateL2.hdf";
- private static final String H5_FILE = "testL.h5";
- private static final int DIM_X = 4;
- private static final int DIM_Y = 6;
- long H5fcpl = HDF5Constants.H5I_INVALID_HID;
- long H5fid = HDF5Constants.H5I_INVALID_HID;
- long H5dsid = HDF5Constants.H5I_INVALID_HID;
- long H5did1 = HDF5Constants.H5I_INVALID_HID;
- long H5did2 = HDF5Constants.H5I_INVALID_HID;
- long H5gcpl = HDF5Constants.H5I_INVALID_HID;
- long H5gid = HDF5Constants.H5I_INVALID_HID;
- long[] H5dims = { DIM_X, DIM_Y };
-
- private final void _deleteFile(String filename) {
+ private static final String H5_FILE = "testL.h5";
+ private static final int DIM_X = 4;
+ private static final int DIM_Y = 6;
+ long H5fcpl = HDF5Constants.H5I_INVALID_HID;
+ long H5fid = HDF5Constants.H5I_INVALID_HID;
+ long H5dsid = HDF5Constants.H5I_INVALID_HID;
+ long H5did1 = HDF5Constants.H5I_INVALID_HID;
+ long H5did2 = HDF5Constants.H5I_INVALID_HID;
+ long H5gcpl = HDF5Constants.H5I_INVALID_HID;
+ long H5gid = HDF5Constants.H5I_INVALID_HID;
+ long[] H5dims = {DIM_X, DIM_Y};
+
+ private final void _deleteFile(String filename)
+ {
File file = new File(filename);
if (file.exists()) {
@@ -62,39 +64,41 @@ public class TestH5Lcreate {
}
}
- private final long _createDataset(long fid, long dsid, String name, long dapl) {
+ private final long _createDataset(long fid, long dsid, String name, long dapl)
+ {
long did = HDF5Constants.H5I_INVALID_HID;
try {
- did = H5.H5Dcreate(fid, name,
- HDF5Constants.H5T_STD_I32BE, dsid,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, dapl);
+ did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32BE, dsid, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, dapl);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Dcreate: " + err);
}
- assertTrue("TestH5L._createDataset: ",did > 0);
+ assertTrue("TestH5L._createDataset: ", did > 0);
return did;
}
- private final long _createGroup(long fid, String name) {
+ private final long _createGroup(long fid, String name)
+ {
long gid = HDF5Constants.H5I_INVALID_HID;
try {
H5gcpl = HDF5Constants.H5P_DEFAULT;
- gid = H5.H5Gcreate(fid, name, HDF5Constants.H5P_DEFAULT,
- H5gcpl, HDF5Constants.H5P_DEFAULT);
+ gid = H5.H5Gcreate(fid, name, HDF5Constants.H5P_DEFAULT, H5gcpl, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Gcreate: " + err);
}
- assertTrue("TestH5L._createGroup: ",gid > 0);
+ assertTrue("TestH5L._createGroup: ", gid > 0);
return gid;
}
- private final void _createHardLink(long fid, long cid, String curname, long did, String dstname, long lcpl, long lapl) {
+ private final void _createHardLink(long fid, long cid, String curname, long did, String dstname,
+ long lcpl, long lapl)
+ {
boolean link_exists = false;
try {
H5.H5Lcreate_hard(cid, curname, did, dstname, lcpl, lapl);
@@ -108,7 +112,9 @@ public class TestH5Lcreate {
assertTrue("TestH5L._createHardLink ", link_exists);
}
- private final void _createSoftLink(long fid, String curname, long did, String dstname, long lcpl, long lapl) {
+ private final void _createSoftLink(long fid, String curname, long did, String dstname, long lcpl,
+ long lapl)
+ {
boolean link_exists = false;
try {
H5.H5Lcreate_soft(curname, did, dstname, lcpl, lapl);
@@ -122,7 +128,9 @@ public class TestH5Lcreate {
assertTrue("TestH5L._createSoftLink ", link_exists);
}
- private final void _createExternalLink(long fid, String ext_filename, String curname, long did, String dstname, long lcpl, long lapl) {
+ private final void _createExternalLink(long fid, String ext_filename, String curname, long did,
+ String dstname, long lcpl, long lapl)
+ {
boolean link_exists = false;
try {
H5.H5Lcreate_external(ext_filename, curname, did, dstname, lcpl, lapl);
@@ -137,111 +145,149 @@ public class TestH5Lcreate {
}
@Before
- public void createH5file()
- throws NullPointerException, HDF5Exception {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ public void createH5file() throws NullPointerException, HDF5Exception
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
try {
H5fcpl = H5.H5Pcreate(HDF5Constants.H5P_FILE_CREATE);
- H5.H5Pset_link_creation_order(H5fcpl, HDF5Constants.H5P_CRT_ORDER_TRACKED+HDF5Constants.H5P_CRT_ORDER_INDEXED);
- H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC,
- H5fcpl, HDF5Constants.H5P_DEFAULT);
+ H5.H5Pset_link_creation_order(H5fcpl, HDF5Constants.H5P_CRT_ORDER_TRACKED +
+ HDF5Constants.H5P_CRT_ORDER_INDEXED);
+ H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC, H5fcpl, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("TestH5L.createH5file: " + err);
}
- assertTrue("TestH5L.createH5file: H5.H5Fcreate: ",H5fid > 0);
+ assertTrue("TestH5L.createH5file: H5.H5Fcreate: ", H5fid > 0);
try {
H5dsid = H5.H5Screate_simple(2, H5dims, null);
H5did1 = _createDataset(H5fid, H5dsid, "DS1", HDF5Constants.H5P_DEFAULT);
- H5gid = _createGroup(H5fid, "/G1");
+ H5gid = _createGroup(H5fid, "/G1");
H5did2 = _createDataset(H5gid, H5dsid, "DS2", HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("TestH5L.createH5objs: " + err);
}
- assertTrue("TestH5L.createH5file: H5.H5Screate_simple: ",H5dsid > 0);
- assertTrue("TestH5L.createH5file: H5.H5Gcreate: ",H5gid > 0);
+ assertTrue("TestH5L.createH5file: H5.H5Screate_simple: ", H5dsid > 0);
+ assertTrue("TestH5L.createH5file: H5.H5Gcreate: ", H5gid > 0);
H5.H5Fflush(H5fid, HDF5Constants.H5F_SCOPE_LOCAL);
}
@After
- public void deleteH5file() throws HDF5LibraryException {
+ public void deleteH5file() throws HDF5LibraryException
+ {
if (H5gid > 0)
- try {H5.H5Gclose(H5gid);} catch (Exception ex) {}
+ try {
+ H5.H5Gclose(H5gid);
+ }
+ catch (Exception ex) {
+ }
if (H5gcpl > 0)
- try {H5.H5Pclose(H5gcpl);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(H5gcpl);
+ }
+ catch (Exception ex) {
+ }
if (H5did2 > 0)
- try {H5.H5Dclose(H5did2);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5did2);
+ }
+ catch (Exception ex) {
+ }
if (H5dsid > 0)
- try {H5.H5Sclose(H5dsid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(H5dsid);
+ }
+ catch (Exception ex) {
+ }
if (H5did1 > 0)
- try {H5.H5Dclose(H5did1);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5did1);
+ }
+ catch (Exception ex) {
+ }
if (H5fid > 0)
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
if (H5fcpl > 0)
- try {H5.H5Pclose(H5fcpl);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(H5fcpl);
+ }
+ catch (Exception ex) {
+ }
_deleteFile(H5_FILE);
System.out.println();
}
@Test
- public void testH5Lget_info_by_idx_n0_create() {
+ public void testH5Lget_info_by_idx_n0_create()
+ {
H5L_info_t link_info = null;
try {
int order = H5.H5Pget_link_creation_order(H5fcpl);
- assertTrue("creation order :"+order, order == HDF5Constants.H5P_CRT_ORDER_TRACKED+HDF5Constants.H5P_CRT_ORDER_INDEXED);
+ assertTrue("creation order :" + order,
+ order == HDF5Constants.H5P_CRT_ORDER_TRACKED + HDF5Constants.H5P_CRT_ORDER_INDEXED);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Lget_info_by_idx_n0_create:H5Pget_link_creation_order " + err);
}
try {
- link_info = H5.H5Lget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 0, HDF5Constants.H5P_DEFAULT);
+ link_info = H5.H5Lget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_CRT_ORDER,
+ HDF5Constants.H5_ITER_INC, 0, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Lget_info_by_idx: " + err);
}
- assertFalse("H5Lget_info_by_idx ", link_info==null);
- assertTrue("H5Lget_info_by_idx link type", link_info.type==HDF5Constants.H5L_TYPE_HARD);
+ assertFalse("H5Lget_info_by_idx ", link_info == null);
+ assertTrue("H5Lget_info_by_idx link type", link_info.type == HDF5Constants.H5L_TYPE_HARD);
}
@Test
- public void testH5Lget_info_by_idx_n1_create() {
+ public void testH5Lget_info_by_idx_n1_create()
+ {
H5L_info_t link_info = null;
try {
int order = H5.H5Pget_link_creation_order(H5fcpl);
- assertTrue("creation order :"+order, order == HDF5Constants.H5P_CRT_ORDER_TRACKED+HDF5Constants.H5P_CRT_ORDER_INDEXED);
+ assertTrue("creation order :" + order,
+ order == HDF5Constants.H5P_CRT_ORDER_TRACKED + HDF5Constants.H5P_CRT_ORDER_INDEXED);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Lget_info_by_idx_n1_create:H5Pget_link_creation_order " + err);
}
try {
- link_info = H5.H5Lget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 1, HDF5Constants.H5P_DEFAULT);
+ link_info = H5.H5Lget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_CRT_ORDER,
+ HDF5Constants.H5_ITER_INC, 1, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Lget_info_by_idx: " + err);
}
- assertFalse("H5Lget_info_by_idx ", link_info==null);
- assertTrue("H5Lget_info_by_idx link type", link_info.type==HDF5Constants.H5L_TYPE_HARD);
+ assertFalse("H5Lget_info_by_idx ", link_info == null);
+ assertTrue("H5Lget_info_by_idx link type", link_info.type == HDF5Constants.H5L_TYPE_HARD);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Lcreate_hard_cur_not_exists() throws Throwable {
+ public void testH5Lcreate_hard_cur_not_exists() throws Throwable
+ {
H5.H5Lcreate_hard(H5fid, "None", H5fid, "DS1", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
@Test
- public void testH5Lcreate_hard() {
+ public void testH5Lcreate_hard()
+ {
try {
- H5.H5Lcreate_hard(H5fid, "DS1", H5fid, "L1", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ H5.H5Lcreate_hard(H5fid, "DS1", H5fid, "L1", HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
H5.H5Fflush(H5fid, HDF5Constants.H5F_SCOPE_LOCAL);
boolean link_exists = H5.H5Lexists(H5fid, "L1", HDF5Constants.H5P_DEFAULT);
assertTrue("testH5Lcreate_hard:H5Lexists ", link_exists);
@@ -253,14 +299,19 @@ public class TestH5Lcreate {
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Lcreate_hard_dst_link_exists() throws Throwable {
- _createHardLink(H5fid, H5fid, "/G1/DS2", H5fid, "L1", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
- H5.H5Lcreate_hard(H5fid, "L1", H5fid, "/G1/DS2", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ public void testH5Lcreate_hard_dst_link_exists() throws Throwable
+ {
+ _createHardLink(H5fid, H5fid, "/G1/DS2", H5fid, "L1", HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
+ H5.H5Lcreate_hard(H5fid, "L1", H5fid, "/G1/DS2", HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
}
@Test
- public void testH5Ldelete_hard_link() {
- _createHardLink(H5fid, H5fid, "/G1/DS2", H5fid, "L1", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ public void testH5Ldelete_hard_link()
+ {
+ _createHardLink(H5fid, H5fid, "/G1/DS2", H5fid, "L1", HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
try {
H5.H5Ldelete(H5fid, "L1", HDF5Constants.H5P_DEFAULT);
H5.H5Fflush(H5fid, HDF5Constants.H5F_SCOPE_LOCAL);
@@ -274,7 +325,8 @@ public class TestH5Lcreate {
}
@Test
- public void testH5Lcreate_soft() {
+ public void testH5Lcreate_soft()
+ {
try {
H5.H5Lcreate_soft("DS1", H5fid, "L1", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
H5.H5Fflush(H5fid, HDF5Constants.H5F_SCOPE_LOCAL);
@@ -288,13 +340,15 @@ public class TestH5Lcreate {
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Lcreate_soft_dst_link_exists() throws Throwable {
+ public void testH5Lcreate_soft_dst_link_exists() throws Throwable
+ {
_createSoftLink(H5fid, "/G1/DS2", H5fid, "L1", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
H5.H5Lcreate_soft("L1", H5fid, "/G1/DS2", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
@Test
- public void testH5Ldelete_soft_link() {
+ public void testH5Ldelete_soft_link()
+ {
_createSoftLink(H5fid, "/G1/DS2", H5fid, "L1", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
try {
H5.H5Ldelete(H5fid, "L1", HDF5Constants.H5P_DEFAULT);
@@ -309,7 +363,8 @@ public class TestH5Lcreate {
}
@Test
- public void testH5Lget_info_softlink() {
+ public void testH5Lget_info_softlink()
+ {
H5L_info_t link_info = null;
_createSoftLink(H5fid, "/G1/DS2", H5fid, "L1", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
try {
@@ -319,15 +374,16 @@ public class TestH5Lcreate {
err.printStackTrace();
fail("H5.H5Lget_info: " + err);
}
- assertFalse("H5Lget_info", link_info==null);
- assertTrue("H5Lget_info link type", link_info.type==HDF5Constants.H5L_TYPE_SOFT);
+ assertFalse("H5Lget_info", link_info == null);
+ assertTrue("H5Lget_info link type", link_info.type == HDF5Constants.H5L_TYPE_SOFT);
assertTrue("Link Value Size", link_info.val_size > 0);
}
@Test
- public void testH5Lget_value_soft() {
+ public void testH5Lget_value_soft()
+ {
String[] link_value = {null, null};
- int link_type = -1;
+ int link_type = -1;
_createSoftLink(H5fid, "/G1/DS2", H5fid, "L1", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
try {
@@ -338,12 +394,13 @@ public class TestH5Lcreate {
fail("H5.H5Lget_value: " + err);
}
assertTrue("Link Type", link_type == HDF5Constants.H5L_TYPE_SOFT);
- assertFalse("H5Lget_value ", link_value[0]==null);
- assertTrue("Link Value ", link_value[0].compareTo("/G1/DS2")==0);
+ assertFalse("H5Lget_value ", link_value[0] == null);
+ assertTrue("Link Value ", link_value[0].compareTo("/G1/DS2") == 0);
}
@Test
- public void testH5Lcreate_soft_dangle() {
+ public void testH5Lcreate_soft_dangle()
+ {
try {
H5.H5Lcreate_soft("DS3", H5fid, "L2", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
H5.H5Fflush(H5fid, HDF5Constants.H5F_SCOPE_LOCAL);
@@ -357,7 +414,8 @@ public class TestH5Lcreate {
}
@Test
- public void testH5Ldelete_soft_link_dangle() {
+ public void testH5Ldelete_soft_link_dangle()
+ {
_createSoftLink(H5fid, "DS3", H5fid, "L2", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
try {
H5.H5Ldelete(H5fid, "L2", HDF5Constants.H5P_DEFAULT);
@@ -372,7 +430,8 @@ public class TestH5Lcreate {
}
@Test
- public void testH5Lget_info_softlink_dangle() {
+ public void testH5Lget_info_softlink_dangle()
+ {
H5L_info_t link_info = null;
_createSoftLink(H5fid, "DS3", H5fid, "L2", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
try {
@@ -382,15 +441,16 @@ public class TestH5Lcreate {
err.printStackTrace();
fail("H5.H5Lget_info: " + err);
}
- assertFalse("H5Lget_info", link_info==null);
- assertTrue("H5Lget_info link type", link_info.type==HDF5Constants.H5L_TYPE_SOFT);
+ assertFalse("H5Lget_info", link_info == null);
+ assertTrue("H5Lget_info link type", link_info.type == HDF5Constants.H5L_TYPE_SOFT);
assertTrue("Link Value Size", link_info.val_size > 0);
}
@Test
- public void testH5Lget_value_dangle() {
- String[] link_value = {null,null};
- int link_type = -1;
+ public void testH5Lget_value_dangle()
+ {
+ String[] link_value = {null, null};
+ int link_type = -1;
_createSoftLink(H5fid, "DS3", H5fid, "L2", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
try {
@@ -401,14 +461,16 @@ public class TestH5Lcreate {
fail("H5.H5Lget_value: " + err);
}
assertTrue("Link Type", link_type == HDF5Constants.H5L_TYPE_SOFT);
- assertFalse("H5Lget_value ", link_value[0]==null);
- assertTrue("Link Value ", link_value[0].compareTo("DS3")==0);
+ assertFalse("H5Lget_value ", link_value[0] == null);
+ assertTrue("Link Value ", link_value[0].compareTo("DS3") == 0);
}
@Test
- public void testH5Lcreate_external() {
+ public void testH5Lcreate_external()
+ {
try {
- H5.H5Lcreate_external(H5_EXTFILE, "DT1", H5fid, "L1", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ H5.H5Lcreate_external(H5_EXTFILE, "DT1", H5fid, "L1", HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
H5.H5Fflush(H5fid, HDF5Constants.H5F_SCOPE_LOCAL);
boolean link_exists = H5.H5Lexists(H5fid, "L1", HDF5Constants.H5P_DEFAULT);
assertTrue("testH5Lcreate_external:H5Lexists ", link_exists);
@@ -420,9 +482,11 @@ public class TestH5Lcreate {
}
@Test
- public void testH5Lget_info_externallink() {
+ public void testH5Lget_info_externallink()
+ {
H5L_info_t link_info = null;
- _createExternalLink(H5fid, H5_EXTFILE, "DT1", H5fid, "L1", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ _createExternalLink(H5fid, H5_EXTFILE, "DT1", H5fid, "L1", HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
try {
link_info = H5.H5Lget_info(H5fid, "L1", HDF5Constants.H5P_DEFAULT);
}
@@ -430,17 +494,19 @@ public class TestH5Lcreate {
err.printStackTrace();
fail("H5.H5Lget_info: " + err);
}
- assertFalse("H5Lget_info", link_info==null);
- assertTrue("H5Lget_info link type", link_info.type==HDF5Constants.H5L_TYPE_EXTERNAL);
+ assertFalse("H5Lget_info", link_info == null);
+ assertTrue("H5Lget_info link type", link_info.type == HDF5Constants.H5L_TYPE_EXTERNAL);
assertTrue("Link Value Size", link_info.val_size > 0);
}
@Test
- public void testH5Lget_value_external(){
- String[] link_value = {null,null};
- int link_type = -1;
+ public void testH5Lget_value_external()
+ {
+ String[] link_value = {null, null};
+ int link_type = -1;
- _createExternalLink(H5fid, H5_EXTFILE, "DT1", H5fid, "L1", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ _createExternalLink(H5fid, H5_EXTFILE, "DT1", H5fid, "L1", HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
try {
link_type = H5.H5Lget_value(H5fid, "L1", link_value, HDF5Constants.H5P_DEFAULT);
}
@@ -449,18 +515,20 @@ public class TestH5Lcreate {
fail("H5.H5Lget_value: " + err);
}
assertTrue("Link Type", link_type == HDF5Constants.H5L_TYPE_EXTERNAL);
- assertFalse("H5Lget_value ", link_value[0]==null);
- assertFalse("H5Lget_value ", link_value[1]==null);
- assertTrue("Link Value ", link_value[0].compareTo("DT1")==0);
+ assertFalse("H5Lget_value ", link_value[0] == null);
+ assertFalse("H5Lget_value ", link_value[1] == null);
+ assertTrue("Link Value ", link_value[0].compareTo("DT1") == 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Lcopy_cur_not_exists() throws Throwable {
+ public void testH5Lcopy_cur_not_exists() throws Throwable
+ {
H5.H5Lcopy(H5fid, "None", H5fid, "DS1", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
@Test
- public void testH5Lcopy() {
+ public void testH5Lcopy()
+ {
try {
H5.H5Lcopy(H5fid, "DS1", H5fid, "CPY1", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
H5.H5Fflush(H5fid, HDF5Constants.H5F_SCOPE_LOCAL);
@@ -474,18 +542,22 @@ public class TestH5Lcreate {
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Lcopy_dst_link_exists() throws Throwable {
- _createHardLink(H5fid, H5fid, "/G1/DS2", H5fid, "CPY1", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ public void testH5Lcopy_dst_link_exists() throws Throwable
+ {
+ _createHardLink(H5fid, H5fid, "/G1/DS2", H5fid, "CPY1", HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
H5.H5Lcopy(H5fid, "CPY1", H5fid, "/G1/DS2", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Lmove_cur_not_exists() throws Throwable {
+ public void testH5Lmove_cur_not_exists() throws Throwable
+ {
H5.H5Lmove(H5fid, "None", H5fid, "DS1", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
@Test
- public void testH5Lmove() {
+ public void testH5Lmove()
+ {
try {
H5.H5Lmove(H5fid, "DS1", H5fid, "CPY1", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
H5.H5Fflush(H5fid, HDF5Constants.H5F_SCOPE_LOCAL);
@@ -501,60 +573,72 @@ public class TestH5Lcreate {
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Lmove_dst_link_exists() throws Throwable {
- _createHardLink(H5fid, H5fid, "/G1/DS2", H5fid, "CPY1", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ public void testH5Lmove_dst_link_exists() throws Throwable
+ {
+ _createHardLink(H5fid, H5fid, "/G1/DS2", H5fid, "CPY1", HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
H5.H5Lmove(H5fid, "CPY1", H5fid, "/G1/DS2", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Lget_value_by_idx_not_exist_name() throws Throwable {
- String[] link_value = {null,null};
- H5.H5Lget_value_by_idx(H5fid, "None", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 0, link_value, HDF5Constants.H5P_DEFAULT);
+ public void testH5Lget_value_by_idx_not_exist_name() throws Throwable
+ {
+ String[] link_value = {null, null};
+ H5.H5Lget_value_by_idx(H5fid, "None", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 0,
+ link_value, HDF5Constants.H5P_DEFAULT);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Lget_value_by_idx_not_exist_create() throws Throwable {
- String[] link_value = {null,null};
- H5.H5Lget_value_by_idx(H5fid, "None", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 0, link_value, HDF5Constants.H5P_DEFAULT);
+ public void testH5Lget_value_by_idx_not_exist_create() throws Throwable
+ {
+ String[] link_value = {null, null};
+ H5.H5Lget_value_by_idx(H5fid, "None", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 0,
+ link_value, HDF5Constants.H5P_DEFAULT);
}
@Test
- public void testH5Lget_value_by_idx_n2_name() {
+ public void testH5Lget_value_by_idx_n2_name()
+ {
H5L_info_t link_info = null;
- String[] link_value = {null,null};
- int link_type = -1;
+ String[] link_value = {null, null};
+ int link_type = -1;
_createSoftLink(H5fid, "/G1/DS2", H5fid, "LS", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
try {
- link_info = H5.H5Lget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 2, HDF5Constants.H5P_DEFAULT);
+ link_info = H5.H5Lget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME,
+ HDF5Constants.H5_ITER_INC, 2, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Lget_info_by_idx: " + err);
}
- assertFalse("testH5Lget_value_by_idx_n2 ",link_info==null);
- assertTrue("testH5Lget_value_by_idx_n2 link type", link_info.type==HDF5Constants.H5L_TYPE_SOFT);
+ assertFalse("testH5Lget_value_by_idx_n2 ", link_info == null);
+ assertTrue("testH5Lget_value_by_idx_n2 link type", link_info.type == HDF5Constants.H5L_TYPE_SOFT);
try {
- link_type = H5.H5Lget_value_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 2, link_value, HDF5Constants.H5P_DEFAULT);
+ link_type =
+ H5.H5Lget_value_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 2,
+ link_value, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Lget_value_by_idx: " + err);
}
assertTrue("Link Type", link_type == HDF5Constants.H5L_TYPE_SOFT);
- assertFalse("testH5Lget_value_by_idx_n2 ", link_value[0]==null);
- assertTrue("testH5Lget_value_by_idx_n2 Link Value ", link_value[0].compareTo("/G1/DS2")==0);
+ assertFalse("testH5Lget_value_by_idx_n2 ", link_value[0] == null);
+ assertTrue("testH5Lget_value_by_idx_n2 Link Value ", link_value[0].compareTo("/G1/DS2") == 0);
}
@Test
- public void testH5Lget_value_by_idx_n2_create() {
+ public void testH5Lget_value_by_idx_n2_create()
+ {
H5L_info_t link_info = null;
- String[] link_value = {null,null};
- int link_type = -1;
+ String[] link_value = {null, null};
+ int link_type = -1;
try {
int order = H5.H5Pget_link_creation_order(H5fcpl);
- assertTrue("creation order :"+order, order == HDF5Constants.H5P_CRT_ORDER_TRACKED+HDF5Constants.H5P_CRT_ORDER_INDEXED);
+ assertTrue("creation order :" + order,
+ order == HDF5Constants.H5P_CRT_ORDER_TRACKED + HDF5Constants.H5P_CRT_ORDER_INDEXED);
}
catch (Throwable err) {
err.printStackTrace();
@@ -562,116 +646,139 @@ public class TestH5Lcreate {
}
_createSoftLink(H5fid, "/G1/DS2", H5fid, "LS", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
try {
- link_info = H5.H5Lget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 2, HDF5Constants.H5P_DEFAULT);
+ link_info = H5.H5Lget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_CRT_ORDER,
+ HDF5Constants.H5_ITER_INC, 2, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Lget_info_by_idx: " + err);
}
- assertFalse("testH5Lget_value_by_idx_n2 ", link_info==null);
- assertTrue("testH5Lget_value_by_idx_n2 link type", link_info.type==HDF5Constants.H5L_TYPE_SOFT);
+ assertFalse("testH5Lget_value_by_idx_n2 ", link_info == null);
+ assertTrue("testH5Lget_value_by_idx_n2 link type", link_info.type == HDF5Constants.H5L_TYPE_SOFT);
try {
- link_type = H5.H5Lget_value_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 2, link_value, HDF5Constants.H5P_DEFAULT);
+ link_type =
+ H5.H5Lget_value_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_CRT_ORDER,
+ HDF5Constants.H5_ITER_INC, 2, link_value, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Lget_value_by_idx: " + err);
}
assertTrue("Link Type", link_type == HDF5Constants.H5L_TYPE_SOFT);
- assertFalse("testH5Lget_value_by_idx_n2 ", link_value[0]==null);
- assertTrue("testH5Lget_value_by_idx_n2 Link Value ", link_value[0].compareTo("/G1/DS2")==0);
+ assertFalse("testH5Lget_value_by_idx_n2 ", link_value[0] == null);
+ assertTrue("testH5Lget_value_by_idx_n2 Link Value ", link_value[0].compareTo("/G1/DS2") == 0);
}
@Test
- public void testH5Lget_value_by_idx_external_name() {
+ public void testH5Lget_value_by_idx_external_name()
+ {
H5L_info_t link_info = null;
- String[] link_value = {null,null};
- int link_type = -1;
+ String[] link_value = {null, null};
+ int link_type = -1;
- _createExternalLink(H5fid, H5_EXTFILE, "DT1", H5fid, "LE", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ _createExternalLink(H5fid, H5_EXTFILE, "DT1", H5fid, "LE", HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
try {
- link_info = H5.H5Lget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 2, HDF5Constants.H5P_DEFAULT);
+ link_info = H5.H5Lget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME,
+ HDF5Constants.H5_ITER_INC, 2, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Lget_info_by_idx: " + err);
}
- assertFalse("testH5Lget_value_by_idx_ext ", link_info==null);
- assertTrue("testH5Lget_value_by_idx_ext link type "+link_info.type, link_info.type==HDF5Constants.H5L_TYPE_EXTERNAL);
+ assertFalse("testH5Lget_value_by_idx_ext ", link_info == null);
+ assertTrue("testH5Lget_value_by_idx_ext link type " + link_info.type,
+ link_info.type == HDF5Constants.H5L_TYPE_EXTERNAL);
try {
- link_type = H5.H5Lget_value_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 2, link_value, HDF5Constants.H5P_DEFAULT);
+ link_type =
+ H5.H5Lget_value_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 2,
+ link_value, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Lget_value_by_idx: " + err);
}
assertTrue("Link Type", link_type == HDF5Constants.H5L_TYPE_EXTERNAL);
- assertFalse("testH5Lget_value_by_idx_ext ", link_value[0]==null);
- assertFalse("testH5Lget_value_by_idx_ext ", link_value[1]==null);
- assertTrue("testH5Lget_value_by_idx_ext Link Value ", link_value[0].compareTo("DT1")==0);
+ assertFalse("testH5Lget_value_by_idx_ext ", link_value[0] == null);
+ assertFalse("testH5Lget_value_by_idx_ext ", link_value[1] == null);
+ assertTrue("testH5Lget_value_by_idx_ext Link Value ", link_value[0].compareTo("DT1") == 0);
}
@Test
- public void testH5Lget_value_by_idx_external_create() {
+ public void testH5Lget_value_by_idx_external_create()
+ {
H5L_info_t link_info = null;
- String[] link_value = {null,null};
- int link_type = -1;
+ String[] link_value = {null, null};
+ int link_type = -1;
- _createExternalLink(H5fid, H5_EXTFILE, "DT1", H5fid, "LE", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ _createExternalLink(H5fid, H5_EXTFILE, "DT1", H5fid, "LE", HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
try {
- link_info = H5.H5Lget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 2, HDF5Constants.H5P_DEFAULT);
+ link_info = H5.H5Lget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_CRT_ORDER,
+ HDF5Constants.H5_ITER_INC, 2, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Lget_info_by_idx: " + err);
}
- assertFalse("testH5Lget_value_by_idx_ext ", link_info==null);
- assertTrue("testH5Lget_value_by_idx_ext link type "+link_info.type, link_info.type==HDF5Constants.H5L_TYPE_EXTERNAL);
+ assertFalse("testH5Lget_value_by_idx_ext ", link_info == null);
+ assertTrue("testH5Lget_value_by_idx_ext link type " + link_info.type,
+ link_info.type == HDF5Constants.H5L_TYPE_EXTERNAL);
try {
- link_type = H5.H5Lget_value_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 2, link_value, HDF5Constants.H5P_DEFAULT);
+ link_type =
+ H5.H5Lget_value_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_CRT_ORDER,
+ HDF5Constants.H5_ITER_INC, 2, link_value, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Lget_value_by_idx: " + err);
}
assertTrue("Link Type", link_type == HDF5Constants.H5L_TYPE_EXTERNAL);
- assertFalse("testH5Lget_value_by_idx_ext ", link_value[0]==null);
- assertFalse("testH5Lget_value_by_idx_ext ", link_value[1]==null);
- assertTrue("testH5Lget_value_by_idx_ext Link Value ", link_value[0].compareTo("DT1")==0);
+ assertFalse("testH5Lget_value_by_idx_ext ", link_value[0] == null);
+ assertFalse("testH5Lget_value_by_idx_ext ", link_value[1] == null);
+ assertTrue("testH5Lget_value_by_idx_ext Link Value ", link_value[0].compareTo("DT1") == 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Ldelete_by_idx_not_exist_name() throws Throwable {
- H5.H5Ldelete_by_idx(H5fid, "None", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 0, HDF5Constants.H5P_DEFAULT);
+ public void testH5Ldelete_by_idx_not_exist_name() throws Throwable
+ {
+ H5.H5Ldelete_by_idx(H5fid, "None", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 0,
+ HDF5Constants.H5P_DEFAULT);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Ldelete_by_idx_not_exist_create() throws Throwable {
- H5.H5Ldelete_by_idx(H5fid, "None", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 0, HDF5Constants.H5P_DEFAULT);
+ public void testH5Ldelete_by_idx_not_exist_create() throws Throwable
+ {
+ H5.H5Ldelete_by_idx(H5fid, "None", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 0,
+ HDF5Constants.H5P_DEFAULT);
}
@Test
- public void testH5Ldelete_by_idx_n2_name() {
+ public void testH5Ldelete_by_idx_n2_name()
+ {
H5L_info_t link_info = null;
_createSoftLink(H5fid, "/G1/DS2", H5fid, "LS", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
try {
- link_info = H5.H5Lget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 2, HDF5Constants.H5P_DEFAULT);
+ link_info = H5.H5Lget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME,
+ HDF5Constants.H5_ITER_INC, 2, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Lget_info_by_idx: " + err);
}
- assertFalse("testH5Ldelete_by_idx_n2 ", link_info==null);
- assertTrue("testH5Ldelete_by_idx_n2 link type", link_info.type==HDF5Constants.H5L_TYPE_SOFT);
+ assertFalse("testH5Ldelete_by_idx_n2 ", link_info == null);
+ assertTrue("testH5Ldelete_by_idx_n2 link type", link_info.type == HDF5Constants.H5L_TYPE_SOFT);
try {
- H5.H5Ldelete_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 2, HDF5Constants.H5P_DEFAULT);
+ H5.H5Ldelete_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 2,
+ HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Ldelete_by_idx: " + err);
}
try {
- link_info = H5.H5Lget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 2, HDF5Constants.H5P_DEFAULT);
+ link_info = H5.H5Lget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME,
+ HDF5Constants.H5_ITER_INC, 2, HDF5Constants.H5P_DEFAULT);
}
catch (HDF5LibraryException err) {
link_info = null;
@@ -680,31 +787,35 @@ public class TestH5Lcreate {
err.printStackTrace();
fail("H5.H5Ldelete_by_idx: " + err);
}
- assertTrue("testH5Ldelete_by_idx_n2 ",link_info==null);
+ assertTrue("testH5Ldelete_by_idx_n2 ", link_info == null);
}
@Test
- public void testH5Ldelete_by_idx_n2_create() {
+ public void testH5Ldelete_by_idx_n2_create()
+ {
H5L_info_t link_info = null;
_createSoftLink(H5fid, "/G1/DS2", H5fid, "LS", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
try {
- link_info = H5.H5Lget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 2, HDF5Constants.H5P_DEFAULT);
+ link_info = H5.H5Lget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_CRT_ORDER,
+ HDF5Constants.H5_ITER_INC, 2, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Lget_info_by_idx: " + err);
}
- assertFalse("testH5Ldelete_by_idx_n2 ", link_info==null);
- assertTrue("testH5Ldelete_by_idx_n2 link type", link_info.type==HDF5Constants.H5L_TYPE_SOFT);
+ assertFalse("testH5Ldelete_by_idx_n2 ", link_info == null);
+ assertTrue("testH5Ldelete_by_idx_n2 link type", link_info.type == HDF5Constants.H5L_TYPE_SOFT);
try {
- H5.H5Ldelete_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 2, HDF5Constants.H5P_DEFAULT);
+ H5.H5Ldelete_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 2,
+ HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Ldelete_by_idx: " + err);
}
try {
- link_info = H5.H5Lget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 2, HDF5Constants.H5P_DEFAULT);
+ link_info = H5.H5Lget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_CRT_ORDER,
+ HDF5Constants.H5_ITER_INC, 2, HDF5Constants.H5P_DEFAULT);
}
catch (HDF5LibraryException err) {
link_info = null;
@@ -713,28 +824,33 @@ public class TestH5Lcreate {
err.printStackTrace();
fail("H5.H5Ldelete_by_idx: " + err);
}
- assertTrue("testH5Ldelete_by_idx_n2 ",link_info==null);
+ assertTrue("testH5Ldelete_by_idx_n2 ", link_info == null);
}
@Test
- public void testH5Lvisit_create() {
+ public void testH5Lvisit_create()
+ {
try {
int order = H5.H5Pget_link_creation_order(H5fcpl);
- assertTrue("creation order :"+order, order == HDF5Constants.H5P_CRT_ORDER_TRACKED+HDF5Constants.H5P_CRT_ORDER_INDEXED);
+ assertTrue("creation order :" + order,
+ order == HDF5Constants.H5P_CRT_ORDER_TRACKED + HDF5Constants.H5P_CRT_ORDER_INDEXED);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Lvisit_create: H5Pget_link_creation_order " + err);
}
- _createHardLink(H5fid, H5fid, "/G1/DS2", H5fid, "CPY1", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
- _createExternalLink(H5fid, H5_EXTFILE, "DT1", H5fid, "LE", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ _createHardLink(H5fid, H5fid, "/G1/DS2", H5fid, "CPY1", HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
+ _createExternalLink(H5fid, H5_EXTFILE, "DT1", H5fid, "LE", HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
_createSoftLink(H5fid, "/G1/DS2", H5fid, "LS", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
class idata {
public String link_name = null;
- public int link_type = -1;
- idata(String name, int type) {
+ public int link_type = -1;
+ idata(String name, int type)
+ {
this.link_name = name;
this.link_type = type;
}
@@ -744,7 +860,8 @@ public class TestH5Lcreate {
}
H5L_iterate_opdata_t iter_data = new H5L_iter_data();
class H5L_iter_callback implements H5L_iterate_t {
- public int callback(long group, String name, H5L_info_t info, H5L_iterate_opdata_t op_data) {
+ public int callback(long group, String name, H5L_info_t info, H5L_iterate_opdata_t op_data)
+ {
idata id = new idata(name, info.type);
((H5L_iter_data)op_data).iterdata.add(id);
return 0;
@@ -752,41 +869,60 @@ public class TestH5Lcreate {
}
H5L_iterate_t iter_cb = new H5L_iter_callback();
try {
- H5.H5Lvisit(H5fid, HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, iter_cb, iter_data);
+ H5.H5Lvisit(H5fid, HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, iter_cb,
+ iter_data);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Lvisit: " + err);
}
- assertFalse("H5Lvisit ",((H5L_iter_data)iter_data).iterdata.isEmpty());
- assertTrue("H5Lvisit "+((H5L_iter_data)iter_data).iterdata.size(),((H5L_iter_data)iter_data).iterdata.size()==6);
- assertTrue("H5Lvisit "+((idata)((H5L_iter_data)iter_data).iterdata.get(0)).link_name,((idata)((H5L_iter_data)iter_data).iterdata.get(0)).link_name.compareToIgnoreCase("DS1")==0);
- assertTrue("H5Lvisit "+((idata)((H5L_iter_data)iter_data).iterdata.get(1)).link_name,((idata)((H5L_iter_data)iter_data).iterdata.get(1)).link_name.compareToIgnoreCase("G1")==0);
- assertTrue("H5Lvisit "+((idata)((H5L_iter_data)iter_data).iterdata.get(2)).link_name,((idata)((H5L_iter_data)iter_data).iterdata.get(2)).link_name.compareToIgnoreCase("G1/DS2")==0);
- assertTrue("H5Lvisit "+((idata)((H5L_iter_data)iter_data).iterdata.get(3)).link_name,((idata)((H5L_iter_data)iter_data).iterdata.get(3)).link_name.compareToIgnoreCase("CPY1")==0);
- assertTrue("H5Lvisit "+((idata)((H5L_iter_data)iter_data).iterdata.get(4)).link_name,((idata)((H5L_iter_data)iter_data).iterdata.get(4)).link_name.compareToIgnoreCase("LE")==0);
- assertTrue("H5Lvisit "+((idata)((H5L_iter_data)iter_data).iterdata.get(5)).link_name,((idata)((H5L_iter_data)iter_data).iterdata.get(5)).link_name.compareToIgnoreCase("LS")==0);
+ assertFalse("H5Lvisit ", ((H5L_iter_data)iter_data).iterdata.isEmpty());
+ assertTrue("H5Lvisit " + ((H5L_iter_data)iter_data).iterdata.size(),
+ ((H5L_iter_data)iter_data).iterdata.size() == 6);
+ assertTrue("H5Lvisit " + ((idata)((H5L_iter_data)iter_data).iterdata.get(0)).link_name,
+ ((idata)((H5L_iter_data)iter_data).iterdata.get(0)).link_name.compareToIgnoreCase("DS1") ==
+ 0);
+ assertTrue("H5Lvisit " + ((idata)((H5L_iter_data)iter_data).iterdata.get(1)).link_name,
+ ((idata)((H5L_iter_data)iter_data).iterdata.get(1)).link_name.compareToIgnoreCase("G1") ==
+ 0);
+ assertTrue(
+ "H5Lvisit " + ((idata)((H5L_iter_data)iter_data).iterdata.get(2)).link_name,
+ ((idata)((H5L_iter_data)iter_data).iterdata.get(2)).link_name.compareToIgnoreCase("G1/DS2") == 0);
+ assertTrue(
+ "H5Lvisit " + ((idata)((H5L_iter_data)iter_data).iterdata.get(3)).link_name,
+ ((idata)((H5L_iter_data)iter_data).iterdata.get(3)).link_name.compareToIgnoreCase("CPY1") == 0);
+ assertTrue("H5Lvisit " + ((idata)((H5L_iter_data)iter_data).iterdata.get(4)).link_name,
+ ((idata)((H5L_iter_data)iter_data).iterdata.get(4)).link_name.compareToIgnoreCase("LE") ==
+ 0);
+ assertTrue("H5Lvisit " + ((idata)((H5L_iter_data)iter_data).iterdata.get(5)).link_name,
+ ((idata)((H5L_iter_data)iter_data).iterdata.get(5)).link_name.compareToIgnoreCase("LS") ==
+ 0);
}
@Test
- public void testH5Literate_create() {
+ public void testH5Literate_create()
+ {
try {
int order = H5.H5Pget_link_creation_order(H5fcpl);
- assertTrue("creation order :"+order, order == HDF5Constants.H5P_CRT_ORDER_TRACKED+HDF5Constants.H5P_CRT_ORDER_INDEXED);
+ assertTrue("creation order :" + order,
+ order == HDF5Constants.H5P_CRT_ORDER_TRACKED + HDF5Constants.H5P_CRT_ORDER_INDEXED);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Literate_create: H5Pget_link_creation_order " + err);
}
- _createHardLink(H5fid, H5fid, "/G1/DS2", H5fid, "CPY1", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
- _createExternalLink(H5fid, H5_EXTFILE, "DT1", H5fid, "LE", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ _createHardLink(H5fid, H5fid, "/G1/DS2", H5fid, "CPY1", HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
+ _createExternalLink(H5fid, H5_EXTFILE, "DT1", H5fid, "LE", HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
_createSoftLink(H5fid, "/G1/DS2", H5fid, "LS", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
class idata {
public String link_name = null;
- public int link_type = -1;
- idata(String name, int type) {
+ public int link_type = -1;
+ idata(String name, int type)
+ {
this.link_name = name;
this.link_type = type;
}
@@ -796,7 +932,8 @@ public class TestH5Lcreate {
}
H5L_iterate_opdata_t iter_data = new H5L_iter_data();
class H5L_iter_callback implements H5L_iterate_t {
- public int callback(long group, String name, H5L_info_t info, H5L_iterate_opdata_t op_data) {
+ public int callback(long group, String name, H5L_info_t info, H5L_iterate_opdata_t op_data)
+ {
idata id = new idata(name, info.type);
((H5L_iter_data)op_data).iterdata.add(id);
return 0;
@@ -804,19 +941,30 @@ public class TestH5Lcreate {
}
H5L_iterate_t iter_cb = new H5L_iter_callback();
try {
- H5.H5Literate(H5fid, HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 0, iter_cb, iter_data);
+ H5.H5Literate(H5fid, HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 0, iter_cb,
+ iter_data);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Literate: " + err);
}
- assertFalse("H5Literate ",((H5L_iter_data)iter_data).iterdata.isEmpty());
- assertTrue("H5Literate "+((H5L_iter_data)iter_data).iterdata.size(),((H5L_iter_data)iter_data).iterdata.size()==5);
- assertTrue("H5Literate "+((idata)((H5L_iter_data)iter_data).iterdata.get(0)).link_name,((idata)((H5L_iter_data)iter_data).iterdata.get(0)).link_name.compareToIgnoreCase("DS1")==0);
- assertTrue("H5Literate "+((idata)((H5L_iter_data)iter_data).iterdata.get(1)).link_name,((idata)((H5L_iter_data)iter_data).iterdata.get(1)).link_name.compareToIgnoreCase("G1")==0);
- assertTrue("H5Literate "+((idata)((H5L_iter_data)iter_data).iterdata.get(2)).link_name,((idata)((H5L_iter_data)iter_data).iterdata.get(2)).link_name.compareToIgnoreCase("CPY1")==0);
- assertTrue("H5Literate "+((idata)((H5L_iter_data)iter_data).iterdata.get(3)).link_name,((idata)((H5L_iter_data)iter_data).iterdata.get(3)).link_name.compareToIgnoreCase("LE")==0);
- assertTrue("H5Literate "+((idata)((H5L_iter_data)iter_data).iterdata.get(4)).link_name,((idata)((H5L_iter_data)iter_data).iterdata.get(4)).link_name.compareToIgnoreCase("LS")==0);
+ assertFalse("H5Literate ", ((H5L_iter_data)iter_data).iterdata.isEmpty());
+ assertTrue("H5Literate " + ((H5L_iter_data)iter_data).iterdata.size(),
+ ((H5L_iter_data)iter_data).iterdata.size() == 5);
+ assertTrue("H5Literate " + ((idata)((H5L_iter_data)iter_data).iterdata.get(0)).link_name,
+ ((idata)((H5L_iter_data)iter_data).iterdata.get(0)).link_name.compareToIgnoreCase("DS1") ==
+ 0);
+ assertTrue("H5Literate " + ((idata)((H5L_iter_data)iter_data).iterdata.get(1)).link_name,
+ ((idata)((H5L_iter_data)iter_data).iterdata.get(1)).link_name.compareToIgnoreCase("G1") ==
+ 0);
+ assertTrue(
+ "H5Literate " + ((idata)((H5L_iter_data)iter_data).iterdata.get(2)).link_name,
+ ((idata)((H5L_iter_data)iter_data).iterdata.get(2)).link_name.compareToIgnoreCase("CPY1") == 0);
+ assertTrue("H5Literate " + ((idata)((H5L_iter_data)iter_data).iterdata.get(3)).link_name,
+ ((idata)((H5L_iter_data)iter_data).iterdata.get(3)).link_name.compareToIgnoreCase("LE") ==
+ 0);
+ assertTrue("H5Literate " + ((idata)((H5L_iter_data)iter_data).iterdata.get(4)).link_name,
+ ((idata)((H5L_iter_data)iter_data).iterdata.get(4)).link_name.compareToIgnoreCase("LS") ==
+ 0);
}
-
}
diff --git a/java/test/TestH5Lparams.java b/java/test/TestH5Lparams.java
index 30ee242..78de663 100644
--- a/java/test/TestH5Lparams.java
+++ b/java/test/TestH5Lparams.java
@@ -13,6 +13,7 @@
package test;
import static org.junit.Assert.assertTrue;
+
import hdf.hdf5lib.H5;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
@@ -23,206 +24,246 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5Lparams {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
@Before
- public void checkOpenIDs() {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ public void checkOpenIDs()
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
}
@After
- public void nextTestName() {
+ public void nextTestName()
+ {
System.out.println();
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Lget_value_invalid() throws Throwable {
+ public void testH5Lget_value_invalid() throws Throwable
+ {
H5.H5Lget_value(-1, "Bogus", null, -1);
}
@Test(expected = NullPointerException.class)
- public void testH5Lget_value_null() throws Throwable {
+ public void testH5Lget_value_null() throws Throwable
+ {
H5.H5Lget_value(-1, null, null, 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Lexists_invalid() throws Throwable {
+ public void testH5Lexists_invalid() throws Throwable
+ {
H5.H5Lexists(-1, "Bogus", -1);
}
@Test(expected = NullPointerException.class)
- public void testH5Lexists_null() throws Throwable {
+ public void testH5Lexists_null() throws Throwable
+ {
H5.H5Lexists(-1, null, 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Lget_info_invalid() throws Throwable {
+ public void testH5Lget_info_invalid() throws Throwable
+ {
H5.H5Lget_info(-1, "Bogus", -1);
}
@Test(expected = NullPointerException.class)
- public void testH5Lget_info_null() throws Throwable {
+ public void testH5Lget_info_null() throws Throwable
+ {
H5.H5Lget_info(-1, null, 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Lget_info_by_idx_invalid() throws Throwable {
+ public void testH5Lget_info_by_idx_invalid() throws Throwable
+ {
H5.H5Lget_info_by_idx(-1, "Bogus", -1, -1, -1L, -1);
}
@Test(expected = NullPointerException.class)
- public void testH5Lget_info_by_idx_null() throws Throwable {
+ public void testH5Lget_info_by_idx_null() throws Throwable
+ {
H5.H5Lget_info_by_idx(-1, null, 0, 0, 0L, 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Lget_name_by_idx_invalid() throws Throwable {
+ public void testH5Lget_name_by_idx_invalid() throws Throwable
+ {
H5.H5Lget_name_by_idx(-1, "Bogus", -1, -1, -1L, -1);
}
@Test(expected = NullPointerException.class)
- public void testH5Lget_name_by_idx_null() throws Throwable {
+ public void testH5Lget_name_by_idx_null() throws Throwable
+ {
H5.H5Lget_name_by_idx(-1, null, 0, 0, 0L, 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Lcreate_hard_invalid() throws Throwable {
+ public void testH5Lcreate_hard_invalid() throws Throwable
+ {
H5.H5Lcreate_hard(-1, "Bogus", -1, "Bogus", -1, -1);
}
@Test(expected = NullPointerException.class)
- public void testH5Lcreate_hard_null_current() throws Throwable {
+ public void testH5Lcreate_hard_null_current() throws Throwable
+ {
H5.H5Lcreate_hard(-1, null, 0, "Bogus", 0, 0);
}
@Test(expected = NullPointerException.class)
- public void testH5Lcreate_hard_null_dest() throws Throwable {
+ public void testH5Lcreate_hard_null_dest() throws Throwable
+ {
H5.H5Lcreate_hard(-1, "Bogus", 0, null, 0, 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Ldelete_invalid() throws Throwable {
+ public void testH5Ldelete_invalid() throws Throwable
+ {
H5.H5Ldelete(-1, "Bogus", -1);
}
@Test(expected = NullPointerException.class)
- public void testH5Ldelete_null() throws Throwable {
+ public void testH5Ldelete_null() throws Throwable
+ {
H5.H5Ldelete(-1, null, 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Lcreate_soft_invalid() throws Throwable {
- H5.H5Lcreate_soft( "Bogus", -1, "Bogus", -1, -1);
+ public void testH5Lcreate_soft_invalid() throws Throwable
+ {
+ H5.H5Lcreate_soft("Bogus", -1, "Bogus", -1, -1);
}
@Test(expected = NullPointerException.class)
- public void testH5Lcreate_soft_null_current() throws Throwable {
+ public void testH5Lcreate_soft_null_current() throws Throwable
+ {
H5.H5Lcreate_soft(null, 0, "Bogus", 0, 0);
}
@Test(expected = NullPointerException.class)
- public void testH5Lcreate_soft_null_dest() throws Throwable {
+ public void testH5Lcreate_soft_null_dest() throws Throwable
+ {
H5.H5Lcreate_soft("Bogus", 0, null, 0, 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Lcreate_external_invalid() throws Throwable {
+ public void testH5Lcreate_external_invalid() throws Throwable
+ {
H5.H5Lcreate_external("PathToFile", "Bogus", -1, "Bogus", -1, -1);
}
@Test(expected = NullPointerException.class)
- public void testH5Lcreate_external_null_file() throws Throwable {
+ public void testH5Lcreate_external_null_file() throws Throwable
+ {
H5.H5Lcreate_external(null, "Bogus", 0, "Bogus", 0, 0);
}
@Test(expected = NullPointerException.class)
- public void testH5Lcreate_external_null_current() throws Throwable {
+ public void testH5Lcreate_external_null_current() throws Throwable
+ {
H5.H5Lcreate_external("PathToFile", null, 0, "Bogus", 0, 0);
}
@Test(expected = NullPointerException.class)
- public void testH5Lcreate_external_null_dest() throws Throwable {
+ public void testH5Lcreate_external_null_dest() throws Throwable
+ {
H5.H5Lcreate_external("PathToFile", "Bogus", 0, null, 0, 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Lcopy_invalid() throws Throwable {
+ public void testH5Lcopy_invalid() throws Throwable
+ {
H5.H5Lcopy(-1, "Bogus", -1, "Bogus", -1, -1);
}
@Test(expected = NullPointerException.class)
- public void testH5Lcopy_null_current() throws Throwable {
+ public void testH5Lcopy_null_current() throws Throwable
+ {
H5.H5Lcopy(-1, null, 0, "Bogus", 0, 0);
}
@Test(expected = NullPointerException.class)
- public void testH5Lcopy_null_dest() throws Throwable {
+ public void testH5Lcopy_null_dest() throws Throwable
+ {
H5.H5Lcopy(-1, "Bogus", 0, null, 0, 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Lmove_invalid() throws Throwable {
+ public void testH5Lmove_invalid() throws Throwable
+ {
H5.H5Lmove(-1, "Bogus", -1, "Bogus", -1, -1);
}
@Test(expected = NullPointerException.class)
- public void testH5Lmove_null_current() throws Throwable {
+ public void testH5Lmove_null_current() throws Throwable
+ {
H5.H5Lmove(-1, null, 0, "Bogus", 0, 0);
}
@Test(expected = NullPointerException.class)
- public void testH5Lmove_null_dest() throws Throwable {
+ public void testH5Lmove_null_dest() throws Throwable
+ {
H5.H5Lmove(-1, "Bogus", 0, null, 0, 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Lget_value_by_idx_invalid() throws Throwable {
+ public void testH5Lget_value_by_idx_invalid() throws Throwable
+ {
H5.H5Lget_value_by_idx(-1, "Bogus", -1, -1, -1L, null, -1);
}
@Test(expected = NullPointerException.class)
- public void testH5Lget_value_by_idx_null() throws Throwable {
+ public void testH5Lget_value_by_idx_null() throws Throwable
+ {
H5.H5Lget_value_by_idx(-1, null, 0, 0, 0L, null, 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Ldelete_by_idx_invalid() throws Throwable {
+ public void testH5Ldelete_by_idx_invalid() throws Throwable
+ {
H5.H5Ldelete_by_idx(-1, "Bogus", -1, -1, -1L, -1);
}
@Test(expected = NullPointerException.class)
- public void testH5Ldelete_by_idx_null() throws Throwable {
+ public void testH5Ldelete_by_idx_null() throws Throwable
+ {
H5.H5Ldelete_by_idx(-1, null, 0, 0, 0L, 0);
}
@Test(expected = NullPointerException.class)
- public void testH5Lvisit_null() throws Throwable {
+ public void testH5Lvisit_null() throws Throwable
+ {
H5.H5Lvisit(-1, -1, -1, null, null);
}
@Test(expected = NullPointerException.class)
- public void testH5Lvisit_by_name_nullname() throws Throwable {
+ public void testH5Lvisit_by_name_nullname() throws Throwable
+ {
H5.H5Lvisit_by_name(-1, null, -1, -1, null, null, -1);
}
@Test(expected = NullPointerException.class)
- public void testH5Lvisit_by_name_null() throws Throwable {
+ public void testH5Lvisit_by_name_null() throws Throwable
+ {
H5.H5Lvisit_by_name(-1, "Bogus", -1, -1, null, null, -1);
}
@Test(expected = NullPointerException.class)
- public void testH5Literate_null() throws Throwable {
+ public void testH5Literate_null() throws Throwable
+ {
H5.H5Literate(-1, -1, -1, -1, null, null);
}
@Test(expected = NullPointerException.class)
- public void testH5Literate_by_name_nullname() throws Throwable {
+ public void testH5Literate_by_name_nullname() throws Throwable
+ {
H5.H5Literate_by_name(-1, null, -1, -1, -1, null, null, -1);
}
@Test(expected = NullPointerException.class)
- public void testH5Literate_by_name_null() throws Throwable {
+ public void testH5Literate_by_name_null() throws Throwable
+ {
H5.H5Literate_by_name(-1, "Bogus", -1, -1, -1, null, null, -1);
}
-
}
diff --git a/java/test/TestH5Obasic.java b/java/test/TestH5Obasic.java
index 350b7aa..cac2e6a 100644
--- a/java/test/TestH5Obasic.java
+++ b/java/test/TestH5Obasic.java
@@ -20,13 +20,13 @@ import java.util.ArrayList;
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
-import hdf.hdf5lib.callbacks.H5O_iterate_t;
import hdf.hdf5lib.callbacks.H5O_iterate_opdata_t;
+import hdf.hdf5lib.callbacks.H5O_iterate_t;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
+import hdf.hdf5lib.structs.H5O_hdr_info_t;
import hdf.hdf5lib.structs.H5O_info_t;
import hdf.hdf5lib.structs.H5O_native_info_t;
import hdf.hdf5lib.structs.H5O_token_t;
-import hdf.hdf5lib.structs.H5O_hdr_info_t;
import hdf.hdf5lib.structs.H5_ih_info_t;
import org.junit.After;
@@ -36,21 +36,21 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5Obasic {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
private static final String H5_FILE = "h5ex_g_iterateO1.hdf";
private static H5O_token_t H5la_ds1 = null;
- private static H5O_token_t H5la_l1 = null;
- long H5fid = HDF5Constants.H5I_INVALID_HID;
+ private static H5O_token_t H5la_l1 = null;
+ long H5fid = HDF5Constants.H5I_INVALID_HID;
@Before
- public void openH5file()
- throws HDF5LibraryException, NullPointerException {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ public void openH5file() throws HDF5LibraryException, NullPointerException
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
try {
- H5fid = H5.H5Fopen(H5_FILE, HDF5Constants.H5F_ACC_RDONLY,
- HDF5Constants.H5P_DEFAULT);
+ H5fid = H5.H5Fopen(H5_FILE, HDF5Constants.H5F_ACC_RDONLY, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
@@ -59,103 +59,136 @@ public class TestH5Obasic {
}
@After
- public void closeH5file() throws HDF5LibraryException {
+ public void closeH5file() throws HDF5LibraryException
+ {
if (H5fid > 0) {
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
}
System.out.println();
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Oopen_not_exists() throws Throwable {
+ public void testH5Oopen_not_exists() throws Throwable
+ {
long oid = HDF5Constants.H5I_INVALID_HID;
oid = H5.H5Oopen(H5fid, "Never_created", HDF5Constants.H5P_DEFAULT);
- try {H5.H5Oclose(oid);} catch (Exception ex) {}
+ try {
+ H5.H5Oclose(oid);
+ }
+ catch (Exception ex) {
+ }
}
@Test
- public void testH5Oget_info_dataset() {
- long oid = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Oget_info_dataset()
+ {
+ long oid = HDF5Constants.H5I_INVALID_HID;
H5O_info_t obj_info = null;
try {
- oid = H5.H5Oopen(H5fid, "DS1", HDF5Constants.H5P_DEFAULT);
+ oid = H5.H5Oopen(H5fid, "DS1", HDF5Constants.H5P_DEFAULT);
obj_info = H5.H5Oget_info(oid);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Oget_info: " + err);
}
- assertFalse("H5Oget_info ",obj_info==null);
- assertTrue("H5Oget_info object type",obj_info.type==HDF5Constants.H5O_TYPE_DATASET);
- try {H5.H5Oclose(oid);} catch (Exception ex) {}
+ assertFalse("H5Oget_info ", obj_info == null);
+ assertTrue("H5Oget_info object type", obj_info.type == HDF5Constants.H5O_TYPE_DATASET);
+ try {
+ H5.H5Oclose(oid);
+ }
+ catch (Exception ex) {
+ }
}
@Test
- public void testH5Oget_info_hardlink() {
- long oid = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Oget_info_hardlink()
+ {
+ long oid = HDF5Constants.H5I_INVALID_HID;
H5O_info_t obj_info = null;
try {
- oid = H5.H5Oopen(H5fid, "L1", HDF5Constants.H5P_DEFAULT);
+ oid = H5.H5Oopen(H5fid, "L1", HDF5Constants.H5P_DEFAULT);
obj_info = H5.H5Oget_info(oid);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Oget_info: " + err);
}
- assertFalse("H5Oget_info ",obj_info==null);
- assertTrue("H5Oget_info object type",obj_info.type==HDF5Constants.H5O_TYPE_DATASET);
- try {H5.H5Oclose(oid);} catch (Exception ex) {}
+ assertFalse("H5Oget_info ", obj_info == null);
+ assertTrue("H5Oget_info object type", obj_info.type == HDF5Constants.H5O_TYPE_DATASET);
+ try {
+ H5.H5Oclose(oid);
+ }
+ catch (Exception ex) {
+ }
}
@Test
- public void testH5Oget_info_group() {
- long oid = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Oget_info_group()
+ {
+ long oid = HDF5Constants.H5I_INVALID_HID;
H5O_info_t obj_info = null;
try {
- oid = H5.H5Oopen(H5fid, "G1", HDF5Constants.H5P_DEFAULT);
+ oid = H5.H5Oopen(H5fid, "G1", HDF5Constants.H5P_DEFAULT);
obj_info = H5.H5Oget_info(oid);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Oget_info: " + err);
}
- assertFalse("H5Oget_info ",obj_info==null);
- assertTrue("H5Oget_info object type",obj_info.type==HDF5Constants.H5O_TYPE_GROUP);
- try {H5.H5Oclose(oid);} catch (Exception ex) {}
+ assertFalse("H5Oget_info ", obj_info == null);
+ assertTrue("H5Oget_info object type", obj_info.type == HDF5Constants.H5O_TYPE_GROUP);
+ try {
+ H5.H5Oclose(oid);
+ }
+ catch (Exception ex) {
+ }
}
@Test
- public void testH5Oget_info_datatype() {
- long oid = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Oget_info_datatype()
+ {
+ long oid = HDF5Constants.H5I_INVALID_HID;
H5O_info_t obj_info = null;
try {
- oid = H5.H5Oopen(H5fid, "DT1", HDF5Constants.H5P_DEFAULT);
+ oid = H5.H5Oopen(H5fid, "DT1", HDF5Constants.H5P_DEFAULT);
obj_info = H5.H5Oget_info(oid);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Oget_info: " + err);
}
- assertFalse("H5Oget_info ",obj_info==null);
- assertTrue("H5Oget_info object type",obj_info.type==HDF5Constants.H5O_TYPE_NAMED_DATATYPE);
- try {H5.H5Oclose(oid);} catch (Exception ex) {}
+ assertFalse("H5Oget_info ", obj_info == null);
+ assertTrue("H5Oget_info object type", obj_info.type == HDF5Constants.H5O_TYPE_NAMED_DATATYPE);
+ try {
+ H5.H5Oclose(oid);
+ }
+ catch (Exception ex) {
+ }
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Oget_info_by_name_not_exist_name() throws Throwable {
+ public void testH5Oget_info_by_name_not_exist_name() throws Throwable
+ {
H5.H5Oget_info_by_name(H5fid, "None", HDF5Constants.H5P_DEFAULT);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Oget_info_by_name_not_exists() throws Throwable {
+ public void testH5Oget_info_by_name_not_exists() throws Throwable
+ {
H5.H5Oget_info_by_name(H5fid, "Bogus", HDF5Constants.H5P_DEFAULT);
}
@Test
- public void testH5Oget_info_by_name_dataset() {
+ public void testH5Oget_info_by_name_dataset()
+ {
H5O_info_t obj_info = null;
try {
@@ -165,12 +198,13 @@ public class TestH5Obasic {
err.printStackTrace();
fail("H5.H5Oget_info: " + err);
}
- assertFalse("H5Oget_info ",obj_info==null);
- assertTrue("H5Oget_info object type",obj_info.type==HDF5Constants.H5O_TYPE_DATASET);
+ assertFalse("H5Oget_info ", obj_info == null);
+ assertTrue("H5Oget_info object type", obj_info.type == HDF5Constants.H5O_TYPE_DATASET);
}
@Test
- public void testH5Oget_info_by_name_hardlink() {
+ public void testH5Oget_info_by_name_hardlink()
+ {
H5O_info_t obj_info = null;
try {
obj_info = H5.H5Oget_info_by_name(H5fid, "L1", HDF5Constants.H5P_DEFAULT);
@@ -179,12 +213,13 @@ public class TestH5Obasic {
err.printStackTrace();
fail("H5.H5Oget_info: " + err);
}
- assertFalse("H5Oget_info ",obj_info==null);
- assertTrue("H5Oget_info object type",obj_info.type==HDF5Constants.H5O_TYPE_DATASET);
+ assertFalse("H5Oget_info ", obj_info == null);
+ assertTrue("H5Oget_info object type", obj_info.type == HDF5Constants.H5O_TYPE_DATASET);
}
@Test
- public void testH5Oget_info_by_name_group() {
+ public void testH5Oget_info_by_name_group()
+ {
H5O_info_t obj_info = null;
try {
obj_info = H5.H5Oget_info_by_name(H5fid, "G1", HDF5Constants.H5P_DEFAULT);
@@ -193,12 +228,13 @@ public class TestH5Obasic {
err.printStackTrace();
fail("H5.H5Oget_info: " + err);
}
- assertFalse("H5Oget_info ",obj_info==null);
- assertTrue("H5Oget_info object type",obj_info.type==HDF5Constants.H5O_TYPE_GROUP);
+ assertFalse("H5Oget_info ", obj_info == null);
+ assertTrue("H5Oget_info object type", obj_info.type == HDF5Constants.H5O_TYPE_GROUP);
}
@Test
- public void testH5Oget_info_by_name_datatype() {
+ public void testH5Oget_info_by_name_datatype()
+ {
H5O_info_t obj_info = null;
try {
obj_info = H5.H5Oget_info_by_name(H5fid, "DT1", HDF5Constants.H5P_DEFAULT);
@@ -207,36 +243,45 @@ public class TestH5Obasic {
err.printStackTrace();
fail("H5.H5Oget_info: " + err);
}
- assertFalse("H5Oget_info ",obj_info==null);
- assertTrue("H5Oget_info object type",obj_info.type==HDF5Constants.H5O_TYPE_NAMED_DATATYPE);
+ assertFalse("H5Oget_info ", obj_info == null);
+ assertTrue("H5Oget_info object type", obj_info.type == HDF5Constants.H5O_TYPE_NAMED_DATATYPE);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Oget_info_by_idx_name_not_exist_name() throws Throwable {
- H5.H5Oget_info_by_idx(H5fid, "None", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 0, HDF5Constants.H5P_DEFAULT);
+ public void testH5Oget_info_by_idx_name_not_exist_name() throws Throwable
+ {
+ H5.H5Oget_info_by_idx(H5fid, "None", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 0,
+ HDF5Constants.H5P_DEFAULT);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Oget_info_by_idx_name_not_exist_create() throws Throwable {
- H5.H5Oget_info_by_idx(H5fid, "None", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 0, HDF5Constants.H5P_DEFAULT);
+ public void testH5Oget_info_by_idx_name_not_exist_create() throws Throwable
+ {
+ H5.H5Oget_info_by_idx(H5fid, "None", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 0,
+ HDF5Constants.H5P_DEFAULT);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Oget_info_by_idx_not_exist_name() throws Throwable {
- H5.H5Oget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 5, HDF5Constants.H5P_DEFAULT);
+ public void testH5Oget_info_by_idx_not_exist_name() throws Throwable
+ {
+ H5.H5Oget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 5,
+ HDF5Constants.H5P_DEFAULT);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Oget_info_by_idx_not_exist_create() throws Throwable {
- H5.H5Oget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 5, HDF5Constants.H5P_DEFAULT);
+ public void testH5Oget_info_by_idx_not_exist_create() throws Throwable
+ {
+ H5.H5Oget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 5,
+ HDF5Constants.H5P_DEFAULT);
}
@Test
- public void testH5Oget_info_by_idx_n0() {
- long oid = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Oget_info_by_idx_n0()
+ {
+ long oid = HDF5Constants.H5I_INVALID_HID;
H5O_info_t obj_info = null;
try {
- oid = H5.H5Oopen(H5fid, "DS1", HDF5Constants.H5P_DEFAULT);
+ oid = H5.H5Oopen(H5fid, "DS1", HDF5Constants.H5P_DEFAULT);
obj_info = H5.H5Oget_info(oid);
}
catch (Throwable err) {
@@ -244,25 +289,32 @@ public class TestH5Obasic {
fail("testH5Oget_info_by_idx_n0:H5.H5Oget_info: " + err);
}
H5la_ds1 = obj_info.token;
- try {H5.H5Oclose(oid);} catch (Exception ex) {}
try {
- obj_info = H5.H5Oget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 0, HDF5Constants.H5P_DEFAULT);
+ H5.H5Oclose(oid);
+ }
+ catch (Exception ex) {
+ }
+ try {
+ obj_info = H5.H5Oget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME,
+ HDF5Constants.H5_ITER_INC, 0, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("testH5Oget_info_by_idx_n0:H5.H5Oget_info_by_idx: " + err);
}
- assertFalse("testH5Oget_info_by_idx_n0:H5Oget_info_by_idx ",obj_info==null);
- assertTrue("testH5Oget_info_by_idx_n0:H5Oget_info_by_idx link type",obj_info.type==HDF5Constants.H5O_TYPE_DATASET);
+ assertFalse("testH5Oget_info_by_idx_n0:H5Oget_info_by_idx ", obj_info == null);
+ assertTrue("testH5Oget_info_by_idx_n0:H5Oget_info_by_idx link type",
+ obj_info.type == HDF5Constants.H5O_TYPE_DATASET);
assertTrue("testH5Oget_info_by_idx_n0:Link Object token", obj_info.token.equals(H5la_ds1));
}
@Test
- public void testH5Oget_info_by_idx_n3() {
- long oid = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Oget_info_by_idx_n3()
+ {
+ long oid = HDF5Constants.H5I_INVALID_HID;
H5O_info_t obj_info = null;
try {
- oid = H5.H5Oopen(H5fid, "L1", HDF5Constants.H5P_DEFAULT);
+ oid = H5.H5Oopen(H5fid, "L1", HDF5Constants.H5P_DEFAULT);
obj_info = H5.H5Oget_info(oid);
}
catch (Throwable err) {
@@ -270,26 +322,33 @@ public class TestH5Obasic {
fail("testH5Oget_info_by_idx_n3:H5.H5Oget_info: " + err);
}
H5la_l1 = obj_info.token;
- try {H5.H5Oclose(oid);} catch (Exception ex) {}
try {
- obj_info = H5.H5Oget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 3, HDF5Constants.H5P_DEFAULT);
+ H5.H5Oclose(oid);
+ }
+ catch (Exception ex) {
+ }
+ try {
+ obj_info = H5.H5Oget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME,
+ HDF5Constants.H5_ITER_INC, 3, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("testH5Oget_info_by_idx_n3:H5.H5Oget_info_by_idx: " + err);
}
- assertFalse("testH5Oget_info_by_idx_n3:H5Oget_info_by_idx ",obj_info==null);
- assertTrue("testH5Oget_info_by_idx_n3:H5Oget_info_by_idx link type",obj_info.type==HDF5Constants.H5O_TYPE_DATASET);
+ assertFalse("testH5Oget_info_by_idx_n3:H5Oget_info_by_idx ", obj_info == null);
+ assertTrue("testH5Oget_info_by_idx_n3:H5Oget_info_by_idx link type",
+ obj_info.type == HDF5Constants.H5O_TYPE_DATASET);
assertTrue("testH5Oget_info_by_idx_n3:Link Object Token", obj_info.token.equals(H5la_l1));
}
@Test
- public void testH5Oget_native_info_dataset() {
- long oid = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Oget_native_info_dataset()
+ {
+ long oid = HDF5Constants.H5I_INVALID_HID;
H5O_native_info_t native_info = null;
try {
- oid = H5.H5Oopen(H5fid, "DS1", HDF5Constants.H5P_DEFAULT);
+ oid = H5.H5Oopen(H5fid, "DS1", HDF5Constants.H5P_DEFAULT);
native_info = H5.H5Oget_native_info(oid);
}
catch (Throwable err) {
@@ -300,16 +359,21 @@ public class TestH5Obasic {
assertFalse("H5Oget_native_info ", native_info.hdr_info == null);
assertFalse("H5Oget_native_info ", native_info.obj_info == null);
assertFalse("H5Oget_native_info ", native_info.attr_info == null);
- try {H5.H5Oclose(oid);} catch (Exception ex) {}
+ try {
+ H5.H5Oclose(oid);
+ }
+ catch (Exception ex) {
+ }
}
@Test
- public void testH5Oget_native_info_hardlink() {
- long oid = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Oget_native_info_hardlink()
+ {
+ long oid = HDF5Constants.H5I_INVALID_HID;
H5O_native_info_t native_info = null;
try {
- oid = H5.H5Oopen(H5fid, "L1", HDF5Constants.H5P_DEFAULT);
+ oid = H5.H5Oopen(H5fid, "L1", HDF5Constants.H5P_DEFAULT);
native_info = H5.H5Oget_native_info(oid);
}
catch (Throwable err) {
@@ -320,16 +384,21 @@ public class TestH5Obasic {
assertFalse("H5Oget_native_info ", native_info.hdr_info == null);
assertFalse("H5Oget_native_info ", native_info.obj_info == null);
assertFalse("H5Oget_native_info ", native_info.attr_info == null);
- try {H5.H5Oclose(oid);} catch (Exception ex) {}
+ try {
+ H5.H5Oclose(oid);
+ }
+ catch (Exception ex) {
+ }
}
@Test
- public void testH5Oget_native_info_group() {
- long oid = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Oget_native_info_group()
+ {
+ long oid = HDF5Constants.H5I_INVALID_HID;
H5O_native_info_t native_info = null;
try {
- oid = H5.H5Oopen(H5fid, "G1", HDF5Constants.H5P_DEFAULT);
+ oid = H5.H5Oopen(H5fid, "G1", HDF5Constants.H5P_DEFAULT);
native_info = H5.H5Oget_native_info(oid);
}
catch (Throwable err) {
@@ -340,16 +409,21 @@ public class TestH5Obasic {
assertFalse("H5Oget_native_info ", native_info.hdr_info == null);
assertFalse("H5Oget_native_info ", native_info.obj_info == null);
assertFalse("H5Oget_native_info ", native_info.attr_info == null);
- try {H5.H5Oclose(oid);} catch (Exception ex) {}
+ try {
+ H5.H5Oclose(oid);
+ }
+ catch (Exception ex) {
+ }
}
@Test
- public void testH5Oget_native_info_datatype() {
- long oid = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Oget_native_info_datatype()
+ {
+ long oid = HDF5Constants.H5I_INVALID_HID;
H5O_native_info_t native_info = null;
try {
- oid = H5.H5Oopen(H5fid, "DT1", HDF5Constants.H5P_DEFAULT);
+ oid = H5.H5Oopen(H5fid, "DT1", HDF5Constants.H5P_DEFAULT);
native_info = H5.H5Oget_native_info(oid);
}
catch (Throwable err) {
@@ -360,21 +434,28 @@ public class TestH5Obasic {
assertFalse("H5Oget_native_info ", native_info.hdr_info == null);
assertFalse("H5Oget_native_info ", native_info.obj_info == null);
assertFalse("H5Oget_native_info ", native_info.attr_info == null);
- try {H5.H5Oclose(oid);} catch (Exception ex) {}
+ try {
+ H5.H5Oclose(oid);
+ }
+ catch (Exception ex) {
+ }
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Oget_native_info_by_name_not_exist_name() throws Throwable {
+ public void testH5Oget_native_info_by_name_not_exist_name() throws Throwable
+ {
H5.H5Oget_native_info_by_name(H5fid, "None", HDF5Constants.H5P_DEFAULT);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Oget_native_info_by_name_not_exists() throws Throwable {
+ public void testH5Oget_native_info_by_name_not_exists() throws Throwable
+ {
H5.H5Oget_native_info_by_name(H5fid, "Bogus", HDF5Constants.H5P_DEFAULT);
}
@Test
- public void testH5Oget_native_info_by_name_dataset() {
+ public void testH5Oget_native_info_by_name_dataset()
+ {
H5O_native_info_t native_info = null;
try {
@@ -391,7 +472,8 @@ public class TestH5Obasic {
}
@Test
- public void testH5Oget_native_info_by_name_hardlink() {
+ public void testH5Oget_native_info_by_name_hardlink()
+ {
H5O_native_info_t native_info = null;
try {
@@ -408,7 +490,8 @@ public class TestH5Obasic {
}
@Test
- public void testH5Oget_native_info_by_name_group() {
+ public void testH5Oget_native_info_by_name_group()
+ {
H5O_native_info_t native_info = null;
try {
@@ -425,7 +508,8 @@ public class TestH5Obasic {
}
@Test
- public void testH5Oget_native_info_by_name_datatype() {
+ public void testH5Oget_native_info_by_name_datatype()
+ {
H5O_native_info_t native_info = null;
try {
@@ -442,35 +526,44 @@ public class TestH5Obasic {
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Oget_native_info_by_idx_name_not_exist_name() throws Throwable {
- H5.H5Oget_native_info_by_idx(H5fid, "None", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 0, HDF5Constants.H5P_DEFAULT);
+ public void testH5Oget_native_info_by_idx_name_not_exist_name() throws Throwable
+ {
+ H5.H5Oget_native_info_by_idx(H5fid, "None", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 0,
+ HDF5Constants.H5P_DEFAULT);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Oget_native_info_by_idx_name_not_exist_create() throws Throwable {
- H5.H5Oget_native_info_by_idx(H5fid, "None", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 0, HDF5Constants.H5P_DEFAULT);
+ public void testH5Oget_native_info_by_idx_name_not_exist_create() throws Throwable
+ {
+ H5.H5Oget_native_info_by_idx(H5fid, "None", HDF5Constants.H5_INDEX_CRT_ORDER,
+ HDF5Constants.H5_ITER_INC, 0, HDF5Constants.H5P_DEFAULT);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Oget_native_info_by_idx_not_exist_name() throws Throwable {
- H5.H5Oget_native_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 5, HDF5Constants.H5P_DEFAULT);
+ public void testH5Oget_native_info_by_idx_not_exist_name() throws Throwable
+ {
+ H5.H5Oget_native_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 5,
+ HDF5Constants.H5P_DEFAULT);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Oget_native_info_by_idx_not_exist_create() throws Throwable {
- H5.H5Oget_native_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 5, HDF5Constants.H5P_DEFAULT);
+ public void testH5Oget_native_info_by_idx_not_exist_create() throws Throwable
+ {
+ H5.H5Oget_native_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC,
+ 5, HDF5Constants.H5P_DEFAULT);
}
@Test
- public void testH5Oget_native_info_by_idx_n0() {
- long oid = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Oget_native_info_by_idx_n0()
+ {
+ long oid = HDF5Constants.H5I_INVALID_HID;
H5O_native_info_t native_info = null;
H5O_hdr_info_t ohdr;
H5_ih_info_t oinfo;
H5_ih_info_t ainfo;
try {
- oid = H5.H5Oopen(H5fid, "DS1", HDF5Constants.H5P_DEFAULT);
+ oid = H5.H5Oopen(H5fid, "DS1", HDF5Constants.H5P_DEFAULT);
native_info = H5.H5Oget_native_info(oid);
}
catch (Throwable err) {
@@ -478,14 +571,20 @@ public class TestH5Obasic {
fail("testH5Oget_native_info_by_idx_n0:H5.H5Oget_native_info: " + err);
}
- ohdr = native_info.hdr_info;
+ ohdr = native_info.hdr_info;
oinfo = native_info.obj_info;
ainfo = native_info.attr_info;
- try {H5.H5Oclose(oid);} catch (Exception ex) {}
+ try {
+ H5.H5Oclose(oid);
+ }
+ catch (Exception ex) {
+ }
try {
- native_info = H5.H5Oget_native_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 0, HDF5Constants.H5P_DEFAULT);
+ native_info =
+ H5.H5Oget_native_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME,
+ HDF5Constants.H5_ITER_INC, 0, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
@@ -501,15 +600,16 @@ public class TestH5Obasic {
}
@Test
- public void testH5Oget_native_info_by_idx_n3() {
- long oid = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Oget_native_info_by_idx_n3()
+ {
+ long oid = HDF5Constants.H5I_INVALID_HID;
H5O_native_info_t native_info = null;
H5O_hdr_info_t ohdr;
H5_ih_info_t oinfo;
H5_ih_info_t ainfo;
try {
- oid = H5.H5Oopen(H5fid, "L1", HDF5Constants.H5P_DEFAULT);
+ oid = H5.H5Oopen(H5fid, "L1", HDF5Constants.H5P_DEFAULT);
native_info = H5.H5Oget_native_info(oid);
}
catch (Throwable err) {
@@ -517,14 +617,20 @@ public class TestH5Obasic {
fail("testH5Oget_native_info_by_idx_n3:H5.H5Oget_native_info: " + err);
}
- ohdr = native_info.hdr_info;
+ ohdr = native_info.hdr_info;
oinfo = native_info.obj_info;
ainfo = native_info.attr_info;
- try {H5.H5Oclose(oid);} catch (Exception ex) {}
+ try {
+ H5.H5Oclose(oid);
+ }
+ catch (Exception ex) {
+ }
try {
- native_info = H5.H5Oget_native_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 3, HDF5Constants.H5P_DEFAULT);
+ native_info =
+ H5.H5Oget_native_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME,
+ HDF5Constants.H5_ITER_INC, 3, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
@@ -540,11 +646,13 @@ public class TestH5Obasic {
}
@Test
- public void testH5Ovisit() {
+ public void testH5Ovisit()
+ {
class idata {
public String link_name = null;
- public int link_type = -1;
- idata(String name, int type) {
+ public int link_type = -1;
+ idata(String name, int type)
+ {
this.link_name = name;
this.link_type = type;
}
@@ -554,7 +662,8 @@ public class TestH5Obasic {
}
H5O_iterate_opdata_t iter_data = new H5O_iter_data();
class H5O_iter_callback implements H5O_iterate_t {
- public int callback(long group, String name, H5O_info_t info, H5O_iterate_opdata_t op_data) {
+ public int callback(long group, String name, H5O_info_t info, H5O_iterate_opdata_t op_data)
+ {
idata id = new idata(name, info.type);
((H5O_iter_data)op_data).iterdata.add(id);
return 0;
@@ -568,22 +677,31 @@ public class TestH5Obasic {
err.printStackTrace();
fail("H5.H5Ovisit: " + err);
}
- assertFalse("H5Ovisit ",((H5O_iter_data)iter_data).iterdata.isEmpty());
- assertTrue("H5Ovisit "+((H5O_iter_data)iter_data).iterdata.size(),((H5O_iter_data)iter_data).iterdata.size()==5);
- assertTrue("H5Ovisit "+(((H5O_iter_data)iter_data).iterdata.get(0)).link_name,(((H5O_iter_data)iter_data).iterdata.get(0)).link_name.compareToIgnoreCase(".")==0);
- assertTrue("H5Ovisit "+(((H5O_iter_data)iter_data).iterdata.get(1)).link_name,(((H5O_iter_data)iter_data).iterdata.get(1)).link_name.compareToIgnoreCase("DS1")==0);
- assertTrue("H5Ovisit "+(((H5O_iter_data)iter_data).iterdata.get(2)).link_name,(((H5O_iter_data)iter_data).iterdata.get(2)).link_name.compareToIgnoreCase("DT1")==0);
- assertTrue("H5Ovisit "+(((H5O_iter_data)iter_data).iterdata.get(3)).link_name,(((H5O_iter_data)iter_data).iterdata.get(3)).link_name.compareToIgnoreCase("G1")==0);
- assertTrue("H5Ovisit "+(((H5O_iter_data)iter_data).iterdata.get(4)).link_name,(((H5O_iter_data)iter_data).iterdata.get(4)).link_name.compareToIgnoreCase("G1/DS2")==0);
-// assertTrue("H5Ovisit "+((idata)((H5O_iter_data)iter_data).iterdata.get(5)).link_name,((idata)((H5O_iter_data)iter_data).iterdata.get(5)).link_name.compareToIgnoreCase("L1")==0);
+ assertFalse("H5Ovisit ", ((H5O_iter_data)iter_data).iterdata.isEmpty());
+ assertTrue("H5Ovisit " + ((H5O_iter_data)iter_data).iterdata.size(),
+ ((H5O_iter_data)iter_data).iterdata.size() == 5);
+ assertTrue("H5Ovisit " + (((H5O_iter_data)iter_data).iterdata.get(0)).link_name,
+ (((H5O_iter_data)iter_data).iterdata.get(0)).link_name.compareToIgnoreCase(".") == 0);
+ assertTrue("H5Ovisit " + (((H5O_iter_data)iter_data).iterdata.get(1)).link_name,
+ (((H5O_iter_data)iter_data).iterdata.get(1)).link_name.compareToIgnoreCase("DS1") == 0);
+ assertTrue("H5Ovisit " + (((H5O_iter_data)iter_data).iterdata.get(2)).link_name,
+ (((H5O_iter_data)iter_data).iterdata.get(2)).link_name.compareToIgnoreCase("DT1") == 0);
+ assertTrue("H5Ovisit " + (((H5O_iter_data)iter_data).iterdata.get(3)).link_name,
+ (((H5O_iter_data)iter_data).iterdata.get(3)).link_name.compareToIgnoreCase("G1") == 0);
+ assertTrue("H5Ovisit " + (((H5O_iter_data)iter_data).iterdata.get(4)).link_name,
+ (((H5O_iter_data)iter_data).iterdata.get(4)).link_name.compareToIgnoreCase("G1/DS2") == 0);
+ // assertTrue("H5Ovisit
+ // "+((idata)((H5O_iter_data)iter_data).iterdata.get(5)).link_name,((idata)((H5O_iter_data)iter_data).iterdata.get(5)).link_name.compareToIgnoreCase("L1")==0);
}
@Test
- public void testH5Ovisit_by_name() {
+ public void testH5Ovisit_by_name()
+ {
class idata {
public String link_name = null;
- public int link_type = -1;
- idata(String name, int type) {
+ public int link_type = -1;
+ idata(String name, int type)
+ {
this.link_name = name;
this.link_type = type;
}
@@ -593,7 +711,8 @@ public class TestH5Obasic {
}
H5O_iterate_opdata_t iter_data = new H5O_iter_data();
class H5O_iter_callback implements H5O_iterate_t {
- public int callback(long group, String name, H5O_info_t info, H5O_iterate_opdata_t op_data) {
+ public int callback(long group, String name, H5O_info_t info, H5O_iterate_opdata_t op_data)
+ {
idata id = new idata(name, info.type);
((H5O_iter_data)op_data).iterdata.add(id);
return 0;
@@ -601,20 +720,25 @@ public class TestH5Obasic {
}
H5O_iterate_t iter_cb = new H5O_iter_callback();
try {
- H5.H5Ovisit_by_name(H5fid, "G1", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, iter_cb, iter_data, HDF5Constants.H5P_DEFAULT);
+ H5.H5Ovisit_by_name(H5fid, "G1", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, iter_cb,
+ iter_data, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Ovisit_by_name: " + err);
}
- assertFalse("H5Ovisit_by_name ",((H5O_iter_data)iter_data).iterdata.isEmpty());
- assertTrue("H5Ovisit_by_name "+((H5O_iter_data)iter_data).iterdata.size(),((H5O_iter_data)iter_data).iterdata.size()==2);
- assertTrue("H5Ovisit_by_name "+(((H5O_iter_data)iter_data).iterdata.get(0)).link_name,(((H5O_iter_data)iter_data).iterdata.get(0)).link_name.compareToIgnoreCase(".")==0);
- assertTrue("H5Ovisit_by_name "+(((H5O_iter_data)iter_data).iterdata.get(1)).link_name,(((H5O_iter_data)iter_data).iterdata.get(1)).link_name.compareToIgnoreCase("DS2")==0);
+ assertFalse("H5Ovisit_by_name ", ((H5O_iter_data)iter_data).iterdata.isEmpty());
+ assertTrue("H5Ovisit_by_name " + ((H5O_iter_data)iter_data).iterdata.size(),
+ ((H5O_iter_data)iter_data).iterdata.size() == 2);
+ assertTrue("H5Ovisit_by_name " + (((H5O_iter_data)iter_data).iterdata.get(0)).link_name,
+ (((H5O_iter_data)iter_data).iterdata.get(0)).link_name.compareToIgnoreCase(".") == 0);
+ assertTrue("H5Ovisit_by_name " + (((H5O_iter_data)iter_data).iterdata.get(1)).link_name,
+ (((H5O_iter_data)iter_data).iterdata.get(1)).link_name.compareToIgnoreCase("DS2") == 0);
}
@Test
- public void testH5Oexists_by_name() {
+ public void testH5Oexists_by_name()
+ {
boolean name_exists = false;
try {
name_exists = H5.H5Oexists_by_name(H5fid, "G1", HDF5Constants.H5P_DEFAULT);
@@ -624,16 +748,17 @@ public class TestH5Obasic {
fail("H5.H5Oexists_by_name: " + err);
}
assertTrue("H5Oexists_by_name ", name_exists);
- //TODO get dangling link result
+ // TODO get dangling link result
}
@Test
- public void testH5Oopen_by_token() {
- long oid = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Oopen_by_token()
+ {
+ long oid = HDF5Constants.H5I_INVALID_HID;
H5O_info_t obj_info = null;
try {
try {
- oid = H5.H5Oopen(H5fid, "DS1", HDF5Constants.H5P_DEFAULT);
+ oid = H5.H5Oopen(H5fid, "DS1", HDF5Constants.H5P_DEFAULT);
obj_info = H5.H5Oget_info(oid);
}
catch (Throwable err) {
@@ -641,7 +766,11 @@ public class TestH5Obasic {
fail("testH5Oopen_by_token: H5.H5Oget_info: " + err);
}
H5la_ds1 = obj_info.token;
- try {H5.H5Oclose(oid);} catch (Exception ex) {}
+ try {
+ H5.H5Oclose(oid);
+ }
+ catch (Exception ex) {
+ }
try {
oid = H5.H5Oopen_by_token(H5fid, H5la_ds1);
}
@@ -656,22 +785,28 @@ public class TestH5Obasic {
err.printStackTrace();
fail("testH5Oopen_by_token: H5.H5Oget_info: " + err);
}
- assertFalse("testH5Oopen_by_token: H5Oget_info ",obj_info==null);
- assertTrue("testH5Oopen_by_token: H5Oget_info link type",obj_info.type==HDF5Constants.H5O_TYPE_DATASET);
+ assertFalse("testH5Oopen_by_token: H5Oget_info ", obj_info == null);
+ assertTrue("testH5Oopen_by_token: H5Oget_info link type",
+ obj_info.type == HDF5Constants.H5O_TYPE_DATASET);
assertTrue("testH5Oopen_by_token: Link Object Token", obj_info.token.equals(H5la_ds1));
}
finally {
- try{H5.H5Oclose(oid);} catch (Exception ex) {}
+ try {
+ H5.H5Oclose(oid);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Oopen_by_idx_n0() {
- long oid = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Oopen_by_idx_n0()
+ {
+ long oid = HDF5Constants.H5I_INVALID_HID;
H5O_info_t obj_info = null;
try {
try {
- oid = H5.H5Oopen(H5fid, "DS1", HDF5Constants.H5P_DEFAULT);
+ oid = H5.H5Oopen(H5fid, "DS1", HDF5Constants.H5P_DEFAULT);
obj_info = H5.H5Oget_info(oid);
}
catch (Throwable err) {
@@ -679,9 +814,14 @@ public class TestH5Obasic {
fail("testH5Oopen_by_idx_n0: H5.H5Oget_info: " + err);
}
H5la_ds1 = obj_info.token;
- try {H5.H5Oclose(oid);} catch (Exception ex) {}
try {
- oid = H5.H5Oopen_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 0, HDF5Constants.H5P_DEFAULT);
+ H5.H5Oclose(oid);
+ }
+ catch (Exception ex) {
+ }
+ try {
+ oid = H5.H5Oopen_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 0,
+ HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
@@ -694,22 +834,28 @@ public class TestH5Obasic {
err.printStackTrace();
fail("testH5Oopen_by_idx_n0: H5.H5Oget_info_by_idx: " + err);
}
- assertFalse("testH5Oopen_by_idx_n0: H5Oget_info_by_idx ",obj_info==null);
- assertTrue("testH5Oopen_by_idx_n0: H5Oget_info_by_idx link type",obj_info.type==HDF5Constants.H5O_TYPE_DATASET);
+ assertFalse("testH5Oopen_by_idx_n0: H5Oget_info_by_idx ", obj_info == null);
+ assertTrue("testH5Oopen_by_idx_n0: H5Oget_info_by_idx link type",
+ obj_info.type == HDF5Constants.H5O_TYPE_DATASET);
assertTrue("testH5Oopen_by_idx_n0: Link Object Token", obj_info.token.equals(H5la_ds1));
}
finally {
- try{H5.H5Oclose(oid);} catch (Exception ex) {}
+ try {
+ H5.H5Oclose(oid);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Oopen_by_idx_n3() {
- long oid = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Oopen_by_idx_n3()
+ {
+ long oid = HDF5Constants.H5I_INVALID_HID;
H5O_info_t obj_info = null;
try {
try {
- oid = H5.H5Oopen(H5fid, "L1", HDF5Constants.H5P_DEFAULT);
+ oid = H5.H5Oopen(H5fid, "L1", HDF5Constants.H5P_DEFAULT);
obj_info = H5.H5Oget_info(oid);
}
catch (Throwable err) {
@@ -717,9 +863,14 @@ public class TestH5Obasic {
fail("testH5Oopen_by_idx_n3:H5.H5Oget_info: " + err);
}
H5la_l1 = obj_info.token;
- try {H5.H5Oclose(oid);} catch (Exception ex) {}
try {
- oid = H5.H5Oopen_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 3, HDF5Constants.H5P_DEFAULT);
+ H5.H5Oclose(oid);
+ }
+ catch (Exception ex) {
+ }
+ try {
+ oid = H5.H5Oopen_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 3,
+ HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
@@ -732,12 +883,17 @@ public class TestH5Obasic {
err.printStackTrace();
fail("testH5Oopen_by_idx_n3:H5.H5Oget_info_by_idx: " + err);
}
- assertFalse("testH5Oopen_by_idx_n3:H5Oget_info_by_idx ",obj_info==null);
- assertTrue("testH5Oopen_by_idx_n3:H5Oget_info_by_idx link type",obj_info.type==HDF5Constants.H5O_TYPE_DATASET);
+ assertFalse("testH5Oopen_by_idx_n3:H5Oget_info_by_idx ", obj_info == null);
+ assertTrue("testH5Oopen_by_idx_n3:H5Oget_info_by_idx link type",
+ obj_info.type == HDF5Constants.H5O_TYPE_DATASET);
assertTrue("testH5Oopen_by_idx_n3:Link Object Token", obj_info.token.equals(H5la_l1));
}
finally {
- try{H5.H5Oclose(oid);} catch (Exception ex) {}
+ try {
+ H5.H5Oclose(oid);
+ }
+ catch (Exception ex) {
+ }
}
}
}
diff --git a/java/test/TestH5Ocopy.java b/java/test/TestH5Ocopy.java
index 821cad3..e429fef 100644
--- a/java/test/TestH5Ocopy.java
+++ b/java/test/TestH5Ocopy.java
@@ -31,20 +31,22 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5Ocopy {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
private static final String FILENAME = "testRefsattribute.h5";
- private static final int DIM_X = 4;
- private static final int DIM_Y = 6;
- long H5fid = HDF5Constants.H5I_INVALID_HID;
- long H5dsid = HDF5Constants.H5I_INVALID_HID;
- long H5did1 = HDF5Constants.H5I_INVALID_HID;
- long H5did2 = HDF5Constants.H5I_INVALID_HID;
- long H5gcpl = HDF5Constants.H5I_INVALID_HID;
- long H5gid = HDF5Constants.H5I_INVALID_HID;
- long H5dsid2 = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { 2 };
-
- private final void _deleteFile(String filename) {
+ private static final int DIM_X = 4;
+ private static final int DIM_Y = 6;
+ long H5fid = HDF5Constants.H5I_INVALID_HID;
+ long H5dsid = HDF5Constants.H5I_INVALID_HID;
+ long H5did1 = HDF5Constants.H5I_INVALID_HID;
+ long H5did2 = HDF5Constants.H5I_INVALID_HID;
+ long H5gcpl = HDF5Constants.H5I_INVALID_HID;
+ long H5gid = HDF5Constants.H5I_INVALID_HID;
+ long H5dsid2 = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {2};
+
+ private final void _deleteFile(String filename)
+ {
File file = new File(filename);
if (file.exists()) {
@@ -57,87 +59,113 @@ public class TestH5Ocopy {
}
}
- private final long _createDataset(long fid, long dsid, String name, long dapl) {
+ private final long _createDataset(long fid, long dsid, String name, long dapl)
+ {
long did = HDF5Constants.H5I_INVALID_HID;
try {
- did = H5.H5Dcreate(fid, name,
- HDF5Constants.H5T_STD_I32BE, dsid,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, dapl);
+ did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32BE, dsid, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, dapl);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Dcreate: " + err);
}
- assertTrue("TestH5O._createDataset: ",did >= 0);
+ assertTrue("TestH5O._createDataset: ", did >= 0);
return did;
}
- private final long _createGroup(long fid, String name) {
+ private final long _createGroup(long fid, String name)
+ {
long gid = HDF5Constants.H5I_INVALID_HID;
try {
H5gcpl = HDF5Constants.H5P_DEFAULT;
- gid = H5.H5Gcreate(fid, name, HDF5Constants.H5P_DEFAULT,
- H5gcpl, HDF5Constants.H5P_DEFAULT);
+ gid = H5.H5Gcreate(fid, name, HDF5Constants.H5P_DEFAULT, H5gcpl, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Gcreate: " + err);
}
- assertTrue("TestH5O._createGroup: ",gid >= 0);
+ assertTrue("TestH5O._createGroup: ", gid >= 0);
return gid;
}
@Before
- public void createH5file()
- throws NullPointerException, HDF5Exception {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ public void createH5file() throws NullPointerException, HDF5Exception
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
try {
- H5fid = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
- H5dsid2 = H5.H5Screate(HDF5Constants.H5S_SCALAR);
- H5did1 = _createDataset(H5fid, H5dsid2, "DS2", HDF5Constants.H5P_DEFAULT);
- H5dsid = H5.H5Screate_simple(1, dims, null);
- H5gid = _createGroup(H5fid, "/G1");
- H5did2 = _createDataset(H5gid, H5dsid, "DS1", HDF5Constants.H5P_DEFAULT);
+ H5fid = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
+ H5dsid2 = H5.H5Screate(HDF5Constants.H5S_SCALAR);
+ H5did1 = _createDataset(H5fid, H5dsid2, "DS2", HDF5Constants.H5P_DEFAULT);
+ H5dsid = H5.H5Screate_simple(1, dims, null);
+ H5gid = _createGroup(H5fid, "/G1");
+ H5did2 = _createDataset(H5gid, H5dsid, "DS1", HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("TestH5O.createH5file: " + err);
}
- assertTrue("TestH5O.createH5file: H5.H5Fcreate: ",H5fid >= 0);
- assertTrue("TestH5O.createH5file: H5.H5Screate_simple: ",H5dsid >= 0);
- assertTrue("TestH5O.createH5file: H5.H5Gcreate: ",H5gid >= 0);
+ assertTrue("TestH5O.createH5file: H5.H5Fcreate: ", H5fid >= 0);
+ assertTrue("TestH5O.createH5file: H5.H5Screate_simple: ", H5dsid >= 0);
+ assertTrue("TestH5O.createH5file: H5.H5Gcreate: ", H5gid >= 0);
H5.H5Fflush(H5fid, HDF5Constants.H5F_SCOPE_LOCAL);
}
@After
- public void deleteH5file() throws HDF5LibraryException {
+ public void deleteH5file() throws HDF5LibraryException
+ {
if (H5gid > 0)
- try {H5.H5Gclose(H5gid);} catch (Exception ex) {}
+ try {
+ H5.H5Gclose(H5gid);
+ }
+ catch (Exception ex) {
+ }
if (H5did2 > 0)
- try {H5.H5Dclose(H5did2);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5did2);
+ }
+ catch (Exception ex) {
+ }
if (H5dsid > 0)
- try {H5.H5Sclose(H5dsid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(H5dsid);
+ }
+ catch (Exception ex) {
+ }
if (H5dsid2 > 0)
- try {H5.H5Sclose(H5dsid2);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(H5dsid2);
+ }
+ catch (Exception ex) {
+ }
if (H5did1 > 0)
- try {H5.H5Dclose(H5did1);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5did1);
+ }
+ catch (Exception ex) {
+ }
if (H5fid > 0)
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
_deleteFile(FILENAME);
System.out.println();
}
@Test
- public void testH5OcopyRefsAttr() {
- long ocp_plist_id = HDF5Constants.H5I_INVALID_HID;
+ public void testH5OcopyRefsAttr()
+ {
+ long ocp_plist_id = HDF5Constants.H5I_INVALID_HID;
byte[][] dset_data = new byte[2][HDF5Constants.H5R_REF_BUF_SIZE];
- long attribute_id = HDF5Constants.H5I_INVALID_HID;
+ long attribute_id = HDF5Constants.H5I_INVALID_HID;
try {
try {
@@ -147,7 +175,7 @@ public class TestH5Ocopy {
err.printStackTrace();
fail("testH5OcopyRefsAttr: H5Rcreate_object " + err);
}
-
+
try {
dset_data[1] = H5.H5Rcreate_object(H5fid, "DS2", HDF5Constants.H5P_DEFAULT);
}
@@ -155,27 +183,40 @@ public class TestH5Ocopy {
err.printStackTrace();
fail("testH5OcopyRefsAttr: H5Rcreate_object " + err);
}
-
+
try {
- attribute_id = H5.H5Acreate(H5did2, "A1", HDF5Constants.H5T_STD_REF, H5dsid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ attribute_id = H5.H5Acreate(H5did2, "A1", HDF5Constants.H5T_STD_REF, H5dsid,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
assertTrue("testH5OcopyRefsAttr.H5Acreate: ", attribute_id >= 0);
H5.H5Awrite(attribute_id, HDF5Constants.H5T_STD_REF, dset_data);
-
+
H5.H5Aclose(attribute_id);
}
catch (Exception ex) {
fail("testH5OcopyRefsAttr: H5Awrite failed");
}
finally {
- try {H5.H5Aclose(attribute_id);} catch (Exception exx) {}
+ try {
+ H5.H5Aclose(attribute_id);
+ }
+ catch (Exception exx) {
+ }
}
}
catch (Exception ex) {
ex.printStackTrace();
}
finally {
- try {H5.H5Rdestroy(dset_data[1]);} catch (Exception ex) {}
- try {H5.H5Rdestroy(dset_data[0]);} catch (Exception ex) {}
+ try {
+ H5.H5Rdestroy(dset_data[1]);
+ }
+ catch (Exception ex) {
+ }
+ try {
+ H5.H5Rdestroy(dset_data[0]);
+ }
+ catch (Exception ex) {
+ }
}
try {
@@ -185,19 +226,24 @@ public class TestH5Ocopy {
H5.H5Ocopy(H5fid, ".", H5fid, "CPYREF", ocp_plist_id, HDF5Constants.H5P_DEFAULT);
}
catch (Exception ex) {
- fail("testH5OcopyRefsAttr: H5Ocopy failed");
+ fail("testH5OcopyRefsAttr: H5Ocopy failed");
}
finally {
- try {H5.H5Pclose(ocp_plist_id);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(ocp_plist_id);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5OcopyRefsDatasettodiffFile() {
+ public void testH5OcopyRefsDatasettodiffFile()
+ {
byte[][] dset_data = new byte[2][HDF5Constants.H5R_REF_BUF_SIZE];
- long ocp_plist_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long H5fid2 = HDF5Constants.H5I_INVALID_HID;
+ long ocp_plist_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long H5fid2 = HDF5Constants.H5I_INVALID_HID;
try {
try {
@@ -214,72 +260,96 @@ public class TestH5Ocopy {
err.printStackTrace();
fail("testH5OcopyRefsDatasettodiffFile: H5Rcreate_object " + err);
}
-
+
try {
- dataset_id = H5.H5Dcreate(H5fid, "DSREF",
- HDF5Constants.H5T_STD_REF, H5dsid,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ dataset_id =
+ H5.H5Dcreate(H5fid, "DSREF", HDF5Constants.H5T_STD_REF, H5dsid, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
assertTrue("testH5OcopyRefsDatasettodiffFile.H5Dcreate: ", dataset_id >= 0);
- H5.H5Dwrite(dataset_id, HDF5Constants.H5T_STD_REF,
- HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dwrite(dataset_id, HDF5Constants.H5T_STD_REF, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
H5.H5Dclose(dataset_id);
}
catch (Exception ex) {
fail("testH5OcopyRefsDatasettodiffFile: create dataset failed");
}
finally {
- try {H5.H5Dclose(dataset_id);} catch (Exception exx) {}
+ try {
+ H5.H5Dclose(dataset_id);
+ }
+ catch (Exception exx) {
+ }
}
}
catch (Exception ex) {
ex.printStackTrace();
}
finally {
- try {H5.H5Rdestroy(dset_data[0]);} catch (Exception ex) {}
- try {H5.H5Rdestroy(dset_data[1]);} catch (Exception ex) {}
+ try {
+ H5.H5Rdestroy(dset_data[0]);
+ }
+ catch (Exception ex) {
+ }
+ try {
+ H5.H5Rdestroy(dset_data[1]);
+ }
+ catch (Exception ex) {
+ }
}
try {
- //create new file
- H5fid2 = H5.H5Fcreate("copy.h5", HDF5Constants.H5F_ACC_TRUNC,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ // create new file
+ H5fid2 = H5.H5Fcreate("copy.h5", HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
assertTrue("testH5OcopyRefsDatasettodiffFile.H5Fcreate: ", H5fid2 >= 0);
H5.H5Fflush(H5fid2, HDF5Constants.H5F_SCOPE_LOCAL);
}
catch (Exception ex) {
- try {H5.H5Fclose(H5fid2);} catch (Exception exx) {}
+ try {
+ H5.H5Fclose(H5fid2);
+ }
+ catch (Exception exx) {
+ }
fail("testH5OcopyRefsDatasettodiffFile: H5Fcreate failed");
}
try {
- //create object copy property list id and set the flags.
+ // create object copy property list id and set the flags.
ocp_plist_id = H5.H5Pcreate(HDF5Constants.H5P_OBJECT_COPY);
assertTrue("testH5OcopyRefsDatasettodiffFile.H5Pcreate: ", ocp_plist_id >= 0);
H5.H5Pset_copy_object(ocp_plist_id, HDF5Constants.H5O_COPY_EXPAND_REFERENCE_FLAG);
- //Perform copy function.
+ // Perform copy function.
H5.H5Ocopy(H5fid, ".", H5fid2, "CPYREFD", ocp_plist_id, HDF5Constants.H5P_DEFAULT);
}
- catch (Exception ex){
+ catch (Exception ex) {
ex.printStackTrace();
fail("testH5OcopyRefsDatasettodiffFile: H5Ocopy failed");
}
finally {
- try {H5.H5Pclose(ocp_plist_id);} catch (Exception ex) {}
- try {H5.H5Fclose(H5fid2);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(ocp_plist_id);
+ }
+ catch (Exception ex) {
+ }
+ try {
+ H5.H5Fclose(H5fid2);
+ }
+ catch (Exception ex) {
+ }
}
_deleteFile("copy.h5");
}
@Test
- public void testH5OcopyRefsDatasettosameFile() {
+ public void testH5OcopyRefsDatasettosameFile()
+ {
byte[][] dset_data = new byte[2][HDF5Constants.H5R_REF_BUF_SIZE];
byte[][] read_data = new byte[2][HDF5Constants.H5R_REF_BUF_SIZE];
- long ocp_plist_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long did = HDF5Constants.H5I_INVALID_HID;
- int obj_type = -1;
+ long ocp_plist_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long did = HDF5Constants.H5I_INVALID_HID;
+ int obj_type = -1;
try {
try {
@@ -289,7 +359,7 @@ public class TestH5Ocopy {
err.printStackTrace();
fail("testH5OcopyRefsDatasettosameFile: H5Rcreate_object " + err);
}
-
+
try {
dset_data[1] = H5.H5Rcreate_object(H5fid, "DS2", HDF5Constants.H5P_DEFAULT);
}
@@ -297,43 +367,54 @@ public class TestH5Ocopy {
err.printStackTrace();
fail("testH5OcopyRefsDatasettosameFile: H5Rcreate_object " + err);
}
-
+
try {
- //Create a dataset and write object references to it.
- dataset_id = H5.H5Dcreate(H5fid, "DSREF",
- HDF5Constants.H5T_STD_REF, H5dsid,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ // Create a dataset and write object references to it.
+ dataset_id =
+ H5.H5Dcreate(H5fid, "DSREF", HDF5Constants.H5T_STD_REF, H5dsid, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
assertTrue("testH5OcopyRefsDatasettosameFile.H5Dcreate: ", dataset_id >= 0);
- H5.H5Dwrite(dataset_id, HDF5Constants.H5T_STD_REF,
- HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
- //Close the dataset.
+ H5.H5Dwrite(dataset_id, HDF5Constants.H5T_STD_REF, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
+ // Close the dataset.
H5.H5Dclose(dataset_id);
}
catch (Exception ex) {
fail("testH5OcopyRefsDatasettosameFile: create dataset failed");
}
finally {
- try {H5.H5Dclose(dataset_id);} catch (Exception exx) {}
+ try {
+ H5.H5Dclose(dataset_id);
+ }
+ catch (Exception exx) {
+ }
}
}
catch (Exception ex) {
ex.printStackTrace();
}
finally {
- try {H5.H5Rdestroy(dset_data[1]);} catch (Exception ex) {}
- try {H5.H5Rdestroy(dset_data[0]);} catch (Exception ex) {}
+ try {
+ H5.H5Rdestroy(dset_data[1]);
+ }
+ catch (Exception ex) {
+ }
+ try {
+ H5.H5Rdestroy(dset_data[0]);
+ }
+ catch (Exception ex) {
+ }
}
try {
ocp_plist_id = H5.H5Pcreate(HDF5Constants.H5P_OBJECT_COPY);
assertTrue("testH5OcopyRefsDatasettosameFile.H5Pcreate: ", ocp_plist_id >= 0);
H5.H5Pset_copy_object(ocp_plist_id, HDF5Constants.H5O_COPY_EXPAND_REFERENCE_FLAG);
- //Perform copy function.
+ // Perform copy function.
try {
H5.H5Ocopy(H5fid, "DSREF", H5fid, "CPYREFD", ocp_plist_id, HDF5Constants.H5P_DEFAULT);
}
- catch(Exception ex) {
+ catch (Exception ex) {
fail("testH5OcopyRefsDatasettosameFile: H5Ocopy failed");
}
}
@@ -341,11 +422,15 @@ public class TestH5Ocopy {
fail("testH5OcopyRefsDatasettosameFile: H5Pset_copy_object failed");
}
finally {
- try {H5.H5Pclose(ocp_plist_id);} catch (Exception exx) {}
+ try {
+ H5.H5Pclose(ocp_plist_id);
+ }
+ catch (Exception exx) {
+ }
}
try {
- //Open the dataset that has been copied
+ // Open the dataset that has been copied
try {
did = H5.H5Dopen(H5fid, "DSREF", HDF5Constants.H5P_DEFAULT);
assertTrue("testH5OcopyRefsDatasettosameFile.H5Dopen: ", did >= 0);
@@ -355,9 +440,10 @@ public class TestH5Ocopy {
fail("testH5OcopyRefsDatasettosameFile: H5Dopen failed");
}
- //Read the dataset object references in the read_data buffer.
+ // Read the dataset object references in the read_data buffer.
try {
- H5.H5Dread(did, HDF5Constants.H5T_STD_REF, HDF5Constants.H5S_ALL,HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, read_data);
+ H5.H5Dread(did, HDF5Constants.H5T_STD_REF, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5P_DEFAULT, read_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -369,14 +455,18 @@ public class TestH5Ocopy {
fail("testH5OcopyRefsDatasettosameFile: open and read dataset failed");
}
finally {
- try {H5.H5Dclose(did);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(did);
+ }
+ catch (Exception ex) {
+ }
}
try {
- //Get the type of object the reference points to.
+ // Get the type of object the reference points to.
obj_type = H5.H5Rget_obj_type3(read_data[1], HDF5Constants.H5R_OBJECT);
assertEquals(obj_type, HDF5Constants.H5O_TYPE_DATASET);
-
+
obj_type = H5.H5Rget_obj_type3(read_data[0], HDF5Constants.H5R_OBJECT);
assertEquals(obj_type, HDF5Constants.H5O_TYPE_GROUP);
}
@@ -384,22 +474,32 @@ public class TestH5Ocopy {
ex.printStackTrace();
}
finally {
- try {H5.H5Rdestroy(read_data[1]);} catch (Exception ex) {}
- try {H5.H5Rdestroy(read_data[0]);} catch (Exception ex) {}
+ try {
+ H5.H5Rdestroy(read_data[1]);
+ }
+ catch (Exception ex) {
+ }
+ try {
+ H5.H5Rdestroy(read_data[0]);
+ }
+ catch (Exception ex) {
+ }
}
}
-
+
@Test
- public void testH5OcopyNullRef() throws Throwable {
+ public void testH5OcopyNullRef() throws Throwable
+ {
final long _pid_ = HDF5Constants.H5P_DEFAULT;
- long sid = HDF5Constants.H5I_INVALID_HID;
- long did = HDF5Constants.H5I_INVALID_HID;
- long aid = HDF5Constants.H5I_INVALID_HID;
+ long sid = HDF5Constants.H5I_INVALID_HID;
+ long did = HDF5Constants.H5I_INVALID_HID;
+ long aid = HDF5Constants.H5I_INVALID_HID;
try {
sid = H5.H5Screate_simple(1, new long[] {1}, null);
assertTrue("testH5OcopyNullRef.H5Screate_simple: ", sid >= 0);
- did = H5.H5Dcreate(H5fid, "Dataset_with_null_Ref", HDF5Constants.H5T_NATIVE_INT, sid, _pid_, _pid_, _pid_);
+ did = H5.H5Dcreate(H5fid, "Dataset_with_null_Ref", HDF5Constants.H5T_NATIVE_INT, sid, _pid_,
+ _pid_, _pid_);
assertTrue("testH5OcopyNullRef.H5Dcreate: ", did > 0);
aid = H5.H5Acreate(did, "Null_Ref", HDF5Constants.H5T_STD_REF, sid, _pid_, _pid_);
assertTrue("testH5OcopyNullRef.H5Acreate: ", aid > 0);
@@ -408,20 +508,36 @@ public class TestH5Ocopy {
ex.printStackTrace();
}
finally {
- try {H5.H5Dclose(did);} catch (Exception exx) {}
- try {H5.H5Aclose(aid);} catch (Exception exx) {}
- try {H5.H5Sclose(sid);} catch (Exception exx) {}
+ try {
+ H5.H5Dclose(did);
+ }
+ catch (Exception exx) {
+ }
+ try {
+ H5.H5Aclose(aid);
+ }
+ catch (Exception exx) {
+ }
+ try {
+ H5.H5Sclose(sid);
+ }
+ catch (Exception exx) {
+ }
}
long ocp_plist_id = H5.H5Pcreate(HDF5Constants.H5P_OBJECT_COPY);
assertTrue("testH5OcopyNullRef.H5Pcreate: ", ocp_plist_id >= 0);
H5.H5Pset_copy_object(ocp_plist_id, HDF5Constants.H5O_COPY_EXPAND_REFERENCE_FLAG);
try {
- H5.H5Ocopy(H5fid, "/Dataset_with_null_Ref", H5fid, "/Dataset_with_null_Ref_cp", ocp_plist_id, _pid_);
+ H5.H5Ocopy(H5fid, "/Dataset_with_null_Ref", H5fid, "/Dataset_with_null_Ref_cp", ocp_plist_id,
+ _pid_);
}
finally {
- try {H5.H5Pclose(ocp_plist_id);} catch (Exception exx) {}
+ try {
+ H5.H5Pclose(ocp_plist_id);
+ }
+ catch (Exception exx) {
+ }
}
}
-
}
diff --git a/java/test/TestH5OcopyOld.java b/java/test/TestH5OcopyOld.java
index e547051..2cfccc7 100644
--- a/java/test/TestH5OcopyOld.java
+++ b/java/test/TestH5OcopyOld.java
@@ -31,20 +31,22 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5OcopyOld {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
private static final String FILENAME = "testRefsattributeO.h5";
- private static final int DIM_X = 4;
- private static final int DIM_Y = 6;
- long H5fid = HDF5Constants.H5I_INVALID_HID;
- long H5dsid = HDF5Constants.H5I_INVALID_HID;
- long H5did1 = HDF5Constants.H5I_INVALID_HID;
- long H5did2 = HDF5Constants.H5I_INVALID_HID;
- long H5gcpl = HDF5Constants.H5I_INVALID_HID;
- long H5gid = HDF5Constants.H5I_INVALID_HID;
- long H5dsid2 = HDF5Constants.H5I_INVALID_HID;
- long[] dims = { 2 };
-
- private final void _deleteFile(String filename) {
+ private static final int DIM_X = 4;
+ private static final int DIM_Y = 6;
+ long H5fid = HDF5Constants.H5I_INVALID_HID;
+ long H5dsid = HDF5Constants.H5I_INVALID_HID;
+ long H5did1 = HDF5Constants.H5I_INVALID_HID;
+ long H5did2 = HDF5Constants.H5I_INVALID_HID;
+ long H5gcpl = HDF5Constants.H5I_INVALID_HID;
+ long H5gid = HDF5Constants.H5I_INVALID_HID;
+ long H5dsid2 = HDF5Constants.H5I_INVALID_HID;
+ long[] dims = {2};
+
+ private final void _deleteFile(String filename)
+ {
File file = new File(filename);
if (file.exists()) {
@@ -57,93 +59,119 @@ public class TestH5OcopyOld {
}
}
- private final long _createDataset(long fid, long dsid, String name, long dapl) {
+ private final long _createDataset(long fid, long dsid, String name, long dapl)
+ {
long did = HDF5Constants.H5I_INVALID_HID;
try {
- did = H5.H5Dcreate(fid, name,
- HDF5Constants.H5T_STD_I32BE, dsid,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, dapl);
+ did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32BE, dsid, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, dapl);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Dcreate: " + err);
}
- assertTrue("TestH5O._createDataset: ",did >= 0);
+ assertTrue("TestH5O._createDataset: ", did >= 0);
return did;
}
- private final long _createGroup(long fid, String name) {
+ private final long _createGroup(long fid, String name)
+ {
long gid = HDF5Constants.H5I_INVALID_HID;
try {
H5gcpl = HDF5Constants.H5P_DEFAULT;
- gid = H5.H5Gcreate(fid, name, HDF5Constants.H5P_DEFAULT,
- H5gcpl, HDF5Constants.H5P_DEFAULT);
+ gid = H5.H5Gcreate(fid, name, HDF5Constants.H5P_DEFAULT, H5gcpl, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Gcreate: " + err);
}
- assertTrue("TestH5O._createGroup: ",gid >= 0);
+ assertTrue("TestH5O._createGroup: ", gid >= 0);
return gid;
}
@Before
- public void createH5file()
- throws NullPointerException, HDF5Exception {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ public void createH5file() throws NullPointerException, HDF5Exception
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
try {
- H5fid = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
- H5dsid2 = H5.H5Screate(HDF5Constants.H5S_SCALAR);
- H5did1 = _createDataset(H5fid, H5dsid2, "DS2", HDF5Constants.H5P_DEFAULT);
- H5dsid = H5.H5Screate_simple(1, dims, null);
- H5gid = _createGroup(H5fid, "/G1");
- H5did2 = _createDataset(H5gid, H5dsid, "DS1", HDF5Constants.H5P_DEFAULT);
+ H5fid = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
+ H5dsid2 = H5.H5Screate(HDF5Constants.H5S_SCALAR);
+ H5did1 = _createDataset(H5fid, H5dsid2, "DS2", HDF5Constants.H5P_DEFAULT);
+ H5dsid = H5.H5Screate_simple(1, dims, null);
+ H5gid = _createGroup(H5fid, "/G1");
+ H5did2 = _createDataset(H5gid, H5dsid, "DS1", HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("TestH5O.createH5file: " + err);
}
- assertTrue("TestH5O.createH5file: H5.H5Fcreate: ",H5fid >= 0);
- assertTrue("TestH5O.createH5file: H5.H5Screate_simple: ",H5dsid >= 0);
- assertTrue("TestH5O.createH5file: H5.H5Gcreate: ",H5gid >= 0);
+ assertTrue("TestH5O.createH5file: H5.H5Fcreate: ", H5fid >= 0);
+ assertTrue("TestH5O.createH5file: H5.H5Screate_simple: ", H5dsid >= 0);
+ assertTrue("TestH5O.createH5file: H5.H5Gcreate: ", H5gid >= 0);
H5.H5Fflush(H5fid, HDF5Constants.H5F_SCOPE_LOCAL);
}
@After
- public void deleteH5file() throws HDF5LibraryException {
+ public void deleteH5file() throws HDF5LibraryException
+ {
if (H5gid > 0)
- try {H5.H5Gclose(H5gid);} catch (Exception ex) {}
+ try {
+ H5.H5Gclose(H5gid);
+ }
+ catch (Exception ex) {
+ }
if (H5did2 > 0)
- try {H5.H5Dclose(H5did2);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5did2);
+ }
+ catch (Exception ex) {
+ }
if (H5dsid > 0)
- try {H5.H5Sclose(H5dsid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(H5dsid);
+ }
+ catch (Exception ex) {
+ }
if (H5dsid2 > 0)
- try {H5.H5Sclose(H5dsid2);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(H5dsid2);
+ }
+ catch (Exception ex) {
+ }
if (H5did1 > 0)
- try {H5.H5Dclose(H5did1);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5did1);
+ }
+ catch (Exception ex) {
+ }
if (H5fid > 0)
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
_deleteFile(FILENAME);
System.out.println();
}
@Test
- public void testH5OcopyRefsAttr() {
+ public void testH5OcopyRefsAttr()
+ {
long ocp_plist_id = HDF5Constants.H5I_INVALID_HID;
- byte rbuf0[]=null , rbuf1[] = null;
- byte[] dset_data = new byte[16];
+ byte rbuf0[] = null, rbuf1[] = null;
+ byte[] dset_data = new byte[16];
long attribute_id = HDF5Constants.H5I_INVALID_HID;
try {
rbuf0 = H5.H5Rcreate(H5fid, "/G1", HDF5Constants.H5R_OBJECT, -1);
rbuf1 = H5.H5Rcreate(H5fid, "DS2", HDF5Constants.H5R_OBJECT, -1);
- //System.arraycopy(rbuf0, 0, dset_data, 0, 8);
+ // System.arraycopy(rbuf0, 0, dset_data, 0, 8);
System.arraycopy(rbuf1, 0, dset_data, 8, 8);
}
catch (Exception ex) {
@@ -151,7 +179,8 @@ public class TestH5OcopyOld {
}
try {
- attribute_id = H5.H5Acreate(H5did2, "A1", HDF5Constants.H5T_STD_REF_OBJ, H5dsid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ attribute_id = H5.H5Acreate(H5did2, "A1", HDF5Constants.H5T_STD_REF_OBJ, H5dsid,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
assertTrue("testH5OcopyRefsAttr.H5Acreate: ", attribute_id >= 0);
H5.H5Awrite(attribute_id, HDF5Constants.H5T_STD_REF_OBJ, dset_data);
@@ -161,7 +190,11 @@ public class TestH5OcopyOld {
fail("testH5OcopyRefsAttr: H5Awrite failed");
}
finally {
- try {H5.H5Aclose(attribute_id);} catch (Exception exx) {}
+ try {
+ H5.H5Aclose(attribute_id);
+ }
+ catch (Exception exx) {
+ }
}
try {
@@ -171,82 +204,103 @@ public class TestH5OcopyOld {
H5.H5Ocopy(H5fid, ".", H5fid, "CPYREF", ocp_plist_id, HDF5Constants.H5P_DEFAULT);
}
catch (Exception ex) {
- fail("testH5OcopyRefsAttr: H5Ocopy failed");
+ fail("testH5OcopyRefsAttr: H5Ocopy failed");
}
finally {
- try {H5.H5Pclose(ocp_plist_id);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(ocp_plist_id);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5OcopyRefsDatasettodiffFile() {
- byte rbuf1[] = null;
- byte[] dset_data = new byte[16];
+ public void testH5OcopyRefsDatasettodiffFile()
+ {
+ byte rbuf1[] = null;
+ byte[] dset_data = new byte[16];
long ocp_plist_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long H5fid2 = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long H5fid2 = HDF5Constants.H5I_INVALID_HID;
try {
rbuf1 = H5.H5Rcreate(H5fid, "DS2", HDF5Constants.H5R_OBJECT, -1);
System.arraycopy(rbuf1, 0, dset_data, 8, 8);
- dataset_id = H5.H5Dcreate(H5fid, "DSREF",
- HDF5Constants.H5T_STD_REF_OBJ, H5dsid,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ dataset_id =
+ H5.H5Dcreate(H5fid, "DSREF", HDF5Constants.H5T_STD_REF_OBJ, H5dsid, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
assertTrue("testH5OcopyRefsDatasettodiffFile.H5Dcreate: ", dataset_id >= 0);
- H5.H5Dwrite(dataset_id, HDF5Constants.H5T_STD_REF_OBJ,
- HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
+ H5.H5Dwrite(dataset_id, HDF5Constants.H5T_STD_REF_OBJ, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
H5.H5Dclose(dataset_id);
}
catch (Exception ex) {
fail("testH5OcopyRefsDatasettodiffFile: create dataset failed");
}
finally {
- try {H5.H5Dclose(dataset_id);} catch (Exception exx) {}
+ try {
+ H5.H5Dclose(dataset_id);
+ }
+ catch (Exception exx) {
+ }
}
try {
- //create new file
- H5fid2 = H5.H5Fcreate("copy.h5", HDF5Constants.H5F_ACC_TRUNC,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ // create new file
+ H5fid2 = H5.H5Fcreate("copy.h5", HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
assertTrue("testH5OcopyRefsDatasettodiffFile.H5Fcreate: ", H5fid2 >= 0);
H5.H5Fflush(H5fid2, HDF5Constants.H5F_SCOPE_LOCAL);
}
catch (Exception ex) {
- try {H5.H5Fclose(H5fid2);} catch (Exception exx) {}
+ try {
+ H5.H5Fclose(H5fid2);
+ }
+ catch (Exception exx) {
+ }
fail("testH5OcopyRefsDatasettodiffFile: H5Fcreate failed");
}
try {
- //create object copy property list id and set the flags.
+ // create object copy property list id and set the flags.
ocp_plist_id = H5.H5Pcreate(HDF5Constants.H5P_OBJECT_COPY);
assertTrue("testH5OcopyRefsDatasettodiffFile.H5Pcreate: ", ocp_plist_id >= 0);
H5.H5Pset_copy_object(ocp_plist_id, HDF5Constants.H5O_COPY_EXPAND_REFERENCE_FLAG);
- //Perform copy function.
+ // Perform copy function.
H5.H5Ocopy(H5fid, ".", H5fid2, "CPYREFD", ocp_plist_id, HDF5Constants.H5P_DEFAULT);
}
- catch (Exception ex){
+ catch (Exception ex) {
ex.printStackTrace();
fail("testH5OcopyRefsDatasettodiffFile: H5Ocopy failed");
}
finally {
- try {H5.H5Pclose(ocp_plist_id);} catch (Exception ex) {}
- try {H5.H5Fclose(H5fid2);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(ocp_plist_id);
+ }
+ catch (Exception ex) {
+ }
+ try {
+ H5.H5Fclose(H5fid2);
+ }
+ catch (Exception ex) {
+ }
}
_deleteFile("copy.h5");
}
@Test
- public void testH5OcopyRefsDatasettosameFile() {
- byte rbuf0[]=null , rbuf1[] = null;
- byte[] dset_data = new byte[16];
+ public void testH5OcopyRefsDatasettosameFile()
+ {
+ byte rbuf0[] = null, rbuf1[] = null;
+ byte[] dset_data = new byte[16];
long ocp_plist_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long did = HDF5Constants.H5I_INVALID_HID;
- int obj_type = -1;
- byte[] read_data = new byte[16];
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long did = HDF5Constants.H5I_INVALID_HID;
+ int obj_type = -1;
+ byte[] read_data = new byte[16];
try {
rbuf0 = H5.H5Rcreate(H5fid, "/G1", HDF5Constants.H5R_OBJECT, -1);
@@ -254,19 +308,22 @@ public class TestH5OcopyOld {
System.arraycopy(rbuf0, 0, dset_data, 0, 8);
System.arraycopy(rbuf1, 0, dset_data, 8, 8);
- //Create a dataset and write object references to it.
- dataset_id = H5.H5Dcreate(H5fid, "DSREF",
- HDF5Constants.H5T_STD_REF_OBJ, H5dsid,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ // Create a dataset and write object references to it.
+ dataset_id =
+ H5.H5Dcreate(H5fid, "DSREF", HDF5Constants.H5T_STD_REF_OBJ, H5dsid, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
assertTrue("testH5OcopyRefsDatasettosameFile.H5Dcreate: ", dataset_id >= 0);
- H5.H5Dwrite(dataset_id, HDF5Constants.H5T_STD_REF_OBJ,
- HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data);
- //Close the dataset.
+ H5.H5Dwrite(dataset_id, HDF5Constants.H5T_STD_REF_OBJ, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
+ // Close the dataset.
H5.H5Dclose(dataset_id);
}
catch (Exception ex) {
- try {H5.H5Dclose(dataset_id);} catch (Exception exx) {}
+ try {
+ H5.H5Dclose(dataset_id);
+ }
+ catch (Exception exx) {
+ }
fail("testH5OcopyRefsDatasettosameFile: create dataset failed");
}
@@ -276,37 +333,50 @@ public class TestH5OcopyOld {
H5.H5Pset_copy_object(ocp_plist_id, HDF5Constants.H5O_COPY_EXPAND_REFERENCE_FLAG);
}
catch (Exception ex) {
- try {H5.H5Pclose(ocp_plist_id);} catch (Exception exx) {}
+ try {
+ H5.H5Pclose(ocp_plist_id);
+ }
+ catch (Exception exx) {
+ }
fail("testH5OcopyRefsDatasettosameFile: H5Pset_copy_object failed");
}
- //Perform copy function.
+ // Perform copy function.
try {
H5.H5Ocopy(H5fid, "DSREF", H5fid, "CPYREFD", ocp_plist_id, HDF5Constants.H5P_DEFAULT);
}
- catch(Exception ex) {
- try {H5.H5Pclose(ocp_plist_id);} catch (Exception exx) {}
+ catch (Exception ex) {
+ try {
+ H5.H5Pclose(ocp_plist_id);
+ }
+ catch (Exception exx) {
+ }
fail("testH5OcopyRefsDatasettosameFile: H5Ocopy failed");
}
- //Open the dataset that has been copied
+ // Open the dataset that has been copied
try {
did = H5.H5Dopen(H5fid, "DSREF", HDF5Constants.H5P_DEFAULT);
assertTrue("testH5OcopyRefsDatasettosameFile.H5Dopen: ", did >= 0);
}
catch (Exception e) {
- try {H5.H5Dclose(did);} catch (Exception exx) {}
+ try {
+ H5.H5Dclose(did);
+ }
+ catch (Exception exx) {
+ }
e.printStackTrace();
fail("testH5OcopyRefsDatasettosameFile: H5Dopen failed");
}
try {
- //Read the dataset object references in the read_data buffer.
- H5.H5Dread(did, HDF5Constants.H5T_STD_REF_OBJ, HDF5Constants.H5S_ALL,HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, read_data);
+ // Read the dataset object references in the read_data buffer.
+ H5.H5Dread(did, HDF5Constants.H5T_STD_REF_OBJ, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5P_DEFAULT, read_data);
System.arraycopy(read_data, 0, rbuf0, 0, 8);
System.arraycopy(read_data, 8, rbuf1, 0, 8);
- //Get the type of object the reference points to.
+ // Get the type of object the reference points to.
obj_type = H5.H5Rget_obj_type(H5fid, HDF5Constants.H5R_OBJECT, rbuf1);
assertEquals(obj_type, HDF5Constants.H5O_TYPE_DATASET);
@@ -317,22 +387,32 @@ public class TestH5OcopyOld {
ex.printStackTrace();
}
finally {
- try {H5.H5Dclose(did);} catch (Exception ex) {}
- try {H5.H5Pclose(ocp_plist_id);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(did);
+ }
+ catch (Exception ex) {
+ }
+ try {
+ H5.H5Pclose(ocp_plist_id);
+ }
+ catch (Exception ex) {
+ }
}
- }
-
+ }
+
@Test
- public void testH5OcopyNullRef() throws Throwable {
+ public void testH5OcopyNullRef() throws Throwable
+ {
final long _pid_ = HDF5Constants.H5P_DEFAULT;
- long sid = HDF5Constants.H5I_INVALID_HID;
- long did = HDF5Constants.H5I_INVALID_HID;
- long aid = HDF5Constants.H5I_INVALID_HID;
+ long sid = HDF5Constants.H5I_INVALID_HID;
+ long did = HDF5Constants.H5I_INVALID_HID;
+ long aid = HDF5Constants.H5I_INVALID_HID;
try {
sid = H5.H5Screate_simple(1, new long[] {1}, null);
assertTrue("testH5OcopyNullRef.H5Screate_simple: ", sid >= 0);
- did = H5.H5Dcreate(H5fid, "Dataset_with_null_Ref", HDF5Constants.H5T_NATIVE_INT, sid, _pid_, _pid_, _pid_);
+ did = H5.H5Dcreate(H5fid, "Dataset_with_null_Ref", HDF5Constants.H5T_NATIVE_INT, sid, _pid_,
+ _pid_, _pid_);
assertTrue("testH5OcopyNullRef.H5Dcreate: ", did > 0);
aid = H5.H5Acreate(did, "Null_Ref", HDF5Constants.H5T_STD_REF_OBJ, sid, _pid_, _pid_);
assertTrue("testH5OcopyNullRef.H5Acreate: ", aid > 0);
@@ -341,57 +421,74 @@ public class TestH5OcopyOld {
ex.printStackTrace();
}
finally {
- try {H5.H5Dclose(did);} catch (Exception exx) {}
- try {H5.H5Aclose(aid);} catch (Exception exx) {}
- try {H5.H5Sclose(sid);} catch (Exception exx) {}
+ try {
+ H5.H5Dclose(did);
+ }
+ catch (Exception exx) {
+ }
+ try {
+ H5.H5Aclose(aid);
+ }
+ catch (Exception exx) {
+ }
+ try {
+ H5.H5Sclose(sid);
+ }
+ catch (Exception exx) {
+ }
}
long ocp_plist_id = H5.H5Pcreate(HDF5Constants.H5P_OBJECT_COPY);
assertTrue("testH5OcopyNullRef.H5Pcreate: ", ocp_plist_id >= 0);
H5.H5Pset_copy_object(ocp_plist_id, HDF5Constants.H5O_COPY_EXPAND_REFERENCE_FLAG);
try {
- H5.H5Ocopy(H5fid, "/Dataset_with_null_Ref", H5fid, "/Dataset_with_null_Ref_cp", ocp_plist_id, _pid_);
+ H5.H5Ocopy(H5fid, "/Dataset_with_null_Ref", H5fid, "/Dataset_with_null_Ref_cp", ocp_plist_id,
+ _pid_);
}
finally {
- try {H5.H5Pclose(ocp_plist_id);} catch (Exception exx) {}
+ try {
+ H5.H5Pclose(ocp_plist_id);
+ }
+ catch (Exception exx) {
+ }
}
}
-// @Ignore because of JIRA HDF5-9547
-// @Test(expected = HDF5LibraryException.class)
-// public void testH5OcopyInvalidRef() throws Throwable {
-// final long _pid_ = HDF5Constants.H5P_DEFAULT;
-// long sid = HDF5Constants.H5I_INVALID_HID;
-// long did = HDF5Constants.H5I_INVALID_HID;
-// long aid = HDF5Constants.H5I_INVALID_HID;
-//
-// try {
-// sid = H5.H5Screate_simple(1, new long[] {1}, null);
-// assertTrue("testH5OcopyInvalidRef.H5Screate_simple: ", sid >= 0);
-// did = H5.H5Dcreate(H5fid, "Dataset_with_invalid_Ref", HDF5Constants.H5T_NATIVE_INT, sid, _pid_, _pid_, _pid_);
-// assertTrue("testH5OcopyInvalidRef.H5Dcreate: ", did > 0);
-// aid = H5.H5Acreate(did, "Invalid_Ref", HDF5Constants.H5T_STD_REF_OBJ, sid, _pid_, _pid_);
-// assertTrue("testH5OcopyInvalidRef.H5Acreate: ", aid > 0);
-// H5.H5Awrite(aid, HDF5Constants.H5T_STD_REF_OBJ, new long[]{-1});
-// }
-// catch (Exception ex) {
-// ex.printStackTrace();
-// }
-// finally {
-// try {H5.H5Dclose(did);} catch (Exception exx) {}
-// try {H5.H5Aclose(aid);} catch (Exception exx) {}
-// try {H5.H5Sclose(sid);} catch (Exception exx) {}
-// }
-//
-// long ocp_plist_id = H5.H5Pcreate(HDF5Constants.H5P_OBJECT_COPY);
-// assertTrue("testH5OcopyInvalidRef.H5Pcreate: ", ocp_plist_id >= 0);
-// H5.H5Pset_copy_object(ocp_plist_id, HDF5Constants.H5O_COPY_EXPAND_REFERENCE_FLAG);
-// try {
-// H5.H5Ocopy(H5fid, "/Dataset_with_invalid_Ref", H5fid, "/Dataset_with_invalid_Ref_cp", ocp_plist_id, _pid_);
-// }
-// finally {
-// try {H5.H5Pclose(ocp_plist_id);} catch (Exception exx) {}
-// }
-// }
-
+ // @Ignore because of JIRA HDF5-9547
+ // @Test(expected = HDF5LibraryException.class)
+ // public void testH5OcopyInvalidRef() throws Throwable {
+ // final long _pid_ = HDF5Constants.H5P_DEFAULT;
+ // long sid = HDF5Constants.H5I_INVALID_HID;
+ // long did = HDF5Constants.H5I_INVALID_HID;
+ // long aid = HDF5Constants.H5I_INVALID_HID;
+ //
+ // try {
+ // sid = H5.H5Screate_simple(1, new long[] {1}, null);
+ // assertTrue("testH5OcopyInvalidRef.H5Screate_simple: ", sid >= 0);
+ // did = H5.H5Dcreate(H5fid, "Dataset_with_invalid_Ref", HDF5Constants.H5T_NATIVE_INT, sid,
+ // _pid_, _pid_, _pid_); assertTrue("testH5OcopyInvalidRef.H5Dcreate: ", did > 0); aid =
+ // H5.H5Acreate(did, "Invalid_Ref", HDF5Constants.H5T_STD_REF_OBJ, sid, _pid_, _pid_);
+ // assertTrue("testH5OcopyInvalidRef.H5Acreate: ", aid > 0);
+ // H5.H5Awrite(aid, HDF5Constants.H5T_STD_REF_OBJ, new long[]{-1});
+ // }
+ // catch (Exception ex) {
+ // ex.printStackTrace();
+ // }
+ // finally {
+ // try {H5.H5Dclose(did);} catch (Exception exx) {}
+ // try {H5.H5Aclose(aid);} catch (Exception exx) {}
+ // try {H5.H5Sclose(sid);} catch (Exception exx) {}
+ // }
+ //
+ // long ocp_plist_id = H5.H5Pcreate(HDF5Constants.H5P_OBJECT_COPY);
+ // assertTrue("testH5OcopyInvalidRef.H5Pcreate: ", ocp_plist_id >= 0);
+ // H5.H5Pset_copy_object(ocp_plist_id, HDF5Constants.H5O_COPY_EXPAND_REFERENCE_FLAG);
+ // try {
+ // H5.H5Ocopy(H5fid, "/Dataset_with_invalid_Ref", H5fid, "/Dataset_with_invalid_Ref_cp",
+ // ocp_plist_id, _pid_);
+ // }
+ // finally {
+ // try {H5.H5Pclose(ocp_plist_id);} catch (Exception exx) {}
+ // }
+ // }
}
diff --git a/java/test/TestH5Ocreate.java b/java/test/TestH5Ocreate.java
index 78ea744..096abcd 100644
--- a/java/test/TestH5Ocreate.java
+++ b/java/test/TestH5Ocreate.java
@@ -21,8 +21,8 @@ import java.util.ArrayList;
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
-import hdf.hdf5lib.callbacks.H5O_iterate_t;
import hdf.hdf5lib.callbacks.H5O_iterate_opdata_t;
+import hdf.hdf5lib.callbacks.H5O_iterate_t;
import hdf.hdf5lib.exceptions.HDF5Exception;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
import hdf.hdf5lib.structs.H5O_info_t;
@@ -35,21 +35,23 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5Ocreate {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
private static final String H5_EXTFILE = "h5ex_g_iterateO2.hdf";
- private static final String H5_FILE = "testO.h5";
- private static final int DIM_X = 4;
- private static final int DIM_Y = 6;
- long H5fcpl = HDF5Constants.H5I_INVALID_HID;
- long H5fid = HDF5Constants.H5I_INVALID_HID;
- long H5dsid = HDF5Constants.H5I_INVALID_HID;
- long H5did1 = HDF5Constants.H5I_INVALID_HID;
- long H5did2 = HDF5Constants.H5I_INVALID_HID;
- long H5gcpl = HDF5Constants.H5I_INVALID_HID;
- long H5gid = HDF5Constants.H5I_INVALID_HID;
- long[] H5dims = { DIM_X, DIM_Y };
-
- private final void _deleteFile(String filename) {
+ private static final String H5_FILE = "testO.h5";
+ private static final int DIM_X = 4;
+ private static final int DIM_Y = 6;
+ long H5fcpl = HDF5Constants.H5I_INVALID_HID;
+ long H5fid = HDF5Constants.H5I_INVALID_HID;
+ long H5dsid = HDF5Constants.H5I_INVALID_HID;
+ long H5did1 = HDF5Constants.H5I_INVALID_HID;
+ long H5did2 = HDF5Constants.H5I_INVALID_HID;
+ long H5gcpl = HDF5Constants.H5I_INVALID_HID;
+ long H5gid = HDF5Constants.H5I_INVALID_HID;
+ long[] H5dims = {DIM_X, DIM_Y};
+
+ private final void _deleteFile(String filename)
+ {
File file = new File(filename);
if (file.exists()) {
@@ -62,39 +64,41 @@ public class TestH5Ocreate {
}
}
- private final long _createDataset(long fid, long dsid, String name, long dapl) {
+ private final long _createDataset(long fid, long dsid, String name, long dapl)
+ {
long did = HDF5Constants.H5I_INVALID_HID;
try {
- did = H5.H5Dcreate(fid, name,
- HDF5Constants.H5T_STD_I32BE, dsid,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, dapl);
+ did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32BE, dsid, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, dapl);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Dcreate: " + err);
}
- assertTrue("TestH5O._createDataset: ",did > 0);
+ assertTrue("TestH5O._createDataset: ", did > 0);
return did;
}
- private final long _createGroup(long fid, String name) {
+ private final long _createGroup(long fid, String name)
+ {
long gid = HDF5Constants.H5I_INVALID_HID;
try {
H5gcpl = HDF5Constants.H5P_DEFAULT;
- gid = H5.H5Gcreate(fid, name, HDF5Constants.H5P_DEFAULT,
- H5gcpl, HDF5Constants.H5P_DEFAULT);
+ gid = H5.H5Gcreate(fid, name, HDF5Constants.H5P_DEFAULT, H5gcpl, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Gcreate: " + err);
}
- assertTrue("TestH5O._createGroup: ",gid > 0);
+ assertTrue("TestH5O._createGroup: ", gid > 0);
return gid;
}
- private final void _createHardLink(long fid, long cid, String curname, long did, String dstname, long lcpl, long lapl) {
+ private final void _createHardLink(long fid, long cid, String curname, long did, String dstname,
+ long lcpl, long lapl)
+ {
boolean link_exists = false;
try {
H5.H5Lcreate_hard(cid, curname, did, dstname, lcpl, lapl);
@@ -108,7 +112,9 @@ public class TestH5Ocreate {
assertTrue("TestH5O._createHardLink ", link_exists);
}
- private final void _createSoftLink(long fid, String curname, long did, String dstname, long lcpl, long lapl) {
+ private final void _createSoftLink(long fid, String curname, long did, String dstname, long lcpl,
+ long lapl)
+ {
boolean link_exists = false;
try {
H5.H5Lcreate_soft(curname, did, dstname, lcpl, lapl);
@@ -122,7 +128,9 @@ public class TestH5Ocreate {
assertTrue("TestH5O._createSoftLink ", link_exists);
}
- private final void _createExternalLink(long fid, String ext_filename, String curname, long did, String dstname, long lcpl, long lapl) {
+ private final void _createExternalLink(long fid, String ext_filename, String curname, long did,
+ String dstname, long lcpl, long lapl)
+ {
boolean link_exists = false;
try {
H5.H5Lcreate_external(ext_filename, curname, did, dstname, lcpl, lapl);
@@ -137,64 +145,95 @@ public class TestH5Ocreate {
}
@Before
- public void createH5file()
- throws NullPointerException, HDF5Exception {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ public void createH5file() throws NullPointerException, HDF5Exception
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
try {
H5fcpl = H5.H5Pcreate(HDF5Constants.H5P_FILE_CREATE);
- H5.H5Pset_link_creation_order(H5fcpl, HDF5Constants.H5P_CRT_ORDER_TRACKED+HDF5Constants.H5P_CRT_ORDER_INDEXED);
- H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC,
- H5fcpl, HDF5Constants.H5P_DEFAULT);
+ H5.H5Pset_link_creation_order(H5fcpl, HDF5Constants.H5P_CRT_ORDER_TRACKED +
+ HDF5Constants.H5P_CRT_ORDER_INDEXED);
+ H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC, H5fcpl, HDF5Constants.H5P_DEFAULT);
H5dsid = H5.H5Screate_simple(2, H5dims, null);
H5did1 = _createDataset(H5fid, H5dsid, "DS1", HDF5Constants.H5P_DEFAULT);
- H5gid = _createGroup(H5fid, "/G1");
+ H5gid = _createGroup(H5fid, "/G1");
H5did2 = _createDataset(H5gid, H5dsid, "DS2", HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("TestH5O.createH5file: " + err);
}
- assertTrue("TestH5O.createH5file: H5.H5Fcreate: ",H5fid > 0);
- assertTrue("TestH5O.createH5file: H5.H5Screate_simple: ",H5dsid > 0);
- assertTrue("TestH5O.createH5file: H5.H5Gcreate: ",H5gid > 0);
+ assertTrue("TestH5O.createH5file: H5.H5Fcreate: ", H5fid > 0);
+ assertTrue("TestH5O.createH5file: H5.H5Screate_simple: ", H5dsid > 0);
+ assertTrue("TestH5O.createH5file: H5.H5Gcreate: ", H5gid > 0);
H5.H5Fflush(H5fid, HDF5Constants.H5F_SCOPE_LOCAL);
}
@After
- public void deleteH5file() throws HDF5LibraryException {
+ public void deleteH5file() throws HDF5LibraryException
+ {
if (H5gid > 0)
- try {H5.H5Gclose(H5gid);} catch (Exception ex) {}
+ try {
+ H5.H5Gclose(H5gid);
+ }
+ catch (Exception ex) {
+ }
if (H5gcpl > 0)
- try {H5.H5Pclose(H5gcpl);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(H5gcpl);
+ }
+ catch (Exception ex) {
+ }
if (H5did2 > 0)
- try {H5.H5Dclose(H5did2);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5did2);
+ }
+ catch (Exception ex) {
+ }
if (H5dsid > 0)
- try {H5.H5Sclose(H5dsid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(H5dsid);
+ }
+ catch (Exception ex) {
+ }
if (H5did1 > 0)
- try {H5.H5Dclose(H5did1);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5did1);
+ }
+ catch (Exception ex) {
+ }
if (H5fid > 0)
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
if (H5fcpl > 0)
- try {H5.H5Pclose(H5fcpl);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(H5fcpl);
+ }
+ catch (Exception ex) {
+ }
_deleteFile(H5_FILE);
System.out.println();
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Ocopy_cur_not_exists() throws Throwable {
+ public void testH5Ocopy_cur_not_exists() throws Throwable
+ {
H5.H5Ocopy(H5fid, "None", H5fid, "DS1", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
@Test
- public void testH5Ocopy() {
+ public void testH5Ocopy()
+ {
try {
H5.H5Ocopy(H5fid, "DS1", H5fid, "CPY1", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
H5.H5Fflush(H5fid, HDF5Constants.H5F_SCOPE_LOCAL);
boolean link_exists = H5.H5Lexists(H5fid, "CPY1", HDF5Constants.H5P_DEFAULT);
- assertTrue("testH5Ocopy:H5Lexists ",link_exists);
+ assertTrue("testH5Ocopy:H5Lexists ", link_exists);
}
catch (Throwable err) {
err.printStackTrace();
@@ -203,57 +242,66 @@ public class TestH5Ocreate {
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Ocopy_dst_link_exists() throws Throwable {
- _createHardLink(H5fid, H5fid, "/G1/DS2", H5fid, "CPY1", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ public void testH5Ocopy_dst_link_exists() throws Throwable
+ {
+ _createHardLink(H5fid, H5fid, "/G1/DS2", H5fid, "CPY1", HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
H5.H5Ocopy(H5fid, "CPY1", H5fid, "/G1/DS2", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
@Test
- public void testH5Oget_info_by_idx_n0_create() {
+ public void testH5Oget_info_by_idx_n0_create()
+ {
H5O_info_t obj_info = null;
try {
int order = H5.H5Pget_link_creation_order(H5fcpl);
- assertTrue("creation order :"+order, order == HDF5Constants.H5P_CRT_ORDER_TRACKED+HDF5Constants.H5P_CRT_ORDER_INDEXED);
+ assertTrue("creation order :" + order,
+ order == HDF5Constants.H5P_CRT_ORDER_TRACKED + HDF5Constants.H5P_CRT_ORDER_INDEXED);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Oget_info_by_idx_n0:H5Pget_link_creation_order " + err);
}
try {
- obj_info = H5.H5Oget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 0, HDF5Constants.H5P_DEFAULT);
+ obj_info = H5.H5Oget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_CRT_ORDER,
+ HDF5Constants.H5_ITER_INC, 0, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Oget_info_by_idx: " + err);
}
- assertFalse("H5Oget_info_by_idx ", obj_info==null);
- assertTrue("H5Oget_info_by_idx link type", obj_info.type==HDF5Constants.H5O_TYPE_DATASET);
+ assertFalse("H5Oget_info_by_idx ", obj_info == null);
+ assertTrue("H5Oget_info_by_idx link type", obj_info.type == HDF5Constants.H5O_TYPE_DATASET);
}
@Test
- public void testH5Oget_info_by_idx_n1_create() {
+ public void testH5Oget_info_by_idx_n1_create()
+ {
H5O_info_t obj_info = null;
try {
int order = H5.H5Pget_link_creation_order(H5fcpl);
- assertTrue("creation order :"+order, order == HDF5Constants.H5P_CRT_ORDER_TRACKED+HDF5Constants.H5P_CRT_ORDER_INDEXED);
+ assertTrue("creation order :" + order,
+ order == HDF5Constants.H5P_CRT_ORDER_TRACKED + HDF5Constants.H5P_CRT_ORDER_INDEXED);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Oget_info_by_idx_n1:H5Pget_link_creation_order " + err);
}
try {
- obj_info = H5.H5Oget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, 1, HDF5Constants.H5P_DEFAULT);
+ obj_info = H5.H5Oget_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_CRT_ORDER,
+ HDF5Constants.H5_ITER_INC, 1, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Oget_info_by_idx: " + err);
}
- assertFalse("H5Oget_info_by_idx ", obj_info==null);
- assertTrue("H5Oget_info_by_idx link type", obj_info.type==HDF5Constants.H5O_TYPE_GROUP);
+ assertFalse("H5Oget_info_by_idx ", obj_info == null);
+ assertTrue("H5Oget_info_by_idx link type", obj_info.type == HDF5Constants.H5O_TYPE_GROUP);
}
@Test
- public void testH5Oget_info_softlink() {
+ public void testH5Oget_info_softlink()
+ {
H5O_info_t obj_info = null;
_createSoftLink(H5fid, "/G1/DS2", H5fid, "L1", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
try {
@@ -263,21 +311,24 @@ public class TestH5Ocreate {
err.printStackTrace();
fail("H5.H5Oget_info: " + err);
}
- assertFalse("H5Oget_info", obj_info==null);
- assertTrue("H5Oget_info link type", obj_info.type==HDF5Constants.H5O_TYPE_DATASET);
+ assertFalse("H5Oget_info", obj_info == null);
+ assertTrue("H5Oget_info link type", obj_info.type == HDF5Constants.H5O_TYPE_DATASET);
assertTrue("Link Object Token", obj_info.token != null);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Oget_info_softlink_dangle() throws Throwable {
+ public void testH5Oget_info_softlink_dangle() throws Throwable
+ {
_createSoftLink(H5fid, "DS3", H5fid, "L2", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
H5.H5Oget_info_by_name(H5fid, "L2", HDF5Constants.H5P_DEFAULT);
}
@Test
- public void testH5Oget_info_externallink() {
+ public void testH5Oget_info_externallink()
+ {
H5O_info_t obj_info = null;
- _createExternalLink(H5fid, H5_EXTFILE, "DT1", H5fid, "L1", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ _createExternalLink(H5fid, H5_EXTFILE, "DT1", H5fid, "L1", HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
try {
obj_info = H5.H5Oget_info_by_name(H5fid, "L1", HDF5Constants.H5P_DEFAULT);
}
@@ -285,18 +336,19 @@ public class TestH5Ocreate {
err.printStackTrace();
fail("H5.H5Oget_info: " + err);
}
- assertFalse("H5Oget_info", obj_info==null);
- assertTrue("H5Oget_info link type", obj_info.type==HDF5Constants.H5O_TYPE_NAMED_DATATYPE);
+ assertFalse("H5Oget_info", obj_info == null);
+ assertTrue("H5Oget_info link type", obj_info.type == HDF5Constants.H5O_TYPE_NAMED_DATATYPE);
assertTrue("Link Object Token", obj_info.token != null);
}
@Test
- public void testH5Olink() {
- long oid = HDF5Constants.H5I_INVALID_HID;
- H5O_info_t obj_info = null;
+ public void testH5Olink()
+ {
+ long oid = HDF5Constants.H5I_INVALID_HID;
+ H5O_info_t obj_info = null;
H5O_info_t dst_obj_info = null;
try {
- oid = H5.H5Oopen(H5fid, "DS1", HDF5Constants.H5P_DEFAULT);
+ oid = H5.H5Oopen(H5fid, "DS1", HDF5Constants.H5P_DEFAULT);
obj_info = H5.H5Oget_info(oid);
}
catch (Throwable err) {
@@ -311,10 +363,14 @@ public class TestH5Ocreate {
err.printStackTrace();
fail("H5.H5Olink: " + err);
}
- try {H5.H5Oclose(oid);} catch (Exception ex) {}
+ try {
+ H5.H5Oclose(oid);
+ }
+ catch (Exception ex) {
+ }
- assertFalse("H5Oget_info ", obj_info==null);
- assertTrue("H5Oget_info object type", obj_info.type==HDF5Constants.H5O_TYPE_DATASET);
+ assertFalse("H5Oget_info ", obj_info == null);
+ assertTrue("H5Oget_info object type", obj_info.type == HDF5Constants.H5O_TYPE_DATASET);
try {
dst_obj_info = H5.H5Oget_info_by_name(H5fid, "CPY1", HDF5Constants.H5P_DEFAULT);
@@ -323,29 +379,34 @@ public class TestH5Ocreate {
err.printStackTrace();
fail("H5.H5Oget_info_by_name: " + err);
}
- assertFalse("H5Oget_info ", dst_obj_info==null);
- assertTrue("H5Oget_info object type", dst_obj_info.type==HDF5Constants.H5O_TYPE_DATASET);
+ assertFalse("H5Oget_info ", dst_obj_info == null);
+ assertTrue("H5Oget_info object type", dst_obj_info.type == HDF5Constants.H5O_TYPE_DATASET);
}
@Test
- public void testH5Ovisit_create() {
+ public void testH5Ovisit_create()
+ {
try {
int order = H5.H5Pget_link_creation_order(H5fcpl);
- assertTrue("creation order :"+order, order == HDF5Constants.H5P_CRT_ORDER_TRACKED+HDF5Constants.H5P_CRT_ORDER_INDEXED);
+ assertTrue("creation order :" + order,
+ order == HDF5Constants.H5P_CRT_ORDER_TRACKED + HDF5Constants.H5P_CRT_ORDER_INDEXED);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Ovisit_create:H5Pget_link_creation_order " + err);
}
- _createHardLink(H5fid, H5fid, "/G1/DS2", H5fid, "CPY1", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
- _createExternalLink(H5fid, H5_EXTFILE, "DT1", H5fid, "LE", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ _createHardLink(H5fid, H5fid, "/G1/DS2", H5fid, "CPY1", HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
+ _createExternalLink(H5fid, H5_EXTFILE, "DT1", H5fid, "LE", HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
_createSoftLink(H5fid, "/G1/DS2", H5fid, "LS", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
class idata {
public String link_name = null;
- public int link_type = -1;
- idata(String name, int type) {
+ public int link_type = -1;
+ idata(String name, int type)
+ {
this.link_name = name;
this.link_type = type;
}
@@ -355,7 +416,8 @@ public class TestH5Ocreate {
}
H5O_iterate_opdata_t iter_data = new H5O_iter_data();
class H5O_iter_callback implements H5O_iterate_t {
- public int callback(long group, String name, H5O_info_t info, H5O_iterate_opdata_t op_data) {
+ public int callback(long group, String name, H5O_info_t info, H5O_iterate_opdata_t op_data)
+ {
idata id = new idata(name, info.type);
((H5O_iter_data)op_data).iterdata.add(id);
return 0;
@@ -363,23 +425,34 @@ public class TestH5Ocreate {
}
H5O_iterate_t iter_cb = new H5O_iter_callback();
try {
- H5.H5Ovisit(H5fid, HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, iter_cb, iter_data);
+ H5.H5Ovisit(H5fid, HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, iter_cb,
+ iter_data);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Ovisit: " + err);
}
assertFalse("H5Ovisit ", ((H5O_iter_data)iter_data).iterdata.isEmpty());
- assertTrue("H5Ovisit "+((H5O_iter_data)iter_data).iterdata.size(), ((H5O_iter_data)iter_data).iterdata.size()==4);
- assertTrue("H5Ovisit "+((idata)((H5O_iter_data)iter_data).iterdata.get(0)).link_name, ((idata)((H5O_iter_data)iter_data).iterdata.get(0)).link_name.compareToIgnoreCase(".")==0);
- assertTrue("H5Ovisit "+((idata)((H5O_iter_data)iter_data).iterdata.get(1)).link_name, ((idata)((H5O_iter_data)iter_data).iterdata.get(1)).link_name.compareToIgnoreCase("DS1")==0);
- assertTrue("H5Ovisit "+((idata)((H5O_iter_data)iter_data).iterdata.get(2)).link_name, ((idata)((H5O_iter_data)iter_data).iterdata.get(2)).link_name.compareToIgnoreCase("G1")==0);
- assertTrue("H5Ovisit "+((idata)((H5O_iter_data)iter_data).iterdata.get(3)).link_name, ((idata)((H5O_iter_data)iter_data).iterdata.get(3)).link_name.compareToIgnoreCase("G1/DS2")==0);
+ assertTrue("H5Ovisit " + ((H5O_iter_data)iter_data).iterdata.size(),
+ ((H5O_iter_data)iter_data).iterdata.size() == 4);
+ assertTrue("H5Ovisit " + ((idata)((H5O_iter_data)iter_data).iterdata.get(0)).link_name,
+ ((idata)((H5O_iter_data)iter_data).iterdata.get(0)).link_name.compareToIgnoreCase(".") ==
+ 0);
+ assertTrue("H5Ovisit " + ((idata)((H5O_iter_data)iter_data).iterdata.get(1)).link_name,
+ ((idata)((H5O_iter_data)iter_data).iterdata.get(1)).link_name.compareToIgnoreCase("DS1") ==
+ 0);
+ assertTrue("H5Ovisit " + ((idata)((H5O_iter_data)iter_data).iterdata.get(2)).link_name,
+ ((idata)((H5O_iter_data)iter_data).iterdata.get(2)).link_name.compareToIgnoreCase("G1") ==
+ 0);
+ assertTrue(
+ "H5Ovisit " + ((idata)((H5O_iter_data)iter_data).iterdata.get(3)).link_name,
+ ((idata)((H5O_iter_data)iter_data).iterdata.get(3)).link_name.compareToIgnoreCase("G1/DS2") == 0);
}
@Test
- public void testH5Ocomment() {
- long oid = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Ocomment()
+ {
+ long oid = HDF5Constants.H5I_INVALID_HID;
String obj_comment = null;
try {
oid = H5.H5Oopen(H5fid, "DS1", HDF5Constants.H5P_DEFAULT);
@@ -397,14 +470,19 @@ public class TestH5Ocreate {
err.printStackTrace();
fail("H5.H5Oget_comment: " + err);
}
- try {H5.H5Oclose(oid);} catch (Exception ex) {}
- assertFalse("H5Oget_comment: ", obj_comment==null);
- assertTrue("H5Oget_comment: ", obj_comment.compareTo("Test Comment")==0);
+ try {
+ H5.H5Oclose(oid);
+ }
+ catch (Exception ex) {
+ }
+ assertFalse("H5Oget_comment: ", obj_comment == null);
+ assertTrue("H5Oget_comment: ", obj_comment.compareTo("Test Comment") == 0);
}
@Test
- public void testH5Ocomment_clear() {
- long oid = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Ocomment_clear()
+ {
+ long oid = HDF5Constants.H5I_INVALID_HID;
String obj_comment = null;
try {
oid = H5.H5Oopen(H5fid, "DS1", HDF5Constants.H5P_DEFAULT);
@@ -422,8 +500,8 @@ public class TestH5Ocreate {
err.printStackTrace();
fail("H5.H5Oget_comment: " + err);
}
- assertFalse("H5Oget_comment: ", obj_comment==null);
- assertTrue("H5Oget_comment: ", obj_comment.compareTo("Test Comment")==0);
+ assertFalse("H5Oget_comment: ", obj_comment == null);
+ assertTrue("H5Oget_comment: ", obj_comment.compareTo("Test Comment") == 0);
try {
H5.H5Oset_comment(oid, null);
H5.H5Fflush(H5fid, HDF5Constants.H5F_SCOPE_LOCAL);
@@ -439,12 +517,17 @@ public class TestH5Ocreate {
err.printStackTrace();
fail("H5.H5Oget_comment: " + err);
}
- try {H5.H5Oclose(oid);} catch (Exception ex) {}
- assertTrue("H5Oget_comment: ", obj_comment==null);
+ try {
+ H5.H5Oclose(oid);
+ }
+ catch (Exception ex) {
+ }
+ assertTrue("H5Oget_comment: ", obj_comment == null);
}
@Test
- public void testH5Ocomment_by_name() {
+ public void testH5Ocomment_by_name()
+ {
String obj_comment = null;
try {
H5.H5Oset_comment_by_name(H5fid, "DS1", "Test Comment", HDF5Constants.H5P_DEFAULT);
@@ -461,12 +544,13 @@ public class TestH5Ocreate {
err.printStackTrace();
fail("H5.H5Oget_comment_by_name: " + err);
}
- assertFalse("H5Oget_comment_by_name: ", obj_comment==null);
- assertTrue("H5Oget_comment_by_name: ", obj_comment.compareTo("Test Comment")==0);
+ assertFalse("H5Oget_comment_by_name: ", obj_comment == null);
+ assertTrue("H5Oget_comment_by_name: ", obj_comment.compareTo("Test Comment") == 0);
}
@Test
- public void testH5Ocomment_by_name_clear() {
+ public void testH5Ocomment_by_name_clear()
+ {
String obj_comment = null;
try {
H5.H5Oset_comment_by_name(H5fid, "DS1", "Test Comment", HDF5Constants.H5P_DEFAULT);
@@ -483,8 +567,8 @@ public class TestH5Ocreate {
err.printStackTrace();
fail("H5.H5Oget_comment_by_name: " + err);
}
- assertFalse("H5Oget_comment_by_name: ", obj_comment==null);
- assertTrue("H5Oget_comment_by_name: ", obj_comment.compareTo("Test Comment")==0);
+ assertFalse("H5Oget_comment_by_name: ", obj_comment == null);
+ assertTrue("H5Oget_comment_by_name: ", obj_comment.compareTo("Test Comment") == 0);
try {
H5.H5Oset_comment_by_name(H5fid, "DS1", null, HDF5Constants.H5P_DEFAULT);
H5.H5Fflush(H5fid, HDF5Constants.H5F_SCOPE_LOCAL);
@@ -500,19 +584,20 @@ public class TestH5Ocreate {
err.printStackTrace();
fail("H5.H5Oget_comment_by_name: " + err);
}
- assertTrue("H5Oget_comment_by_name: ", obj_comment==null);
+ assertTrue("H5Oget_comment_by_name: ", obj_comment == null);
}
@Test
- public void testH5Oinc_dec_count() {
- long oid = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Oinc_dec_count()
+ {
+ long oid = HDF5Constants.H5I_INVALID_HID;
H5O_info_t obj_info = null;
try {
try {
- oid = H5.H5Oopen(H5fid, "G1", HDF5Constants.H5P_DEFAULT);
+ oid = H5.H5Oopen(H5fid, "G1", HDF5Constants.H5P_DEFAULT);
obj_info = H5.H5Oget_info(oid);
- assertFalse("testH5Oinc_dec_count: H5Oget_info ",obj_info==null);
- assertTrue("testH5Oinc_dec_count: H5Oget_info reference count",obj_info.rc==1);
+ assertFalse("testH5Oinc_dec_count: H5Oget_info ", obj_info == null);
+ assertTrue("testH5Oinc_dec_count: H5Oget_info reference count", obj_info.rc == 1);
}
catch (Throwable err) {
err.printStackTrace();
@@ -527,8 +612,8 @@ public class TestH5Ocreate {
}
try {
obj_info = H5.H5Oget_info(oid);
- assertFalse("testH5Oinc_dec_count: H5Oget_info ",obj_info==null);
- assertTrue("testH5Oinc_dec_count: H5Oget_info reference count",obj_info.rc==2);
+ assertFalse("testH5Oinc_dec_count: H5Oget_info ", obj_info == null);
+ assertTrue("testH5Oinc_dec_count: H5Oget_info reference count", obj_info.rc == 2);
}
catch (Throwable err) {
err.printStackTrace();
@@ -543,8 +628,8 @@ public class TestH5Ocreate {
}
try {
obj_info = H5.H5Oget_info(oid);
- assertFalse("testH5Oinc_dec_count: H5Oget_info ",obj_info==null);
- assertTrue("testH5Oinc_dec_count: H5Oget_info reference count",obj_info.rc==1);
+ assertFalse("testH5Oinc_dec_count: H5Oget_info ", obj_info == null);
+ assertTrue("testH5Oinc_dec_count: H5Oget_info reference count", obj_info.rc == 1);
}
catch (Throwable err) {
err.printStackTrace();
@@ -552,12 +637,17 @@ public class TestH5Ocreate {
}
}
finally {
- try{H5.H5Oclose(oid);} catch (Exception ex) {}
+ try {
+ H5.H5Oclose(oid);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Ocork() {
+ public void testH5Ocork()
+ {
boolean corked = false;
// Check cork status of the group: not corked
@@ -608,5 +698,4 @@ public class TestH5Ocreate {
}
assertFalse("H5Oare_mdc_flushes_disabled: ", corked);
}
-
}
diff --git a/java/test/TestH5Oparams.java b/java/test/TestH5Oparams.java
index 5cbabe1..280e9fd 100644
--- a/java/test/TestH5Oparams.java
+++ b/java/test/TestH5Oparams.java
@@ -13,6 +13,7 @@
package test;
import static org.junit.Assert.assertTrue;
+
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
@@ -25,177 +26,211 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5Oparams {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
@Before
- public void checkOpenIDs() {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ public void checkOpenIDs()
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
}
@After
- public void nextTestName() {
+ public void nextTestName()
+ {
System.out.println();
}
- @Test//(expected = HDF5LibraryException.class)
- public void testH5Oclose_invalid() throws Throwable {
+ @Test //(expected = HDF5LibraryException.class)
+ public void testH5Oclose_invalid() throws Throwable
+ {
long oid = H5.H5Oclose(-1);
assertTrue(oid == 0);
}
@Test(expected = NullPointerException.class)
- public void testH5Oopen_null() throws Throwable {
+ public void testH5Oopen_null() throws Throwable
+ {
H5.H5Oopen(-1, null, 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Oopen_invalid() throws Throwable {
+ public void testH5Oopen_invalid() throws Throwable
+ {
H5.H5Oopen(-1, "Bogus", 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Ocopy_invalid() throws Throwable {
+ public void testH5Ocopy_invalid() throws Throwable
+ {
H5.H5Ocopy(-1, "Bogus", -1, "Bogus", -1, -1);
}
@Test(expected = NullPointerException.class)
- public void testH5Ocopy_null_current() throws Throwable {
+ public void testH5Ocopy_null_current() throws Throwable
+ {
H5.H5Ocopy(-1, null, 0, "Bogus", 0, 0);
}
@Test(expected = NullPointerException.class)
- public void testH5Ocopy_null_dest() throws Throwable {
+ public void testH5Ocopy_null_dest() throws Throwable
+ {
H5.H5Ocopy(-1, "Bogus", 0, null, 0, 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Oget_info_invalid() throws Throwable {
+ public void testH5Oget_info_invalid() throws Throwable
+ {
H5.H5Oget_info(-1, 0);
}
@Test(expected = NullPointerException.class)
- public void testH5Oget_info_by_name_null() throws Throwable {
+ public void testH5Oget_info_by_name_null() throws Throwable
+ {
H5.H5Oget_info_by_name(-1, null, 0, HDF5Constants.H5P_DEFAULT);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Oget_info_by_name_invalid() throws Throwable {
+ public void testH5Oget_info_by_name_invalid() throws Throwable
+ {
H5.H5Oget_info_by_name(-1, "/testH5Gcreate", 0, HDF5Constants.H5P_DEFAULT);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Oget_info_by_idx_invalid() throws Throwable {
+ public void testH5Oget_info_by_idx_invalid() throws Throwable
+ {
H5.H5Oget_info_by_idx(-1, "Bogus", -1, -1, -1L, 0, -1);
}
@Test(expected = NullPointerException.class)
- public void testH5Oget_info_by_idx_null() throws Throwable {
+ public void testH5Oget_info_by_idx_null() throws Throwable
+ {
H5.H5Oget_info_by_idx(-1, null, 0, 0, 0L, 0, 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Oget_native_info_invalid() throws Throwable {
+ public void testH5Oget_native_info_invalid() throws Throwable
+ {
H5.H5Oget_native_info(-1, 0);
}
@Test(expected = NullPointerException.class)
- public void testH5Oget_native_info_by_name_null() throws Throwable {
+ public void testH5Oget_native_info_by_name_null() throws Throwable
+ {
H5.H5Oget_native_info_by_name(-1, null, 0, HDF5Constants.H5P_DEFAULT);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Oget_native_info_by_name_invalid() throws Throwable {
+ public void testH5Oget_native_info_by_name_invalid() throws Throwable
+ {
H5.H5Oget_native_info_by_name(-1, "/testH5Gcreate", 0, HDF5Constants.H5P_DEFAULT);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Oget_native_info_by_idx_invalid() throws Throwable {
+ public void testH5Oget_native_info_by_idx_invalid() throws Throwable
+ {
H5.H5Oget_native_info_by_idx(-1, "Bogus", -1, -1, -1L, 0, -1);
}
@Test(expected = NullPointerException.class)
- public void testH5Oget_native_info_by_idx_null() throws Throwable {
+ public void testH5Oget_native_info_by_idx_null() throws Throwable
+ {
H5.H5Oget_native_info_by_idx(-1, null, 0, 0, 0L, 0, 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Olink_invalid() throws Throwable {
+ public void testH5Olink_invalid() throws Throwable
+ {
H5.H5Olink(-1, -1, "Bogus", -1, -1);
}
@Test(expected = NullPointerException.class)
- public void testH5Olink_null_dest() throws Throwable {
+ public void testH5Olink_null_dest() throws Throwable
+ {
H5.H5Olink(-1, 0, null, 0, 0);
}
@Test(expected = NullPointerException.class)
- public void testH5Ovisit_null() throws Throwable {
+ public void testH5Ovisit_null() throws Throwable
+ {
H5.H5Ovisit(-1, -1, -1, null, null, 0);
}
@Test(expected = NullPointerException.class)
- public void testH5Ovisit_by_name_nullname() throws Throwable {
+ public void testH5Ovisit_by_name_nullname() throws Throwable
+ {
H5.H5Ovisit_by_name(-1, null, -1, -1, null, null, 0, -1);
}
@Test(expected = NullPointerException.class)
- public void testH5Ovisit_by_name_null() throws Throwable {
+ public void testH5Ovisit_by_name_null() throws Throwable
+ {
H5.H5Ovisit_by_name(-1, "Bogus", -1, -1, null, null, 0, -1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Oset_comment_invalid() throws Throwable {
+ public void testH5Oset_comment_invalid() throws Throwable
+ {
H5.H5Oset_comment(-1, "Bogus");
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Oget_comment_invalid() throws Throwable {
+ public void testH5Oget_comment_invalid() throws Throwable
+ {
H5.H5Oget_comment(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Oset_comment_by_name_invalid() throws Throwable {
+ public void testH5Oset_comment_by_name_invalid() throws Throwable
+ {
H5.H5Oset_comment_by_name(-1, "Bogus", null, -1);
}
@Test(expected = NullPointerException.class)
- public void testH5Oset_comment_by_name_null() throws Throwable {
+ public void testH5Oset_comment_by_name_null() throws Throwable
+ {
H5.H5Oset_comment_by_name(-1, null, null, -1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Oget_comment_by_name_invalid() throws Throwable {
+ public void testH5Oget_comment_by_name_invalid() throws Throwable
+ {
H5.H5Oget_comment_by_name(-1, "Bogus", -1);
}
@Test(expected = NullPointerException.class)
- public void testH5Oget_comment_by_name_null() throws Throwable {
+ public void testH5Oget_comment_by_name_null() throws Throwable
+ {
H5.H5Oget_comment_by_name(-1, null, -1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Oflush_invalid() throws Throwable {
+ public void testH5Oflush_invalid() throws Throwable
+ {
H5.H5Oflush(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Orefresh_invalid() throws Throwable {
+ public void testH5Orefresh_invalid() throws Throwable
+ {
H5.H5Orefresh(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Odisable_mdc_flushes() throws Throwable {
+ public void testH5Odisable_mdc_flushes() throws Throwable
+ {
H5.H5Odisable_mdc_flushes(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Oenable_mdc_flushes() throws Throwable {
+ public void testH5Oenable_mdc_flushes() throws Throwable
+ {
H5.H5Oenable_mdc_flushes(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Oare_mdc_flushes_disabled() throws Throwable {
+ public void testH5Oare_mdc_flushes_disabled() throws Throwable
+ {
H5.H5Oare_mdc_flushes_disabled(-1);
}
-
}
diff --git a/java/test/TestH5P.java b/java/test/TestH5P.java
index 6ae93d9..0571e3f 100644
--- a/java/test/TestH5P.java
+++ b/java/test/TestH5P.java
@@ -34,40 +34,47 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5P {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
private static final String H5_FILE = "testP.h5";
- private static final int DIM_X = 4;
- private static final int DIM_Y = 6;
- long[] H5dims = { DIM_X, DIM_Y };
- long H5fid = HDF5Constants.H5I_INVALID_HID;
- long H5dsid = HDF5Constants.H5I_INVALID_HID;
- long H5did = HDF5Constants.H5I_INVALID_HID;
- long lapl_id = HDF5Constants.H5I_INVALID_HID;
- long fapl_id = HDF5Constants.H5I_INVALID_HID;
- long fcpl_id = HDF5Constants.H5I_INVALID_HID;
- long ocpl_id = HDF5Constants.H5I_INVALID_HID;
- long ocp_plist_id = HDF5Constants.H5I_INVALID_HID;
- long lcpl_id = HDF5Constants.H5I_INVALID_HID;
- long plapl_id = HDF5Constants.H5I_INVALID_HID;
- long plist_id = HDF5Constants.H5I_INVALID_HID;
- long gapl_id = HDF5Constants.H5I_INVALID_HID;
- long gcpl_id = HDF5Constants.H5I_INVALID_HID;
- long acpl_id = HDF5Constants.H5I_INVALID_HID;
-
- private final void _deleteFile(String filename) {
+ private static final int DIM_X = 4;
+ private static final int DIM_Y = 6;
+ long[] H5dims = {DIM_X, DIM_Y};
+ long H5fid = HDF5Constants.H5I_INVALID_HID;
+ long H5dsid = HDF5Constants.H5I_INVALID_HID;
+ long H5did = HDF5Constants.H5I_INVALID_HID;
+ long lapl_id = HDF5Constants.H5I_INVALID_HID;
+ long fapl_id = HDF5Constants.H5I_INVALID_HID;
+ long fcpl_id = HDF5Constants.H5I_INVALID_HID;
+ long ocpl_id = HDF5Constants.H5I_INVALID_HID;
+ long ocp_plist_id = HDF5Constants.H5I_INVALID_HID;
+ long lcpl_id = HDF5Constants.H5I_INVALID_HID;
+ long plapl_id = HDF5Constants.H5I_INVALID_HID;
+ long plist_id = HDF5Constants.H5I_INVALID_HID;
+ long gapl_id = HDF5Constants.H5I_INVALID_HID;
+ long gcpl_id = HDF5Constants.H5I_INVALID_HID;
+ long acpl_id = HDF5Constants.H5I_INVALID_HID;
+
+ private final void _deleteFile(String filename)
+ {
File file = new File(filename);
if (file.exists()) {
- try {file.delete();} catch (SecurityException e) {}
+ try {
+ file.delete();
+ }
+ catch (SecurityException e) {
+ }
}
}
- private final long _createDataset(long fid, long dsid, String name, long dapl) {
+ private final long _createDataset(long fid, long dsid, String name, long dapl)
+ {
long did = HDF5Constants.H5I_INVALID_HID;
try {
- did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32BE, dsid,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, dapl);
+ did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32BE, dsid, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, dapl);
}
catch (Throwable err) {
err.printStackTrace();
@@ -78,12 +85,12 @@ public class TestH5P {
return did;
}
- private final void _createH5File(long fcpl, long fapl) {
+ private final void _createH5File(long fcpl, long fapl)
+ {
try {
- H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC,
- fcpl, fapl);
+ H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC, fcpl, fapl);
H5dsid = H5.H5Screate_simple(2, H5dims, null);
- H5did = _createDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DEFAULT);
+ H5did = _createDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
@@ -101,28 +108,26 @@ public class TestH5P {
}
}
- public void deleteH5file() throws HDF5LibraryException {
- _deleteFile(H5_FILE);
- }
+ public void deleteH5file() throws HDF5LibraryException { _deleteFile(H5_FILE); }
@Before
- public void createH5fileProperties()
- throws NullPointerException, HDF5Exception {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ public void createH5fileProperties() throws NullPointerException, HDF5Exception
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
try {
- lapl_id = H5.H5Pcreate(HDF5Constants.H5P_DATASET_ACCESS);
- fapl_id = H5.H5Pcreate(HDF5Constants.H5P_FILE_ACCESS);
- fcpl_id = H5.H5Pcreate(HDF5Constants.H5P_FILE_CREATE);
- ocpl_id = H5.H5Pcreate(HDF5Constants.H5P_DATASET_CREATE);
+ lapl_id = H5.H5Pcreate(HDF5Constants.H5P_DATASET_ACCESS);
+ fapl_id = H5.H5Pcreate(HDF5Constants.H5P_FILE_ACCESS);
+ fcpl_id = H5.H5Pcreate(HDF5Constants.H5P_FILE_CREATE);
+ ocpl_id = H5.H5Pcreate(HDF5Constants.H5P_DATASET_CREATE);
ocp_plist_id = H5.H5Pcreate(HDF5Constants.H5P_OBJECT_COPY);
- lcpl_id = H5.H5Pcreate(HDF5Constants.H5P_LINK_CREATE);
- plapl_id = H5.H5Pcreate(HDF5Constants.H5P_LINK_ACCESS);
- plist_id = H5.H5Pcreate(HDF5Constants.H5P_DATASET_XFER);
- gapl_id = H5.H5Pcreate(HDF5Constants.H5P_GROUP_ACCESS);
- gcpl_id = H5.H5Pcreate(HDF5Constants.H5P_GROUP_CREATE);
- acpl_id = H5.H5Pcreate(HDF5Constants.H5P_ATTRIBUTE_CREATE);
+ lcpl_id = H5.H5Pcreate(HDF5Constants.H5P_LINK_CREATE);
+ plapl_id = H5.H5Pcreate(HDF5Constants.H5P_LINK_ACCESS);
+ plist_id = H5.H5Pcreate(HDF5Constants.H5P_DATASET_XFER);
+ gapl_id = H5.H5Pcreate(HDF5Constants.H5P_GROUP_ACCESS);
+ gcpl_id = H5.H5Pcreate(HDF5Constants.H5P_GROUP_CREATE);
+ acpl_id = H5.H5Pcreate(HDF5Constants.H5P_ATTRIBUTE_CREATE);
}
catch (Throwable err) {
err.printStackTrace();
@@ -134,51 +139,109 @@ public class TestH5P {
assertTrue(ocpl_id > 0);
assertTrue(ocp_plist_id > 0);
assertTrue(lcpl_id > 0);
- assertTrue(plapl_id>0);
+ assertTrue(plapl_id > 0);
assertTrue(plist_id > 0);
assertTrue(gapl_id > 0);
- assertTrue(gcpl_id >0);
- assertTrue(acpl_id >0);
+ assertTrue(gcpl_id > 0);
+ assertTrue(acpl_id > 0);
}
@After
- public void deleteH5fileProperties() throws HDF5LibraryException {
- if (lapl_id >0)
- try {H5.H5Pclose(lapl_id);} catch (Exception ex) {}
- if (fapl_id >0)
- try {H5.H5Pclose(fapl_id);} catch (Exception ex) {}
- if (fcpl_id >0)
- try {H5.H5Pclose(fcpl_id);} catch (Exception ex) {}
- if (ocpl_id >0)
- try {H5.H5Pclose(ocpl_id);} catch (Exception ex) {}
- if (ocp_plist_id >0)
- try {H5.H5Pclose(ocp_plist_id);} catch (Exception ex) {}
- if (lcpl_id >0)
- try {H5.H5Pclose(lcpl_id);} catch (Exception ex) {}
- if (plapl_id >0)
- try {H5.H5Pclose(plapl_id);} catch (Exception ex) {}
- if (plist_id >0)
- try {H5.H5Pclose(plist_id);} catch (Exception ex) {}
- if (gapl_id >0)
- try {H5.H5Pclose(gapl_id);} catch (Exception ex) {}
- if (gcpl_id >0)
- try {H5.H5Pclose(gcpl_id);} catch (Exception ex) {}
- if (acpl_id >0)
- try {H5.H5Pclose(acpl_id);} catch (Exception ex) {}
+ public void deleteH5fileProperties() throws HDF5LibraryException
+ {
+ if (lapl_id > 0)
+ try {
+ H5.H5Pclose(lapl_id);
+ }
+ catch (Exception ex) {
+ }
+ if (fapl_id > 0)
+ try {
+ H5.H5Pclose(fapl_id);
+ }
+ catch (Exception ex) {
+ }
+ if (fcpl_id > 0)
+ try {
+ H5.H5Pclose(fcpl_id);
+ }
+ catch (Exception ex) {
+ }
+ if (ocpl_id > 0)
+ try {
+ H5.H5Pclose(ocpl_id);
+ }
+ catch (Exception ex) {
+ }
+ if (ocp_plist_id > 0)
+ try {
+ H5.H5Pclose(ocp_plist_id);
+ }
+ catch (Exception ex) {
+ }
+ if (lcpl_id > 0)
+ try {
+ H5.H5Pclose(lcpl_id);
+ }
+ catch (Exception ex) {
+ }
+ if (plapl_id > 0)
+ try {
+ H5.H5Pclose(plapl_id);
+ }
+ catch (Exception ex) {
+ }
+ if (plist_id > 0)
+ try {
+ H5.H5Pclose(plist_id);
+ }
+ catch (Exception ex) {
+ }
+ if (gapl_id > 0)
+ try {
+ H5.H5Pclose(gapl_id);
+ }
+ catch (Exception ex) {
+ }
+ if (gcpl_id > 0)
+ try {
+ H5.H5Pclose(gcpl_id);
+ }
+ catch (Exception ex) {
+ }
+ if (acpl_id > 0)
+ try {
+ H5.H5Pclose(acpl_id);
+ }
+ catch (Exception ex) {
+ }
if (H5dsid > 0)
- try {H5.H5Sclose(H5dsid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(H5dsid);
+ }
+ catch (Exception ex) {
+ }
if (H5did > 0)
- try {H5.H5Dclose(H5did);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5did);
+ }
+ catch (Exception ex) {
+ }
if (H5fid > 0)
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
System.out.println();
}
@Test
- public void testH5Pget_nlinks() {
+ public void testH5Pget_nlinks()
+ {
long nlinks = -1;
try {
- nlinks = (long) H5.H5Pget_nlinks(lapl_id);
+ nlinks = (long)H5.H5Pget_nlinks(lapl_id);
}
catch (Throwable err) {
err.printStackTrace();
@@ -190,12 +253,13 @@ public class TestH5P {
}
@Test
- public void testH5Pset_nlinks() {
+ public void testH5Pset_nlinks()
+ {
long nlinks = 20;
int ret_val = -1;
try {
ret_val = H5.H5Pset_nlinks(lapl_id, nlinks);
- nlinks = (long) H5.H5Pget_nlinks(lapl_id);
+ nlinks = (long)H5.H5Pget_nlinks(lapl_id);
}
catch (Throwable err) {
err.printStackTrace();
@@ -207,17 +271,22 @@ public class TestH5P {
}
@Test(expected = HDF5FunctionArgumentException.class)
- public void testH5Pset_libver_bounds_invalidlow() throws Throwable {
- H5.H5Pset_libver_bounds(fapl_id, HDF5Constants.H5F_LIBVER_LATEST+1, HDF5Constants.H5F_LIBVER_LATEST);
+ public void testH5Pset_libver_bounds_invalidlow() throws Throwable
+ {
+ H5.H5Pset_libver_bounds(fapl_id, HDF5Constants.H5F_LIBVER_LATEST + 1,
+ HDF5Constants.H5F_LIBVER_LATEST);
}
@Test(expected = HDF5FunctionArgumentException.class)
- public void testH5Pset_libver_bounds_invalidhigh() throws Throwable {
- H5.H5Pset_libver_bounds(fapl_id, HDF5Constants.H5F_LIBVER_LATEST, HDF5Constants.H5F_LIBVER_LATEST+1);
+ public void testH5Pset_libver_bounds_invalidhigh() throws Throwable
+ {
+ H5.H5Pset_libver_bounds(fapl_id, HDF5Constants.H5F_LIBVER_LATEST,
+ HDF5Constants.H5F_LIBVER_LATEST + 1);
}
@Test
- public void testH5Pget_link_creation_order() {
+ public void testH5Pget_link_creation_order()
+ {
int crt_order_flags = 0;
try {
crt_order_flags = H5.H5Pget_link_creation_order(fcpl_id);
@@ -230,47 +299,51 @@ public class TestH5P {
}
@Test
- public void testH5Pset_link_creation_order_trackedPLUSindexed() {
- int ret_val = -1;
+ public void testH5Pset_link_creation_order_trackedPLUSindexed()
+ {
+ int ret_val = -1;
int crt_order_flags = HDF5Constants.H5P_CRT_ORDER_TRACKED + HDF5Constants.H5P_CRT_ORDER_INDEXED;
- int crtorderflags = 0;
+ int crtorderflags = 0;
try {
- ret_val = H5.H5Pset_link_creation_order(fcpl_id, crt_order_flags);
+ ret_val = H5.H5Pset_link_creation_order(fcpl_id, crt_order_flags);
crtorderflags = H5.H5Pget_link_creation_order(fcpl_id);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5Pset_link_creation_order: " + err);
}
- assertTrue("testH5Pset_link_creation_order_trackedPLUSindexed",ret_val >= 0);
+ assertTrue("testH5Pset_link_creation_order_trackedPLUSindexed", ret_val >= 0);
assertEquals(crt_order_flags, crtorderflags);
}
@Test
- public void testH5Pset_link_creation_order_tracked() {
- int ret_val = -1;
+ public void testH5Pset_link_creation_order_tracked()
+ {
+ int ret_val = -1;
int crtorderflags = 0;
try {
- ret_val = H5.H5Pset_link_creation_order(fcpl_id, HDF5Constants.H5P_CRT_ORDER_TRACKED);
+ ret_val = H5.H5Pset_link_creation_order(fcpl_id, HDF5Constants.H5P_CRT_ORDER_TRACKED);
crtorderflags = H5.H5Pget_link_creation_order(fcpl_id);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5Pset_link_creation_order: " + err);
}
- assertTrue("testH5Pset_link_creation_order_tracked",ret_val >= 0);
+ assertTrue("testH5Pset_link_creation_order_tracked", ret_val >= 0);
assertEquals(HDF5Constants.H5P_CRT_ORDER_TRACKED, crtorderflags);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Pset_link_creation_order_invalidvalue() throws Throwable {
+ public void testH5Pset_link_creation_order_invalidvalue() throws Throwable
+ {
H5.H5Pset_link_creation_order(fcpl_id, HDF5Constants.H5P_CRT_ORDER_INDEXED);
}
@Test
- public void testH5Pget_attr_creation_order() {
+ public void testH5Pget_attr_creation_order()
+ {
int crt_order_flags = 0;
try {
@@ -284,13 +357,14 @@ public class TestH5P {
}
@Test
- public void testH5Pset_attr_creation_order_trackedPLUSindexed() {
- int ret_val = -1;
+ public void testH5Pset_attr_creation_order_trackedPLUSindexed()
+ {
+ int ret_val = -1;
int crt_order_flags = HDF5Constants.H5P_CRT_ORDER_TRACKED + HDF5Constants.H5P_CRT_ORDER_INDEXED;
- int crtorderflags = 0;
+ int crtorderflags = 0;
try {
- ret_val = H5.H5Pset_attr_creation_order(ocpl_id, crt_order_flags);
+ ret_val = H5.H5Pset_attr_creation_order(ocpl_id, crt_order_flags);
crtorderflags = H5.H5Pget_attr_creation_order(ocpl_id);
}
catch (Throwable err) {
@@ -302,12 +376,13 @@ public class TestH5P {
}
@Test
- public void testH5Pset_attr_creation_order_tracked() {
- int ret_val = -1;
+ public void testH5Pset_attr_creation_order_tracked()
+ {
+ int ret_val = -1;
int crtorderflags = 0;
try {
- ret_val = H5.H5Pset_attr_creation_order(ocpl_id, HDF5Constants.H5P_CRT_ORDER_TRACKED);
+ ret_val = H5.H5Pset_attr_creation_order(ocpl_id, HDF5Constants.H5P_CRT_ORDER_TRACKED);
crtorderflags = H5.H5Pget_attr_creation_order(ocpl_id);
}
catch (Throwable err) {
@@ -319,12 +394,14 @@ public class TestH5P {
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Pset_attr_creation_order_invalidvalue() throws Throwable {
+ public void testH5Pset_attr_creation_order_invalidvalue() throws Throwable
+ {
H5.H5Pset_attr_creation_order(ocpl_id, HDF5Constants.H5P_CRT_ORDER_INDEXED);
}
@Test
- public void testH5Pset_copy_object() {
+ public void testH5Pset_copy_object()
+ {
int cpy_option = -1;
@@ -350,12 +427,14 @@ public class TestH5P {
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Pset_copy_object_invalidobject() throws Throwable {
+ public void testH5Pset_copy_object_invalidobject() throws Throwable
+ {
H5.H5Pset_copy_object(HDF5Constants.H5P_DEFAULT, HDF5Constants.H5O_COPY_SHALLOW_HIERARCHY_FLAG);
}
@Test
- public void testH5Pset_create_intermediate_group() {
+ public void testH5Pset_create_intermediate_group()
+ {
int ret_val = -1;
try {
@@ -365,16 +444,18 @@ public class TestH5P {
err.printStackTrace();
fail("H5Pset_create_intermediate_group: " + err);
}
- assertTrue(ret_val>=0);
+ assertTrue(ret_val >= 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Pset_create_intermediate_group_invalidobject() throws Throwable {
+ public void testH5Pset_create_intermediate_group_invalidobject() throws Throwable
+ {
H5.H5Pset_create_intermediate_group(ocp_plist_id, true);
}
@Test
- public void testH5Pget_create_intermediate_group() {
+ public void testH5Pget_create_intermediate_group()
+ {
boolean flag = false;
try {
H5.H5Pset_create_intermediate_group(lcpl_id, true);
@@ -388,7 +469,8 @@ public class TestH5P {
}
@Test
- public void testH5Pget_create_intermediate_group_notcreated() {
+ public void testH5Pget_create_intermediate_group_notcreated()
+ {
boolean flag = true;
try {
flag = H5.H5Pget_create_intermediate_group(lcpl_id);
@@ -401,43 +483,48 @@ public class TestH5P {
}
@Test
- public void testH5Pset_data_transform() {
+ public void testH5Pset_data_transform()
+ {
String expression = "(5/9.0)*(x-32)";
- int ret_val = -1;
+ int ret_val = -1;
try {
- ret_val= H5.H5Pset_data_transform(plist_id, expression);
+ ret_val = H5.H5Pset_data_transform(plist_id, expression);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5Pset_data_transform: " + err);
}
- assertTrue(ret_val>=0);
+ assertTrue(ret_val >= 0);
}
@Test(expected = NullPointerException.class)
- public void testH5Pset_data_transform_NullExpression() throws Throwable {
+ public void testH5Pset_data_transform_NullExpression() throws Throwable
+ {
H5.H5Pset_data_transform(plist_id, null);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Pset_data_transform_InvalidExpression1() throws Throwable {
+ public void testH5Pset_data_transform_InvalidExpression1() throws Throwable
+ {
H5.H5Pset_data_transform(plist_id, "");
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Pset_data_transform_InvalidExpression2() throws Throwable {
+ public void testH5Pset_data_transform_InvalidExpression2() throws Throwable
+ {
H5.H5Pset_data_transform(plist_id, "hello");
}
@Test
- public void testH5Pget_data_transform() {
+ public void testH5Pget_data_transform()
+ {
String expression = "(5/9.0)*(x-32)";
- String [] express = {""};
+ String[] express = {""};
long express_size = 0;
- long size = 20;
+ long size = 20;
try {
H5.H5Pset_data_transform(plist_id, expression);
@@ -447,25 +534,28 @@ public class TestH5P {
err.printStackTrace();
fail("H5Pget_data_transform: " + err);
}
- assertTrue(express_size>=0);
+ assertTrue(express_size >= 0);
assertTrue("The data transform expression: ", expression.equals(express[0]));
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Pget_data_transform_ExpressionNotSet() throws Throwable {
- String [] express = {""};
+ public void testH5Pget_data_transform_ExpressionNotSet() throws Throwable
+ {
+ String[] express = {""};
H5.H5Pget_data_transform(plist_id, express, 20);
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Pget_data_transform_IllegalSize() throws Throwable {
- String [] express = {""};
+ public void testH5Pget_data_transform_IllegalSize() throws Throwable
+ {
+ String[] express = {""};
H5.H5Pset_data_transform(plist_id, "(5/9.0)*(x-32)");
H5.H5Pget_data_transform(plist_id, express, 0);
}
@Test
- public void testH5Pget_elink_acc_flags() {
+ public void testH5Pget_elink_acc_flags()
+ {
int get_flags = -1;
try {
@@ -480,12 +570,13 @@ public class TestH5P {
}
@Test
- public void testH5Pset_elink_acc_flags() {
+ public void testH5Pset_elink_acc_flags()
+ {
int get_flags = -1;
- int ret_val = -1;
+ int ret_val = -1;
try {
- ret_val = H5.H5Pset_elink_acc_flags(lapl_id, HDF5Constants.H5F_ACC_RDWR);
+ ret_val = H5.H5Pset_elink_acc_flags(lapl_id, HDF5Constants.H5F_ACC_RDWR);
get_flags = H5.H5Pget_elink_acc_flags(lapl_id);
}
catch (Throwable err) {
@@ -497,21 +588,24 @@ public class TestH5P {
}
@Test(expected = HDF5FunctionArgumentException.class)
- public void testH5Pset_elink_acc_flags_InvalidFlag1() throws Throwable {
+ public void testH5Pset_elink_acc_flags_InvalidFlag1() throws Throwable
+ {
H5.H5Pset_elink_acc_flags(lapl_id, HDF5Constants.H5F_ACC_TRUNC);
}
@Test(expected = HDF5FunctionArgumentException.class)
- public void testH5Pset_elink_acc_flags_InvalidFlag2() throws Throwable {
+ public void testH5Pset_elink_acc_flags_InvalidFlag2() throws Throwable
+ {
H5.H5Pset_elink_acc_flags(lapl_id, -1);
}
@Test
- public void testH5Pset_link_phase_change() {
+ public void testH5Pset_link_phase_change()
+ {
int ret_val = -1;
try {
- ret_val = H5.H5Pset_link_phase_change(fcpl_id , 2, 2);
+ ret_val = H5.H5Pset_link_phase_change(fcpl_id, 2, 2);
}
catch (Throwable err) {
err.printStackTrace();
@@ -521,17 +615,20 @@ public class TestH5P {
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Pset_link_phase_change_Highmax_Compact() throws Throwable {
- H5.H5Pset_link_phase_change(fcpl_id , 70000000, 3);
+ public void testH5Pset_link_phase_change_Highmax_Compact() throws Throwable
+ {
+ H5.H5Pset_link_phase_change(fcpl_id, 70000000, 3);
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Pset_link_phase_change_max_compactLESSTHANmin_dense() throws Throwable {
- H5.H5Pset_link_phase_change(fcpl_id , 5, 6);
+ public void testH5Pset_link_phase_change_max_compactLESSTHANmin_dense() throws Throwable
+ {
+ H5.H5Pset_link_phase_change(fcpl_id, 5, 6);
}
@Test
- public void testH5Pget_link_phase_change() {
+ public void testH5Pget_link_phase_change()
+ {
int ret_val = -1;
int[] links = new int[2];
@@ -548,10 +645,11 @@ public class TestH5P {
}
@Test
- public void testH5Pget_link_phase_change_EqualsSet() {
+ public void testH5Pget_link_phase_change_EqualsSet()
+ {
int[] links = new int[2];
try {
- H5.H5Pset_link_phase_change(fcpl_id , 10, 7);
+ H5.H5Pset_link_phase_change(fcpl_id, 10, 7);
H5.H5Pget_link_phase_change(fcpl_id, links);
}
catch (Throwable err) {
@@ -563,13 +661,15 @@ public class TestH5P {
}
@Test(expected = NullPointerException.class)
- public void testH5Pget_link_phase_change_Null() throws Throwable {
+ public void testH5Pget_link_phase_change_Null() throws Throwable
+ {
H5.H5Pget_link_phase_change(fcpl_id, null);
}
@Test
- public void testH5Pget_attr_phase_change() {
- int ret_val = -1;
+ public void testH5Pget_attr_phase_change()
+ {
+ int ret_val = -1;
int[] attributes = new int[2];
try {
@@ -580,7 +680,8 @@ public class TestH5P {
fail("H5Pget_attr_phase_change: " + err);
}
assertTrue("testH5Pget_attr_phase_change", ret_val >= 0);
- assertEquals("Default value of the max. no. of attributes stored in compact storage", 8, attributes[0]);
+ assertEquals("Default value of the max. no. of attributes stored in compact storage", 8,
+ attributes[0]);
assertEquals("Default value of the min. no. of attributes stored in dense storage", 6, attributes[1]);
try {
H5.H5Pset_attr_phase_change(ocpl_id, 9, 5);
@@ -597,14 +698,16 @@ public class TestH5P {
fail("H5Pget_attr_phase_change: " + err);
}
assertTrue("testH5Pget_attr_phase_change", ret_val >= 0);
- assertEquals("Default value of the max. no. of attributes stored in compact storage", 9, attributes[0]);
+ assertEquals("Default value of the max. no. of attributes stored in compact storage", 9,
+ attributes[0]);
assertEquals("Default value of the min. no. of attributes stored in dense storage", 5, attributes[1]);
}
@Test
- public void testH5Pget_shared_mesg_phase_change() {
+ public void testH5Pget_shared_mesg_phase_change()
+ {
int ret_val = -1;
- int[] size = new int[2];
+ int[] size = new int[2];
try {
ret_val = H5.H5Pget_shared_mesg_phase_change(fcpl_id, size);
@@ -617,11 +720,12 @@ public class TestH5P {
}
@Test
- public void testH5Pget_shared_mesg_phase_change_EqualsSET() {
+ public void testH5Pget_shared_mesg_phase_change_EqualsSET()
+ {
int[] size = new int[2];
try {
- H5.H5Pset_shared_mesg_phase_change(fcpl_id,50, 40);
+ H5.H5Pset_shared_mesg_phase_change(fcpl_id, 50, 40);
H5.H5Pget_shared_mesg_phase_change(fcpl_id, size);
}
catch (Throwable err) {
@@ -633,11 +737,12 @@ public class TestH5P {
}
@Test
- public void testH5Pset_shared_mesg_phase_change() {
+ public void testH5Pset_shared_mesg_phase_change()
+ {
int ret_val = -1;
try {
- ret_val = H5.H5Pset_shared_mesg_phase_change(fcpl_id,2, 1);
+ ret_val = H5.H5Pset_shared_mesg_phase_change(fcpl_id, 2, 1);
}
catch (Throwable err) {
err.printStackTrace();
@@ -647,22 +752,26 @@ public class TestH5P {
}
@Test(expected = IllegalArgumentException.class)
- public void testH5PH5Pset_shared_mesg_phase_change_HighMaxlistValue() throws Throwable {
+ public void testH5PH5Pset_shared_mesg_phase_change_HighMaxlistValue() throws Throwable
+ {
H5.H5Pset_shared_mesg_phase_change(fcpl_id, 5001, 4000);
}
@Test(expected = IllegalArgumentException.class)
- public void testH5PH5Pset_shared_mesg_phase_change_HighMinbtreeValue() throws Throwable {
+ public void testH5PH5Pset_shared_mesg_phase_change_HighMinbtreeValue() throws Throwable
+ {
H5.H5Pset_shared_mesg_phase_change(fcpl_id, 5000, 5001);
}
@Test(expected = IllegalArgumentException.class)
- public void testH5PH5Pset_shared_mesg_phase_change_MinbtreeGreaterThanMaxlist() throws Throwable {
- H5.H5Pset_link_phase_change(fcpl_id , 3, 7);
+ public void testH5PH5Pset_shared_mesg_phase_change_MinbtreeGreaterThanMaxlist() throws Throwable
+ {
+ H5.H5Pset_link_phase_change(fcpl_id, 3, 7);
}
@Test
- public void testH5Pget_shared_mesg_nindexes() {
+ public void testH5Pget_shared_mesg_nindexes()
+ {
int nindexes = -1;
try {
@@ -676,12 +785,13 @@ public class TestH5P {
}
@Test
- public void testH5Pset_shared_mesg_nindexes() {
+ public void testH5Pset_shared_mesg_nindexes()
+ {
int nindexes = -1;
- int ret_val = -1;
+ int ret_val = -1;
try {
- ret_val = H5.H5Pset_shared_mesg_nindexes(fcpl_id, 7);
+ ret_val = H5.H5Pset_shared_mesg_nindexes(fcpl_id, 7);
nindexes = H5.H5Pget_shared_mesg_nindexes(fcpl_id);
}
catch (Throwable err) {
@@ -689,21 +799,23 @@ public class TestH5P {
fail("H5Pset_shared_mesg_nindexes: " + err);
}
assertTrue("H5Pset_shared_mesg_nindexes", ret_val >= 0);
- assertEquals("Value of nindexes is equal to value set",7 ,nindexes);
+ assertEquals("Value of nindexes is equal to value set", 7, nindexes);
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Pset_shared_mesg_nindexes_InvalidHIGHnindexes()throws Throwable {
+ public void testH5Pset_shared_mesg_nindexes_InvalidHIGHnindexes() throws Throwable
+ {
H5.H5Pset_shared_mesg_nindexes(fcpl_id, 9);
}
@Test
- public void testH5Pset_shared_mesg_index() {
+ public void testH5Pset_shared_mesg_index()
+ {
int ret_val = -1;
try {
H5.H5Pset_shared_mesg_nindexes(fcpl_id, 2);
- ret_val = H5.H5Pset_shared_mesg_index(fcpl_id, 0,HDF5Constants.H5O_SHMESG_ATTR_FLAG, 10);
+ ret_val = H5.H5Pset_shared_mesg_index(fcpl_id, 0, HDF5Constants.H5O_SHMESG_ATTR_FLAG, 10);
}
catch (Throwable err) {
err.printStackTrace();
@@ -713,24 +825,27 @@ public class TestH5P {
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Pset_shared_mesg_index_Invalid_indexnum() throws Throwable {
- H5.H5Pset_shared_mesg_index(fcpl_id, 2,HDF5Constants.H5O_SHMESG_ATTR_FLAG, 10);
+ public void testH5Pset_shared_mesg_index_Invalid_indexnum() throws Throwable
+ {
+ H5.H5Pset_shared_mesg_index(fcpl_id, 2, HDF5Constants.H5O_SHMESG_ATTR_FLAG, 10);
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Pset_shared_mesg_index_InvalidFlag() throws Throwable {
+ public void testH5Pset_shared_mesg_index_InvalidFlag() throws Throwable
+ {
H5.H5Pset_shared_mesg_nindexes(fcpl_id, 7);
- H5.H5Pset_shared_mesg_index(fcpl_id, 2,HDF5Constants.H5O_SHMESG_ALL_FLAG + 1, 10);
+ H5.H5Pset_shared_mesg_index(fcpl_id, 2, HDF5Constants.H5O_SHMESG_ALL_FLAG + 1, 10);
}
@Test
- public void testH5Pget_shared_mesg_index() {
+ public void testH5Pget_shared_mesg_index()
+ {
- int ret_val = -1;
+ int ret_val = -1;
int[] mesg_info = new int[2];
try {
H5.H5Pset_shared_mesg_nindexes(fcpl_id, 2);
- H5.H5Pset_shared_mesg_index(fcpl_id, 0,HDF5Constants.H5O_SHMESG_ATTR_FLAG, 10);
+ H5.H5Pset_shared_mesg_index(fcpl_id, 0, HDF5Constants.H5O_SHMESG_ATTR_FLAG, 10);
ret_val = H5.H5Pget_shared_mesg_index(fcpl_id, 0, mesg_info);
}
catch (Throwable err) {
@@ -743,13 +858,15 @@ public class TestH5P {
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Pget_shared_mesg_index_Invalid_indexnum() throws Throwable {
+ public void testH5Pget_shared_mesg_index_Invalid_indexnum() throws Throwable
+ {
int[] mesg_info = new int[2];
H5.H5Pget_shared_mesg_index(fcpl_id, 0, mesg_info);
}
@Test
- public void testH5Pset_local_heap_size_hint() {
+ public void testH5Pset_local_heap_size_hint()
+ {
int ret_val = -1;
try {
ret_val = H5.H5Pset_local_heap_size_hint(gcpl_id, 0);
@@ -762,7 +879,8 @@ public class TestH5P {
}
@Test
- public void testH5Pget_local_heap_size_hint() {
+ public void testH5Pget_local_heap_size_hint()
+ {
long size_hint = -1;
try {
size_hint = H5.H5Pget_local_heap_size_hint(gcpl_id);
@@ -775,7 +893,8 @@ public class TestH5P {
}
@Test
- public void testH5Pset_nbit() {
+ public void testH5Pset_nbit()
+ {
int ret_val = -1;
try {
ret_val = H5.H5Pset_nbit(ocpl_id);
@@ -788,9 +907,10 @@ public class TestH5P {
}
@Test
- public void testH5Pset_scaleoffset() {
- int ret_val = -1;
- int scale_type = HDF5Constants.H5Z_SO_FLOAT_DSCALE;
+ public void testH5Pset_scaleoffset()
+ {
+ int ret_val = -1;
+ int scale_type = HDF5Constants.H5Z_SO_FLOAT_DSCALE;
int scale_factor = HDF5Constants.H5Z_SO_INT_MINBITS_DEFAULT;
try {
ret_val = H5.H5Pset_scaleoffset(ocpl_id, scale_type, scale_factor);
@@ -803,20 +923,23 @@ public class TestH5P {
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Pset_scaleoffset_Invalidscale_type() throws Throwable {
+ public void testH5Pset_scaleoffset_Invalidscale_type() throws Throwable
+ {
H5.H5Pset_scaleoffset(ocpl_id, 3, 1);
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Pset_scaleoffset_Invalidscale_factor() throws Throwable {
+ public void testH5Pset_scaleoffset_Invalidscale_factor() throws Throwable
+ {
H5.H5Pset_scaleoffset(ocpl_id, HDF5Constants.H5Z_SO_INT, -1);
}
@Test
- public void testH5Pset_est_link_info() {
+ public void testH5Pset_est_link_info()
+ {
int ret_val = -1;
try {
- ret_val = H5.H5Pset_est_link_info(gcpl_id, 0,10);
+ ret_val = H5.H5Pset_est_link_info(gcpl_id, 0, 10);
}
catch (Throwable err) {
err.printStackTrace();
@@ -826,13 +949,15 @@ public class TestH5P {
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Pset_est_link_info_InvalidValues() throws Throwable {
- H5.H5Pset_est_link_info(gcpl_id, 100000,10);
+ public void testH5Pset_est_link_info_InvalidValues() throws Throwable
+ {
+ H5.H5Pset_est_link_info(gcpl_id, 100000, 10);
}
@Test
- public void testH5Pget_est_link_info() {
- int ret_val = -1;
+ public void testH5Pget_est_link_info()
+ {
+ int ret_val = -1;
int[] link_info = new int[2];
try {
ret_val = H5.H5Pget_est_link_info(gcpl_id, link_info);
@@ -845,8 +970,9 @@ public class TestH5P {
}
@Test
- public void testH5Pset_elink_prefix() {
- int ret_val = -1;
+ public void testH5Pset_elink_prefix()
+ {
+ int ret_val = -1;
String prefix = "tmp";
try {
ret_val = H5.H5Pset_elink_prefix(plapl_id, prefix);
@@ -859,14 +985,16 @@ public class TestH5P {
}
@Test(expected = NullPointerException.class)
- public void testH5Pset_elink_prefix_null() throws Throwable{
+ public void testH5Pset_elink_prefix_null() throws Throwable
+ {
H5.H5Pset_elink_prefix(plapl_id, null);
}
@Test
- public void testH5Pget_elink_prefix() {
- String prefix = "tmp";
- String[] pre = {""};
+ public void testH5Pget_elink_prefix()
+ {
+ String prefix = "tmp";
+ String[] pre = {""};
long prefix_size = 0;
try {
@@ -877,22 +1005,25 @@ public class TestH5P {
err.printStackTrace();
fail("H5Pget_elink_prefix: " + err);
}
- assertTrue(prefix_size>=0);
+ assertTrue(prefix_size >= 0);
assertTrue("The prefix: ", prefix.equals(pre[0]));
}
@Test(expected = NullPointerException.class)
- public void testH5Pget_elink_prefix_null() throws Throwable {
+ public void testH5Pget_elink_prefix_null() throws Throwable
+ {
H5.H5Pget_elink_prefix(plapl_id, null);
}
@Test(expected = NullPointerException.class)
- public void testH5Pget_userblock_null() throws Throwable {
+ public void testH5Pget_userblock_null() throws Throwable
+ {
H5.H5Pget_userblock(fcpl_id, null);
}
@Test
- public void testH5P_userblock() {
+ public void testH5P_userblock()
+ {
long[] size = {0};
try {
@@ -903,13 +1034,13 @@ public class TestH5P {
H5.H5Pclose(fcpl_id);
/* Get the file's dataset creation property list */
- fcpl_id = H5.H5Fget_create_plist(H5fid);
+ fcpl_id = H5.H5Fget_create_plist(H5fid);
/* Get the file's version information */
H5F_info2_t finfo = H5.H5Fget_info(H5fid);
- assertTrue("super block version: "+finfo.super_version, finfo.super_version == 0);
- assertTrue("free-space manager version: "+finfo.free_version, finfo.free_version == 0);
- assertTrue("shared object header version: "+finfo.sohm_version, finfo.sohm_version == 0);
+ assertTrue("super block version: " + finfo.super_version, finfo.super_version == 0);
+ assertTrue("free-space manager version: " + finfo.free_version, finfo.free_version == 0);
+ assertTrue("shared object header version: " + finfo.sohm_version, finfo.sohm_version == 0);
H5.H5Pget_userblock(fcpl_id, size);
deleteH5file();
}
@@ -917,17 +1048,19 @@ public class TestH5P {
err.printStackTrace();
fail("H5Pget_userblock: " + err);
}
- assertTrue("user block size: "+size[0], size[0] == 1024);
+ assertTrue("user block size: " + size[0], size[0] == 1024);
}
@Test(expected = NullPointerException.class)
- public void testH5Pget_sizes_null() throws Throwable {
+ public void testH5Pget_sizes_null() throws Throwable
+ {
H5.H5Pget_sizes(fcpl_id, null);
}
@Test
- public void testH5P_sizes() {
- long[] size = {0,0};
+ public void testH5P_sizes()
+ {
+ long[] size = {0, 0};
try {
H5.H5Pset_sizes(fcpl_id, 4, 8);
@@ -937,13 +1070,13 @@ public class TestH5P {
H5.H5Pclose(fcpl_id);
/* Get the file's dataset creation property list */
- fcpl_id = H5.H5Fget_create_plist(H5fid);
+ fcpl_id = H5.H5Fget_create_plist(H5fid);
/* Get the file's version information */
H5F_info2_t finfo = H5.H5Fget_info(H5fid);
- assertTrue("super block version: "+finfo.super_version, finfo.super_version == 0);
- assertTrue("free-space manager version: "+finfo.free_version, finfo.free_version == 0);
- assertTrue("shared object header version: "+finfo.sohm_version, finfo.sohm_version == 0);
+ assertTrue("super block version: " + finfo.super_version, finfo.super_version == 0);
+ assertTrue("free-space manager version: " + finfo.free_version, finfo.free_version == 0);
+ assertTrue("shared object header version: " + finfo.sohm_version, finfo.sohm_version == 0);
H5.H5Pget_sizes(fcpl_id, size);
deleteH5file();
}
@@ -951,18 +1084,20 @@ public class TestH5P {
err.printStackTrace();
fail("H5Pget_sizes: " + err);
}
- assertTrue("sizeof_addr size: "+size[0], size[0] == 4);
- assertTrue("sizeof_size size: "+size[1], size[1] == 8);
+ assertTrue("sizeof_addr size: " + size[0], size[0] == 4);
+ assertTrue("sizeof_size size: " + size[1], size[1] == 8);
}
@Test(expected = NullPointerException.class)
- public void testH5Pget_sym_k_null() throws Throwable {
+ public void testH5Pget_sym_k_null() throws Throwable
+ {
H5.H5Pget_sym_k(fcpl_id, null);
}
@Test
- public void testH5P_sym_k() {
- int[] size = {0,0};
+ public void testH5P_sym_k()
+ {
+ int[] size = {0, 0};
try {
H5.H5Pset_sym_k(fcpl_id, 32, 8);
@@ -972,13 +1107,13 @@ public class TestH5P {
H5.H5Pclose(fcpl_id);
/* Get the file's dataset creation property list */
- fcpl_id = H5.H5Fget_create_plist(H5fid);
+ fcpl_id = H5.H5Fget_create_plist(H5fid);
/* Get the file's version information */
H5F_info2_t finfo = H5.H5Fget_info(H5fid);
- assertTrue("super block version: "+finfo.super_version, finfo.super_version == 0);
- assertTrue("free-space manager version: "+finfo.free_version, finfo.free_version == 0);
- assertTrue("shared object header version: "+finfo.sohm_version, finfo.sohm_version == 0);
+ assertTrue("super block version: " + finfo.super_version, finfo.super_version == 0);
+ assertTrue("free-space manager version: " + finfo.free_version, finfo.free_version == 0);
+ assertTrue("shared object header version: " + finfo.sohm_version, finfo.sohm_version == 0);
H5.H5Pget_sym_k(fcpl_id, size);
deleteH5file();
}
@@ -986,17 +1121,19 @@ public class TestH5P {
err.printStackTrace();
fail("H5Pget_sym_k: " + err);
}
- assertTrue("symbol table tree rank: "+size[0], size[0] == 32);
- assertTrue("symbol table node size: "+size[1], size[1] == 8);
+ assertTrue("symbol table tree rank: " + size[0], size[0] == 32);
+ assertTrue("symbol table node size: " + size[1], size[1] == 8);
}
@Test(expected = NullPointerException.class)
- public void testH5Pget_istore_k_null() throws Throwable {
+ public void testH5Pget_istore_k_null() throws Throwable
+ {
H5.H5Pget_istore_k(fcpl_id, null);
}
@Test
- public void testH5P_istore_k() {
+ public void testH5P_istore_k()
+ {
int[] size = {0};
try {
@@ -1007,13 +1144,13 @@ public class TestH5P {
H5.H5Pclose(fcpl_id);
/* Get the file's dataset creation property list */
- fcpl_id = H5.H5Fget_create_plist(H5fid);
+ fcpl_id = H5.H5Fget_create_plist(H5fid);
/* Get the file's version information */
H5F_info2_t finfo = H5.H5Fget_info(H5fid);
- assertTrue("super block version: "+finfo.super_version, finfo.super_version == 1);
- assertTrue("free-space manager version: "+finfo.free_version, finfo.free_version == 0);
- assertTrue("shared object header version: "+finfo.sohm_version, finfo.sohm_version == 0);
+ assertTrue("super block version: " + finfo.super_version, finfo.super_version == 1);
+ assertTrue("free-space manager version: " + finfo.free_version, finfo.free_version == 0);
+ assertTrue("shared object header version: " + finfo.sohm_version, finfo.sohm_version == 0);
H5.H5Pget_istore_k(fcpl_id, size);
deleteH5file();
}
@@ -1021,13 +1158,14 @@ public class TestH5P {
err.printStackTrace();
fail("H5Pget_sym_k: " + err);
}
- assertTrue("chunked storage b-tree 1/2-rank: "+size[0], size[0] == 64);
+ assertTrue("chunked storage b-tree 1/2-rank: " + size[0], size[0] == 64);
}
@Test
- public void testH5P_obj_track_times() {
+ public void testH5P_obj_track_times()
+ {
boolean default_ret_val = false;
- boolean ret_val = true;
+ boolean ret_val = true;
try {
default_ret_val = H5.H5Pget_obj_track_times(ocpl_id);
H5.H5Pset_obj_track_times(ocpl_id, false);
@@ -1042,7 +1180,8 @@ public class TestH5P {
}
@Test
- public void testH5Pget_char_encoding() {
+ public void testH5Pget_char_encoding()
+ {
int char_encoding = 0;
try {
@@ -1065,18 +1204,19 @@ public class TestH5P {
}
@Test
- public void testH5P_fill_time() {
+ public void testH5P_fill_time()
+ {
int[] fill_time = {0};
try {
H5.H5Pget_fill_time(ocpl_id, fill_time);
- assertTrue("fill_time: "+fill_time[0], fill_time[0] == HDF5Constants.H5D_FILL_TIME_IFSET);
+ assertTrue("fill_time: " + fill_time[0], fill_time[0] == HDF5Constants.H5D_FILL_TIME_IFSET);
H5.H5Pset_fill_time(ocpl_id, HDF5Constants.H5D_FILL_TIME_ALLOC);
H5.H5Pget_fill_time(ocpl_id, fill_time);
- assertTrue("fill_time: "+fill_time[0], fill_time[0] == HDF5Constants.H5D_FILL_TIME_ALLOC);
+ assertTrue("fill_time: " + fill_time[0], fill_time[0] == HDF5Constants.H5D_FILL_TIME_ALLOC);
H5.H5Pset_fill_time(ocpl_id, HDF5Constants.H5D_FILL_TIME_NEVER);
H5.H5Pget_fill_time(ocpl_id, fill_time);
- assertTrue("fill_time: "+fill_time[0], fill_time[0] == HDF5Constants.H5D_FILL_TIME_NEVER);
+ assertTrue("fill_time: " + fill_time[0], fill_time[0] == HDF5Constants.H5D_FILL_TIME_NEVER);
}
catch (Throwable err) {
err.printStackTrace();
@@ -1085,18 +1225,19 @@ public class TestH5P {
}
@Test
- public void testH5P_alloc_time() {
+ public void testH5P_alloc_time()
+ {
int[] alloc_time = {0};
try {
H5.H5Pget_alloc_time(ocpl_id, alloc_time);
- assertTrue("alloc_time: "+alloc_time[0], alloc_time[0] == HDF5Constants.H5D_ALLOC_TIME_LATE);
+ assertTrue("alloc_time: " + alloc_time[0], alloc_time[0] == HDF5Constants.H5D_ALLOC_TIME_LATE);
H5.H5Pset_alloc_time(ocpl_id, HDF5Constants.H5D_ALLOC_TIME_EARLY);
H5.H5Pget_alloc_time(ocpl_id, alloc_time);
- assertTrue("alloc_time: "+alloc_time[0], alloc_time[0] == HDF5Constants.H5D_ALLOC_TIME_EARLY);
+ assertTrue("alloc_time: " + alloc_time[0], alloc_time[0] == HDF5Constants.H5D_ALLOC_TIME_EARLY);
H5.H5Pset_alloc_time(ocpl_id, HDF5Constants.H5D_ALLOC_TIME_INCR);
H5.H5Pget_alloc_time(ocpl_id, alloc_time);
- assertTrue("alloc_time: "+alloc_time[0], alloc_time[0] == HDF5Constants.H5D_ALLOC_TIME_INCR);
+ assertTrue("alloc_time: " + alloc_time[0], alloc_time[0] == HDF5Constants.H5D_ALLOC_TIME_INCR);
}
catch (Throwable err) {
err.printStackTrace();
@@ -1105,21 +1246,24 @@ public class TestH5P {
}
@Test
- public void testH5P_fill_value() {
- int[] fill_value = {-1};
+ public void testH5P_fill_value()
+ {
+ int[] fill_value = {-1};
int[] fill_value_status = {-1};
try {
H5.H5Pfill_value_defined(ocpl_id, fill_value_status);
- assertTrue("fill_value_status: "+fill_value_status[0], fill_value_status[0] == HDF5Constants.H5D_FILL_VALUE_DEFAULT);
+ assertTrue("fill_value_status: " + fill_value_status[0],
+ fill_value_status[0] == HDF5Constants.H5D_FILL_VALUE_DEFAULT);
H5.H5Pget_fill_value(ocpl_id, HDF5Constants.H5T_NATIVE_INT, fill_value);
- assertTrue("fill_value: "+fill_value[0], fill_value[0] == 0);
+ assertTrue("fill_value: " + fill_value[0], fill_value[0] == 0);
fill_value[0] = 255;
H5.H5Pset_fill_value(ocpl_id, HDF5Constants.H5T_NATIVE_INT, fill_value);
H5.H5Pget_fill_value(ocpl_id, HDF5Constants.H5T_NATIVE_INT, fill_value);
- assertTrue("fill_value: "+fill_value[0], fill_value[0] == 255);
+ assertTrue("fill_value: " + fill_value[0], fill_value[0] == 255);
H5.H5Pfill_value_defined(ocpl_id, fill_value_status);
- assertTrue("fill_value_status: "+fill_value_status[0], fill_value_status[0] == HDF5Constants.H5D_FILL_VALUE_USER_DEFINED);
+ assertTrue("fill_value_status: " + fill_value_status[0],
+ fill_value_status[0] == HDF5Constants.H5D_FILL_VALUE_USER_DEFINED);
}
catch (Throwable err) {
err.printStackTrace();
@@ -1128,15 +1272,16 @@ public class TestH5P {
}
@Test
- public void testH5P_layout() {
+ public void testH5P_layout()
+ {
int layout_type = -1;
try {
layout_type = H5.H5Pget_layout(ocpl_id);
- assertTrue("layout: "+layout_type, layout_type == HDF5Constants.H5D_CONTIGUOUS);
+ assertTrue("layout: " + layout_type, layout_type == HDF5Constants.H5D_CONTIGUOUS);
H5.H5Pset_layout(ocpl_id, HDF5Constants.H5D_COMPACT);
layout_type = H5.H5Pget_layout(ocpl_id);
- assertTrue("layout: "+layout_type, layout_type == HDF5Constants.H5D_COMPACT);
+ assertTrue("layout: " + layout_type, layout_type == HDF5Constants.H5D_COMPACT);
}
catch (Throwable err) {
err.printStackTrace();
@@ -1145,18 +1290,19 @@ public class TestH5P {
}
@Test
- public void testH5P_chunk() {
- long[] chunk_size = {0,0};
- long[] chunk_new_size = {2,3};
- int layout_type = -1;
+ public void testH5P_chunk()
+ {
+ long[] chunk_size = {0, 0};
+ long[] chunk_new_size = {2, 3};
+ int layout_type = -1;
try {
H5.H5Pset_chunk(ocpl_id, 2, chunk_new_size);
H5.H5Pget_chunk(ocpl_id, 2, chunk_size);
- assertTrue("chunk: "+chunk_size[0], chunk_size[0] == chunk_new_size[0]);
- assertTrue("chunk: "+chunk_size[1], chunk_size[1] == chunk_new_size[1]);
+ assertTrue("chunk: " + chunk_size[0], chunk_size[0] == chunk_new_size[0]);
+ assertTrue("chunk: " + chunk_size[1], chunk_size[1] == chunk_new_size[1]);
layout_type = H5.H5Pget_layout(ocpl_id);
- assertTrue("layout: "+layout_type, layout_type == HDF5Constants.H5D_CHUNKED);
+ assertTrue("layout: " + layout_type, layout_type == HDF5Constants.H5D_CHUNKED);
}
catch (Throwable err) {
err.printStackTrace();
@@ -1165,20 +1311,22 @@ public class TestH5P {
}
@Test
- public void testH5P_file_space_strategy() {
- long[] threshold = {0};
+ public void testH5P_file_space_strategy()
+ {
+ long[] threshold = {0};
boolean[] persist = {false};
- int strategy = 0;
+ int strategy = 0;
try {
strategy = H5.H5Pget_file_space_strategy(fcpl_id, persist, threshold);
- assertTrue("strategy(default): "+strategy, strategy == HDF5Constants.H5F_FSPACE_STRATEGY_FSM_AGGR);
- assertTrue("persist(default): "+persist[0], persist[0] == false);
- assertTrue("threshold(default): "+threshold[0], threshold[0] == 1);
+ assertTrue("strategy(default): " + strategy,
+ strategy == HDF5Constants.H5F_FSPACE_STRATEGY_FSM_AGGR);
+ assertTrue("persist(default): " + persist[0], persist[0] == false);
+ assertTrue("threshold(default): " + threshold[0], threshold[0] == 1);
H5.H5Pset_file_space_strategy(fcpl_id, HDF5Constants.H5F_FSPACE_STRATEGY_PAGE, true, 1);
strategy = H5.H5Pget_file_space_strategy(fcpl_id, persist, threshold);
- assertTrue("strategy: "+strategy, strategy == HDF5Constants.H5F_FSPACE_STRATEGY_PAGE);
- assertTrue("persist: "+persist[0], persist[0] == true);
- assertTrue("threshold: "+threshold[0], threshold[0] == 1);
+ assertTrue("strategy: " + strategy, strategy == HDF5Constants.H5F_FSPACE_STRATEGY_PAGE);
+ assertTrue("persist: " + persist[0], persist[0] == true);
+ assertTrue("threshold: " + threshold[0], threshold[0] == 1);
}
catch (Throwable err) {
err.printStackTrace();
@@ -1187,23 +1335,25 @@ public class TestH5P {
}
@Test
- public void testH5P_file_space_page_size() {
+ public void testH5P_file_space_page_size()
+ {
long page_size = 0;
try {
page_size = H5.H5Pget_file_space_page_size(fcpl_id);
- assertTrue("page_size(default): "+page_size, page_size == 4096);
+ assertTrue("page_size(default): " + page_size, page_size == 4096);
H5.H5Pset_file_space_page_size(fcpl_id, 512);
page_size = H5.H5Pget_file_space_page_size(fcpl_id);
- assertTrue("page_size: "+page_size, page_size == 512);
+ assertTrue("page_size: " + page_size, page_size == 512);
}
catch (Throwable err) {
err.printStackTrace();
fail("testH5P_file_space_page_size: " + err);
}
- }
+ }
@Test
- public void testH5Pset_efile_prefix() {
+ public void testH5Pset_efile_prefix()
+ {
String prefix = "tmp";
try {
H5.H5Pset_efile_prefix(lapl_id, prefix);
@@ -1215,14 +1365,16 @@ public class TestH5P {
}
@Test(expected = NullPointerException.class)
- public void testH5Pset_efile_prefix_null() throws Throwable{
+ public void testH5Pset_efile_prefix_null() throws Throwable
+ {
H5.H5Pset_efile_prefix(lapl_id, null);
}
@Test
- public void testH5Pget_efile_prefix() {
+ public void testH5Pget_efile_prefix()
+ {
String prefix = "tmp";
- String pre = "";
+ String pre = "";
try {
H5.H5Pset_efile_prefix(lapl_id, prefix);
@@ -1236,15 +1388,17 @@ public class TestH5P {
}
@Ignore
- public void testH5P_chunk_opts() {
+ public void testH5P_chunk_opts()
+ {
int chunk_opts = -1;
try {
chunk_opts = H5.H5Pget_chunk_opts(ocpl_id);
- assertTrue("chunk_opts: "+chunk_opts, chunk_opts == 0);
+ assertTrue("chunk_opts: " + chunk_opts, chunk_opts == 0);
H5.H5Pset_chunk_opts(ocpl_id, HDF5Constants.H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS);
chunk_opts = H5.H5Pget_chunk_opts(ocpl_id);
- assertTrue("chunk_opts: "+chunk_opts, chunk_opts == HDF5Constants.H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS);
+ assertTrue("chunk_opts: " + chunk_opts,
+ chunk_opts == HDF5Constants.H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS);
}
catch (Throwable err) {
err.printStackTrace();
diff --git a/java/test/TestH5PData.java b/java/test/TestH5PData.java
index 8b04629..49a0b7d 100644
--- a/java/test/TestH5PData.java
+++ b/java/test/TestH5PData.java
@@ -31,44 +31,61 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5PData {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
private static final String H5_FILE = "testPD.h5";
- private static final int DIM_X = 12;
- private static final int DIM_Y = 18;
- long H5fid = HDF5Constants.H5I_INVALID_HID;
- long H5dsid = HDF5Constants.H5I_INVALID_HID;
- long H5did = HDF5Constants.H5I_INVALID_HID;
- long plist_id = HDF5Constants.H5I_INVALID_HID;
- long[] H5dims = { DIM_X, DIM_Y };
- double windchillF[][] =
- {{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}
- };
-
- private final void _deleteFile(String filename) {
+ private static final int DIM_X = 12;
+ private static final int DIM_Y = 18;
+ long H5fid = HDF5Constants.H5I_INVALID_HID;
+ long H5dsid = HDF5Constants.H5I_INVALID_HID;
+ long H5did = HDF5Constants.H5I_INVALID_HID;
+ long plist_id = HDF5Constants.H5I_INVALID_HID;
+ long[] H5dims = {DIM_X, DIM_Y};
+ double windchillF[][] = {{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}};
+
+ private final void _deleteFile(String filename)
+ {
File file = new File(filename);
if (file.exists()) {
- try {file.delete();} catch (SecurityException e) {}
+ try {
+ file.delete();
+ }
+ catch (SecurityException e) {
+ }
}
}
- private final long _createFloatDataset(long fid, long dsid, String name, long dapl) {
+ private final long _createFloatDataset(long fid, long dsid, String name, long dapl)
+ {
long did = HDF5Constants.H5I_INVALID_HID;
try {
- did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_NATIVE_FLOAT, dsid,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, dapl);
+ did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_NATIVE_FLOAT, dsid, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, dapl);
}
catch (Throwable err) {
err.printStackTrace();
@@ -80,49 +97,67 @@ public class TestH5PData {
}
@Before
- public void createH5file()
- throws NullPointerException, HDF5Exception {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ public void createH5file() throws NullPointerException, HDF5Exception
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
try {
- H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
- H5dsid = H5.H5Screate_simple(2, H5dims, null);
- H5did = _createFloatDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DEFAULT);
+ H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
+ H5dsid = H5.H5Screate_simple(2, H5dims, null);
+ H5did = _createFloatDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DEFAULT);
plist_id = H5.H5Pcreate(HDF5Constants.H5P_DATASET_XFER);
}
catch (Throwable err) {
err.printStackTrace();
fail("TestH5PData.createH5file: " + err);
}
- assertTrue("TestH5PData.createH5file: H5.H5Fcreate: ",H5fid > 0);
- assertTrue("TestH5PData.createH5file: H5.H5Screate_simple: ",H5dsid > 0);
- assertTrue("TestH5PData.createH5file: _createFloatDataset: ",H5did > 0);
+ assertTrue("TestH5PData.createH5file: H5.H5Fcreate: ", H5fid > 0);
+ assertTrue("TestH5PData.createH5file: H5.H5Screate_simple: ", H5dsid > 0);
+ assertTrue("TestH5PData.createH5file: _createFloatDataset: ", H5did > 0);
assertTrue(plist_id > 0);
H5.H5Fflush(H5fid, HDF5Constants.H5F_SCOPE_LOCAL);
}
@After
- public void deleteH5file() throws HDF5LibraryException {
+ public void deleteH5file() throws HDF5LibraryException
+ {
if (H5dsid > 0)
- try {H5.H5Sclose(H5dsid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(H5dsid);
+ }
+ catch (Exception ex) {
+ }
if (H5did > 0)
- try {H5.H5Dclose(H5did);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5did);
+ }
+ catch (Exception ex) {
+ }
if (H5fid > 0)
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
_deleteFile(H5_FILE);
if (plist_id > 0)
- try {H5.H5Pclose(plist_id);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(plist_id);
+ }
+ catch (Exception ex) {
+ }
System.out.println();
}
@Test
- public void testH5Pdata_transform() {
- String f_to_c = "(5/9.0)*(x-32)";
+ public void testH5Pdata_transform()
+ {
+ String f_to_c = "(5/9.0)*(x-32)";
double windchillFread[][] = new double[DIM_X][DIM_Y];
double windchillC;
NumberFormat formatter = new DecimalFormat("#0.000");
@@ -130,38 +165,40 @@ public class TestH5PData {
try {
H5.H5Pset_data_transform(plist_id, f_to_c);
H5.H5Dwrite(H5did, HDF5Constants.H5T_NATIVE_DOUBLE, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- plist_id, windchillF);
+ plist_id, windchillF);
H5.H5Dread(H5did, HDF5Constants.H5T_NATIVE_DOUBLE, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, windchillFread);
+ HDF5Constants.H5P_DEFAULT, windchillFread);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5Pdata_transform: " + err);
}
- for(int row = 0; row < DIM_X; row++)
- for(int col = 0; col < DIM_Y; col++) {
- windchillC = (5/9.0)*(windchillF[row][col]-32);
- String Cstr = formatter.format(windchillC);
+ for (int row = 0; row < DIM_X; row++)
+ for (int col = 0; col < DIM_Y; col++) {
+ windchillC = (5 / 9.0) * (windchillF[row][col] - 32);
+ String Cstr = formatter.format(windchillC);
String Fread = formatter.format(windchillFread[row][col]);
- assertTrue("H5Pdata_transform: <"+row+","+col+">"+Fread+"="+Cstr, Fread.compareTo(Cstr)==0);
+ assertTrue("H5Pdata_transform: <" + row + "," + col + ">" + Fread + "=" + Cstr,
+ Fread.compareTo(Cstr) == 0);
}
}
@Test
- public void testH5P_buffer() {
+ public void testH5P_buffer()
+ {
long default_size = 0;
- long size = 0;
+ long size = 0;
try {
default_size = H5.H5Pget_buffer_size(plist_id);
- H5.H5Pset_buffer_size(plist_id, DIM_X*DIM_Y);
+ H5.H5Pset_buffer_size(plist_id, DIM_X * DIM_Y);
size = H5.H5Pget_buffer_size(plist_id);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5P_buffer fail: " + err);
}
- assertTrue("H5P_buffer default: "+default_size, default_size==1024*1024);
- assertTrue("H5P_buffer size: "+size, size==DIM_X*DIM_Y);
+ assertTrue("H5P_buffer default: " + default_size, default_size == 1024 * 1024);
+ assertTrue("H5P_buffer size: " + size, size == DIM_X * DIM_Y);
}
}
diff --git a/java/test/TestH5PL.java b/java/test/TestH5PL.java
index d44cc0b..f6440cd 100644
--- a/java/test/TestH5PL.java
+++ b/java/test/TestH5PL.java
@@ -14,6 +14,7 @@ package test;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
+
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
@@ -26,39 +27,45 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5PL {
- @Rule public TestName testname = new TestName();
- private static String FILENAME = "h5_dlopenChunk.h5";
- private static String DATASETNAME = "DS1";
- private static final int DIM_X = 6;
- private static final int DIM_Y = 8;
- private static final int CHUNK_X = 4;
- private static final int CHUNK_Y = 4;
- private static final int RANK = 2;
- private static final int NDIMS = 2;
+ @Rule
+ public TestName testname = new TestName();
+ private static String FILENAME = "h5_dlopenChunk.h5";
+ private static String DATASETNAME = "DS1";
+ private static final int DIM_X = 6;
+ private static final int DIM_Y = 8;
+ private static final int CHUNK_X = 4;
+ private static final int CHUNK_Y = 4;
+ private static final int RANK = 2;
+ private static final int NDIMS = 2;
private static final int H5Z_FILTER_DYNLIB4 = 260;
@Before
- public void checkOpenIDs() {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ public void checkOpenIDs()
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
}
@After
- public void nextTestName() {
+ public void nextTestName()
+ {
System.out.println();
}
@Test
- public void TestH5PLplugins() {
+ public void TestH5PLplugins()
+ {
try {
int plugin_flags = H5.H5PLget_loading_state();
- assertTrue("H5.H5PLget_loading_state: "+plugin_flags, plugin_flags == HDF5Constants.H5PL_ALL_PLUGIN);
+ assertTrue("H5.H5PLget_loading_state: " + plugin_flags,
+ plugin_flags == HDF5Constants.H5PL_ALL_PLUGIN);
int new_setting = plugin_flags & ~HDF5Constants.H5PL_FILTER_PLUGIN;
- H5.H5PLset_loading_state (new_setting);
+ H5.H5PLset_loading_state(new_setting);
int changed_flags = H5.H5PLget_loading_state();
- assertTrue("H5.H5PLget_loading_state: "+changed_flags, changed_flags == new_setting);
- H5.H5PLset_loading_state (plugin_flags);
+ assertTrue("H5.H5PLget_loading_state: " + changed_flags, changed_flags == new_setting);
+ H5.H5PLset_loading_state(plugin_flags);
changed_flags = H5.H5PLget_loading_state();
- assertTrue("H5.H5PLget_loading_state: "+changed_flags, changed_flags == HDF5Constants.H5PL_ALL_PLUGIN);
+ assertTrue("H5.H5PLget_loading_state: " + changed_flags,
+ changed_flags == HDF5Constants.H5PL_ALL_PLUGIN);
}
catch (Throwable err) {
err.printStackTrace();
@@ -67,15 +74,16 @@ public class TestH5PL {
}
@Test
- public void TestH5PLpaths() {
+ public void TestH5PLpaths()
+ {
try {
// Get the original number of paths
int nStartPaths = H5.H5PLsize();
- int nPaths; /* # paths from H5PLSize() */
- int nTruePaths = nStartPaths; /* What the # paths should be */
- int index; /* Path table index */
- String path; /* Path from H5PLget() */
+ int nPaths; /* # paths from H5PLSize() */
+ int nTruePaths = nStartPaths; /* What the # paths should be */
+ int index; /* Path table index */
+ String path; /* Path from H5PLget() */
// APPEND a path and ensure it was added correctly
String pathAppend = "path_append";
@@ -86,8 +94,9 @@ public class TestH5PL {
assertTrue("# paths should be " + nTruePaths + " but was " + nPaths, nTruePaths == nPaths);
index = nTruePaths - 1;
- path = H5.H5PLget(index);
- assertTrue("Path should be " + pathAppend + " but was " + path, path.compareToIgnoreCase(pathAppend) == 0);
+ path = H5.H5PLget(index);
+ assertTrue("Path should be " + pathAppend + " but was " + path,
+ path.compareToIgnoreCase(pathAppend) == 0);
// PREPEND a path and ensure it was added correctly
String pathPrepend = "path_prepend";
@@ -98,13 +107,14 @@ public class TestH5PL {
assertTrue("# paths should be " + nTruePaths + " but was " + nPaths, nTruePaths == nPaths);
index = 0;
- path = H5.H5PLget(index);
- assertTrue("Path should be " + pathPrepend + " but was " + path, path.compareToIgnoreCase(pathPrepend) == 0);
+ path = H5.H5PLget(index);
+ assertTrue("Path should be " + pathPrepend + " but was " + path,
+ path.compareToIgnoreCase(pathPrepend) == 0);
// INSERT a path and ensure it was added correctly
// Inserting at the index == # of start paths ensures we're in the middle
String pathInsert = "path_insert";
- index = nStartPaths;
+ index = nStartPaths;
H5.H5PLinsert(pathInsert, index);
nPaths = H5.H5PLsize();
@@ -112,22 +122,24 @@ public class TestH5PL {
assertTrue("# paths should be " + nTruePaths + " but was " + nPaths, nTruePaths == nPaths);
path = H5.H5PLget(index);
- assertTrue("Path should be " + pathInsert + " but was " + path, path.compareToIgnoreCase(pathInsert) == 0);
+ assertTrue("Path should be " + pathInsert + " but was " + path,
+ path.compareToIgnoreCase(pathInsert) == 0);
// REPLACE the path we just added and ensure it updated correctly
String pathReplace = "path_replace";
- index = nStartPaths;
+ index = nStartPaths;
H5.H5PLreplace(pathReplace, index);
nPaths = H5.H5PLsize();
assertTrue("# paths should be " + nTruePaths + " but was " + nPaths, nTruePaths == nPaths);
path = H5.H5PLget(index);
- assertTrue("Path should be " + pathReplace + " but was " + path, path.compareToIgnoreCase(pathReplace) == 0);
+ assertTrue("Path should be " + pathReplace + " but was " + path,
+ path.compareToIgnoreCase(pathReplace) == 0);
// REMOVE the path we just replaced and check that the table was compacted
// The (index+1) path should move down to fill the space when the path is removed.
- index = nStartPaths;
+ index = nStartPaths;
String pathRemove = H5.H5PLget(index + 1);
H5.H5PLremove(index);
@@ -136,7 +148,8 @@ public class TestH5PL {
assertTrue("# paths should be " + nTruePaths + " but was " + nPaths, nTruePaths == nPaths);
path = H5.H5PLget(index);
- assertTrue("Path should be " + pathRemove + " but was " + path, path.compareToIgnoreCase(pathRemove) == 0);
+ assertTrue("Path should be " + pathRemove + " but was " + path,
+ path.compareToIgnoreCase(pathRemove) == 0);
}
catch (Throwable err) {
err.printStackTrace();
@@ -145,22 +158,23 @@ public class TestH5PL {
}
@Ignore
- public void TestH5PLdlopen() {
- long file_id = HDF5Constants.H5I_INVALID_HID;
+ public void TestH5PLdlopen()
+ {
+ long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
- long dataset_id = HDF5Constants.H5I_INVALID_HID;
- long fapl_id = HDF5Constants.H5I_INVALID_HID;
- long dcpl_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long fapl_id = HDF5Constants.H5I_INVALID_HID;
+ long dcpl_id = HDF5Constants.H5I_INVALID_HID;
try {
- int[] cd_values = {9, 0, 0, 0};
- int[] libversion = {0, 0, 0};
- long[] dims = { DIM_X, DIM_Y };
- long[] chunk_dims = { CHUNK_X, CHUNK_Y };
- int[][] dset_data = new int[DIM_X][DIM_Y];
- int[] mdc_nelmts = {0};
+ int[] cd_values = {9, 0, 0, 0};
+ int[] libversion = {0, 0, 0};
+ long[] dims = {DIM_X, DIM_Y};
+ long[] chunk_dims = {CHUNK_X, CHUNK_Y};
+ int[][] dset_data = new int[DIM_X][DIM_Y];
+ int[] mdc_nelmts = {0};
long[] rdcc_nelmts = {0};
long[] rdcc_nbytes = {0};
- double[] rdcc_w0 = {0};
+ double[] rdcc_w0 = {0};
// Initialize data to "1", to make it easier to see the selections.
for (int indx = 0; indx < DIM_X; indx++)
@@ -170,7 +184,7 @@ public class TestH5PL {
// Create a new file using default properties.
try {
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT);
+ HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -212,7 +226,8 @@ public class TestH5PL {
cd_values[2] = libversion[1];
cd_values[3] = libversion[2];
if (dcpl_id >= 0)
- H5.H5Pset_filter(dcpl_id, H5Z_FILTER_DYNLIB4, HDF5Constants.H5Z_FLAG_MANDATORY, 4, cd_values);
+ H5.H5Pset_filter(dcpl_id, H5Z_FILTER_DYNLIB4, HDF5Constants.H5Z_FLAG_MANDATORY, 4,
+ cd_values);
}
catch (Exception e) {
e.printStackTrace();
@@ -222,8 +237,9 @@ public class TestH5PL {
// Create the chunked dataset.
try {
if ((file_id >= 0) && (filespace_id >= 0) && (dcpl_id >= 0))
- dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_NATIVE_INT, filespace_id,
- HDF5Constants.H5P_DEFAULT, dcpl_id, HDF5Constants.H5P_DEFAULT);
+ dataset_id =
+ H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_NATIVE_INT, filespace_id,
+ HDF5Constants.H5P_DEFAULT, dcpl_id, HDF5Constants.H5P_DEFAULT);
}
catch (Exception e) {
e.printStackTrace();
@@ -232,8 +248,8 @@ public class TestH5PL {
try {
if (dataset_id >= 0)
- H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5S_ALL, dset_data);
+ H5.H5Dwrite(dataset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL, dset_data);
}
catch (Exception e) {
e.printStackTrace();
@@ -247,13 +263,29 @@ public class TestH5PL {
finally {
// End access to the dataset and release resources used by it.
if (dcpl_id >= 0)
- try {H5.H5Pclose_class(dcpl_id);} catch (Throwable err) {}
+ try {
+ H5.H5Pclose_class(dcpl_id);
+ }
+ catch (Throwable err) {
+ }
if (dataset_id >= 0)
- try {H5.H5Dclose(dataset_id);} catch (Throwable err) {}
+ try {
+ H5.H5Dclose(dataset_id);
+ }
+ catch (Throwable err) {
+ }
if (filespace_id >= 0)
- try {H5.H5Sclose(filespace_id);} catch (Throwable err) {}
+ try {
+ H5.H5Sclose(filespace_id);
+ }
+ catch (Throwable err) {
+ }
if (file_id >= 0)
- try {H5.H5Fclose(file_id);} catch (Throwable err) {}
+ try {
+ H5.H5Fclose(file_id);
+ }
+ catch (Throwable err) {
+ }
}
}
}
diff --git a/java/test/TestH5Pfapl.java b/java/test/TestH5Pfapl.java
index f6be24f..307ee74 100644
--- a/java/test/TestH5Pfapl.java
+++ b/java/test/TestH5Pfapl.java
@@ -35,104 +35,140 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5Pfapl {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
- private static final String H5_FILE = "testPf.h5";
- private static final String H5_LOG_FILE = "testPf.log";
+ private static final String H5_FILE = "testPf.h5";
+ private static final String H5_LOG_FILE = "testPf.log";
private static final String H5_FAMILY_FILE = "testPf%05d";
- private static final String H5_MULTI_FILE = "testPfmulti";
- private static char MULTI_LETTERS[] = {'X','s','b','r','g','l','o'};
- private static final int DIM_X = 4;
- private static final int DIM_Y = 6;
- private static final int DIMF_X = 12;
- private static final int DIMF_Y = 18;
- long H5fid = HDF5Constants.H5I_INVALID_HID;
- long H5dsid = HDF5Constants.H5I_INVALID_HID;
- long H5did = HDF5Constants.H5I_INVALID_HID;
- long H5Fdsid = HDF5Constants.H5I_INVALID_HID;
- long H5Fdid = HDF5Constants.H5I_INVALID_HID;
- long[] H5dims = { DIM_X, DIM_Y };
- long fapl_id = HDF5Constants.H5I_INVALID_HID;
- long plapl_id = HDF5Constants.H5I_INVALID_HID;
- long dapl_id = HDF5Constants.H5I_INVALID_HID;
- long plist_id = HDF5Constants.H5I_INVALID_HID;
- long btplist_id = HDF5Constants.H5I_INVALID_HID;
- long[] H5Fdims = { DIMF_X, DIMF_Y };
- double windchillF[][] =
- {{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}
- };
-
- private final void _deleteFile(String filename) {
+ private static final String H5_MULTI_FILE = "testPfmulti";
+ private static char MULTI_LETTERS[] = {'X', 's', 'b', 'r', 'g', 'l', 'o'};
+ private static final int DIM_X = 4;
+ private static final int DIM_Y = 6;
+ private static final int DIMF_X = 12;
+ private static final int DIMF_Y = 18;
+ long H5fid = HDF5Constants.H5I_INVALID_HID;
+ long H5dsid = HDF5Constants.H5I_INVALID_HID;
+ long H5did = HDF5Constants.H5I_INVALID_HID;
+ long H5Fdsid = HDF5Constants.H5I_INVALID_HID;
+ long H5Fdid = HDF5Constants.H5I_INVALID_HID;
+ long[] H5dims = {DIM_X, DIM_Y};
+ long fapl_id = HDF5Constants.H5I_INVALID_HID;
+ long plapl_id = HDF5Constants.H5I_INVALID_HID;
+ long dapl_id = HDF5Constants.H5I_INVALID_HID;
+ long plist_id = HDF5Constants.H5I_INVALID_HID;
+ long btplist_id = HDF5Constants.H5I_INVALID_HID;
+ long[] H5Fdims = {DIMF_X, DIMF_Y};
+ double windchillF[][] = {{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}};
+
+ private final void _deleteFile(String filename)
+ {
File file = null;
try {
file = new File(filename);
}
- catch (Throwable err) {}
+ catch (Throwable err) {
+ }
if (file.exists()) {
- try {file.delete();} catch (SecurityException e) {}
+ try {
+ file.delete();
+ }
+ catch (SecurityException e) {
+ }
}
}
- private final void _deleteLogFile() {
+ private final void _deleteLogFile()
+ {
File file = null;
try {
file = new File(H5_LOG_FILE);
}
- catch (Throwable err) {}
+ catch (Throwable err) {
+ }
if (file.exists()) {
- try {file.delete();} catch (SecurityException e) {}
+ try {
+ file.delete();
+ }
+ catch (SecurityException e) {
+ }
}
}
- private final void _deleteFamilyFile() {
+ private final void _deleteFamilyFile()
+ {
File file = null;
- for(int indx = 0; ;indx++) {
+ for (int indx = 0;; indx++) {
java.text.DecimalFormat myFormat = new java.text.DecimalFormat("00000");
try {
- file = new File("test"+myFormat.format(Integer.valueOf(indx))+".h5");
+ file = new File("test" + myFormat.format(Integer.valueOf(indx)) + ".h5");
+ }
+ catch (Throwable err) {
}
- catch (Throwable err) {}
if (file.exists()) {
- try {file.delete();} catch (SecurityException e) {}
+ try {
+ file.delete();
+ }
+ catch (SecurityException e) {
+ }
}
else
return;
}
}
- private final void _deleteMultiFile() {
+ private final void _deleteMultiFile()
+ {
File file = null;
- for(int indx = 1;indx<7;indx++) {
+ for (int indx = 1; indx < 7; indx++) {
try {
- file = new File(H5_MULTI_FILE+"-"+MULTI_LETTERS[indx]+".h5");
+ file = new File(H5_MULTI_FILE + "-" + MULTI_LETTERS[indx] + ".h5");
+ }
+ catch (Throwable err) {
}
- catch (Throwable err) {}
if (file.exists()) {
- try {file.delete();} catch (SecurityException e) {}
+ try {
+ file.delete();
+ }
+ catch (SecurityException e) {
+ }
}
}
}
- private final long _createDataset(long fid, long dsid, String name, long dapl) {
+ private final long _createDataset(long fid, long dsid, String name, long dapl)
+ {
long did = HDF5Constants.H5I_INVALID_HID;
try {
- did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32BE, dsid,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, dapl);
+ did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32BE, dsid, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, dapl);
}
catch (Throwable err) {
err.printStackTrace();
@@ -143,11 +179,13 @@ public class TestH5Pfapl {
return did;
}
- private final void _createFloatDataset() {
+ private final void _createFloatDataset()
+ {
try {
H5Fdsid = H5.H5Screate_simple(2, H5Fdims, null);
- H5Fdid = H5.H5Dcreate(H5fid, "dsfloat", HDF5Constants.H5T_NATIVE_FLOAT, H5Fdsid,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ H5Fdid =
+ H5.H5Dcreate(H5fid, "dsfloat", HDF5Constants.H5T_NATIVE_FLOAT, H5Fdsid,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
@@ -163,7 +201,8 @@ public class TestH5Pfapl {
}
}
- private final void _createH5multiFileDS() {
+ private final void _createH5multiFileDS()
+ {
try {
H5did = _createDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DEFAULT);
}
@@ -181,12 +220,12 @@ public class TestH5Pfapl {
}
}
- private final void _createH5File(long fapl) {
+ private final void _createH5File(long fapl)
+ {
try {
- H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC,
- HDF5Constants.H5P_DEFAULT, fapl);
+ H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT, fapl);
H5dsid = H5.H5Screate_simple(2, H5dims, null);
- H5did = _createDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DEFAULT);
+ H5did = _createDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
@@ -204,12 +243,13 @@ public class TestH5Pfapl {
}
}
- private final void _createH5familyFile(long fapl) {
+ private final void _createH5familyFile(long fapl)
+ {
try {
- H5fid = H5.H5Fcreate(H5_FAMILY_FILE+".h5", HDF5Constants.H5F_ACC_TRUNC,
- HDF5Constants.H5P_DEFAULT, fapl);
+ H5fid = H5.H5Fcreate(H5_FAMILY_FILE + ".h5", HDF5Constants.H5F_ACC_TRUNC,
+ HDF5Constants.H5P_DEFAULT, fapl);
H5dsid = H5.H5Screate_simple(2, H5dims, null);
- H5did = _createDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DEFAULT);
+ H5did = _createDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
@@ -227,10 +267,10 @@ public class TestH5Pfapl {
}
}
- private final void _createH5multiFile(long fapl) {
+ private final void _createH5multiFile(long fapl)
+ {
try {
- H5fid = H5.H5Fcreate(H5_MULTI_FILE, HDF5Constants.H5F_ACC_TRUNC,
- HDF5Constants.H5P_DEFAULT, fapl);
+ H5fid = H5.H5Fcreate(H5_MULTI_FILE, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT, fapl);
H5dsid = H5.H5Screate_simple(2, H5dims, null);
}
catch (Throwable err) {
@@ -248,22 +288,16 @@ public class TestH5Pfapl {
}
}
- public void deleteH5file() {
- _deleteFile(H5_FILE);
- }
+ public void deleteH5file() { _deleteFile(H5_FILE); }
- public void deleteH5familyfile() {
- _deleteFamilyFile();
- }
+ public void deleteH5familyfile() { _deleteFamilyFile(); }
- public void deleteH5multifile() {
- _deleteMultiFile();
- }
+ public void deleteH5multifile() { _deleteMultiFile(); }
@Before
- public void createFileAccess()
- throws NullPointerException, HDF5Exception {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ public void createFileAccess() throws NullPointerException, HDF5Exception
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
try {
@@ -283,9 +317,9 @@ public class TestH5Pfapl {
}
assertTrue(plapl_id > 0);
try {
- plist_id = H5.H5Pcreate(HDF5Constants.H5P_DATASET_XFER);
+ plist_id = H5.H5Pcreate(HDF5Constants.H5P_DATASET_XFER);
btplist_id = H5.H5Pcreate(HDF5Constants.H5P_DATASET_XFER);
- dapl_id = H5.H5Pcreate(HDF5Constants.H5P_DATASET_ACCESS);
+ dapl_id = H5.H5Pcreate(HDF5Constants.H5P_DATASET_ACCESS);
}
catch (Throwable err) {
err.printStackTrace();
@@ -297,34 +331,76 @@ public class TestH5Pfapl {
}
@After
- public void deleteFileAccess() throws HDF5LibraryException {
+ public void deleteFileAccess() throws HDF5LibraryException
+ {
if (fapl_id > 0)
- try {H5.H5Pclose(fapl_id);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(fapl_id);
+ }
+ catch (Exception ex) {
+ }
if (plapl_id > 0)
- try {H5.H5Pclose(plapl_id);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(plapl_id);
+ }
+ catch (Exception ex) {
+ }
if (dapl_id > 0)
- try {H5.H5Pclose(dapl_id);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(dapl_id);
+ }
+ catch (Exception ex) {
+ }
if (plist_id > 0)
- try {H5.H5Pclose(plist_id);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(plist_id);
+ }
+ catch (Exception ex) {
+ }
if (btplist_id > 0)
- try {H5.H5Pclose(btplist_id);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(btplist_id);
+ }
+ catch (Exception ex) {
+ }
if (H5Fdsid > 0)
- try {H5.H5Sclose(H5Fdsid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(H5Fdsid);
+ }
+ catch (Exception ex) {
+ }
if (H5Fdid > 0)
- try {H5.H5Dclose(H5Fdid);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5Fdid);
+ }
+ catch (Exception ex) {
+ }
if (H5dsid > 0)
- try {H5.H5Sclose(H5dsid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(H5dsid);
+ }
+ catch (Exception ex) {
+ }
if (H5did > 0)
- try {H5.H5Dclose(H5did);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5did);
+ }
+ catch (Exception ex) {
+ }
if (H5fid > 0)
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
System.out.println();
}
@Test
- public void testH5Pget_libver_bounds() {
- int ret_val = -1;
+ public void testH5Pget_libver_bounds()
+ {
+ int ret_val = -1;
int[] libver = new int[2];
try {
@@ -342,11 +418,12 @@ public class TestH5Pfapl {
}
@Test
- public void testH5Pset_libver_bounds() {
+ public void testH5Pset_libver_bounds()
+ {
- int ret_val = -1;
- int low = HDF5Constants.H5F_LIBVER_EARLIEST;
- int high = HDF5Constants.H5F_LIBVER_LATEST;
+ int ret_val = -1;
+ int low = HDF5Constants.H5F_LIBVER_EARLIEST;
+ int high = HDF5Constants.H5F_LIBVER_LATEST;
int[] libver = new int[2];
try {
@@ -365,15 +442,17 @@ public class TestH5Pfapl {
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Pset_elink_fapl_NegativeID() throws Throwable {
- H5.H5Pset_elink_fapl(-1, fapl_id );
+ public void testH5Pset_elink_fapl_NegativeID() throws Throwable
+ {
+ H5.H5Pset_elink_fapl(-1, fapl_id);
}
@Test
- public void testH5Pset_elink_fapl() {
+ public void testH5Pset_elink_fapl()
+ {
int ret_val = -1;
try {
- ret_val = H5.H5Pset_elink_fapl(plapl_id, fapl_id );
+ ret_val = H5.H5Pset_elink_fapl(plapl_id, fapl_id);
}
catch (Throwable err) {
err.printStackTrace();
@@ -383,12 +462,13 @@ public class TestH5Pfapl {
}
@Test
- public void testH5Pget_elink_fapl() {
+ public void testH5Pget_elink_fapl()
+ {
long ret_val_id = HDF5Constants.H5I_INVALID_HID;
try {
ret_val_id = H5.H5Pget_elink_fapl(plapl_id);
assertTrue("H5Pget_elink_fapl", ret_val_id >= 0);
- assertEquals(HDF5Constants.H5P_DEFAULT, ret_val_id );
+ assertEquals(HDF5Constants.H5P_DEFAULT, ret_val_id);
}
catch (Throwable err) {
err.printStackTrace();
@@ -396,15 +476,20 @@ public class TestH5Pfapl {
}
finally {
if (ret_val_id > 0)
- try {H5.H5Pclose(ret_val_id);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(ret_val_id);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5P_elink_fapl() {
+ public void testH5P_elink_fapl()
+ {
long ret_val_id = HDF5Constants.H5I_INVALID_HID;
try {
- H5.H5Pset_elink_fapl(plapl_id, fapl_id );
+ H5.H5Pset_elink_fapl(plapl_id, fapl_id);
ret_val_id = H5.H5Pget_elink_fapl(plapl_id);
assertTrue("H5P_elink_fapl", ret_val_id >= 0);
}
@@ -414,16 +499,21 @@ public class TestH5Pfapl {
}
finally {
if (ret_val_id > 0)
- try {H5.H5Pclose(ret_val_id);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(ret_val_id);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5P_elink_file_cache_size() {
+ public void testH5P_elink_file_cache_size()
+ {
long elink_fapl_id = HDF5Constants.H5I_INVALID_HID;
- int efc_size = 0;
+ int efc_size = 0;
try {
- H5.H5Pset_elink_fapl(plapl_id, fapl_id );
+ H5.H5Pset_elink_fapl(plapl_id, fapl_id);
elink_fapl_id = H5.H5Pget_elink_fapl(plapl_id);
assertTrue("H5P_elink_file_cache_size", elink_fapl_id >= 0);
try {
@@ -449,15 +539,20 @@ public class TestH5Pfapl {
}
finally {
if (elink_fapl_id > 0)
- try {H5.H5Pclose(elink_fapl_id);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(elink_fapl_id);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5P_btree_ratios() {
- double[] left = {0.1};
+ public void testH5P_btree_ratios()
+ {
+ double[] left = {0.1};
double[] middle = {0.5};
- double[] right = {0.7};
+ double[] right = {0.7};
try {
H5.H5Pset_btree_ratios(plist_id, left[0], middle[0], right[0]);
H5.H5Pget_btree_ratios(plist_id, left, middle, right);
@@ -470,7 +565,8 @@ public class TestH5Pfapl {
}
@Test
- public void testH5P_edc_check() {
+ public void testH5P_edc_check()
+ {
int ret_val_id = -1;
try {
ret_val_id = H5.H5Pget_edc_check(plist_id);
@@ -486,7 +582,8 @@ public class TestH5Pfapl {
}
@Test
- public void testH5P_fclose_degree() {
+ public void testH5P_fclose_degree()
+ {
int ret_val_id = -1;
try {
ret_val_id = H5.H5Pget_fclose_degree(fapl_id);
@@ -517,8 +614,9 @@ public class TestH5Pfapl {
}
@Test
- public void testH5P_alignment() {
- long[] align = {0,0};
+ public void testH5P_alignment()
+ {
+ long[] align = {0, 0};
try {
H5.H5Pget_alignment(fapl_id, align);
assertTrue("H5P_alignment threshold default", align[0] == 1);
@@ -543,7 +641,8 @@ public class TestH5Pfapl {
}
@Test
- public void testH5P_meta_block_size() {
+ public void testH5P_meta_block_size()
+ {
long meta_size = 0;
try {
meta_size = H5.H5Pget_meta_block_size(fapl_id);
@@ -566,7 +665,8 @@ public class TestH5Pfapl {
}
@Test
- public void testH5P_small_data_block_size() {
+ public void testH5P_small_data_block_size()
+ {
long align = 0;
try {
align = H5.H5Pget_small_data_block_size(fapl_id);
@@ -589,7 +689,8 @@ public class TestH5Pfapl {
}
@Test
- public void testH5P_hyper_vector_size() {
+ public void testH5P_hyper_vector_size()
+ {
long[] align = {0};
try {
H5.H5Pget_hyper_vector_size(plist_id, align);
@@ -612,14 +713,15 @@ public class TestH5Pfapl {
}
@Test
- public void testH5P_cache() {
+ public void testH5P_cache()
+ {
long[] rdcc_nelmts = {0};
long[] rdcc_nbytes = {0};
- double[] rdcc_w0 = {0};
+ double[] rdcc_w0 = {0};
try {
H5.H5Pget_cache(fapl_id, null, rdcc_nelmts, rdcc_nbytes, rdcc_w0);
assertTrue("H5P_cache default", rdcc_nelmts[0] == 521);
- assertTrue("H5P_cache default", rdcc_nbytes[0] == (1024*1024));
+ assertTrue("H5P_cache default", rdcc_nbytes[0] == (1024 * 1024));
assertTrue("H5P_cache default", rdcc_w0[0] == 0.75);
}
catch (Throwable err) {
@@ -639,14 +741,15 @@ public class TestH5Pfapl {
}
@Test
- public void testH5P_chunk_cache() {
+ public void testH5P_chunk_cache()
+ {
long[] rdcc_nslots = {0};
long[] rdcc_nbytes = {0};
- double[] rdcc_w0 = {0};
+ double[] rdcc_w0 = {0};
try {
H5.H5Pget_chunk_cache(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0);
assertTrue("H5P_chunk_cache default", rdcc_nslots[0] == 521);
- assertTrue("H5P_chunk_cache default", rdcc_nbytes[0] == (1024*1024));
+ assertTrue("H5P_chunk_cache default", rdcc_nbytes[0] == (1024 * 1024));
assertTrue("H5P_chunk_cache default", rdcc_w0[0] == 0.75);
}
catch (Throwable err) {
@@ -666,11 +769,12 @@ public class TestH5Pfapl {
}
@Test
- public void testH5P_sieve_buf_size() {
+ public void testH5P_sieve_buf_size()
+ {
long buf_size = 0;
try {
buf_size = H5.H5Pget_sieve_buf_size(fapl_id);
- assertTrue("H5P_sieve_buf_size default", buf_size == (64*1024));
+ assertTrue("H5P_sieve_buf_size default", buf_size == (64 * 1024));
}
catch (Throwable err) {
err.printStackTrace();
@@ -689,7 +793,8 @@ public class TestH5Pfapl {
}
@Test
- public void testH5P_gc_references() {
+ public void testH5P_gc_references()
+ {
boolean ret_val_id = false;
try {
H5.H5Pset_gc_references(fapl_id, true);
@@ -703,11 +808,13 @@ public class TestH5Pfapl {
}
@Test
- public void testH5Pget_mdc_config() {
+ public void testH5Pget_mdc_config()
+ {
H5AC_cache_config_t cache_config = null;
try {
cache_config = H5.H5Pget_mdc_config(fapl_id);
- assertTrue("H5Pget_mdc_config", cache_config.version==HDF5Constants.H5AC_CURR_CACHE_CONFIG_VERSION);
+ assertTrue("H5Pget_mdc_config",
+ cache_config.version == HDF5Constants.H5AC_CURR_CACHE_CONFIG_VERSION);
}
catch (Throwable err) {
err.printStackTrace();
@@ -716,11 +823,13 @@ public class TestH5Pfapl {
}
@Test
- public void testH5Pset_mdc_config() {
+ public void testH5Pset_mdc_config()
+ {
H5AC_cache_config_t cache_config = null;
try {
cache_config = H5.H5Pget_mdc_config(fapl_id);
- assertTrue("H5Pset_mdc_config", cache_config.version==HDF5Constants.H5AC_CURR_CACHE_CONFIG_VERSION);
+ assertTrue("H5Pset_mdc_config",
+ cache_config.version == HDF5Constants.H5AC_CURR_CACHE_CONFIG_VERSION);
}
catch (Throwable err) {
err.printStackTrace();
@@ -730,8 +839,9 @@ public class TestH5Pfapl {
cache_config.decr_mode = HDF5Constants.H5C_decr_off;
H5.H5Pset_mdc_config(fapl_id, cache_config);
cache_config = H5.H5Pget_mdc_config(fapl_id);
- assertTrue("H5Pset_mdc_config", cache_config.version==HDF5Constants.H5AC_CURR_CACHE_CONFIG_VERSION);
- assertTrue("H5Pset_mdc_config", cache_config.decr_mode==HDF5Constants.H5C_decr_off);
+ assertTrue("H5Pset_mdc_config",
+ cache_config.version == HDF5Constants.H5AC_CURR_CACHE_CONFIG_VERSION);
+ assertTrue("H5Pset_mdc_config", cache_config.decr_mode == HDF5Constants.H5C_decr_off);
}
catch (Throwable err) {
err.printStackTrace();
@@ -740,24 +850,25 @@ public class TestH5Pfapl {
}
@Test
- public void testH5P_fapl_core() {
+ public void testH5P_fapl_core()
+ {
if (HDF5Constants.H5FD_CORE < 0)
return;
try {
H5.H5Pset_fapl_core(fapl_id, 4096, false);
long driver_type = H5.H5Pget_driver(fapl_id);
- assertTrue("H5Pget_driver: core = "+ driver_type, HDF5Constants.H5FD_CORE==driver_type);
+ assertTrue("H5Pget_driver: core = " + driver_type, HDF5Constants.H5FD_CORE == driver_type);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5Pset_fapl_core: " + err);
}
try {
- long[] increment = {-1};
+ long[] increment = {-1};
boolean[] backingstore = {true};
H5.H5Pget_fapl_core(fapl_id, increment, backingstore);
- assertTrue("H5Pget_fapl_core: increment="+increment[0], increment[0]==4096);
- assertTrue("H5Pget_fapl_core: backingstore="+backingstore[0], !backingstore[0]);
+ assertTrue("H5Pget_fapl_core: increment=" + increment[0], increment[0] == 4096);
+ assertTrue("H5Pget_fapl_core: backingstore=" + backingstore[0], !backingstore[0]);
}
catch (Throwable err) {
err.printStackTrace();
@@ -766,13 +877,14 @@ public class TestH5Pfapl {
}
@Test
- public void testH5P_fapl_family() {
+ public void testH5P_fapl_family()
+ {
if (HDF5Constants.H5FD_FAMILY < 0)
return;
try {
H5.H5Pset_fapl_family(fapl_id, 1024, HDF5Constants.H5P_DEFAULT);
long driver_type = H5.H5Pget_driver(fapl_id);
- assertTrue("H5Pget_driver: family = "+ driver_type, HDF5Constants.H5FD_FAMILY==driver_type);
+ assertTrue("H5Pget_driver: family = " + driver_type, HDF5Constants.H5FD_FAMILY == driver_type);
}
catch (Throwable err) {
err.printStackTrace();
@@ -782,8 +894,9 @@ public class TestH5Pfapl {
long[] member_size = {0};
long[] member_fapl = {-1};
H5.H5Pget_fapl_family(fapl_id, member_size, member_fapl);
- assertTrue("H5Pget_fapl_family: member_size="+member_size[0], member_size[0]==1024);
- assertTrue("H5Pget_fapl_family: member_fapl ", H5.H5P_equal(member_fapl[0], HDF5Constants.H5P_FILE_ACCESS_DEFAULT));
+ assertTrue("H5Pget_fapl_family: member_size=" + member_size[0], member_size[0] == 1024);
+ assertTrue("H5Pget_fapl_family: member_fapl ",
+ H5.H5P_equal(member_fapl[0], HDF5Constants.H5P_FILE_ACCESS_DEFAULT));
}
catch (Throwable err) {
err.printStackTrace();
@@ -794,13 +907,14 @@ public class TestH5Pfapl {
}
@Test
- public void testH5P_family_offset() {
+ public void testH5P_family_offset()
+ {
if (HDF5Constants.H5FD_FAMILY < 0)
return;
try {
H5.H5Pset_fapl_family(fapl_id, 1024, HDF5Constants.H5P_DEFAULT);
long driver_type = H5.H5Pget_driver(fapl_id);
- assertTrue("H5Pget_driver: family = "+ driver_type, HDF5Constants.H5FD_FAMILY==driver_type);
+ assertTrue("H5Pget_driver: family = " + driver_type, HDF5Constants.H5FD_FAMILY == driver_type);
}
catch (Throwable err) {
err.printStackTrace();
@@ -817,7 +931,7 @@ public class TestH5Pfapl {
}
try {
long offset = H5.H5Pget_family_offset(fapl_id);
- assertTrue("H5Pget_fapl_family: offset="+offset, offset==family_offset);
+ assertTrue("H5Pget_fapl_family: offset=" + offset, offset == family_offset);
}
catch (Throwable err) {
err.printStackTrace();
@@ -827,13 +941,14 @@ public class TestH5Pfapl {
}
@Test
- public void testH5Pset_fapl_sec2() {
+ public void testH5Pset_fapl_sec2()
+ {
if (HDF5Constants.H5FD_SEC2 < 0)
return;
try {
H5.H5Pset_fapl_sec2(fapl_id);
long driver_type = H5.H5Pget_driver(fapl_id);
- assertTrue("H5Pget_driver: sec2 = "+ driver_type, HDF5Constants.H5FD_SEC2==driver_type);
+ assertTrue("H5Pget_driver: sec2 = " + driver_type, HDF5Constants.H5FD_SEC2 == driver_type);
}
catch (Throwable err) {
err.printStackTrace();
@@ -844,13 +959,14 @@ public class TestH5Pfapl {
}
@Test
- public void testH5Pset_fapl_stdio() {
+ public void testH5Pset_fapl_stdio()
+ {
if (HDF5Constants.H5FD_STDIO < 0)
return;
try {
H5.H5Pset_fapl_stdio(fapl_id);
long driver_type = H5.H5Pget_driver(fapl_id);
- assertTrue("H5Pget_driver: stdio = "+ driver_type, HDF5Constants.H5FD_STDIO==driver_type);
+ assertTrue("H5Pget_driver: stdio = " + driver_type, HDF5Constants.H5FD_STDIO == driver_type);
}
catch (Throwable err) {
err.printStackTrace();
@@ -861,14 +977,15 @@ public class TestH5Pfapl {
}
@Test
- public void testH5Pset_fapl_log() {
+ public void testH5Pset_fapl_log()
+ {
if (HDF5Constants.H5FD_LOG < 0)
return;
try {
long log_flags = HDF5Constants.H5FD_LOG_LOC_IO;
H5.H5Pset_fapl_log(fapl_id, H5_LOG_FILE, log_flags, 1024);
long driver_type = H5.H5Pget_driver(fapl_id);
- assertTrue("H5Pget_driver: log = "+ driver_type, HDF5Constants.H5FD_LOG==driver_type);
+ assertTrue("H5Pget_driver: log = " + driver_type, HDF5Constants.H5FD_LOG == driver_type);
}
catch (Throwable err) {
err.printStackTrace();
@@ -880,19 +997,20 @@ public class TestH5Pfapl {
}
@Test
- public void testH5P_fapl_muti_nulls() {
+ public void testH5P_fapl_muti_nulls()
+ {
if (HDF5Constants.H5FD_MULTI < 0)
return;
- int[] member_map = null;
- long[] member_fapl = null;
+ int[] member_map = null;
+ long[] member_fapl = null;
String[] member_name = null;
- long[] member_addr = null;
+ long[] member_addr = null;
try {
H5.H5Pset_fapl_multi(fapl_id, member_map, member_fapl, member_name, member_addr, true);
long driver_type = H5.H5Pget_driver(fapl_id);
- assertTrue("H5Pget_driver: multi = "+ driver_type, HDF5Constants.H5FD_MULTI==driver_type);
+ assertTrue("H5Pget_driver: multi = " + driver_type, HDF5Constants.H5FD_MULTI == driver_type);
}
catch (Throwable err) {
err.printStackTrace();
@@ -911,53 +1029,68 @@ public class TestH5Pfapl {
}
@Test
- public void testH5P_fapl_muti_defaults() {
+ public void testH5P_fapl_muti_defaults()
+ {
if (HDF5Constants.H5FD_MULTI < 0)
return;
int H5FD_MEM_NTYPES = HDF5Constants.H5FD_MEM_NTYPES; // 7
long sH5FD_MEM_DEFAULT_HADDR = HDF5Constants.H5FD_DEFAULT_HADDR_SIZE;
- long sH5FD_MEM_HADDR = HDF5Constants.H5FD_MEM_DEFAULT_SIZE;
- long sH5FD_MEM_SUPER_HADDR = HDF5Constants.H5FD_MEM_DEFAULT_SUPER_SIZE;
- long sH5FD_MEM_BTREE_HADDR = HDF5Constants.H5FD_MEM_DEFAULT_BTREE_SIZE;
- long sH5FD_MEM_DRAW_HADDR = HDF5Constants.H5FD_MEM_DEFAULT_DRAW_SIZE;
- long sH5FD_MEM_GHEAP_HADDR = HDF5Constants.H5FD_MEM_DEFAULT_GHEAP_SIZE;
- long sH5FD_MEM_LHEAP_HADDR = HDF5Constants.H5FD_MEM_DEFAULT_LHEAP_SIZE;
- long sH5FD_MEM_OHDR_HADDR = HDF5Constants.H5FD_MEM_DEFAULT_OHDR_SIZE;
- int[] member_map = null;
- long[] member_fapl = null;
- String[] member_name = null;
- long[] member_addr = null;
+ long sH5FD_MEM_HADDR = HDF5Constants.H5FD_MEM_DEFAULT_SIZE;
+ long sH5FD_MEM_SUPER_HADDR = HDF5Constants.H5FD_MEM_DEFAULT_SUPER_SIZE;
+ long sH5FD_MEM_BTREE_HADDR = HDF5Constants.H5FD_MEM_DEFAULT_BTREE_SIZE;
+ long sH5FD_MEM_DRAW_HADDR = HDF5Constants.H5FD_MEM_DEFAULT_DRAW_SIZE;
+ long sH5FD_MEM_GHEAP_HADDR = HDF5Constants.H5FD_MEM_DEFAULT_GHEAP_SIZE;
+ long sH5FD_MEM_LHEAP_HADDR = HDF5Constants.H5FD_MEM_DEFAULT_LHEAP_SIZE;
+ long sH5FD_MEM_OHDR_HADDR = HDF5Constants.H5FD_MEM_DEFAULT_OHDR_SIZE;
+ int[] member_map = null;
+ long[] member_fapl = null;
+ String[] member_name = null;
+ long[] member_addr = null;
try {
H5.H5Pset_fapl_multi(fapl_id, member_map, member_fapl, member_name, member_addr, true);
long driver_type = H5.H5Pget_driver(fapl_id);
- assertTrue("H5Pget_driver: multi = "+ driver_type, HDF5Constants.H5FD_MULTI==driver_type);
+ assertTrue("H5Pget_driver: multi = " + driver_type, HDF5Constants.H5FD_MULTI == driver_type);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5Pset_fapl_muti: " + err);
}
try {
- member_map = new int[HDF5Constants.H5FD_MEM_NTYPES];
- member_fapl = new long[HDF5Constants.H5FD_MEM_NTYPES];
- member_name = new String[HDF5Constants.H5FD_MEM_NTYPES];
- member_addr = new long[HDF5Constants.H5FD_MEM_NTYPES];
+ member_map = new int[HDF5Constants.H5FD_MEM_NTYPES];
+ member_fapl = new long[HDF5Constants.H5FD_MEM_NTYPES];
+ member_name = new String[HDF5Constants.H5FD_MEM_NTYPES];
+ member_addr = new long[HDF5Constants.H5FD_MEM_NTYPES];
boolean relax = H5.H5Pget_fapl_multi(fapl_id, member_map, member_fapl, member_name, member_addr);
assertTrue("H5Pget_fapl_muti: relax ", relax);
- assertTrue("H5Pget_fapl_muti: member_map="+member_map[HDF5Constants.H5FD_MEM_DEFAULT], member_map[HDF5Constants.H5FD_MEM_DEFAULT] == HDF5Constants.H5FD_MEM_DEFAULT);
- assertTrue("H5Pget_fapl_muti: member_fapl ", H5.H5P_equal(member_fapl[HDF5Constants.H5FD_MEM_DEFAULT], HDF5Constants.H5P_FILE_ACCESS_DEFAULT));
- assertTrue("H5Pget_fapl_muti: member_name="+member_name[HDF5Constants.H5FD_MEM_DEFAULT], member_name[HDF5Constants.H5FD_MEM_DEFAULT].compareTo("%s-X.h5")==0);
- assertTrue("H5Pget_fapl_muti: member_name="+member_name[HDF5Constants.H5FD_MEM_SUPER], member_name[HDF5Constants.H5FD_MEM_SUPER].compareTo("%s-s.h5")==0);
- assertTrue("H5Pget_fapl_muti: member_name="+member_name[HDF5Constants.H5FD_MEM_BTREE], member_name[HDF5Constants.H5FD_MEM_BTREE].compareTo("%s-b.h5")==0);
- assertTrue("H5Pget_fapl_muti: member_name="+member_name[HDF5Constants.H5FD_MEM_DRAW], member_name[HDF5Constants.H5FD_MEM_DRAW].compareTo("%s-r.h5")==0);
- assertTrue("H5Pget_fapl_muti: member_addr="+member_addr[HDF5Constants.H5FD_MEM_DEFAULT], member_addr[HDF5Constants.H5FD_MEM_DEFAULT] == sH5FD_MEM_HADDR);
- assertTrue("H5Pget_fapl_muti: member_addr="+member_addr[HDF5Constants.H5FD_MEM_SUPER], member_addr[HDF5Constants.H5FD_MEM_SUPER] == sH5FD_MEM_SUPER_HADDR);
- assertTrue("H5Pget_fapl_muti: member_addr="+member_addr[HDF5Constants.H5FD_MEM_BTREE], member_addr[HDF5Constants.H5FD_MEM_BTREE] == sH5FD_MEM_BTREE_HADDR);
- assertTrue("H5Pget_fapl_muti: member_addr="+member_addr[HDF5Constants.H5FD_MEM_DRAW], member_addr[HDF5Constants.H5FD_MEM_DRAW] == sH5FD_MEM_DRAW_HADDR);
- assertTrue("H5Pget_fapl_muti: member_addr="+member_addr[HDF5Constants.H5FD_MEM_GHEAP], member_addr[HDF5Constants.H5FD_MEM_GHEAP] == sH5FD_MEM_GHEAP_HADDR);
- assertTrue("H5Pget_fapl_muti: member_addr="+member_addr[HDF5Constants.H5FD_MEM_LHEAP], member_addr[HDF5Constants.H5FD_MEM_LHEAP] == sH5FD_MEM_LHEAP_HADDR);
- assertTrue("H5Pget_fapl_muti: member_addr="+member_addr[HDF5Constants.H5FD_MEM_OHDR], member_addr[HDF5Constants.H5FD_MEM_OHDR] == sH5FD_MEM_OHDR_HADDR);
+ assertTrue("H5Pget_fapl_muti: member_map=" + member_map[HDF5Constants.H5FD_MEM_DEFAULT],
+ member_map[HDF5Constants.H5FD_MEM_DEFAULT] == HDF5Constants.H5FD_MEM_DEFAULT);
+ assertTrue("H5Pget_fapl_muti: member_fapl ",
+ H5.H5P_equal(member_fapl[HDF5Constants.H5FD_MEM_DEFAULT],
+ HDF5Constants.H5P_FILE_ACCESS_DEFAULT));
+ assertTrue("H5Pget_fapl_muti: member_name=" + member_name[HDF5Constants.H5FD_MEM_DEFAULT],
+ member_name[HDF5Constants.H5FD_MEM_DEFAULT].compareTo("%s-X.h5") == 0);
+ assertTrue("H5Pget_fapl_muti: member_name=" + member_name[HDF5Constants.H5FD_MEM_SUPER],
+ member_name[HDF5Constants.H5FD_MEM_SUPER].compareTo("%s-s.h5") == 0);
+ assertTrue("H5Pget_fapl_muti: member_name=" + member_name[HDF5Constants.H5FD_MEM_BTREE],
+ member_name[HDF5Constants.H5FD_MEM_BTREE].compareTo("%s-b.h5") == 0);
+ assertTrue("H5Pget_fapl_muti: member_name=" + member_name[HDF5Constants.H5FD_MEM_DRAW],
+ member_name[HDF5Constants.H5FD_MEM_DRAW].compareTo("%s-r.h5") == 0);
+ assertTrue("H5Pget_fapl_muti: member_addr=" + member_addr[HDF5Constants.H5FD_MEM_DEFAULT],
+ member_addr[HDF5Constants.H5FD_MEM_DEFAULT] == sH5FD_MEM_HADDR);
+ assertTrue("H5Pget_fapl_muti: member_addr=" + member_addr[HDF5Constants.H5FD_MEM_SUPER],
+ member_addr[HDF5Constants.H5FD_MEM_SUPER] == sH5FD_MEM_SUPER_HADDR);
+ assertTrue("H5Pget_fapl_muti: member_addr=" + member_addr[HDF5Constants.H5FD_MEM_BTREE],
+ member_addr[HDF5Constants.H5FD_MEM_BTREE] == sH5FD_MEM_BTREE_HADDR);
+ assertTrue("H5Pget_fapl_muti: member_addr=" + member_addr[HDF5Constants.H5FD_MEM_DRAW],
+ member_addr[HDF5Constants.H5FD_MEM_DRAW] == sH5FD_MEM_DRAW_HADDR);
+ assertTrue("H5Pget_fapl_muti: member_addr=" + member_addr[HDF5Constants.H5FD_MEM_GHEAP],
+ member_addr[HDF5Constants.H5FD_MEM_GHEAP] == sH5FD_MEM_GHEAP_HADDR);
+ assertTrue("H5Pget_fapl_muti: member_addr=" + member_addr[HDF5Constants.H5FD_MEM_LHEAP],
+ member_addr[HDF5Constants.H5FD_MEM_LHEAP] == sH5FD_MEM_LHEAP_HADDR);
+ assertTrue("H5Pget_fapl_muti: member_addr=" + member_addr[HDF5Constants.H5FD_MEM_OHDR],
+ member_addr[HDF5Constants.H5FD_MEM_OHDR] == sH5FD_MEM_OHDR_HADDR);
}
catch (Throwable err) {
err.printStackTrace();
@@ -969,20 +1102,21 @@ public class TestH5Pfapl {
}
@Test
- public void testH5P_fapl_muti() {
+ public void testH5P_fapl_muti()
+ {
if (HDF5Constants.H5FD_MULTI < 0)
return;
long HADDR_DEFAULT_SIZE = HDF5Constants.H5FD_DEFAULT_HADDR_SIZE;
- int[] member_map = new int[HDF5Constants.H5FD_MEM_NTYPES];
- long[] member_fapl = new long[HDF5Constants.H5FD_MEM_NTYPES];
- String[] member_name = new String[HDF5Constants.H5FD_MEM_NTYPES];
- long[] member_addr = new long[HDF5Constants.H5FD_MEM_NTYPES];
+ int[] member_map = new int[HDF5Constants.H5FD_MEM_NTYPES];
+ long[] member_fapl = new long[HDF5Constants.H5FD_MEM_NTYPES];
+ String[] member_name = new String[HDF5Constants.H5FD_MEM_NTYPES];
+ long[] member_addr = new long[HDF5Constants.H5FD_MEM_NTYPES];
- for(int mt=HDF5Constants.H5FD_MEM_DEFAULT; mt<HDF5Constants.H5FD_MEM_NTYPES; mt++) {
+ for (int mt = HDF5Constants.H5FD_MEM_DEFAULT; mt < HDF5Constants.H5FD_MEM_NTYPES; mt++) {
member_fapl[mt] = HDF5Constants.H5P_DEFAULT;
- member_map[mt] = HDF5Constants.H5FD_MEM_SUPER;
+ member_map[mt] = HDF5Constants.H5FD_MEM_SUPER;
}
- member_map[HDF5Constants.H5FD_MEM_DRAW] = HDF5Constants.H5FD_MEM_DRAW;
+ member_map[HDF5Constants.H5FD_MEM_DRAW] = HDF5Constants.H5FD_MEM_DRAW;
member_map[HDF5Constants.H5FD_MEM_BTREE] = HDF5Constants.H5FD_MEM_BTREE;
member_map[HDF5Constants.H5FD_MEM_GHEAP] = HDF5Constants.H5FD_MEM_GHEAP;
@@ -990,18 +1124,18 @@ public class TestH5Pfapl {
member_addr[HDF5Constants.H5FD_MEM_SUPER] = 0;
member_name[HDF5Constants.H5FD_MEM_BTREE] = new String("%s-btree.h5");
- member_addr[HDF5Constants.H5FD_MEM_BTREE] = HADDR_DEFAULT_SIZE/4;
+ member_addr[HDF5Constants.H5FD_MEM_BTREE] = HADDR_DEFAULT_SIZE / 4;
member_name[HDF5Constants.H5FD_MEM_DRAW] = new String("%s-draw.h5");
- member_addr[HDF5Constants.H5FD_MEM_DRAW] = HADDR_DEFAULT_SIZE/2;
+ member_addr[HDF5Constants.H5FD_MEM_DRAW] = HADDR_DEFAULT_SIZE / 2;
member_name[HDF5Constants.H5FD_MEM_GHEAP] = new String("%s-gheap.h5");
- member_addr[HDF5Constants.H5FD_MEM_GHEAP] = (HADDR_DEFAULT_SIZE/4)*3;
+ member_addr[HDF5Constants.H5FD_MEM_GHEAP] = (HADDR_DEFAULT_SIZE / 4) * 3;
try {
H5.H5Pset_fapl_multi(fapl_id, member_map, member_fapl, member_name, member_addr, true);
long driver_type = H5.H5Pget_driver(fapl_id);
- assertTrue("H5Pget_driver: multi = "+ driver_type, HDF5Constants.H5FD_MULTI==driver_type);
+ assertTrue("H5Pget_driver: multi = " + driver_type, HDF5Constants.H5FD_MULTI == driver_type);
}
catch (Throwable err) {
err.printStackTrace();
@@ -1010,23 +1144,37 @@ public class TestH5Pfapl {
try {
boolean relax = H5.H5Pget_fapl_multi(fapl_id, member_map, member_fapl, member_name, member_addr);
assertTrue("H5Pget_fapl_muti: relax ", relax);
- assertTrue("H5Pget_fapl_muti: member_map="+member_map[HDF5Constants.H5FD_MEM_DEFAULT], member_map[HDF5Constants.H5FD_MEM_DEFAULT] == HDF5Constants.H5FD_MEM_SUPER);
- assertTrue("H5Pget_fapl_muti: member_map="+member_map[HDF5Constants.H5FD_MEM_DRAW], member_map[HDF5Constants.H5FD_MEM_DRAW] == HDF5Constants.H5FD_MEM_DRAW);
- assertTrue("H5Pget_fapl_muti: member_map="+member_map[HDF5Constants.H5FD_MEM_BTREE], member_map[HDF5Constants.H5FD_MEM_BTREE] == HDF5Constants.H5FD_MEM_BTREE);
- assertTrue("H5Pget_fapl_muti: member_map="+member_map[HDF5Constants.H5FD_MEM_GHEAP], member_map[HDF5Constants.H5FD_MEM_GHEAP] == HDF5Constants.H5FD_MEM_GHEAP);
-
- assertTrue("H5Pget_fapl_muti: member_fapl ", H5.H5P_equal(member_fapl[HDF5Constants.H5FD_MEM_DEFAULT], HDF5Constants.H5P_FILE_ACCESS_DEFAULT));
- assertTrue("H5Pget_fapl_muti: member_addr="+member_addr[HDF5Constants.H5FD_MEM_DEFAULT], member_addr[HDF5Constants.H5FD_MEM_DEFAULT] == 0);
- assertTrue("H5Pget_fapl_muti: member_name="+member_name[HDF5Constants.H5FD_MEM_SUPER], member_name[HDF5Constants.H5FD_MEM_SUPER].compareTo("%s-super.h5")==0);
-
- assertTrue("H5Pget_fapl_muti: member_name="+member_name[HDF5Constants.H5FD_MEM_BTREE], member_name[HDF5Constants.H5FD_MEM_BTREE].compareTo("%s-btree.h5")==0);
- assertTrue("H5Pget_fapl_muti: member_addr="+member_addr[HDF5Constants.H5FD_MEM_BTREE], member_addr[HDF5Constants.H5FD_MEM_BTREE] == HADDR_DEFAULT_SIZE/4);
-
- assertTrue("H5Pget_fapl_muti: member_name="+member_name[HDF5Constants.H5FD_MEM_DRAW], member_name[HDF5Constants.H5FD_MEM_DRAW].compareTo("%s-draw.h5")==0);
- assertTrue("H5Pget_fapl_muti: member_addr="+member_addr[HDF5Constants.H5FD_MEM_DRAW], member_addr[HDF5Constants.H5FD_MEM_DRAW] == HADDR_DEFAULT_SIZE/2);
-
- assertTrue("H5Pget_fapl_muti: member_name="+member_name[HDF5Constants.H5FD_MEM_GHEAP], member_name[HDF5Constants.H5FD_MEM_GHEAP].compareTo("%s-gheap.h5")==0);
- assertTrue("H5Pget_fapl_muti: member_addr="+member_addr[HDF5Constants.H5FD_MEM_GHEAP], member_addr[HDF5Constants.H5FD_MEM_GHEAP] == (HADDR_DEFAULT_SIZE/4)*3);
+ assertTrue("H5Pget_fapl_muti: member_map=" + member_map[HDF5Constants.H5FD_MEM_DEFAULT],
+ member_map[HDF5Constants.H5FD_MEM_DEFAULT] == HDF5Constants.H5FD_MEM_SUPER);
+ assertTrue("H5Pget_fapl_muti: member_map=" + member_map[HDF5Constants.H5FD_MEM_DRAW],
+ member_map[HDF5Constants.H5FD_MEM_DRAW] == HDF5Constants.H5FD_MEM_DRAW);
+ assertTrue("H5Pget_fapl_muti: member_map=" + member_map[HDF5Constants.H5FD_MEM_BTREE],
+ member_map[HDF5Constants.H5FD_MEM_BTREE] == HDF5Constants.H5FD_MEM_BTREE);
+ assertTrue("H5Pget_fapl_muti: member_map=" + member_map[HDF5Constants.H5FD_MEM_GHEAP],
+ member_map[HDF5Constants.H5FD_MEM_GHEAP] == HDF5Constants.H5FD_MEM_GHEAP);
+
+ assertTrue("H5Pget_fapl_muti: member_fapl ",
+ H5.H5P_equal(member_fapl[HDF5Constants.H5FD_MEM_DEFAULT],
+ HDF5Constants.H5P_FILE_ACCESS_DEFAULT));
+ assertTrue("H5Pget_fapl_muti: member_addr=" + member_addr[HDF5Constants.H5FD_MEM_DEFAULT],
+ member_addr[HDF5Constants.H5FD_MEM_DEFAULT] == 0);
+ assertTrue("H5Pget_fapl_muti: member_name=" + member_name[HDF5Constants.H5FD_MEM_SUPER],
+ member_name[HDF5Constants.H5FD_MEM_SUPER].compareTo("%s-super.h5") == 0);
+
+ assertTrue("H5Pget_fapl_muti: member_name=" + member_name[HDF5Constants.H5FD_MEM_BTREE],
+ member_name[HDF5Constants.H5FD_MEM_BTREE].compareTo("%s-btree.h5") == 0);
+ assertTrue("H5Pget_fapl_muti: member_addr=" + member_addr[HDF5Constants.H5FD_MEM_BTREE],
+ member_addr[HDF5Constants.H5FD_MEM_BTREE] == HADDR_DEFAULT_SIZE / 4);
+
+ assertTrue("H5Pget_fapl_muti: member_name=" + member_name[HDF5Constants.H5FD_MEM_DRAW],
+ member_name[HDF5Constants.H5FD_MEM_DRAW].compareTo("%s-draw.h5") == 0);
+ assertTrue("H5Pget_fapl_muti: member_addr=" + member_addr[HDF5Constants.H5FD_MEM_DRAW],
+ member_addr[HDF5Constants.H5FD_MEM_DRAW] == HADDR_DEFAULT_SIZE / 2);
+
+ assertTrue("H5Pget_fapl_muti: member_name=" + member_name[HDF5Constants.H5FD_MEM_GHEAP],
+ member_name[HDF5Constants.H5FD_MEM_GHEAP].compareTo("%s-gheap.h5") == 0);
+ assertTrue("H5Pget_fapl_muti: member_addr=" + member_addr[HDF5Constants.H5FD_MEM_GHEAP],
+ member_addr[HDF5Constants.H5FD_MEM_GHEAP] == (HADDR_DEFAULT_SIZE / 4) * 3);
}
catch (Throwable err) {
err.printStackTrace();
@@ -1035,7 +1183,8 @@ public class TestH5Pfapl {
_createH5multiFile(fapl_id);
try {
long file_size = H5.H5Fget_filesize(H5fid);
- assertTrue("H5Pget_fapl_muti: file_size ", file_size >= HADDR_DEFAULT_SIZE/4 || file_size <= HADDR_DEFAULT_SIZE/2);
+ assertTrue("H5Pget_fapl_muti: file_size ",
+ file_size >= HADDR_DEFAULT_SIZE / 4 || file_size <= HADDR_DEFAULT_SIZE / 2);
}
catch (Throwable err) {
err.printStackTrace();
@@ -1043,67 +1192,71 @@ public class TestH5Pfapl {
}
_createH5multiFileDS();
deleteH5multifile();
- File file = new File(H5_MULTI_FILE+"-super.h5");
+ File file = new File(H5_MULTI_FILE + "-super.h5");
if (file.exists()) {
try {
file.delete();
}
catch (SecurityException e) {
- ;// e.printStackTrace();
+ ; // e.printStackTrace();
}
}
- file = new File(H5_MULTI_FILE+"-btree.h5");
+ file = new File(H5_MULTI_FILE + "-btree.h5");
if (file.exists()) {
try {
file.delete();
}
catch (SecurityException e) {
- ;// e.printStackTrace();
+ ; // e.printStackTrace();
}
}
- file = new File(H5_MULTI_FILE+"-draw.h5");
+ file = new File(H5_MULTI_FILE + "-draw.h5");
if (file.exists()) {
try {
file.delete();
}
catch (SecurityException e) {
- ;// e.printStackTrace();
+ ; // e.printStackTrace();
}
}
- file = new File(H5_MULTI_FILE+"-gheap.h5");
+ file = new File(H5_MULTI_FILE + "-gheap.h5");
if (file.exists()) {
try {
file.delete();
}
catch (SecurityException e) {
- ;// e.printStackTrace();
+ ; // e.printStackTrace();
}
}
}
@Test
- public void testH5P_fapl_split() {
+ public void testH5P_fapl_split()
+ {
if (HDF5Constants.H5FD_MULTI < 0)
return;
try {
- H5.H5Pset_fapl_split(fapl_id, "-meta.h5", HDF5Constants.H5P_DEFAULT, "-raw.h5", HDF5Constants.H5P_DEFAULT);
+ H5.H5Pset_fapl_split(fapl_id, "-meta.h5", HDF5Constants.H5P_DEFAULT, "-raw.h5",
+ HDF5Constants.H5P_DEFAULT);
long driver_type = H5.H5Pget_driver(fapl_id);
- assertTrue("H5Pget_driver: split = "+ driver_type, HDF5Constants.H5FD_MULTI==driver_type);
+ assertTrue("H5Pget_driver: split = " + driver_type, HDF5Constants.H5FD_MULTI == driver_type);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5Pset_fapl_split: " + err);
}
try {
- int[] member_map = new int[HDF5Constants.H5FD_MEM_NTYPES];
- long[] member_fapl = new long[HDF5Constants.H5FD_MEM_NTYPES];
+ int[] member_map = new int[HDF5Constants.H5FD_MEM_NTYPES];
+ long[] member_fapl = new long[HDF5Constants.H5FD_MEM_NTYPES];
String[] member_name = new String[HDF5Constants.H5FD_MEM_NTYPES];
- long[] member_addr = new long[HDF5Constants.H5FD_MEM_NTYPES];
+ long[] member_addr = new long[HDF5Constants.H5FD_MEM_NTYPES];
boolean relax = H5.H5Pget_fapl_multi(fapl_id, member_map, member_fapl, member_name, member_addr);
assertTrue("H5Pget_fapl_multi: relax ", relax);
- assertTrue("H5Pget_fapl_multi: member_name="+member_name[HDF5Constants.H5FD_MEM_SUPER], member_name[HDF5Constants.H5FD_MEM_SUPER].compareTo("%s-meta.h5")==0);
- assertTrue("H5Pget_fapl_multi: member_name="+member_name[HDF5Constants.H5FD_MEM_DRAW], member_name[HDF5Constants.H5FD_MEM_DRAW].compareTo("%s-raw.h5")==0);
+ assertTrue("H5Pget_fapl_multi: member_name=" + member_name[HDF5Constants.H5FD_MEM_SUPER],
+ member_name[HDF5Constants.H5FD_MEM_SUPER].compareTo("%s-meta.h5") == 0);
+ assertTrue("H5Pget_fapl_multi: member_name=" + member_name[HDF5Constants.H5FD_MEM_DRAW],
+ member_name[HDF5Constants.H5FD_MEM_DRAW].compareTo("%s-raw.h5") == 0);
}
catch (Throwable err) {
err.printStackTrace();
@@ -1111,34 +1264,35 @@ public class TestH5Pfapl {
}
_createH5multiFile(fapl_id);
deleteH5multifile();
- File file = new File(H5_MULTI_FILE+"-meta.h5");
+ File file = new File(H5_MULTI_FILE + "-meta.h5");
if (file.exists()) {
try {
file.delete();
}
catch (SecurityException e) {
- ;// e.printStackTrace();
+ ; // e.printStackTrace();
}
}
- file = new File(H5_MULTI_FILE+"-raw.h5");
+ file = new File(H5_MULTI_FILE + "-raw.h5");
if (file.exists()) {
try {
file.delete();
}
catch (SecurityException e) {
- ;// e.printStackTrace();
+ ; // e.printStackTrace();
}
}
}
@Test
- public void testH5P_fapl_direct() {
+ public void testH5P_fapl_direct()
+ {
if (HDF5Constants.H5FD_DIRECT < 0)
return;
try {
- H5.H5Pset_fapl_direct(fapl_id, 1024, 4096, 8*4096);
+ H5.H5Pset_fapl_direct(fapl_id, 1024, 4096, 8 * 4096);
long driver_type = H5.H5Pget_driver(fapl_id);
- assertTrue("H5Pget_driver: direct = "+ driver_type, HDF5Constants.H5FD_DIRECT==driver_type);
+ assertTrue("H5Pget_driver: direct = " + driver_type, HDF5Constants.H5FD_DIRECT == driver_type);
}
catch (Throwable err) {
err.printStackTrace();
@@ -1147,9 +1301,9 @@ public class TestH5Pfapl {
try {
long[] params = {-1, -1, -1};
H5.H5Pget_fapl_direct(fapl_id, params);
- assertTrue("H5Pget_fapl_direct: alignment="+params[0], params[0]==1024);
- assertTrue("H5Pget_fapl_direct: block_size="+params[1], params[1]==4096);
- assertTrue("H5Pget_fapl_direct: cbuf_size="+params[2], params[2]==8*4096);
+ assertTrue("H5Pget_fapl_direct: alignment=" + params[0], params[0] == 1024);
+ assertTrue("H5Pget_fapl_direct: block_size=" + params[1], params[1] == 4096);
+ assertTrue("H5Pget_fapl_direct: cbuf_size=" + params[2], params[2] == 8 * 4096);
}
catch (Throwable err) {
err.printStackTrace();
@@ -1160,13 +1314,14 @@ public class TestH5Pfapl {
}
@Test
- public void testH5Pset_fapl_windows() {
+ public void testH5Pset_fapl_windows()
+ {
if (HDF5Constants.H5FD_WINDOWS < 0)
return;
try {
H5.H5Pset_fapl_windows(fapl_id);
long driver_type = H5.H5Pget_driver(fapl_id);
- assertTrue("H5Pget_driver: windows = "+ driver_type, HDF5Constants.H5FD_WINDOWS==driver_type);
+ assertTrue("H5Pget_driver: windows = " + driver_type, HDF5Constants.H5FD_WINDOWS == driver_type);
}
catch (Throwable err) {
err.printStackTrace();
@@ -1177,19 +1332,20 @@ public class TestH5Pfapl {
}
@Test
- public void testH5Pmulti_transform() {
+ public void testH5Pmulti_transform()
+ {
if (HDF5Constants.H5FD_MULTI < 0)
return;
- String f_to_c = "(5/9.0)*(x-32)";
+ String f_to_c = "(5/9.0)*(x-32)";
double windchillFread[][] = new double[DIMF_X][DIMF_Y];
double windchillC;
NumberFormat formatter = new DecimalFormat("#0.000");
- long HADDRMAX = HDF5Constants.H5FD_DEFAULT_HADDR_SIZE;
+ long HADDRMAX = HDF5Constants.H5FD_DEFAULT_HADDR_SIZE;
- int[] member_map = new int[HDF5Constants.H5FD_MEM_NTYPES];
- long[] member_fapl = new long[HDF5Constants.H5FD_MEM_NTYPES];
+ int[] member_map = new int[HDF5Constants.H5FD_MEM_NTYPES];
+ long[] member_fapl = new long[HDF5Constants.H5FD_MEM_NTYPES];
String[] member_name = new String[HDF5Constants.H5FD_MEM_NTYPES];
- long[] member_addr = new long[HDF5Constants.H5FD_MEM_NTYPES];
+ long[] member_addr = new long[HDF5Constants.H5FD_MEM_NTYPES];
try {
H5.H5Pset_data_transform(plist_id, f_to_c);
@@ -1200,11 +1356,11 @@ public class TestH5Pfapl {
fail("H5Pdata_transform: " + err);
}
- for(int mt=HDF5Constants.H5FD_MEM_DEFAULT; mt<HDF5Constants.H5FD_MEM_NTYPES; mt++) {
+ for (int mt = HDF5Constants.H5FD_MEM_DEFAULT; mt < HDF5Constants.H5FD_MEM_NTYPES; mt++) {
member_fapl[mt] = HDF5Constants.H5P_DEFAULT;
- member_map[mt] = HDF5Constants.H5FD_MEM_SUPER;
+ member_map[mt] = HDF5Constants.H5FD_MEM_SUPER;
}
- member_map[HDF5Constants.H5FD_MEM_DRAW] = HDF5Constants.H5FD_MEM_DRAW;
+ member_map[HDF5Constants.H5FD_MEM_DRAW] = HDF5Constants.H5FD_MEM_DRAW;
member_map[HDF5Constants.H5FD_MEM_BTREE] = HDF5Constants.H5FD_MEM_BTREE;
member_map[HDF5Constants.H5FD_MEM_GHEAP] = HDF5Constants.H5FD_MEM_GHEAP;
@@ -1212,18 +1368,18 @@ public class TestH5Pfapl {
member_addr[HDF5Constants.H5FD_MEM_SUPER] = 0;
member_name[HDF5Constants.H5FD_MEM_BTREE] = new String("%s-btree.h5");
- member_addr[HDF5Constants.H5FD_MEM_BTREE] = HADDRMAX/4;
+ member_addr[HDF5Constants.H5FD_MEM_BTREE] = HADDRMAX / 4;
member_name[HDF5Constants.H5FD_MEM_DRAW] = new String("%s-draw.h5");
- member_addr[HDF5Constants.H5FD_MEM_DRAW] = HADDRMAX/2;
+ member_addr[HDF5Constants.H5FD_MEM_DRAW] = HADDRMAX / 2;
member_name[HDF5Constants.H5FD_MEM_GHEAP] = new String("%s-gheap.h5");
- member_addr[HDF5Constants.H5FD_MEM_GHEAP] = (HADDRMAX/4)*3;
+ member_addr[HDF5Constants.H5FD_MEM_GHEAP] = (HADDRMAX / 4) * 3;
try {
H5.H5Pset_fapl_multi(fapl_id, member_map, member_fapl, member_name, member_addr, true);
long driver_type = H5.H5Pget_driver(fapl_id);
- assertTrue("H5Pget_driver: multi = "+ driver_type, HDF5Constants.H5FD_MULTI==driver_type);
+ assertTrue("H5Pget_driver: multi = " + driver_type, HDF5Constants.H5FD_MULTI == driver_type);
}
catch (Throwable err) {
err.printStackTrace();
@@ -1232,23 +1388,37 @@ public class TestH5Pfapl {
try {
boolean relax = H5.H5Pget_fapl_multi(fapl_id, member_map, member_fapl, member_name, member_addr);
assertTrue("H5Pget_fapl_muti: relax ", relax);
- assertTrue("H5Pget_fapl_muti: member_map="+member_map[HDF5Constants.H5FD_MEM_DEFAULT], member_map[HDF5Constants.H5FD_MEM_DEFAULT] == HDF5Constants.H5FD_MEM_SUPER);
- assertTrue("H5Pget_fapl_muti: member_map="+member_map[HDF5Constants.H5FD_MEM_DRAW], member_map[HDF5Constants.H5FD_MEM_DRAW] == HDF5Constants.H5FD_MEM_DRAW);
- assertTrue("H5Pget_fapl_muti: member_map="+member_map[HDF5Constants.H5FD_MEM_BTREE], member_map[HDF5Constants.H5FD_MEM_BTREE] == HDF5Constants.H5FD_MEM_BTREE);
- assertTrue("H5Pget_fapl_muti: member_map="+member_map[HDF5Constants.H5FD_MEM_GHEAP], member_map[HDF5Constants.H5FD_MEM_GHEAP] == HDF5Constants.H5FD_MEM_GHEAP);
-
- assertTrue("H5Pget_fapl_muti: member_fapl ", H5.H5P_equal(member_fapl[HDF5Constants.H5FD_MEM_DEFAULT], HDF5Constants.H5P_FILE_ACCESS_DEFAULT));
- assertTrue("H5Pget_fapl_muti: member_addr="+member_addr[HDF5Constants.H5FD_MEM_DEFAULT], member_addr[HDF5Constants.H5FD_MEM_DEFAULT] == 0);
- assertTrue("H5Pget_fapl_muti: member_name="+member_name[HDF5Constants.H5FD_MEM_SUPER], member_name[HDF5Constants.H5FD_MEM_SUPER].compareTo("%s-super.h5")==0);
-
- assertTrue("H5Pget_fapl_muti: member_name="+member_name[HDF5Constants.H5FD_MEM_BTREE], member_name[HDF5Constants.H5FD_MEM_BTREE].compareTo("%s-btree.h5")==0);
- assertTrue("H5Pget_fapl_muti: member_addr="+member_addr[HDF5Constants.H5FD_MEM_BTREE], member_addr[HDF5Constants.H5FD_MEM_BTREE] == HADDRMAX/4);
-
- assertTrue("H5Pget_fapl_muti: member_name="+member_name[HDF5Constants.H5FD_MEM_DRAW], member_name[HDF5Constants.H5FD_MEM_DRAW].compareTo("%s-draw.h5")==0);
- assertTrue("H5Pget_fapl_muti: member_addr="+member_addr[HDF5Constants.H5FD_MEM_DRAW], member_addr[HDF5Constants.H5FD_MEM_DRAW] == HADDRMAX/2);
-
- assertTrue("H5Pget_fapl_muti: member_name="+member_name[HDF5Constants.H5FD_MEM_GHEAP], member_name[HDF5Constants.H5FD_MEM_GHEAP].compareTo("%s-gheap.h5")==0);
- assertTrue("H5Pget_fapl_muti: member_addr="+member_addr[HDF5Constants.H5FD_MEM_GHEAP], member_addr[HDF5Constants.H5FD_MEM_GHEAP] == (HADDRMAX/4)*3);
+ assertTrue("H5Pget_fapl_muti: member_map=" + member_map[HDF5Constants.H5FD_MEM_DEFAULT],
+ member_map[HDF5Constants.H5FD_MEM_DEFAULT] == HDF5Constants.H5FD_MEM_SUPER);
+ assertTrue("H5Pget_fapl_muti: member_map=" + member_map[HDF5Constants.H5FD_MEM_DRAW],
+ member_map[HDF5Constants.H5FD_MEM_DRAW] == HDF5Constants.H5FD_MEM_DRAW);
+ assertTrue("H5Pget_fapl_muti: member_map=" + member_map[HDF5Constants.H5FD_MEM_BTREE],
+ member_map[HDF5Constants.H5FD_MEM_BTREE] == HDF5Constants.H5FD_MEM_BTREE);
+ assertTrue("H5Pget_fapl_muti: member_map=" + member_map[HDF5Constants.H5FD_MEM_GHEAP],
+ member_map[HDF5Constants.H5FD_MEM_GHEAP] == HDF5Constants.H5FD_MEM_GHEAP);
+
+ assertTrue("H5Pget_fapl_muti: member_fapl ",
+ H5.H5P_equal(member_fapl[HDF5Constants.H5FD_MEM_DEFAULT],
+ HDF5Constants.H5P_FILE_ACCESS_DEFAULT));
+ assertTrue("H5Pget_fapl_muti: member_addr=" + member_addr[HDF5Constants.H5FD_MEM_DEFAULT],
+ member_addr[HDF5Constants.H5FD_MEM_DEFAULT] == 0);
+ assertTrue("H5Pget_fapl_muti: member_name=" + member_name[HDF5Constants.H5FD_MEM_SUPER],
+ member_name[HDF5Constants.H5FD_MEM_SUPER].compareTo("%s-super.h5") == 0);
+
+ assertTrue("H5Pget_fapl_muti: member_name=" + member_name[HDF5Constants.H5FD_MEM_BTREE],
+ member_name[HDF5Constants.H5FD_MEM_BTREE].compareTo("%s-btree.h5") == 0);
+ assertTrue("H5Pget_fapl_muti: member_addr=" + member_addr[HDF5Constants.H5FD_MEM_BTREE],
+ member_addr[HDF5Constants.H5FD_MEM_BTREE] == HADDRMAX / 4);
+
+ assertTrue("H5Pget_fapl_muti: member_name=" + member_name[HDF5Constants.H5FD_MEM_DRAW],
+ member_name[HDF5Constants.H5FD_MEM_DRAW].compareTo("%s-draw.h5") == 0);
+ assertTrue("H5Pget_fapl_muti: member_addr=" + member_addr[HDF5Constants.H5FD_MEM_DRAW],
+ member_addr[HDF5Constants.H5FD_MEM_DRAW] == HADDRMAX / 2);
+
+ assertTrue("H5Pget_fapl_muti: member_name=" + member_name[HDF5Constants.H5FD_MEM_GHEAP],
+ member_name[HDF5Constants.H5FD_MEM_GHEAP].compareTo("%s-gheap.h5") == 0);
+ assertTrue("H5Pget_fapl_muti: member_addr=" + member_addr[HDF5Constants.H5FD_MEM_GHEAP],
+ member_addr[HDF5Constants.H5FD_MEM_GHEAP] == (HADDRMAX / 4) * 3);
}
catch (Throwable err) {
err.printStackTrace();
@@ -1257,7 +1427,8 @@ public class TestH5Pfapl {
try {
_createH5multiFile(fapl_id);
long file_size = H5.H5Fget_filesize(H5fid);
- assertTrue("H5Pget_fapl_muti: file_size ", file_size >= HADDRMAX/4 || file_size <= HADDRMAX/2);
+ assertTrue("H5Pget_fapl_muti: file_size ",
+ file_size >= HADDRMAX / 4 || file_size <= HADDRMAX / 2);
_createH5multiFileDS();
_createFloatDataset();
}
@@ -1267,68 +1438,70 @@ public class TestH5Pfapl {
}
try {
H5.H5Dwrite(H5Fdid, HDF5Constants.H5T_NATIVE_DOUBLE, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- plist_id, windchillF);
+ plist_id, windchillF);
H5.H5Dread(H5Fdid, HDF5Constants.H5T_NATIVE_DOUBLE, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, windchillFread);
+ HDF5Constants.H5P_DEFAULT, windchillFread);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5Pdata_transform: " + err);
}
- for(int row = 0; row < DIMF_X; row++) {
- for(int col = 0; col < DIMF_Y; col++) {
- windchillC = (5/9.0)*(windchillF[row][col]-32);
- String Cstr = formatter.format(windchillC);
+ for (int row = 0; row < DIMF_X; row++) {
+ for (int col = 0; col < DIMF_Y; col++) {
+ windchillC = (5 / 9.0) * (windchillF[row][col] - 32);
+ String Cstr = formatter.format(windchillC);
String Fread = formatter.format(windchillFread[row][col]);
- assertTrue("H5Pdata_transform: <"+row+","+col+">"+Fread+"="+Cstr, Fread.compareTo(Cstr)==0);
+ assertTrue("H5Pdata_transform: <" + row + "," + col + ">" + Fread + "=" + Cstr,
+ Fread.compareTo(Cstr) == 0);
}
}
deleteH5multifile();
- File file = new File(H5_MULTI_FILE+"-super.h5");
+ File file = new File(H5_MULTI_FILE + "-super.h5");
if (file.exists()) {
try {
file.delete();
}
catch (SecurityException e) {
- ;// e.printStackTrace();
+ ; // e.printStackTrace();
}
}
- file = new File(H5_MULTI_FILE+"-btree.h5");
+ file = new File(H5_MULTI_FILE + "-btree.h5");
if (file.exists()) {
try {
file.delete();
}
catch (SecurityException e) {
- ;// e.printStackTrace();
+ ; // e.printStackTrace();
}
}
- file = new File(H5_MULTI_FILE+"-draw.h5");
+ file = new File(H5_MULTI_FILE + "-draw.h5");
if (file.exists()) {
try {
file.delete();
}
catch (SecurityException e) {
- ;// e.printStackTrace();
+ ; // e.printStackTrace();
}
}
- file = new File(H5_MULTI_FILE+"-gheap.h5");
+ file = new File(H5_MULTI_FILE + "-gheap.h5");
if (file.exists()) {
try {
file.delete();
}
catch (SecurityException e) {
- ;// e.printStackTrace();
+ ; // e.printStackTrace();
}
}
}
@Test
- public void testH5Fmdc_logging() {
+ public void testH5Fmdc_logging()
+ {
boolean[] mdc_logging_status = {false, false};
- boolean[] mdc_log_options = {false, false};
+ boolean[] mdc_log_options = {false, false};
try {
- boolean is_enabled = true;
+ boolean is_enabled = true;
boolean start_on_access = false;
H5.H5Pset_mdc_log_options(fapl_id, is_enabled, H5_LOG_FILE, start_on_access);
@@ -1336,7 +1509,8 @@ public class TestH5Pfapl {
assertTrue("H5.H5Pget_mdc_log_options: is_enabled", mdc_log_options[0]);
assertFalse("H5.H5Pget_mdc_log_options: start_on_access_out", mdc_log_options[1]);
- H5.H5Pset_libver_bounds(fapl_id, HDF5Constants.H5F_LIBVER_LATEST, HDF5Constants.H5F_LIBVER_LATEST);
+ H5.H5Pset_libver_bounds(fapl_id, HDF5Constants.H5F_LIBVER_LATEST,
+ HDF5Constants.H5F_LIBVER_LATEST);
}
catch (Throwable err) {
err.printStackTrace();
@@ -1370,7 +1544,7 @@ public class TestH5Pfapl {
catch (Throwable err) {
fail("stop H5.H5Fget_mdc_logging_status: " + err);
}
-// assertFalse("stop: is_enabled", mdc_logging_status[0]);
+ // assertFalse("stop: is_enabled", mdc_logging_status[0]);
assertFalse("stop: is_currently_logging", mdc_logging_status[1]);
deleteH5file();
@@ -1378,7 +1552,8 @@ public class TestH5Pfapl {
}
@Test
- public void testH5P_evict_on_close() {
+ public void testH5P_evict_on_close()
+ {
boolean ret_val_id = false;
try {
H5.H5Pset_evict_on_close(fapl_id, true);
@@ -1399,20 +1574,21 @@ public class TestH5Pfapl {
}
@Test
- public void testH5P_file_locking() {
- boolean use_file_locking = false;
+ public void testH5P_file_locking()
+ {
+ boolean use_file_locking = false;
boolean ignore_disabled_file_locking = false;
try {
// false values (usually not the default)
H5.H5Pset_file_locking(fapl_id, false, false);
- use_file_locking = H5.H5Pget_use_file_locking(fapl_id);
+ use_file_locking = H5.H5Pget_use_file_locking(fapl_id);
ignore_disabled_file_locking = H5.H5Pget_ignore_disabled_file_locking(fapl_id);
assertFalse("H5P_file_locking", use_file_locking);
assertFalse("H5P_file_locking", ignore_disabled_file_locking);
// true values (typically the default)
H5.H5Pset_file_locking(fapl_id, true, true);
- use_file_locking = H5.H5Pget_use_file_locking(fapl_id);
+ use_file_locking = H5.H5Pget_use_file_locking(fapl_id);
ignore_disabled_file_locking = H5.H5Pget_ignore_disabled_file_locking(fapl_id);
assertTrue("H5P_file_locking", use_file_locking);
assertTrue("H5P_file_locking", ignore_disabled_file_locking);
diff --git a/java/test/TestH5Pfaplhdfs.java b/java/test/TestH5Pfaplhdfs.java
index d922666..e99967b 100644
--- a/java/test/TestH5Pfaplhdfs.java
+++ b/java/test/TestH5Pfaplhdfs.java
@@ -31,12 +31,13 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5Pfaplhdfs {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
- long fapl_id = HDF5Constants.H5I_INVALID_HID;
- long plapl_id = HDF5Constants.H5I_INVALID_HID;
- long dapl_id = HDF5Constants.H5I_INVALID_HID;
- long plist_id = HDF5Constants.H5I_INVALID_HID;
+ long fapl_id = HDF5Constants.H5I_INVALID_HID;
+ long plapl_id = HDF5Constants.H5I_INVALID_HID;
+ long dapl_id = HDF5Constants.H5I_INVALID_HID;
+ long plist_id = HDF5Constants.H5I_INVALID_HID;
long btplist_id = HDF5Constants.H5I_INVALID_HID;
@Before
@@ -62,9 +63,9 @@ public class TestH5Pfaplhdfs {
}
assertTrue(plapl_id > 0);
try {
- plist_id = H5.H5Pcreate(HDF5Constants.H5P_DATASET_XFER);
+ plist_id = H5.H5Pcreate(HDF5Constants.H5P_DATASET_XFER);
btplist_id = H5.H5Pcreate(HDF5Constants.H5P_DATASET_XFER);
- dapl_id = H5.H5Pcreate(HDF5Constants.H5P_DATASET_ACCESS);
+ dapl_id = H5.H5Pcreate(HDF5Constants.H5P_DATASET_ACCESS);
}
catch (Throwable err) {
err.printStackTrace();
@@ -79,15 +80,35 @@ public class TestH5Pfaplhdfs {
public void deleteFileAccess() throws HDF5LibraryException
{
if (fapl_id > 0)
- try {H5.H5Pclose(fapl_id);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(fapl_id);
+ }
+ catch (Exception ex) {
+ }
if (plapl_id > 0)
- try {H5.H5Pclose(plapl_id);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(plapl_id);
+ }
+ catch (Exception ex) {
+ }
if (dapl_id > 0)
- try {H5.H5Pclose(dapl_id);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(dapl_id);
+ }
+ catch (Exception ex) {
+ }
if (plist_id > 0)
- try {H5.H5Pclose(plist_id);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(plist_id);
+ }
+ catch (Exception ex) {
+ }
if (btplist_id > 0)
- try {H5.H5Pclose(btplist_id);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(btplist_id);
+ }
+ catch (Exception ex) {
+ }
System.out.println();
}
@@ -97,19 +118,21 @@ public class TestH5Pfaplhdfs {
if (HDF5Constants.H5FD_HDFS < 0)
throw new HDF5LibraryException("skip");
- String nodename = "blues";
- int nodeport = 12345;
- String username = "sparticus";
+ String nodename = "blues";
+ int nodeport = 12345;
+ String username = "sparticus";
String kerbcache = "/dev/null";
- int streamsize = 1024;
+ int streamsize = 1024;
- final H5FD_hdfs_fapl_t config = new H5FD_hdfs_fapl_t(nodename, nodeport, username, kerbcache, streamsize);
+ final H5FD_hdfs_fapl_t config =
+ new H5FD_hdfs_fapl_t(nodename, nodeport, username, kerbcache, streamsize);
assertTrue("setting fapl should succeed", -1 < H5.H5Pset_fapl_hdfs(fapl_id, config));
assertEquals("driver types should match", HDF5Constants.H5FD_HDFS, H5.H5Pget_driver(fapl_id));
H5FD_hdfs_fapl_t copy = H5.H5Pget_fapl_hdfs(fapl_id);
- assertEquals("fapl contents should match", new H5FD_hdfs_fapl_t(nodename, nodeport, username, kerbcache, streamsize), copy);
+ assertEquals("fapl contents should match",
+ new H5FD_hdfs_fapl_t(nodename, nodeport, username, kerbcache, streamsize), copy);
}
@Test(expected = HDF5LibraryException.class)
@@ -125,13 +148,12 @@ public class TestH5Pfaplhdfs {
{
if (HDF5Constants.H5FD_HDFS < 0)
throw new HDF5LibraryException("skip");
- if (HDF5Constants.H5FD_SEC2 < 0 )
+ if (HDF5Constants.H5FD_SEC2 < 0)
throw new HDF5LibraryException("skip");
- /* TODO: for now, test against a sec2 fapl only */
+ /* TODO: for now, test against a sec2 fapl only */
H5.H5Pset_fapl_sec2(fapl_id);
assertEquals("fapl_id was not set properly", HDF5Constants.H5FD_SEC2, H5.H5Pget_driver(fapl_id));
H5FD_hdfs_fapl_t fails = H5.H5Pget_fapl_hdfs(fapl_id);
}
-
}
diff --git a/java/test/TestH5Pfapls3.java b/java/test/TestH5Pfapls3.java
index dda2716..06baef2 100644
--- a/java/test/TestH5Pfapls3.java
+++ b/java/test/TestH5Pfapls3.java
@@ -31,12 +31,13 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5Pfapls3 {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
- long fapl_id = HDF5Constants.H5I_INVALID_HID;
- long plapl_id = HDF5Constants.H5I_INVALID_HID;
- long dapl_id = HDF5Constants.H5I_INVALID_HID;
- long plist_id = HDF5Constants.H5I_INVALID_HID;
+ long fapl_id = HDF5Constants.H5I_INVALID_HID;
+ long plapl_id = HDF5Constants.H5I_INVALID_HID;
+ long dapl_id = HDF5Constants.H5I_INVALID_HID;
+ long plist_id = HDF5Constants.H5I_INVALID_HID;
long btplist_id = HDF5Constants.H5I_INVALID_HID;
@Before
@@ -62,9 +63,9 @@ public class TestH5Pfapls3 {
}
assertTrue(plapl_id > 0);
try {
- plist_id = H5.H5Pcreate(HDF5Constants.H5P_DATASET_XFER);
+ plist_id = H5.H5Pcreate(HDF5Constants.H5P_DATASET_XFER);
btplist_id = H5.H5Pcreate(HDF5Constants.H5P_DATASET_XFER);
- dapl_id = H5.H5Pcreate(HDF5Constants.H5P_DATASET_ACCESS);
+ dapl_id = H5.H5Pcreate(HDF5Constants.H5P_DATASET_ACCESS);
}
catch (Throwable err) {
err.printStackTrace();
@@ -79,15 +80,35 @@ public class TestH5Pfapls3 {
public void deleteFileAccess() throws HDF5LibraryException
{
if (fapl_id > 0)
- try {H5.H5Pclose(fapl_id);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(fapl_id);
+ }
+ catch (Exception ex) {
+ }
if (plapl_id > 0)
- try {H5.H5Pclose(plapl_id);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(plapl_id);
+ }
+ catch (Exception ex) {
+ }
if (dapl_id > 0)
- try {H5.H5Pclose(dapl_id);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(dapl_id);
+ }
+ catch (Exception ex) {
+ }
if (plist_id > 0)
- try {H5.H5Pclose(plist_id);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(plist_id);
+ }
+ catch (Exception ex) {
+ }
if (btplist_id > 0)
- try {H5.H5Pclose(btplist_id);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(btplist_id);
+ }
+ catch (Exception ex) {
+ }
System.out.println();
}
@@ -98,18 +119,15 @@ public class TestH5Pfapls3 {
return;
final H5FD_ros3_fapl_t config = new H5FD_ros3_fapl_t();
- assertEquals("Default fapl has unexpected contents",
- new H5FD_ros3_fapl_t("", "", ""), config);
+ assertEquals("Default fapl has unexpected contents", new H5FD_ros3_fapl_t("", "", ""), config);
H5.H5Pset_fapl_ros3(fapl_id, config);
- assertEquals("driver types don't match",
- HDF5Constants.H5FD_ROS3, H5.H5Pget_driver(fapl_id));
+ assertEquals("driver types don't match", HDF5Constants.H5FD_ROS3, H5.H5Pget_driver(fapl_id));
/* get_fapl_ros3 can throw exception in error cases */
H5FD_ros3_fapl_t copy = H5.H5Pget_fapl_ros3(fapl_id);
- assertEquals("contents of fapl set and get don't match",
- new H5FD_ros3_fapl_t("", "", ""), copy);
+ assertEquals("contents of fapl set and get don't match", new H5FD_ros3_fapl_t("", "", ""), copy);
}
@Test(expected = HDF5LibraryException.class)
@@ -125,13 +143,12 @@ public class TestH5Pfapls3 {
{
if (HDF5Constants.H5FD_ROS3 < 0)
throw new HDF5LibraryException("skip");
- if (HDF5Constants.H5FD_SEC2 < 0 )
+ if (HDF5Constants.H5FD_SEC2 < 0)
throw new HDF5LibraryException("skip");
- /* TODO: for now, test against a sec2 fapl only */
+ /* TODO: for now, test against a sec2 fapl only */
H5.H5Pset_fapl_sec2(fapl_id);
- assertEquals("fapl_id was not set properly",
- HDF5Constants.H5FD_SEC2, H5.H5Pget_driver(fapl_id));
+ assertEquals("fapl_id was not set properly", HDF5Constants.H5FD_SEC2, H5.H5Pget_driver(fapl_id));
H5FD_ros3_fapl_t fails = H5.H5Pget_fapl_ros3(fapl_id);
}
@@ -147,12 +164,10 @@ public class TestH5Pfapls3 {
final H5FD_ros3_fapl_t config = new H5FD_ros3_fapl_t(region, acc_id, acc_key);
H5.H5Pset_fapl_ros3(fapl_id, config);
- assertEquals("driver types don't match",
- HDF5Constants.H5FD_ROS3, H5.H5Pget_driver(fapl_id));
+ assertEquals("driver types don't match", HDF5Constants.H5FD_ROS3, H5.H5Pget_driver(fapl_id));
H5FD_ros3_fapl_t copy = H5.H5Pget_fapl_ros3(fapl_id);
assertEquals("contents of fapl set and get don't match",
- new H5FD_ros3_fapl_t(region, acc_id, acc_key), copy);
+ new H5FD_ros3_fapl_t(region, acc_id, acc_key), copy);
}
-
}
diff --git a/java/test/TestH5Plist.java b/java/test/TestH5Plist.java
index 03e1c8f..d8a429b 100644
--- a/java/test/TestH5Plist.java
+++ b/java/test/TestH5Plist.java
@@ -17,11 +17,11 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
-import java.util.ArrayList;
import java.io.File;
+import java.nio.charset.StandardCharsets;
import java.text.DecimalFormat;
import java.text.NumberFormat;
-import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
@@ -32,15 +32,15 @@ import hdf.hdf5lib.callbacks.H5P_cls_copy_func_cb;
import hdf.hdf5lib.callbacks.H5P_cls_copy_func_t;
import hdf.hdf5lib.callbacks.H5P_cls_create_func_cb;
import hdf.hdf5lib.callbacks.H5P_cls_create_func_t;
-import hdf.hdf5lib.callbacks.H5P_prp_set_func_cb;
-import hdf.hdf5lib.callbacks.H5P_prp_get_func_cb;
-import hdf.hdf5lib.callbacks.H5P_prp_delete_func_cb;
-import hdf.hdf5lib.callbacks.H5P_prp_copy_func_cb;
-import hdf.hdf5lib.callbacks.H5P_prp_compare_func_cb;
-import hdf.hdf5lib.callbacks.H5P_prp_close_func_cb;
-import hdf.hdf5lib.callbacks.H5P_prp_create_func_cb;
import hdf.hdf5lib.callbacks.H5P_iterate_cb;
import hdf.hdf5lib.callbacks.H5P_iterate_t;
+import hdf.hdf5lib.callbacks.H5P_prp_close_func_cb;
+import hdf.hdf5lib.callbacks.H5P_prp_compare_func_cb;
+import hdf.hdf5lib.callbacks.H5P_prp_copy_func_cb;
+import hdf.hdf5lib.callbacks.H5P_prp_create_func_cb;
+import hdf.hdf5lib.callbacks.H5P_prp_delete_func_cb;
+import hdf.hdf5lib.callbacks.H5P_prp_get_func_cb;
+import hdf.hdf5lib.callbacks.H5P_prp_set_func_cb;
import hdf.hdf5lib.exceptions.HDF5Exception;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
import hdf.hdf5lib.structs.H5AC_cache_config_t;
@@ -52,7 +52,8 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5Plist {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
// Property definitions
private static final String CLASS1_NAME = "Class 1";
@@ -63,33 +64,31 @@ public class TestH5Plist {
// Property definitions
private static final String PROP1_NAME = "Property 1";
- private static final int prop1_def = 10; // Property 1 default value
- private static final int PROP1_SIZE = 2;
+ private static final int prop1_def = 10; // Property 1 default value
+ private static final int PROP1_SIZE = 2;
private static final String PROP2_NAME = "Property 2";
- private static final float prop2_def = 3.14F; // Property 2 default value
- private static final int PROP2_SIZE = 8;
+ private static final float prop2_def = 3.14F; // Property 2 default value
+ private static final int PROP2_SIZE = 8;
- private static final String PROP3_NAME = "Property 3";
- private static final char[] prop3_def = {'T','e','n',' ','c','h','a','r','s',' '}; // Property 3 default value
- private static final int PROP3_SIZE = 10;
+ private static final String PROP3_NAME = "Property 3";
+ private static final char[] prop3_def = {'T', 'e', 'n', ' ', 'c',
+ 'h', 'a', 'r', 's', ' '}; // Property 3 default value
+ private static final int PROP3_SIZE = 10;
- private static final String PROP4_NAME = "Property 4";
- private static final double prop4_def = 1.41F; // Property 4 default value
- private static final int PROP4_SIZE = 8;
+ private static final String PROP4_NAME = "Property 4";
+ private static final double prop4_def = 1.41F; // Property 4 default value
+ private static final int PROP4_SIZE = 8;
- private static final String [] pnames = { // Names of properties for iterator
- PROP1_NAME,
- PROP2_NAME,
- PROP3_NAME,
- PROP4_NAME};
+ private static final String[] pnames = { // Names of properties for iterator
+ PROP1_NAME, PROP2_NAME, PROP3_NAME, PROP4_NAME};
long plist_class_id = HDF5Constants.H5I_INVALID_HID;
@Before
- public void createPropClass()throws NullPointerException, HDF5Exception
+ public void createPropClass() throws NullPointerException, HDF5Exception
{
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
// Create a new generic class, derived from the root of the class hierarchy
try {
@@ -103,20 +102,26 @@ public class TestH5Plist {
}
@After
- public void deleteFileAccess() throws HDF5LibraryException {
+ public void deleteFileAccess() throws HDF5LibraryException
+ {
if (plist_class_id > 0)
- try {H5.H5Pclose(plist_class_id);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(plist_class_id);
+ }
+ catch (Exception ex) {
+ }
System.out.println();
}
// Test basic generic property list code. Tests creating new generic classes.
@Test
- public void testH5P_genprop_basic_class() {
- int status = -1;
- long cid1 = HDF5Constants.H5I_INVALID_HID; // Generic Property class ID
- long cid2 = HDF5Constants.H5I_INVALID_HID; // Generic Property class ID
- long cid3 = HDF5Constants.H5I_INVALID_HID; // Generic Property class ID
- String name = null; // Name of class
+ public void testH5P_genprop_basic_class()
+ {
+ int status = -1;
+ long cid1 = HDF5Constants.H5I_INVALID_HID; // Generic Property class ID
+ long cid2 = HDF5Constants.H5I_INVALID_HID; // Generic Property class ID
+ long cid3 = HDF5Constants.H5I_INVALID_HID; // Generic Property class ID
+ String name = null; // Name of class
try {
// Check class name
@@ -127,7 +132,8 @@ public class TestH5Plist {
err.printStackTrace();
fail("H5Pget_class_name plist_class_id: " + err);
}
- assertTrue("Class names don't match!, "+name+"="+CLASS1_NAME+"\n", name.compareTo(CLASS1_NAME)==0);
+ assertTrue("Class names don't match!, " + name + "=" + CLASS1_NAME + "\n",
+ name.compareTo(CLASS1_NAME) == 0);
// Check class parent
try {
@@ -196,7 +202,8 @@ public class TestH5Plist {
err.printStackTrace();
fail("H5Pget_class_name cid1: " + err);
}
- assertTrue("Class names don't match!, "+name+"="+CLASS2_NAME+"\n", name.compareTo(CLASS2_NAME)==0);
+ assertTrue("Class names don't match!, " + name + "=" + CLASS2_NAME + "\n",
+ name.compareTo(CLASS2_NAME) == 0);
// Check class parent
try {
@@ -270,20 +277,33 @@ public class TestH5Plist {
}
finally {
if (cid3 > 0)
- try {H5.H5Pclose_class(cid3);} catch (Throwable err) {}
+ try {
+ H5.H5Pclose_class(cid3);
+ }
+ catch (Throwable err) {
+ }
if (cid2 > 0)
- try {H5.H5Pclose_class(cid2);} catch (Throwable err) {}
+ try {
+ H5.H5Pclose_class(cid2);
+ }
+ catch (Throwable err) {
+ }
if (cid1 > 0)
- try {H5.H5Pclose_class(cid1);} catch (Throwable err) {}
+ try {
+ H5.H5Pclose_class(cid1);
+ }
+ catch (Throwable err) {
+ }
}
}
// Test basic generic property list code. Tests adding properties to generic classes.
@Test
- public void testH5P_genprop_basic_class_prop() {
- boolean status = false;
- long size = -1; // Generic Property size
- long nprops = -1; // Generic Property class number
+ public void testH5P_genprop_basic_class_prop()
+ {
+ boolean status = false;
+ long size = -1; // Generic Property size
+ long nprops = -1; // Generic Property class number
// Check the number of properties in class
try {
@@ -293,7 +313,7 @@ public class TestH5Plist {
err.printStackTrace();
fail("H5Pget_nprops plist_class_id: " + err);
}
- assertTrue("H5Pget_nprops: "+nprops, nprops==0);
+ assertTrue("H5Pget_nprops: " + nprops, nprops == 0);
// Check the existence of the first property (should fail)
try {
@@ -303,7 +323,7 @@ public class TestH5Plist {
err.printStackTrace();
fail("H5Pexist plist_class_id: " + err);
}
- assertFalse("H5Pexist plist_class_id "+PROP1_NAME, status);
+ assertFalse("H5Pexist plist_class_id " + PROP1_NAME, status);
// Insert first property into class (with no callbacks)
try {
@@ -313,7 +333,7 @@ public class TestH5Plist {
}
catch (Throwable err) {
err.printStackTrace();
- fail("H5Pregister2 plist_class_id: "+PROP1_NAME + err);
+ fail("H5Pregister2 plist_class_id: " + PROP1_NAME + err);
}
// Try to insert the first property again (should fail)
@@ -321,7 +341,7 @@ public class TestH5Plist {
byte[] prop_value = HDFNativeData.intToByte(prop1_def);
H5.H5Pregister2_nocb(plist_class_id, PROP1_NAME, PROP1_SIZE, prop_value);
- fail("H5Pregister2 plist_class_id: "+PROP1_NAME);
+ fail("H5Pregister2 plist_class_id: " + PROP1_NAME);
}
catch (Throwable err) {
}
@@ -334,7 +354,7 @@ public class TestH5Plist {
err.printStackTrace();
fail("H5Pexist plist_class_id: " + err);
}
- assertTrue("H5Pexist plist_class_id "+PROP1_NAME, status);
+ assertTrue("H5Pexist plist_class_id " + PROP1_NAME, status);
// Check the size of the first property
try {
@@ -344,7 +364,7 @@ public class TestH5Plist {
err.printStackTrace();
fail("H5Pget_size PROP1_NAME: " + err);
}
- assertTrue("H5Pget_size "+PROP1_NAME +" size: "+size, size == PROP1_SIZE);
+ assertTrue("H5Pget_size " + PROP1_NAME + " size: " + size, size == PROP1_SIZE);
// Check the number of properties in class
try {
@@ -354,7 +374,7 @@ public class TestH5Plist {
err.printStackTrace();
fail("H5Pget_nprops plist_class_id: " + err);
}
- assertTrue("H5Pget_nprops: "+nprops, nprops==1);
+ assertTrue("H5Pget_nprops: " + nprops, nprops == 1);
// Insert second property into class (with no callbacks)
try {
@@ -364,7 +384,7 @@ public class TestH5Plist {
}
catch (Throwable err) {
err.printStackTrace();
- fail("H5Pregister2 plist_class_id: "+PROP2_NAME + err);
+ fail("H5Pregister2 plist_class_id: " + PROP2_NAME + err);
}
// Try to insert the second property again (should fail)
@@ -372,7 +392,7 @@ public class TestH5Plist {
byte[] prop_value = HDFNativeData.floatToByte(prop2_def);
H5.H5Pregister2_nocb(plist_class_id, PROP2_NAME, PROP2_SIZE, prop_value);
- fail("H5Pregister2 plist_class_id: "+PROP2_NAME);
+ fail("H5Pregister2 plist_class_id: " + PROP2_NAME);
}
catch (Throwable err) {
}
@@ -385,7 +405,7 @@ public class TestH5Plist {
err.printStackTrace();
fail("H5Pexist plist_class_id: " + err);
}
- assertTrue("H5Pexist plist_class_id "+PROP2_NAME, status);
+ assertTrue("H5Pexist plist_class_id " + PROP2_NAME, status);
// Check the size of the second property
try {
@@ -395,7 +415,7 @@ public class TestH5Plist {
err.printStackTrace();
fail("H5Pget_size PROP2_NAME: " + err);
}
- assertTrue("H5Pget_size "+PROP2_NAME +" size: "+size, size == PROP2_SIZE);
+ assertTrue("H5Pget_size " + PROP2_NAME + " size: " + size, size == PROP2_SIZE);
// Check the number of properties in class
try {
@@ -405,7 +425,7 @@ public class TestH5Plist {
err.printStackTrace();
fail("H5Pget_nprops plist_class_id: " + err);
}
- assertTrue("H5Pget_nprops: "+nprops, nprops==2);
+ assertTrue("H5Pget_nprops: " + nprops, nprops == 2);
// Insert third property into class (with no callbacks)
try {
@@ -415,7 +435,7 @@ public class TestH5Plist {
}
catch (Throwable err) {
err.printStackTrace();
- fail("H5Pregister2 plist_class_id: "+PROP3_NAME + err);
+ fail("H5Pregister2 plist_class_id: " + PROP3_NAME + err);
}
// Check the existence of the third property
@@ -426,7 +446,7 @@ public class TestH5Plist {
err.printStackTrace();
fail("H5Pexist plist_class_id: " + err);
}
- assertTrue("H5Pexist plist_class_id "+PROP3_NAME, status);
+ assertTrue("H5Pexist plist_class_id " + PROP3_NAME, status);
// Check the size of the third property
try {
@@ -436,7 +456,7 @@ public class TestH5Plist {
err.printStackTrace();
fail("H5Pget_size PROP3_NAME: " + err);
}
- assertTrue("H5Pget_size "+PROP3_NAME +" size: "+size, size == PROP3_SIZE);
+ assertTrue("H5Pget_size " + PROP3_NAME + " size: " + size, size == PROP3_SIZE);
// Check the number of properties in class
try {
@@ -446,7 +466,7 @@ public class TestH5Plist {
err.printStackTrace();
fail("H5Pget_nprops plist_class_id: " + err);
}
- assertTrue("H5Pget_nprops: "+nprops, nprops==3);
+ assertTrue("H5Pget_nprops: " + nprops, nprops == 3);
// Unregister first property
try {
@@ -454,7 +474,7 @@ public class TestH5Plist {
}
catch (Throwable err) {
err.printStackTrace();
- fail("H5Punregister plist_class_id: "+PROP1_NAME + err);
+ fail("H5Punregister plist_class_id: " + PROP1_NAME + err);
}
// Try to check the size of the first property (should fail)
@@ -473,7 +493,7 @@ public class TestH5Plist {
err.printStackTrace();
fail("H5Pget_nprops plist_class_id: " + err);
}
- assertTrue("H5Pget_nprops: "+nprops, nprops==2);
+ assertTrue("H5Pget_nprops: " + nprops, nprops == 2);
// Unregister second property
try {
@@ -481,7 +501,7 @@ public class TestH5Plist {
}
catch (Throwable err) {
err.printStackTrace();
- fail("H5Punregister plist_class_id: "+PROP2_NAME + err);
+ fail("H5Punregister plist_class_id: " + PROP2_NAME + err);
}
// Check the number of properties in class
@@ -492,7 +512,7 @@ public class TestH5Plist {
err.printStackTrace();
fail("H5Pget_nprops plist_class_id: " + err);
}
- assertTrue("H5Pget_nprops: "+nprops, nprops==1);
+ assertTrue("H5Pget_nprops: " + nprops, nprops == 1);
// Unregister third property
try {
@@ -500,7 +520,7 @@ public class TestH5Plist {
}
catch (Throwable err) {
err.printStackTrace();
- fail("H5Punregister plist_class_id: "+PROP3_NAME + err);
+ fail("H5Punregister plist_class_id: " + PROP3_NAME + err);
}
// Check the number of properties in class
@@ -511,16 +531,18 @@ public class TestH5Plist {
err.printStackTrace();
fail("H5Pget_nprops plist_class_id: " + err);
}
- assertTrue("H5Pget_nprops: "+nprops, nprops==0);
+ assertTrue("H5Pget_nprops: " + nprops, nprops == 0);
}
// Test basic generic property list code. Tests iterating over properties in a generic class.
@Test
- public void testH5P_genprop_class_iter() {
+ public void testH5P_genprop_class_iter()
+ {
class idata {
- public String[] iter_names= null;
- public int iter_count = -1;
- idata(String[] names, int count) {
+ public String[] iter_names = null;
+ public int iter_count = -1;
+ idata(String[] names, int count)
+ {
this.iter_names = names;
this.iter_count = count;
}
@@ -531,16 +553,17 @@ public class TestH5Plist {
H5P_iterate_t iter_data = new H5P_iter_data();
class H5P_iter_callback implements H5P_iterate_cb {
- public int callback(long list_id, String name, H5P_iterate_t op_data) {
+ public int callback(long list_id, String name, H5P_iterate_t op_data)
+ {
idata id = ((H5P_iter_data)op_data).iterdata.get(0);
return name.compareTo(id.iter_names[id.iter_count++]);
}
}
H5P_iterate_cb iter_cb = new H5P_iter_callback();
- long size = -1; // Generic Property size
- long nprops = -1; // Generic Property class number
- int[] idx = {0}; // Index to start iteration at
+ long size = -1; // Generic Property size
+ long nprops = -1; // Generic Property class number
+ int[] idx = {0}; // Index to start iteration at
// Insert first property into class (with no callbacks) */
try {
@@ -550,7 +573,7 @@ public class TestH5Plist {
}
catch (Throwable err) {
err.printStackTrace();
- fail("H5Pregister2 plist_class_id: "+PROP1_NAME + err);
+ fail("H5Pregister2 plist_class_id: " + PROP1_NAME + err);
}
// Insert second property into class (with no callbacks) */
@@ -561,7 +584,7 @@ public class TestH5Plist {
}
catch (Throwable err) {
err.printStackTrace();
- fail("H5Pregister2 plist_class_id: "+PROP2_NAME + err);
+ fail("H5Pregister2 plist_class_id: " + PROP2_NAME + err);
}
// Insert third property into class (with no callbacks) */
@@ -572,7 +595,7 @@ public class TestH5Plist {
}
catch (Throwable err) {
err.printStackTrace();
- fail("H5Pregister2 plist_class_id: "+PROP3_NAME + err);
+ fail("H5Pregister2 plist_class_id: " + PROP3_NAME + err);
}
// Insert fourth property into class (with no callbacks) */
@@ -583,7 +606,7 @@ public class TestH5Plist {
}
catch (Throwable err) {
err.printStackTrace();
- fail("H5Pregister2 plist_class_id: "+PROP4_NAME + err);
+ fail("H5Pregister2 plist_class_id: " + PROP4_NAME + err);
}
// Check the number of properties in class */
@@ -594,7 +617,7 @@ public class TestH5Plist {
err.printStackTrace();
fail("H5Pget_nprops plist_class_id: " + err);
}
- assertTrue("H5Pget_nprops: "+nprops, nprops==4);
+ assertTrue("H5Pget_nprops: " + nprops, nprops == 4);
// Iterate over all properties in class */
idata id = new idata(pnames, 0);
@@ -606,12 +629,14 @@ public class TestH5Plist {
err.printStackTrace();
fail("H5.H5Piterate: " + err);
}
- assertFalse("H5Piterate ",((H5P_iter_data)iter_data).iterdata.isEmpty());
- assertTrue("H5Piterate "+((H5P_iter_data)iter_data).iterdata.size(),((H5P_iter_data)iter_data).iterdata.size()==1);
- assertTrue("H5Piterate "+(((H5P_iter_data)iter_data).iterdata.get(0)).iter_count,((idata)((H5P_iter_data)iter_data).iterdata.get(0)).iter_count==4);
+ assertFalse("H5Piterate ", ((H5P_iter_data)iter_data).iterdata.isEmpty());
+ assertTrue("H5Piterate " + ((H5P_iter_data)iter_data).iterdata.size(),
+ ((H5P_iter_data)iter_data).iterdata.size() == 1);
+ assertTrue("H5Piterate " + (((H5P_iter_data)iter_data).iterdata.get(0)).iter_count,
+ ((idata)((H5P_iter_data)iter_data).iterdata.get(0)).iter_count == 4);
// Iterate over last three properties in class */
- idx[0] = 1;
+ idx[0] = 1;
((H5P_iter_data)iter_data).iterdata.get(0).iter_count = 1;
try {
H5.H5Piterate(plist_class_id, idx, iter_cb, iter_data);
@@ -620,21 +645,24 @@ public class TestH5Plist {
err.printStackTrace();
fail("H5.H5Piterate: " + err);
}
- assertFalse("H5Piterate ",((H5P_iter_data)iter_data).iterdata.isEmpty());
- assertTrue("H5Piterate "+((H5P_iter_data)iter_data).iterdata.size(),((H5P_iter_data)iter_data).iterdata.size()==1);
- assertTrue("H5Piterate "+(((H5P_iter_data)iter_data).iterdata.get(0)).iter_count,((idata)((H5P_iter_data)iter_data).iterdata.get(0)).iter_count==4);
+ assertFalse("H5Piterate ", ((H5P_iter_data)iter_data).iterdata.isEmpty());
+ assertTrue("H5Piterate " + ((H5P_iter_data)iter_data).iterdata.size(),
+ ((H5P_iter_data)iter_data).iterdata.size() == 1);
+ assertTrue("H5Piterate " + (((H5P_iter_data)iter_data).iterdata.get(0)).iter_count,
+ ((idata)((H5P_iter_data)iter_data).iterdata.get(0)).iter_count == 4);
- assertTrue("H5Piterate: "+nprops+"="+idx[0], nprops == idx[0]);
+ assertTrue("H5Piterate: " + nprops + "=" + idx[0], nprops == idx[0]);
}
// Test basic generic property list code.
// Tests creating new generic property lists and adding and
// removing properties from them.
@Test
- public void testH5P_genprop_basic_list_prop() {
- boolean status = false;
- long lid1 = HDF5Constants.H5I_INVALID_HID; // Generic Property list ID
- long nprops = -1; // Number of properties in class
+ public void testH5P_genprop_basic_list_prop()
+ {
+ boolean status = false;
+ long lid1 = HDF5Constants.H5I_INVALID_HID; // Generic Property list ID
+ long nprops = -1; // Number of properties in class
try {
// Add several properties (several w/default values)
@@ -647,7 +675,7 @@ public class TestH5Plist {
}
catch (Throwable err) {
err.printStackTrace();
- fail("H5Pregister2 plist_class_id: "+PROP1_NAME + err);
+ fail("H5Pregister2 plist_class_id: " + PROP1_NAME + err);
}
// Insert second property into class (with no callbacks)
@@ -658,7 +686,7 @@ public class TestH5Plist {
}
catch (Throwable err) {
err.printStackTrace();
- fail("H5Pregister2 plist_class_id: "+PROP2_NAME + err);
+ fail("H5Pregister2 plist_class_id: " + PROP2_NAME + err);
}
// Create a property list from the class
@@ -678,7 +706,7 @@ public class TestH5Plist {
err.printStackTrace();
fail("H5Pget_nprops lid1: " + err);
}
- assertTrue("H5Pget_nprops: "+nprops, nprops==2);
+ assertTrue("H5Pget_nprops: " + nprops, nprops == 2);
// Add temporary properties
@@ -690,7 +718,7 @@ public class TestH5Plist {
}
catch (Throwable err) {
err.printStackTrace();
- fail("H5Pinsertr2 lid1: "+PROP3_NAME + err);
+ fail("H5Pinsertr2 lid1: " + PROP3_NAME + err);
}
// Insert second temporary property into list (with no callbacks)
@@ -701,7 +729,7 @@ public class TestH5Plist {
}
catch (Throwable err) {
err.printStackTrace();
- fail("H5Pinsert2 lid1: "+PROP4_NAME + err);
+ fail("H5Pinsert2 lid1: " + PROP4_NAME + err);
}
// Check the number of properties in class
@@ -712,7 +740,7 @@ public class TestH5Plist {
err.printStackTrace();
fail("H5Pget_nprops lid1: " + err);
}
- assertTrue("H5Pget_nprops: "+nprops, nprops==4);
+ assertTrue("H5Pget_nprops: " + nprops, nprops == 4);
// Check existence of all properties
try {
@@ -722,7 +750,7 @@ public class TestH5Plist {
err.printStackTrace();
fail("H5Pexist plist_class_id: " + err);
}
- assertTrue("H5Pexist lid1 "+PROP1_NAME, status);
+ assertTrue("H5Pexist lid1 " + PROP1_NAME, status);
try {
status = H5.H5Pexist(lid1, PROP2_NAME);
}
@@ -730,7 +758,7 @@ public class TestH5Plist {
err.printStackTrace();
fail("H5Pexist plist_class_id: " + err);
}
- assertTrue("H5Pexist lid1 "+PROP2_NAME, status);
+ assertTrue("H5Pexist lid1 " + PROP2_NAME, status);
try {
status = H5.H5Pexist(lid1, PROP3_NAME);
}
@@ -738,7 +766,7 @@ public class TestH5Plist {
err.printStackTrace();
fail("H5Pexist plist_class_id: " + err);
}
- assertTrue("H5Pexist lid1 "+PROP3_NAME, status);
+ assertTrue("H5Pexist lid1 " + PROP3_NAME, status);
try {
status = H5.H5Pexist(lid1, PROP4_NAME);
}
@@ -746,265 +774,279 @@ public class TestH5Plist {
err.printStackTrace();
fail("H5Pexist plist_class_id: " + err);
}
- assertTrue("H5Pexist lid1 "+PROP4_NAME, status);
-
+ assertTrue("H5Pexist lid1 " + PROP4_NAME, status);
}
finally {
if (lid1 > 0)
- try {H5.H5Pclose(lid1);} catch (Throwable err) {}
+ try {
+ H5.H5Pclose(lid1);
+ }
+ catch (Throwable err) {
+ }
}
}
-// // Test basic generic property list code. Tests callbacks for property lists in a generic class.
-// @Test
-// public void testH5P_genprop_class_callback() {
-// class cdata {
-// public long cls_id = HDF5Constants.H5I_INVALID_HID;
-// public int cls_count = -1;
-// cdata(long id, int count) {
-// this.cls_id = id;
-// this.cls_count = count;
-// }
-// }
-// class H5P_cls_create_data implements H5P_cls_create_func_t {
-// public ArrayList<cdata> clsdata = new ArrayList<cdata>();
-// }
-// H5P_cls_create_func_t cls_create_data = new H5P_cls_create_data();
-//
-// class H5P_cls_create_callback implements H5P_cls_create_func_cb {
-// public int callback(long list_id, H5P_cls_create_func_t cls_data) {
-// System.err.println("H5P_cls_create_callback enter");
-// cdata cd = ((H5P_cls_create_data)cls_create_data).clsdata.get(0);
-// cd.cls_count++;
-// cd.cls_id = list_id;
-// return 0;
-// }
-// }
-// H5P_cls_create_func_cb cls_create_cb = new H5P_cls_create_callback();
-//
-// class H5P_cls_copy_data implements H5P_cls_copy_func_t {
-// public ArrayList<cdata> clsdata = new ArrayList<cdata>();
-// }
-// H5P_cls_copy_func_t cls_copy_data = new H5P_cls_copy_data();
-//
-// class H5P_cls_copy_callback implements H5P_cls_copy_func_cb {
-// public int callback(long list_id1, long list_id2, H5P_cls_copy_func_t cls_data) {
-// cdata cd = ((H5P_cls_copy_data)cls_copy_data).clsdata.get(0);
-// cd.cls_count++;
-// cd.cls_id = list_id1;
-// return 0;
-// }
-// }
-// H5P_cls_copy_func_cb cls_copy_cb = new H5P_cls_copy_callback();
-//
-// class H5P_cls_close_data implements H5P_cls_close_func_t {
-// public ArrayList<cdata> clsdata = new ArrayList<cdata>();
-// }
-// H5P_cls_close_func_t cls_close_data = new H5P_cls_close_data();
-//
-// class H5P_cls_close_callback implements H5P_cls_close_func_cb {
-// public int callback(long list_id, H5P_cls_close_func_t cls_data) {
-// cdata cd = ((H5P_cls_close_data)cls_close_data).clsdata.get(0);
-// cd.cls_count++;
-// cd.cls_id = list_id;
-// return 0;
-// }
-// }
-// H5P_cls_close_func_cb cls_close_cb = new H5P_cls_close_callback();
-//
-// long cid1 = HDF5Constants.H5I_INVALID_HID; // Generic Property class ID
-// long cid2 = HDF5Constants.H5I_INVALID_HID; // Generic Property class ID
-// long lid1 = HDF5Constants.H5I_INVALID_HID; // Generic Property list ID
-// long lid2 = HDF5Constants.H5I_INVALID_HID; // Generic Property list ID
-// long lid3 = HDF5Constants.H5I_INVALID_HID; // Generic Property list ID
-// long nprops = -1; // Number of properties in class
-//
-// try {
-// // Create a new generic class, derived from the root of the class hierarchy
-// try {
-// cid1 = H5.H5Pcreate_class(HDF5Constants.H5P_ROOT, CLASS1_NAME, cls_create_cb, cls_create_data, cls_copy_cb, cls_copy_data, cls_close_cb, cls_close_data);
-// }
-// catch (Throwable err) {
-// err.printStackTrace();
-// fail("H5Pcreate_class cid1: " + err);
-// }
-// assertTrue("H5Pcreate_class cid1", cid1 >= 0);
-//
-// // Insert first property into class (with no callbacks)
-// try {
-// byte[] prop_value = HDFNativeData.intToByte(prop1_def);
-//
-// H5.H5Pregister2(cid1, PROP1_NAME, PROP1_SIZE, prop_value, null, null, null, null, null, null, null);
-// }
-// catch (Throwable err) {
-// err.printStackTrace();
-// fail("H5Pregister2 cid1: "+PROP1_NAME + err);
-// }
-//
-// // Insert second property into class (with no callbacks)
-// try {
-// byte[] prop_value = HDFNativeData.floatToByte(prop2_def);
-//
-// H5.H5Pregister2(cid1, PROP2_NAME, PROP2_SIZE, prop_value, null, null, null, null, null, null, null);
-// }
-// catch (Throwable err) {
-// err.printStackTrace();
-// fail("H5Pregister2 cid1: "+PROP2_NAME + err);
-// }
-//
-// // Insert third property into class (with no callbacks)
-// try {
-// byte[] prop_value = new String(prop3_def).getBytes(StandardCharsets.UTF_8);
-//
-// H5.H5Pregister2(cid1, PROP3_NAME, PROP3_SIZE, prop_value, null, null, null, null, null, null, null);
-// }
-// catch (Throwable err) {
-// err.printStackTrace();
-// fail("H5Pregister2 cid1: "+PROP3_NAME + err);
-// }
-//
-// // Check the number of properties in class
-// try {
-// nprops = H5.H5Pget_nprops(cid1);
-// }
-// catch (Throwable err) {
-// err.printStackTrace();
-// fail("H5Pget_nprops cid1: " + err);
-// }
-// assertTrue("H5Pget_nprops: "+nprops, nprops==3);
-//
-// // Initialize class callback structs
-// cdata create_id = new cdata(-1, 0);
-// cdata copy_id = new cdata(-1, 0);
-// cdata close_id = new cdata(-1, 0);
-// ((H5P_cls_create_data)cls_create_data).clsdata.add(create_id);
-// ((H5P_cls_copy_data)cls_copy_data).clsdata.add(copy_id);
-// ((H5P_cls_close_data)cls_close_data).clsdata.add(close_id);
-//
-// // Create a property list from the class
-// try {
-// lid1 = H5.H5Pcreate(cid1);
-// }
-// catch (Throwable err) {
-// err.printStackTrace();
-// fail("H5Pcreate lid1: " + err);
-// }
-//
-// // Verify that the creation callback occurred
-// assertFalse("H5Pcreate ",((H5P_cls_create_data)cls_create_data).clsdata.isEmpty());
-// assertTrue("H5Pcreate "+((H5P_cls_create_data)cls_create_data).clsdata.get(0).cls_id ,((H5P_cls_create_data)cls_create_data).clsdata.get(0).cls_id == lid1);
-// assertTrue("H5Pcreate "+(((H5P_cls_create_data)cls_create_data).clsdata.get(0)).cls_count,((cdata)((H5P_cls_create_data)cls_create_data).clsdata.get(0)).cls_count==1);
-//
-// // Check the number of properties in list
-// try {
-// nprops = H5.H5Pget_nprops(lid1);
-// }
-// catch (Throwable err) {
-// err.printStackTrace();
-// fail("H5Pget_nprops lid1: " + err);
-// }
-// assertTrue("H5Pget_nprops: "+nprops, nprops==3);
-//
-// // Create another property list from the class
-// try {
-// lid2 = H5.H5Pcreate(cid1);
-// }
-// catch (Throwable err) {
-// err.printStackTrace();
-// fail("H5Pcreate lid2: " + err);
-// }
-//
-// /* Verify that the creation callback occurred */
-// assertFalse("H5Pcreate ",((H5P_cls_create_data)cls_create_data).clsdata.isEmpty());
-// assertTrue("H5Pcreate "+((H5P_cls_create_data)cls_create_data).clsdata.get(0).cls_id ,((H5P_cls_create_data)cls_create_data).clsdata.get(0).cls_id == lid2);
-// assertTrue("H5Pcreate "+(((H5P_cls_create_data)cls_create_data).clsdata.get(0)).cls_count,((cdata)((H5P_cls_create_data)cls_create_data).clsdata.get(0)).cls_count==2);
-//
-// // Check the number of properties in list
-// try {
-// nprops = H5.H5Pget_nprops(lid2);
-// }
-// catch (Throwable err) {
-// err.printStackTrace();
-// fail("H5Pget_nprops lid2: " + err);
-// }
-// assertTrue("H5Pget_nprops: "+nprops, nprops==3);
-//
-// // Create another property list by copying an existing list
-// try {
-// lid3= H5.H5Pcopy(lid1);
-// }
-// catch (Throwable err) {
-// err.printStackTrace();
-// fail("H5Pcopy lid3: " + err);
-// }
-//
-// // Verify that the copy callback occurred
-// assertFalse("H5Pcopy ",((H5P_cls_copy_data)cls_copy_data).clsdata.isEmpty());
-// assertTrue("H5Pcopy "+((H5P_cls_copy_data)cls_copy_data).clsdata.get(0).cls_id ,((H5P_cls_copy_data)cls_copy_data).clsdata.get(0).cls_id == lid3);
-// assertTrue("H5Pcopy "+(((H5P_cls_copy_data)cls_copy_data).clsdata.get(0)).cls_count,((cdata)((H5P_cls_copy_data)cls_copy_data).clsdata.get(0)).cls_count==1);
-//
-// // Check the number of properties in list
-// try {
-// nprops = H5.H5Pget_nprops(lid3);
-// }
-// catch (Throwable err) {
-// err.printStackTrace();
-// fail("H5Pget_nprops lid3: " + err);
-// }
-// assertTrue("H5Pget_nprops: "+nprops, nprops==3);
-//
-// // Close first list
-// try {
-// H5.H5Pclose(lid1);
-// }
-// catch (Throwable err) {
-// err.printStackTrace();
-// fail("H5Pclose lid1: " + err);
-// }
-//
-// /* Verify that the close callback occurred */
-// assertFalse("H5Pclose ",((H5P_cls_close_data)cls_close_data).clsdata.isEmpty());
-// assertTrue("H5Pclose "+((H5P_cls_close_data)cls_close_data).clsdata.get(0).cls_id ,((H5P_cls_close_data)cls_copy_data).clsdata.get(0).cls_id == lid1);
-// assertTrue("H5Pclose "+(((H5P_cls_close_data)cls_close_data).clsdata.get(0)).cls_count,((cdata)((H5P_cls_close_data)cls_copy_data).clsdata.get(0)).cls_count==1);
-//
-// // Close second list
-// try {
-// H5.H5Pclose(lid2);
-// }
-// catch (Throwable err) {
-// err.printStackTrace();
-// fail("H5Pclose lid2: " + err);
-// }
-//
-// // Verify that the close callback occurred
-// assertTrue("H5Pclose "+((H5P_cls_close_data)cls_close_data).clsdata.get(0).cls_id ,((H5P_cls_close_data)cls_close_data).clsdata.get(0).cls_id == lid2);
-// assertTrue("H5Pclose "+(((H5P_cls_close_data)cls_close_data).clsdata.get(0)).cls_count,((cdata)((H5P_cls_close_data)cls_close_data).clsdata.get(0)).cls_count==2);
-//
-// // Close third list
-// try {
-// H5.H5Pclose(lid3);
-// }
-// catch (Throwable err) {
-// err.printStackTrace();
-// fail("H5Pclose lid3: " + err);
-// }
-//
-// // Verify that the close callback occurred
-// assertTrue("H5Pclose "+((H5P_cls_close_data)cls_close_data).clsdata.get(0).cls_id ,((H5P_cls_close_data)cls_close_data).clsdata.get(0).cls_id == lid3);
-// assertTrue("H5Pclose "+(((H5P_cls_close_data)cls_close_data).clsdata.get(0)).cls_count,((cdata)((H5P_cls_close_data)cls_close_data).clsdata.get(0)).cls_count==3);
-// }
-// finally {
-// if (lid3 > 0)
-// try {H5.H5Pclose(lid3);} catch (Throwable err) {}
-// if (lid2 > 0)
-// try {H5.H5Pclose(lid2);} catch (Throwable err) {}
-// if (lid1 > 0)
-// try {H5.H5Pclose(lid1);} catch (Throwable err) {}
-// if (cid2 > 0)
-// try {H5.H5Pclose_class(cid2);} catch (Throwable err) {}
-// if (cid1 > 0)
-// try {H5.H5Pclose_class(cid1);} catch (Throwable err) {}
-// }
-// }
-
+ // // Test basic generic property list code. Tests callbacks for property lists in a generic class.
+ // @Test
+ // public void testH5P_genprop_class_callback() {
+ // class cdata {
+ // public long cls_id = HDF5Constants.H5I_INVALID_HID;
+ // public int cls_count = -1;
+ // cdata(long id, int count) {
+ // this.cls_id = id;
+ // this.cls_count = count;
+ // }
+ // }
+ // class H5P_cls_create_data implements H5P_cls_create_func_t {
+ // public ArrayList<cdata> clsdata = new ArrayList<cdata>();
+ // }
+ // H5P_cls_create_func_t cls_create_data = new H5P_cls_create_data();
+ //
+ // class H5P_cls_create_callback implements H5P_cls_create_func_cb {
+ // public int callback(long list_id, H5P_cls_create_func_t cls_data) {
+ // System.err.println("H5P_cls_create_callback enter");
+ // cdata cd = ((H5P_cls_create_data)cls_create_data).clsdata.get(0);
+ // cd.cls_count++;
+ // cd.cls_id = list_id;
+ // return 0;
+ // }
+ // }
+ // H5P_cls_create_func_cb cls_create_cb = new H5P_cls_create_callback();
+ //
+ // class H5P_cls_copy_data implements H5P_cls_copy_func_t {
+ // public ArrayList<cdata> clsdata = new ArrayList<cdata>();
+ // }
+ // H5P_cls_copy_func_t cls_copy_data = new H5P_cls_copy_data();
+ //
+ // class H5P_cls_copy_callback implements H5P_cls_copy_func_cb {
+ // public int callback(long list_id1, long list_id2, H5P_cls_copy_func_t cls_data) {
+ // cdata cd = ((H5P_cls_copy_data)cls_copy_data).clsdata.get(0);
+ // cd.cls_count++;
+ // cd.cls_id = list_id1;
+ // return 0;
+ // }
+ // }
+ // H5P_cls_copy_func_cb cls_copy_cb = new H5P_cls_copy_callback();
+ //
+ // class H5P_cls_close_data implements H5P_cls_close_func_t {
+ // public ArrayList<cdata> clsdata = new ArrayList<cdata>();
+ // }
+ // H5P_cls_close_func_t cls_close_data = new H5P_cls_close_data();
+ //
+ // class H5P_cls_close_callback implements H5P_cls_close_func_cb {
+ // public int callback(long list_id, H5P_cls_close_func_t cls_data) {
+ // cdata cd = ((H5P_cls_close_data)cls_close_data).clsdata.get(0);
+ // cd.cls_count++;
+ // cd.cls_id = list_id;
+ // return 0;
+ // }
+ // }
+ // H5P_cls_close_func_cb cls_close_cb = new H5P_cls_close_callback();
+ //
+ // long cid1 = HDF5Constants.H5I_INVALID_HID; // Generic Property class ID
+ // long cid2 = HDF5Constants.H5I_INVALID_HID; // Generic Property class ID
+ // long lid1 = HDF5Constants.H5I_INVALID_HID; // Generic Property list ID
+ // long lid2 = HDF5Constants.H5I_INVALID_HID; // Generic Property list ID
+ // long lid3 = HDF5Constants.H5I_INVALID_HID; // Generic Property list ID
+ // long nprops = -1; // Number of properties in class
+ //
+ // try {
+ // // Create a new generic class, derived from the root of the class hierarchy
+ // try {
+ // cid1 = H5.H5Pcreate_class(HDF5Constants.H5P_ROOT, CLASS1_NAME, cls_create_cb,
+ // cls_create_data, cls_copy_cb, cls_copy_data, cls_close_cb, cls_close_data);
+ // }
+ // catch (Throwable err) {
+ // err.printStackTrace();
+ // fail("H5Pcreate_class cid1: " + err);
+ // }
+ // assertTrue("H5Pcreate_class cid1", cid1 >= 0);
+ //
+ // // Insert first property into class (with no callbacks)
+ // try {
+ // byte[] prop_value = HDFNativeData.intToByte(prop1_def);
+ //
+ // H5.H5Pregister2(cid1, PROP1_NAME, PROP1_SIZE, prop_value, null, null, null, null, null,
+ // null, null);
+ // }
+ // catch (Throwable err) {
+ // err.printStackTrace();
+ // fail("H5Pregister2 cid1: "+PROP1_NAME + err);
+ // }
+ //
+ // // Insert second property into class (with no callbacks)
+ // try {
+ // byte[] prop_value = HDFNativeData.floatToByte(prop2_def);
+ //
+ // H5.H5Pregister2(cid1, PROP2_NAME, PROP2_SIZE, prop_value, null, null, null, null, null,
+ // null, null);
+ // }
+ // catch (Throwable err) {
+ // err.printStackTrace();
+ // fail("H5Pregister2 cid1: "+PROP2_NAME + err);
+ // }
+ //
+ // // Insert third property into class (with no callbacks)
+ // try {
+ // byte[] prop_value = new String(prop3_def).getBytes(StandardCharsets.UTF_8);
+ //
+ // H5.H5Pregister2(cid1, PROP3_NAME, PROP3_SIZE, prop_value, null, null, null, null, null,
+ // null, null);
+ // }
+ // catch (Throwable err) {
+ // err.printStackTrace();
+ // fail("H5Pregister2 cid1: "+PROP3_NAME + err);
+ // }
+ //
+ // // Check the number of properties in class
+ // try {
+ // nprops = H5.H5Pget_nprops(cid1);
+ // }
+ // catch (Throwable err) {
+ // err.printStackTrace();
+ // fail("H5Pget_nprops cid1: " + err);
+ // }
+ // assertTrue("H5Pget_nprops: "+nprops, nprops==3);
+ //
+ // // Initialize class callback structs
+ // cdata create_id = new cdata(-1, 0);
+ // cdata copy_id = new cdata(-1, 0);
+ // cdata close_id = new cdata(-1, 0);
+ // ((H5P_cls_create_data)cls_create_data).clsdata.add(create_id);
+ // ((H5P_cls_copy_data)cls_copy_data).clsdata.add(copy_id);
+ // ((H5P_cls_close_data)cls_close_data).clsdata.add(close_id);
+ //
+ // // Create a property list from the class
+ // try {
+ // lid1 = H5.H5Pcreate(cid1);
+ // }
+ // catch (Throwable err) {
+ // err.printStackTrace();
+ // fail("H5Pcreate lid1: " + err);
+ // }
+ //
+ // // Verify that the creation callback occurred
+ // assertFalse("H5Pcreate ",((H5P_cls_create_data)cls_create_data).clsdata.isEmpty());
+ // assertTrue("H5Pcreate "+((H5P_cls_create_data)cls_create_data).clsdata.get(0).cls_id
+ // ,((H5P_cls_create_data)cls_create_data).clsdata.get(0).cls_id == lid1);
+ // assertTrue("H5Pcreate
+ // "+(((H5P_cls_create_data)cls_create_data).clsdata.get(0)).cls_count,((cdata)((H5P_cls_create_data)cls_create_data).clsdata.get(0)).cls_count==1);
+ //
+ // // Check the number of properties in list
+ // try {
+ // nprops = H5.H5Pget_nprops(lid1);
+ // }
+ // catch (Throwable err) {
+ // err.printStackTrace();
+ // fail("H5Pget_nprops lid1: " + err);
+ // }
+ // assertTrue("H5Pget_nprops: "+nprops, nprops==3);
+ //
+ // // Create another property list from the class
+ // try {
+ // lid2 = H5.H5Pcreate(cid1);
+ // }
+ // catch (Throwable err) {
+ // err.printStackTrace();
+ // fail("H5Pcreate lid2: " + err);
+ // }
+ //
+ // /* Verify that the creation callback occurred */
+ // assertFalse("H5Pcreate ",((H5P_cls_create_data)cls_create_data).clsdata.isEmpty());
+ // assertTrue("H5Pcreate "+((H5P_cls_create_data)cls_create_data).clsdata.get(0).cls_id
+ // ,((H5P_cls_create_data)cls_create_data).clsdata.get(0).cls_id == lid2);
+ // assertTrue("H5Pcreate
+ // "+(((H5P_cls_create_data)cls_create_data).clsdata.get(0)).cls_count,((cdata)((H5P_cls_create_data)cls_create_data).clsdata.get(0)).cls_count==2);
+ //
+ // // Check the number of properties in list
+ // try {
+ // nprops = H5.H5Pget_nprops(lid2);
+ // }
+ // catch (Throwable err) {
+ // err.printStackTrace();
+ // fail("H5Pget_nprops lid2: " + err);
+ // }
+ // assertTrue("H5Pget_nprops: "+nprops, nprops==3);
+ //
+ // // Create another property list by copying an existing list
+ // try {
+ // lid3= H5.H5Pcopy(lid1);
+ // }
+ // catch (Throwable err) {
+ // err.printStackTrace();
+ // fail("H5Pcopy lid3: " + err);
+ // }
+ //
+ // // Verify that the copy callback occurred
+ // assertFalse("H5Pcopy ",((H5P_cls_copy_data)cls_copy_data).clsdata.isEmpty());
+ // assertTrue("H5Pcopy "+((H5P_cls_copy_data)cls_copy_data).clsdata.get(0).cls_id
+ // ,((H5P_cls_copy_data)cls_copy_data).clsdata.get(0).cls_id == lid3); assertTrue("H5Pcopy
+ // "+(((H5P_cls_copy_data)cls_copy_data).clsdata.get(0)).cls_count,((cdata)((H5P_cls_copy_data)cls_copy_data).clsdata.get(0)).cls_count==1);
+ //
+ // // Check the number of properties in list
+ // try {
+ // nprops = H5.H5Pget_nprops(lid3);
+ // }
+ // catch (Throwable err) {
+ // err.printStackTrace();
+ // fail("H5Pget_nprops lid3: " + err);
+ // }
+ // assertTrue("H5Pget_nprops: "+nprops, nprops==3);
+ //
+ // // Close first list
+ // try {
+ // H5.H5Pclose(lid1);
+ // }
+ // catch (Throwable err) {
+ // err.printStackTrace();
+ // fail("H5Pclose lid1: " + err);
+ // }
+ //
+ // /* Verify that the close callback occurred */
+ // assertFalse("H5Pclose ",((H5P_cls_close_data)cls_close_data).clsdata.isEmpty());
+ // assertTrue("H5Pclose "+((H5P_cls_close_data)cls_close_data).clsdata.get(0).cls_id
+ // ,((H5P_cls_close_data)cls_copy_data).clsdata.get(0).cls_id == lid1); assertTrue("H5Pclose
+ // "+(((H5P_cls_close_data)cls_close_data).clsdata.get(0)).cls_count,((cdata)((H5P_cls_close_data)cls_copy_data).clsdata.get(0)).cls_count==1);
+ //
+ // // Close second list
+ // try {
+ // H5.H5Pclose(lid2);
+ // }
+ // catch (Throwable err) {
+ // err.printStackTrace();
+ // fail("H5Pclose lid2: " + err);
+ // }
+ //
+ // // Verify that the close callback occurred
+ // assertTrue("H5Pclose "+((H5P_cls_close_data)cls_close_data).clsdata.get(0).cls_id
+ // ,((H5P_cls_close_data)cls_close_data).clsdata.get(0).cls_id == lid2); assertTrue("H5Pclose
+ // "+(((H5P_cls_close_data)cls_close_data).clsdata.get(0)).cls_count,((cdata)((H5P_cls_close_data)cls_close_data).clsdata.get(0)).cls_count==2);
+ //
+ // // Close third list
+ // try {
+ // H5.H5Pclose(lid3);
+ // }
+ // catch (Throwable err) {
+ // err.printStackTrace();
+ // fail("H5Pclose lid3: " + err);
+ // }
+ //
+ // // Verify that the close callback occurred
+ // assertTrue("H5Pclose "+((H5P_cls_close_data)cls_close_data).clsdata.get(0).cls_id
+ // ,((H5P_cls_close_data)cls_close_data).clsdata.get(0).cls_id == lid3); assertTrue("H5Pclose
+ // "+(((H5P_cls_close_data)cls_close_data).clsdata.get(0)).cls_count,((cdata)((H5P_cls_close_data)cls_close_data).clsdata.get(0)).cls_count==3);
+ // }
+ // finally {
+ // if (lid3 > 0)
+ // try {H5.H5Pclose(lid3);} catch (Throwable err) {}
+ // if (lid2 > 0)
+ // try {H5.H5Pclose(lid2);} catch (Throwable err) {}
+ // if (lid1 > 0)
+ // try {H5.H5Pclose(lid1);} catch (Throwable err) {}
+ // if (cid2 > 0)
+ // try {H5.H5Pclose_class(cid2);} catch (Throwable err) {}
+ // if (cid1 > 0)
+ // try {H5.H5Pclose_class(cid1);} catch (Throwable err) {}
+ // }
+ // }
}
diff --git a/java/test/TestH5Pvirtual.java b/java/test/TestH5Pvirtual.java
index 0478356..41ae6d1 100644
--- a/java/test/TestH5Pvirtual.java
+++ b/java/test/TestH5Pvirtual.java
@@ -32,48 +32,47 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5Pvirtual {
- @Rule public TestName testname = new TestName();
-
- private static final String H5_FILE = "vds.h5";
- private static final String SRC_FILE[] = {
- "v-0.h5",
- "v-1.h5",
- "v-2.h5"
- };
- private static final String SRC_DATASET[] = {
- "A",
- "B",
- "C"
- };
- private static final int DIM_Y = 6;
- private static final int VDSDIM_X = 4;
- private static final int VDSDIM_Y = 6;
- private static final int fill_value = -1;
- long[] H5dims = { DIM_Y };
- long[] VDSH5dims = { VDSDIM_X, VDSDIM_Y };
- long H5fid = HDF5Constants.H5I_INVALID_HID;
- long H5dsid = HDF5Constants.H5I_INVALID_HID;
- long H5dssid = HDF5Constants.H5I_INVALID_HID;
- long H5dvsid = HDF5Constants.H5I_INVALID_HID;
- long H5did = HDF5Constants.H5I_INVALID_HID;
- long H5dcplid = HDF5Constants.H5I_INVALID_HID;
- long H5dapl_id = HDF5Constants.H5I_INVALID_HID;
-
- private final void _deleteFile(String filename) {
+ @Rule
+ public TestName testname = new TestName();
+
+ private static final String H5_FILE = "vds.h5";
+ private static final String SRC_FILE[] = {"v-0.h5", "v-1.h5", "v-2.h5"};
+ private static final String SRC_DATASET[] = {"A", "B", "C"};
+ private static final int DIM_Y = 6;
+ private static final int VDSDIM_X = 4;
+ private static final int VDSDIM_Y = 6;
+ private static final int fill_value = -1;
+ long[] H5dims = {DIM_Y};
+ long[] VDSH5dims = {VDSDIM_X, VDSDIM_Y};
+ long H5fid = HDF5Constants.H5I_INVALID_HID;
+ long H5dsid = HDF5Constants.H5I_INVALID_HID;
+ long H5dssid = HDF5Constants.H5I_INVALID_HID;
+ long H5dvsid = HDF5Constants.H5I_INVALID_HID;
+ long H5did = HDF5Constants.H5I_INVALID_HID;
+ long H5dcplid = HDF5Constants.H5I_INVALID_HID;
+ long H5dapl_id = HDF5Constants.H5I_INVALID_HID;
+
+ private final void _deleteFile(String filename)
+ {
File file = new File(filename);
if (file.exists()) {
- try {file.delete();} catch (SecurityException e) {}
+ try {
+ file.delete();
+ }
+ catch (SecurityException e) {
+ }
}
}
- private final long _createDataset(long fid, long dsid, String name, long dcpl, long dapl) {
- long did = HDF5Constants.H5I_INVALID_HID;
+ private final long _createDataset(long fid, long dsid, String name, long dcpl, long dapl)
+ {
+ long did = HDF5Constants.H5I_INVALID_HID;
long space_id = HDF5Constants.H5I_INVALID_HID;
- long[] start = {0, 0};
+ long[] start = {0, 0};
long[] stride = null;
- long[] count = {1, 1};
- long[] block = {1, VDSDIM_Y};
+ long[] count = {1, 1};
+ long[] block = {1, VDSDIM_Y};
try {
H5dssid = H5.H5Screate_simple(1, H5dims, null);
@@ -83,8 +82,8 @@ public class TestH5Pvirtual {
H5.H5Sselect_hyperslab(dsid, HDF5Constants.H5S_SELECT_SET, start, stride, count, block);
H5.H5Pset_virtual(dcpl, dsid, SRC_FILE[i], SRC_DATASET[i], H5dssid);
}
- did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_NATIVE_INT, dsid,
- HDF5Constants.H5P_DEFAULT, dcpl, dapl);
+ did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_NATIVE_INT, dsid, HDF5Constants.H5P_DEFAULT, dcpl,
+ dapl);
}
catch (Throwable err) {
err.printStackTrace();
@@ -95,23 +94,26 @@ public class TestH5Pvirtual {
return did;
}
- private final void _createH5File(long fcpl, long fapl) {
+ private final void _createH5File(long fcpl, long fapl)
+ {
int[] dset_data = new int[DIM_Y];
// Create source files and datasets
- for (int i=0; i < 3; i++) {
+ for (int i = 0; i < 3; i++) {
long space_id = HDF5Constants.H5I_INVALID_HID;
- long dset_id = HDF5Constants.H5I_INVALID_HID;
- long file_id = HDF5Constants.H5I_INVALID_HID;
- for (int j = 0; j < DIM_Y; j++) dset_data[j] = i+1;
+ long dset_id = HDF5Constants.H5I_INVALID_HID;
+ long file_id = HDF5Constants.H5I_INVALID_HID;
+ for (int j = 0; j < DIM_Y; j++)
+ dset_data[j] = i + 1;
try {
- file_id = H5.H5Fcreate(SRC_FILE[i], HDF5Constants.H5F_ACC_TRUNC,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ file_id = H5.H5Fcreate(SRC_FILE[i], HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
space_id = H5.H5Screate_simple(1, H5dims, null);
- dset_id = H5.H5Dcreate(file_id, SRC_DATASET[i], HDF5Constants.H5T_NATIVE_INT, space_id,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
- H5.H5Dwrite (dset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT,
- dset_data);
+ dset_id = H5.H5Dcreate(file_id, SRC_DATASET[i], HDF5Constants.H5T_NATIVE_INT, space_id,
+ HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
+ H5.H5Dwrite(dset_id, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data);
}
catch (Throwable err) {
err.printStackTrace();
@@ -119,19 +121,32 @@ public class TestH5Pvirtual {
}
finally {
if (dset_id > 0)
- try {H5.H5Dclose(dset_id);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(dset_id);
+ }
+ catch (Exception ex) {
+ }
if (space_id > 0)
- try {H5.H5Sclose(space_id);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(space_id);
+ }
+ catch (Exception ex) {
+ }
if (file_id > 0)
- try {H5.H5Fclose(file_id);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(file_id);
+ }
+ catch (Exception ex) {
+ }
}
}
try {
int[] fill_value = {-1};
- H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
- H5dsid = H5.H5Screate_simple(2, VDSH5dims, null);
- H5dcplid = H5.H5Pcreate(HDF5Constants.H5P_DATASET_CREATE);
+ H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
+ H5dsid = H5.H5Screate_simple(2, VDSH5dims, null);
+ H5dcplid = H5.H5Pcreate(HDF5Constants.H5P_DATASET_CREATE);
H5.H5Pset_fill_value(H5dcplid, HDF5Constants.H5T_NATIVE_INT, fill_value);
}
catch (Throwable err) {
@@ -151,25 +166,42 @@ public class TestH5Pvirtual {
}
@Before
- public void createH5file()
- throws NullPointerException, HDF5Exception {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ public void createH5file() throws NullPointerException, HDF5Exception
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
_createH5File(HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
H5dapl_id = H5.H5Pcreate(HDF5Constants.H5P_DATASET_ACCESS);
assertTrue("TestH5Pvirtual.createH5file: H5.H5Pcreate: ", H5dapl_id > 0);
- }
+ }
@After
- public void deleteH5file() throws HDF5LibraryException {
+ public void deleteH5file() throws HDF5LibraryException
+ {
if (H5dapl_id > 0)
- try {H5.H5Pclose(H5dapl_id);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(H5dapl_id);
+ }
+ catch (Exception ex) {
+ }
if (H5dcplid > 0)
- try {H5.H5Pclose(H5dcplid);} catch (Exception ex) {}
+ try {
+ H5.H5Pclose(H5dcplid);
+ }
+ catch (Exception ex) {
+ }
if (H5dsid > 0)
- try {H5.H5Sclose(H5dsid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(H5dsid);
+ }
+ catch (Exception ex) {
+ }
if (H5fid > 0)
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
for (int i = 0; i < 3; i++) {
_deleteFile(SRC_FILE[i]);
}
@@ -178,12 +210,13 @@ public class TestH5Pvirtual {
}
@Test
- public void testH5Pvirtual_storage() {
+ public void testH5Pvirtual_storage()
+ {
int layout = -1;
H5did = _createDataset(H5fid, H5dsid, "VDS", H5dcplid, H5dapl_id);
try {
- layout = H5.H5Pget_layout (H5dcplid);
+ layout = H5.H5Pget_layout(H5dcplid);
}
catch (Throwable err) {
err.printStackTrace();
@@ -191,15 +224,24 @@ public class TestH5Pvirtual {
}
finally {
if (H5dssid > 0)
- try {H5.H5Sclose(H5dssid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(H5dssid);
+ }
+ catch (Exception ex) {
+ }
if (H5did > 0)
- try {H5.H5Dclose(H5did);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5did);
+ }
+ catch (Exception ex) {
+ }
}
assertTrue("testH5Pvirtual_storage", HDF5Constants.H5D_VIRTUAL == layout);
}
@Test
- public void testH5Pget_virtual_count() {
+ public void testH5Pget_virtual_count()
+ {
long num_map = -1;
H5did = _createDataset(H5fid, H5dsid, "VDS", H5dcplid, H5dapl_id);
@@ -212,21 +254,30 @@ public class TestH5Pvirtual {
}
finally {
if (H5dssid > 0)
- try {H5.H5Sclose(H5dssid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(H5dssid);
+ }
+ catch (Exception ex) {
+ }
if (H5did > 0)
- try {H5.H5Dclose(H5did);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5did);
+ }
+ catch (Exception ex) {
+ }
}
- assertTrue("testH5Pget_virtual_count: "+num_map, num_map >= 0);
+ assertTrue("testH5Pget_virtual_count: " + num_map, num_map >= 0);
assertEquals(3, num_map);
}
@Test
- public void testH5Pget_source_filename() throws Throwable {
+ public void testH5Pget_source_filename() throws Throwable
+ {
String filename = null;
H5did = _createDataset(H5fid, H5dsid, "VDS", H5dcplid, H5dapl_id);
try {
- filename = (H5.H5Pget_virtual_filename (H5dcplid, 2));
+ filename = (H5.H5Pget_virtual_filename(H5dcplid, 2));
}
catch (Throwable err) {
err.printStackTrace();
@@ -234,20 +285,29 @@ public class TestH5Pvirtual {
}
finally {
if (H5dssid > 0)
- try {H5.H5Sclose(H5dssid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(H5dssid);
+ }
+ catch (Exception ex) {
+ }
if (H5did > 0)
- try {H5.H5Dclose(H5did);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5did);
+ }
+ catch (Exception ex) {
+ }
}
- assertTrue("testH5Pget_source_filename: "+filename, filename.compareTo("v-2.h5") == 0);
+ assertTrue("testH5Pget_source_filename: " + filename, filename.compareTo("v-2.h5") == 0);
}
@Test
- public void testH5Pget_source_datasetname() throws Throwable {
+ public void testH5Pget_source_datasetname() throws Throwable
+ {
String datasetname = null;
H5did = _createDataset(H5fid, H5dsid, "VDS", H5dcplid, H5dapl_id);
try {
- datasetname = H5.H5Pget_virtual_dsetname (H5dcplid, 1);
+ datasetname = H5.H5Pget_virtual_dsetname(H5dcplid, 1);
}
catch (Throwable err) {
err.printStackTrace();
@@ -255,21 +315,30 @@ public class TestH5Pvirtual {
}
finally {
if (H5dssid > 0)
- try {H5.H5Sclose(H5dssid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(H5dssid);
+ }
+ catch (Exception ex) {
+ }
if (H5did > 0)
- try {H5.H5Dclose(H5did);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5did);
+ }
+ catch (Exception ex) {
+ }
}
- assertTrue("testH5Pget_source_datasetname: "+datasetname, datasetname.compareTo("B") == 0);
+ assertTrue("testH5Pget_source_datasetname: " + datasetname, datasetname.compareTo("B") == 0);
}
@Test
- public void testH5Pget_selection_source_dataset() throws Throwable {
- long src_space = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Pget_selection_source_dataset() throws Throwable
+ {
+ long src_space = HDF5Constants.H5I_INVALID_HID;
long src_selection = -1;
H5did = _createDataset(H5fid, H5dsid, "VDS", H5dcplid, H5dapl_id);
try {
- src_space = H5.H5Pget_virtual_srcspace (H5dcplid, 0);
+ src_space = H5.H5Pget_virtual_srcspace(H5dcplid, 0);
src_selection = H5.H5Sget_select_type(src_space);
}
catch (Throwable err) {
@@ -278,17 +347,30 @@ public class TestH5Pvirtual {
}
finally {
if (src_space > 0)
- try {H5.H5Sclose(src_space);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(src_space);
+ }
+ catch (Exception ex) {
+ }
if (H5dssid > 0)
- try {H5.H5Sclose(H5dssid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(H5dssid);
+ }
+ catch (Exception ex) {
+ }
if (H5did > 0)
- try {H5.H5Dclose(H5did);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5did);
+ }
+ catch (Exception ex) {
+ }
}
assertTrue("testH5Pget_selection_source_dataset", src_selection == HDF5Constants.H5S_SEL_ALL);
}
@Test
- public void testH5Pget_mapping_parameters() {
+ public void testH5Pget_mapping_parameters()
+ {
long num_map = -1;
H5did = _createDataset(H5fid, H5dsid, "VDS", H5dcplid, H5dapl_id);
@@ -302,22 +384,22 @@ public class TestH5Pvirtual {
}
for (int i = 0; i < num_map; i++) {
int vselection = -1;
- long vspace = -1;
- long nblocks; // Number of hyperslab blocks
- long blocks[] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}; // List of blocks
- long[] start = {i, 0};
- long[] stride = {1, 1};
- long[] count = {1, 1};
- long[] block = {1, VDSDIM_Y};
- long q_start[] = new long[2];
- long q_stride[] = new long[2];
- long q_count[] = new long[2];
- long q_block[] = new long[2];
+ long vspace = -1;
+ long nblocks; // Number of hyperslab blocks
+ long blocks[] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}; // List of blocks
+ long[] start = {i, 0};
+ long[] stride = {1, 1};
+ long[] count = {1, 1};
+ long[] block = {1, VDSDIM_Y};
+ long q_start[] = new long[2];
+ long q_stride[] = new long[2];
+ long q_count[] = new long[2];
+ long q_block[] = new long[2];
boolean is_regular = false;
try {
try {
- vspace = H5.H5Pget_virtual_vspace (H5dcplid, i);
+ vspace = H5.H5Pget_virtual_vspace(H5dcplid, i);
}
catch (Throwable err) {
err.printStackTrace();
@@ -330,7 +412,8 @@ public class TestH5Pvirtual {
err.printStackTrace();
fail("H5.H5Sget_select_type: " + err);
}
- assertTrue("testH5Pget_mapping_parameters["+i+"]", vselection == HDF5Constants.H5S_SEL_HYPERSLABS);
+ assertTrue("testH5Pget_mapping_parameters[" + i + "]",
+ vselection == HDF5Constants.H5S_SEL_HYPERSLABS);
// Verify that there is only one block
nblocks = H5.H5Sget_select_hyper_nblocks(vspace);
@@ -340,30 +423,38 @@ public class TestH5Pvirtual {
H5.H5Sget_select_hyper_blocklist(vspace, 0, nblocks, blocks);
// Verify that the correct block is defined
- assertTrue("H5.H5Sget_select_hyper_blocklist["+i+"] [0]: "+blocks[0], start[0] == blocks[0]);
- assertTrue("H5.H5Sget_select_hyper_blocklist["+i+"] [1]: "+blocks[1], start[1] == blocks[1]);
- assertTrue("H5.H5Sget_select_hyper_blocklist["+i+"] [2]: "+blocks[2], (block[0]-1+i) == blocks[2]);
- assertTrue("H5.H5Sget_select_hyper_blocklist["+i+"] [3]: "+blocks[3], (block[1]-1) == blocks[3]);
+ assertTrue("H5.H5Sget_select_hyper_blocklist[" + i + "] [0]: " + blocks[0],
+ start[0] == blocks[0]);
+ assertTrue("H5.H5Sget_select_hyper_blocklist[" + i + "] [1]: " + blocks[1],
+ start[1] == blocks[1]);
+ assertTrue("H5.H5Sget_select_hyper_blocklist[" + i + "] [2]: " + blocks[2],
+ (block[0] - 1 + i) == blocks[2]);
+ assertTrue("H5.H5Sget_select_hyper_blocklist[" + i + "] [3]: " + blocks[3],
+ (block[1] - 1) == blocks[3]);
// We also can use new APIs to get start, stride, count and block
is_regular = H5.H5Sis_regular_hyperslab(vspace);
assertTrue("H5.H5Sis_regular_hyperslab", is_regular);
- H5.H5Sget_regular_hyperslab (vspace, q_start, q_stride, q_count, q_block);
+ H5.H5Sget_regular_hyperslab(vspace, q_start, q_stride, q_count, q_block);
// Verify the hyperslab parameters
- for(int u = 0; u < 2; u++) {
+ for (int u = 0; u < 2; u++) {
assertTrue("H5Sget_regular_hyperslab, start", start[u] == q_start[u]);
assertTrue("H5Sget_regular_hyperslab, stride", stride[u] == q_stride[u]);
assertTrue("H5Sget_regular_hyperslab, count", count[u] == q_count[u]);
assertTrue("H5Sget_regular_hyperslab, block", block[u] == q_block[u]);
}
- }
+ }
catch (Throwable err) {
err.printStackTrace();
fail("H5.testH5Pget_mapping_parameters: " + err);
}
finally {
if (vspace > 0)
- try {H5.H5Sclose(vspace);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(vspace);
+ }
+ catch (Exception ex) {
+ }
}
}
}
@@ -373,16 +464,25 @@ public class TestH5Pvirtual {
}
finally {
if (H5dssid > 0)
- try {H5.H5Sclose(H5dssid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(H5dssid);
+ }
+ catch (Exception ex) {
+ }
if (H5did > 0)
- try {H5.H5Dclose(H5did);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5did);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Pset_get_virtual_view() {
+ public void testH5Pset_get_virtual_view()
+ {
int ret_val = -1;
- H5did = _createDataset(H5fid, H5dsid, "VDS", H5dcplid, H5dapl_id);
+ H5did = _createDataset(H5fid, H5dsid, "VDS", H5dcplid, H5dapl_id);
try {
ret_val = H5.H5Pget_virtual_view(H5dapl_id);
assertTrue("H5Pget_virtual_view", ret_val >= 0);
@@ -398,16 +498,25 @@ public class TestH5Pvirtual {
}
finally {
if (H5dssid > 0)
- try {H5.H5Sclose(H5dssid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(H5dssid);
+ }
+ catch (Exception ex) {
+ }
if (H5did > 0)
- try {H5.H5Dclose(H5did);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5did);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Pset_get_virtual_printf_gap() {
+ public void testH5Pset_get_virtual_printf_gap()
+ {
long ret_val = -1;
- H5did = _createDataset(H5fid, H5dsid, "VDS", H5dcplid, H5dapl_id);
+ H5did = _createDataset(H5fid, H5dsid, "VDS", H5dcplid, H5dapl_id);
try {
ret_val = H5.H5Pget_virtual_printf_gap(H5dapl_id);
assertTrue("H5Pget_virtual_printf_gap", ret_val >= 0);
@@ -423,14 +532,23 @@ public class TestH5Pvirtual {
}
finally {
if (H5dssid > 0)
- try {H5.H5Sclose(H5dssid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(H5dssid);
+ }
+ catch (Exception ex) {
+ }
if (H5did > 0)
- try {H5.H5Dclose(H5did);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5did);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Pset_virtual_prefix() {
+ public void testH5Pset_virtual_prefix()
+ {
String prefix = "tmp";
try {
H5.H5Pset_virtual_prefix(H5dapl_id, prefix);
@@ -442,14 +560,16 @@ public class TestH5Pvirtual {
}
@Test(expected = NullPointerException.class)
- public void testH5Pset_virtual_prefix_null() throws Throwable{
+ public void testH5Pset_virtual_prefix_null() throws Throwable
+ {
H5.H5Pset_virtual_prefix(H5dapl_id, null);
}
@Test
- public void testH5Pget_virtual_prefix() {
+ public void testH5Pget_virtual_prefix()
+ {
String prefix = "tmp";
- String pre = "";
+ String pre = "";
try {
H5.H5Pset_virtual_prefix(H5dapl_id, prefix);
diff --git a/java/test/TestH5R.java b/java/test/TestH5R.java
index 031b8e4..4e610bc 100644
--- a/java/test/TestH5R.java
+++ b/java/test/TestH5R.java
@@ -23,8 +23,8 @@ import java.io.File;
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
import hdf.hdf5lib.exceptions.HDF5Exception;
-import hdf.hdf5lib.exceptions.HDF5LibraryException;
import hdf.hdf5lib.exceptions.HDF5FunctionArgumentException;
+import hdf.hdf5lib.exceptions.HDF5LibraryException;
import org.junit.After;
import org.junit.Before;
@@ -34,38 +34,46 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5R {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
private static final String H5_FILE = "testH5R.h5";
- private static final int DIM_X = 4;
- private static final int DIM_Y = 6;
- long H5fid = HDF5Constants.H5I_INVALID_HID;
- long H5dsid = HDF5Constants.H5I_INVALID_HID;
- long H5did = HDF5Constants.H5I_INVALID_HID;
- long H5gid = HDF5Constants.H5I_INVALID_HID;
- long H5did2 = HDF5Constants.H5I_INVALID_HID;
- long[] H5dims = { DIM_X, DIM_Y };
- int[][] dset_data = new int[DIM_X][DIM_Y];
- int FILLVAL = 99;
-
- private final void _deleteFile(String filename) {
+ private static final int DIM_X = 4;
+ private static final int DIM_Y = 6;
+ long H5fid = HDF5Constants.H5I_INVALID_HID;
+ long H5dsid = HDF5Constants.H5I_INVALID_HID;
+ long H5did = HDF5Constants.H5I_INVALID_HID;
+ long H5gid = HDF5Constants.H5I_INVALID_HID;
+ long H5did2 = HDF5Constants.H5I_INVALID_HID;
+ long[] H5dims = {DIM_X, DIM_Y};
+ int[][] dset_data = new int[DIM_X][DIM_Y];
+ int FILLVAL = 99;
+
+ private final void _deleteFile(String filename)
+ {
File file = null;
try {
file = new File(filename);
}
- catch (Throwable err) {}
+ catch (Throwable err) {
+ }
if (file.exists()) {
- try {file.delete();} catch (SecurityException e) {e.printStackTrace();}
+ try {
+ file.delete();
+ }
+ catch (SecurityException e) {
+ e.printStackTrace();
+ }
}
assertFalse("TestH5R._deleteFile file still exists ", file.exists());
}
- private final long _createDataset(long fid, long dsid, String name, long dapl) {
+ private final long _createDataset(long fid, long dsid, String name, long dapl)
+ {
long did = HDF5Constants.H5I_INVALID_HID;
try {
- did = H5.H5Dcreate(fid, name,
- HDF5Constants.H5T_STD_I32BE, dsid,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, dapl);
+ did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32BE, dsid, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT, dapl);
}
catch (Throwable err) {
err.printStackTrace();
@@ -76,34 +84,35 @@ public class TestH5R {
return did;
}
- private final long _createGroup(long fid, String name) {
+ private final long _createGroup(long fid, String name)
+ {
long gid = HDF5Constants.H5I_INVALID_HID;
try {
- gid = H5.H5Gcreate(fid, name, HDF5Constants.H5P_DEFAULT,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ gid = H5.H5Gcreate(fid, name, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Gcreate: " + err);
}
- assertTrue("TestH5R._createGroup: ",gid > 0);
+ assertTrue("TestH5R._createGroup: ", gid > 0);
return gid;
}
@Before
- public void createH5file()
- throws NullPointerException, HDF5Exception {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ public void createH5file() throws NullPointerException, HDF5Exception
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
try {
- H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
H5dsid = H5.H5Screate_simple(2, H5dims, null);
- H5gid = _createGroup(H5fid, "Group1");
+ H5gid = _createGroup(H5fid, "Group1");
H5did2 = _createDataset(H5gid, H5dsid, "dset2", HDF5Constants.H5P_DEFAULT);
- H5did = _createDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DEFAULT);
+ H5did = _createDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DEFAULT);
// Initialize the dataset.
for (int indx = 0; indx < DIM_X; indx++)
@@ -112,38 +121,57 @@ public class TestH5R {
try {
if (H5did >= 0)
- H5.H5Dwrite(H5did, HDF5Constants.H5T_NATIVE_INT,
- HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, dset_data[0]);
+ H5.H5Dwrite(H5did, HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, dset_data[0]);
}
catch (Exception e) {
e.printStackTrace();
}
-
}
catch (Throwable err) {
err.printStackTrace();
fail("TestH5R.createH5file: " + err);
}
- assertTrue("TestH5R.createH5file: H5.H5Fcreate: ",H5fid > 0);
- assertTrue("TestH5R.createH5file: H5.H5Screate_simple: ",H5dsid > 0);
- assertTrue("TestH5R.createH5file: _createDataset: ",H5did > 0);
+ assertTrue("TestH5R.createH5file: H5.H5Fcreate: ", H5fid > 0);
+ assertTrue("TestH5R.createH5file: H5.H5Screate_simple: ", H5dsid > 0);
+ assertTrue("TestH5R.createH5file: _createDataset: ", H5did > 0);
H5.H5Fflush(H5fid, HDF5Constants.H5F_SCOPE_LOCAL);
}
@After
- public void deleteH5file() throws HDF5LibraryException {
+ public void deleteH5file() throws HDF5LibraryException
+ {
if (H5dsid > 0)
- try {H5.H5Sclose(H5dsid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(H5dsid);
+ }
+ catch (Exception ex) {
+ }
if (H5did > 0)
- try {H5.H5Dclose(H5did);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5did);
+ }
+ catch (Exception ex) {
+ }
if (H5fid > 0)
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
if (H5gid > 0)
- try {H5.H5Gclose(H5gid);} catch (Exception ex) {}
+ try {
+ H5.H5Gclose(H5gid);
+ }
+ catch (Exception ex) {
+ }
if (H5did2 > 0)
- try {H5.H5Dclose(H5did2);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5did2);
+ }
+ catch (Exception ex) {
+ }
_deleteFile(H5_FILE);
System.out.println();
@@ -152,11 +180,12 @@ public class TestH5R {
// Test v1.12 APIs params
@Test
- public void testH5Rget_object() {
- int ref_type = HDF5Constants.H5R_OBJECT2;
- long ret_val = -1;
- byte[] ref = null;
- String name = "";
+ public void testH5Rget_object()
+ {
+ int ref_type = HDF5Constants.H5R_OBJECT2;
+ long ret_val = -1;
+ byte[] ref = null;
+ String name = "";
String objName = "/dset";
try {
@@ -197,9 +226,10 @@ public class TestH5R {
}
@Test
- public void testH5Rget_obj_type3() {
- int obj_type = -1;
- byte[] ref = null;
+ public void testH5Rget_obj_type3()
+ {
+ int obj_type = -1;
+ byte[] ref = null;
String objName = "/dset";
try {
@@ -222,13 +252,14 @@ public class TestH5R {
}
@Test
- public void testH5Rcreate_regionref_object() {
- byte[] ref = null;
+ public void testH5Rcreate_regionref_object()
+ {
+ byte[] ref = null;
String objName = "/dset";
- long start[] = {2,2}; // Starting location of hyperslab
- long stride[] = {1,1}; // Stride of hyperslab
- long count[] = {1,1}; // Element count of hyperslab
- long block[] = {3,3}; // Block size of hyperslab
+ long start[] = {2, 2}; // Starting location of hyperslab
+ long stride[] = {1, 1}; // Stride of hyperslab
+ long count[] = {1, 1}; // Element count of hyperslab
+ long block[] = {3, 3}; // Block size of hyperslab
// Select 3x3 hyperslab for reference
try {
@@ -249,235 +280,252 @@ public class TestH5R {
H5.H5Rdestroy(ref);
}
-// These tests need to be updated with new APIs
-// @Test//
-// public void testH5Rget_group() {
-// long loc_id = H5fid;
-// int ref_type = HDF5Constants.H5R_OBJECT2;
-// long ret_val = -1;
-// byte[] ref = null;
-// String name = "";
-// String objName = "/dset";
-//
-// try {
-// ref = H5.H5Rcreate_object(H5fid, objName, HDF5Constants.H5P_DEFAULT);
-// }
-// catch (Throwable err) {
-// err.printStackTrace();
-// fail("testH5Rget_object: H5Rcreate_object " + err);
-// }
-// try {
-// dataset_id= H5.H5Rdereference(H5fid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5R_DATASET_REGION, ref1);
-//
-// //Create reference on group
-// ref2 = H5.H5Rcreate(H5gid, "/Group1", HDF5Constants.H5R_OBJECT, -1);
-// group_id= H5.H5Rdereference(H5gid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5R_OBJECT, ref2);
-// assertNotNull(ref1);
-// assertNotNull(ref2);
-// assertTrue(dataset_id >= 0);
-// assertTrue(group_id >= 0);
-// }
-// catch (Throwable err) {
-// err.printStackTrace();
-// fail("TestH5Rdereference " + err);
-// }
-// finally {
-// try {H5.H5Dclose(dataset_id);} catch (Exception ex) {}
-// try {H5.H5Gclose(group_id);} catch (Exception ex) {}
-// }
-// }
-
-// @Test//
-// public void testH5Rget_region_dataset() {
-// long loc_id = H5fid;
-// int ref_type = HDF5Constants.H5R_OBJECT2;
-// long ret_val = -1;
-// byte[] ref = null;
-// String name = "";
-// String objName = "/dset";
-//
-// try {
-// ref = H5.H5Rcreate_object(H5fid, objName, HDF5Constants.H5P_DEFAULT);
-// }
-// catch (Throwable err) {
-// err.printStackTrace();
-// fail("testH5Rget_object: H5Rcreate_object " + err);
-// }
-// try {
-// dsid = H5.H5Rget_region(H5fid, HDF5Constants.H5R_DATASET_REGION, ref);
-// assertNotNull(ref);
-// assertTrue(dsid >= 0);
-// }
-// catch (Throwable err) {
-// err.printStackTrace();
-// fail("TestH5Rget_region: " + err);
-// }
-// finally {
-// try {H5.H5Sclose(dsid);} catch (Exception ex) {}
-// }
-// }
-
-// @Test//
-// public void testH5Rget_attr() {
-// long loc_id = H5fid;
-// int ref_type = HDF5Constants.H5R_OBJECT2;
-// long ret_val = -1;
-// byte[] ref = null;
-// String name = "";
-// String objName = "/dset";
-//
-// try {
-// ref = H5.H5Rcreate_object(H5fid, objName, HDF5Constants.H5P_DEFAULT);
-// }
-// catch (Throwable err) {
-// err.printStackTrace();
-// fail("testH5Rget_object: H5Rcreate_object " + err);
-// }
-// try {
-// dsid = H5.H5Rget_region(H5fid, HDF5Constants.H5R_DATASET_REGION, ref);
-// assertNotNull(ref);
-// assertTrue(dsid >= 0);
-// }
-// catch (Throwable err) {
-// err.printStackTrace();
-// fail("TestH5Rget_region: " + err);
-// }
-// finally {
-// try {H5.H5Sclose(dsid);} catch (Exception ex) {}
-// }
-// }
+ // These tests need to be updated with new APIs
+ // @Test//
+ // public void testH5Rget_group() {
+ // long loc_id = H5fid;
+ // int ref_type = HDF5Constants.H5R_OBJECT2;
+ // long ret_val = -1;
+ // byte[] ref = null;
+ // String name = "";
+ // String objName = "/dset";
+ //
+ // try {
+ // ref = H5.H5Rcreate_object(H5fid, objName, HDF5Constants.H5P_DEFAULT);
+ // }
+ // catch (Throwable err) {
+ // err.printStackTrace();
+ // fail("testH5Rget_object: H5Rcreate_object " + err);
+ // }
+ // try {
+ // dataset_id= H5.H5Rdereference(H5fid, HDF5Constants.H5P_DEFAULT,
+ // HDF5Constants.H5R_DATASET_REGION, ref1);
+ //
+ // //Create reference on group
+ // ref2 = H5.H5Rcreate(H5gid, "/Group1", HDF5Constants.H5R_OBJECT, -1);
+ // group_id= H5.H5Rdereference(H5gid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5R_OBJECT,
+ // ref2); assertNotNull(ref1); assertNotNull(ref2); assertTrue(dataset_id >= 0);
+ // assertTrue(group_id >= 0);
+ // }
+ // catch (Throwable err) {
+ // err.printStackTrace();
+ // fail("TestH5Rdereference " + err);
+ // }
+ // finally {
+ // try {H5.H5Dclose(dataset_id);} catch (Exception ex) {}
+ // try {H5.H5Gclose(group_id);} catch (Exception ex) {}
+ // }
+ // }
+
+ // @Test//
+ // public void testH5Rget_region_dataset() {
+ // long loc_id = H5fid;
+ // int ref_type = HDF5Constants.H5R_OBJECT2;
+ // long ret_val = -1;
+ // byte[] ref = null;
+ // String name = "";
+ // String objName = "/dset";
+ //
+ // try {
+ // ref = H5.H5Rcreate_object(H5fid, objName, HDF5Constants.H5P_DEFAULT);
+ // }
+ // catch (Throwable err) {
+ // err.printStackTrace();
+ // fail("testH5Rget_object: H5Rcreate_object " + err);
+ // }
+ // try {
+ // dsid = H5.H5Rget_region(H5fid, HDF5Constants.H5R_DATASET_REGION, ref);
+ // assertNotNull(ref);
+ // assertTrue(dsid >= 0);
+ // }
+ // catch (Throwable err) {
+ // err.printStackTrace();
+ // fail("TestH5Rget_region: " + err);
+ // }
+ // finally {
+ // try {H5.H5Sclose(dsid);} catch (Exception ex) {}
+ // }
+ // }
+
+ // @Test//
+ // public void testH5Rget_attr() {
+ // long loc_id = H5fid;
+ // int ref_type = HDF5Constants.H5R_OBJECT2;
+ // long ret_val = -1;
+ // byte[] ref = null;
+ // String name = "";
+ // String objName = "/dset";
+ //
+ // try {
+ // ref = H5.H5Rcreate_object(H5fid, objName, HDF5Constants.H5P_DEFAULT);
+ // }
+ // catch (Throwable err) {
+ // err.printStackTrace();
+ // fail("testH5Rget_object: H5Rcreate_object " + err);
+ // }
+ // try {
+ // dsid = H5.H5Rget_region(H5fid, HDF5Constants.H5R_DATASET_REGION, ref);
+ // assertNotNull(ref);
+ // assertTrue(dsid >= 0);
+ // }
+ // catch (Throwable err) {
+ // err.printStackTrace();
+ // fail("TestH5Rget_region: " + err);
+ // }
+ // finally {
+ // try {H5.H5Sclose(dsid);} catch (Exception ex) {}
+ // }
+ // }
// Test parameters to H5Rcreate_object
@Test(expected = NullPointerException.class)
- public void testH5Rcreate_object_Nullname() throws Throwable {
+ public void testH5Rcreate_object_Nullname() throws Throwable
+ {
String name = null;
H5.H5Rcreate_object(H5fid, name, HDF5Constants.H5P_DEFAULT);
}
@Test(expected = HDF5FunctionArgumentException.class)
- public void testH5Rget_name_Invalidloc() throws Throwable {
- String name= "";
+ public void testH5Rget_name_Invalidloc() throws Throwable
+ {
+ String name = "";
H5.H5Rcreate_object(-1, name, HDF5Constants.H5P_DEFAULT);
}
// Test parameters to H5Rcreate_region
@Test(expected = NullPointerException.class)
- public void testH5Rcreate_region_Nullname() throws Throwable {
+ public void testH5Rcreate_region_Nullname() throws Throwable
+ {
String name = null;
H5.H5Rcreate_region(H5fid, name, -1, HDF5Constants.H5P_DEFAULT);
}
@Test(expected = HDF5FunctionArgumentException.class)
- public void testH5Rcreate_region_Invalidloc() throws Throwable {
- String name= "";
+ public void testH5Rcreate_region_Invalidloc() throws Throwable
+ {
+ String name = "";
H5.H5Rcreate_region(-1, name, -1, HDF5Constants.H5P_DEFAULT);
}
// Test parameters to H5Rcreate_attr
@Test(expected = NullPointerException.class)
- public void testH5Rcreate_attr_Nullname() throws Throwable {
- String name = null;
+ public void testH5Rcreate_attr_Nullname() throws Throwable
+ {
+ String name = null;
String attrname = "";
H5.H5Rcreate_attr(H5fid, name, attrname, HDF5Constants.H5P_DEFAULT);
}
@Test(expected = NullPointerException.class)
- public void testH5Rcreate_attr_Nullattrname() throws Throwable {
- String name = "";
+ public void testH5Rcreate_attr_Nullattrname() throws Throwable
+ {
+ String name = "";
String attrname = null;
H5.H5Rcreate_attr(H5fid, name, attrname, HDF5Constants.H5P_DEFAULT);
}
@Test(expected = HDF5FunctionArgumentException.class)
- public void testH5Rcreate_attr_Invalidloc() throws Throwable {
- String name= "";
- String attrname= "";
+ public void testH5Rcreate_attr_Invalidloc() throws Throwable
+ {
+ String name = "";
+ String attrname = "";
H5.H5Rcreate_attr(-1, name, attrname, HDF5Constants.H5P_DEFAULT);
}
// Test parameters to H5Rdestroy
@Test(expected = NullPointerException.class)
- public void testH5Rdestroy_Nullref() throws Throwable {
+ public void testH5Rdestroy_Nullref() throws Throwable
+ {
byte[] ref = null;
H5.H5Rdestroy(ref);
}
// Test parameters to H5Rget_type
@Test(expected = NullPointerException.class)
- public void testH5Rget_type_Nullref() throws Throwable {
+ public void testH5Rget_type_Nullref() throws Throwable
+ {
byte[] ref = null;
H5.H5Rget_type(ref);
}
// Test parameters to H5Requal
@Test(expected = NullPointerException.class)
- public void testH5Requal_Nullref1() throws Throwable {
+ public void testH5Requal_Nullref1() throws Throwable
+ {
byte[] ref1 = null;
- byte[] ref2 = {0,0,0,0};
+ byte[] ref2 = {0, 0, 0, 0};
H5.H5Requal(ref1, ref2);
}
@Test(expected = NullPointerException.class)
- public void testH5Requal_Nullref2() throws Throwable {
- byte[] ref1 = {0,0,0,0};
+ public void testH5Requal_Nullref2() throws Throwable
+ {
+ byte[] ref1 = {0, 0, 0, 0};
byte[] ref2 = null;
H5.H5Requal(ref1, ref2);
}
// Test parameters to H5Rcopy
@Test(expected = NullPointerException.class)
- public void testH5Rcopy_Nullref1() throws Throwable {
+ public void testH5Rcopy_Nullref1() throws Throwable
+ {
byte[] ref1 = null;
byte[] ref2 = H5.H5Rcopy(ref1);
}
// Test parameters to H5Ropen_object
@Test(expected = NullPointerException.class)
- public void testH5Ropen_object_Nullref() throws Throwable {
+ public void testH5Ropen_object_Nullref() throws Throwable
+ {
byte[] ref = null;
H5.H5Ropen_object(ref, -1, -1);
}
// Test parameters to H5Ropen_region
@Test(expected = NullPointerException.class)
- public void testH5Ropen_region_Nullref() throws Throwable {
+ public void testH5Ropen_region_Nullref() throws Throwable
+ {
byte[] ref = null;
H5.H5Ropen_region(ref, -1, -1);
}
// Test parameters to H5Ropen_attr
@Test(expected = NullPointerException.class)
- public void testH5Ropen_attr_Nullref() throws Throwable {
+ public void testH5Ropen_attr_Nullref() throws Throwable
+ {
byte[] ref = null;
H5.H5Ropen_attr(ref, -1, -1);
}
// Test parameters to H5Rget_obj_type3
@Test(expected = NullPointerException.class)
- public void testH5Rget_obj_type3_Nullref() throws Throwable {
+ public void testH5Rget_obj_type3_Nullref() throws Throwable
+ {
byte[] ref = null;
H5.H5Rget_obj_type3(ref, -1);
}
// Test parameters to H5Rget_file_name
@Test(expected = NullPointerException.class)
- public void testH5Rget_file_name_Nullref() throws Throwable {
+ public void testH5Rget_file_name_Nullref() throws Throwable
+ {
byte[] ref = null;
H5.H5Rget_file_name(ref);
}
// Test parameters to H5Rget_obj_name
@Test(expected = NullPointerException.class)
- public void testH5Rget_obj_name_Nullref() throws Throwable {
+ public void testH5Rget_obj_name_Nullref() throws Throwable
+ {
byte[] ref = null;
H5.H5Rget_obj_name(ref, -1);
}
// Test parameters to H5Rget_attr_name
@Test(expected = NullPointerException.class)
- public void testH5Rget_attr_name_Nullref() throws Throwable {
+ public void testH5Rget_attr_name_Nullref() throws Throwable
+ {
byte[] ref = null;
H5.H5Rget_attr_name(ref);
}
-
}
diff --git a/java/test/TestH5Rref.java b/java/test/TestH5Rref.java
index 5733aae..520de74 100644
--- a/java/test/TestH5Rref.java
+++ b/java/test/TestH5Rref.java
@@ -23,8 +23,8 @@ import java.io.File;
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
import hdf.hdf5lib.exceptions.HDF5Exception;
-import hdf.hdf5lib.exceptions.HDF5LibraryException;
import hdf.hdf5lib.exceptions.HDF5FunctionArgumentException;
+import hdf.hdf5lib.exceptions.HDF5LibraryException;
import org.junit.After;
import org.junit.Before;
@@ -34,14 +34,16 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5Rref {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
private static final String H5_DREG_FILE = "trefer_reg.h5";
private static final String H5_AREG_FILE = "trefer_attr.h5";
- long H5fid = HDF5Constants.H5I_INVALID_HID;
- long H5dsid = HDF5Constants.H5I_INVALID_HID;
- long H5did = HDF5Constants.H5I_INVALID_HID;
+ long H5fid = HDF5Constants.H5I_INVALID_HID;
+ long H5dsid = HDF5Constants.H5I_INVALID_HID;
+ long H5did = HDF5Constants.H5I_INVALID_HID;
- private boolean byteArrayCheck(final byte[] array) {
+ private boolean byteArrayCheck(final byte[] array)
+ {
for (byte b : array) {
if (b != 0) {
return false;
@@ -50,67 +52,81 @@ public class TestH5Rref {
return true;
}
- public void openH5file(String filename, String dsetname) {
- try {
- H5fid = H5.H5Fopen(filename,
- HDF5Constants.H5F_ACC_RDONLY, HDF5Constants.H5P_DEFAULT);
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("TestH5R._openH5file: " + err);
- }
- assertTrue("TestH5R._openH5file: H5.H5Fopen: ", H5fid >= 0);
- try {
- H5did = H5.H5Dopen(H5fid, dsetname, HDF5Constants.H5P_DEFAULT);
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("TestH5R._openH5file: " + err);
- }
- assertTrue("TestH5R._openH5file: H5.H5Dopen: ", H5did >= 0);
- try {
- H5dsid = H5.H5Dget_space(H5did);
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("TestH5R._openH5file: " + err);
- }
- assertTrue("TestH5R._openH5file: H5.H5Screate_simple: ",H5dsid > 0);
+ public void openH5file(String filename, String dsetname)
+ {
+ try {
+ H5fid = H5.H5Fopen(filename, HDF5Constants.H5F_ACC_RDONLY, HDF5Constants.H5P_DEFAULT);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("TestH5R._openH5file: " + err);
+ }
+ assertTrue("TestH5R._openH5file: H5.H5Fopen: ", H5fid >= 0);
+ try {
+ H5did = H5.H5Dopen(H5fid, dsetname, HDF5Constants.H5P_DEFAULT);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("TestH5R._openH5file: " + err);
+ }
+ assertTrue("TestH5R._openH5file: H5.H5Dopen: ", H5did >= 0);
+ try {
+ H5dsid = H5.H5Dget_space(H5did);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("TestH5R._openH5file: " + err);
+ }
+ assertTrue("TestH5R._openH5file: H5.H5Screate_simple: ", H5dsid > 0);
}
@After
- public void closeH5file() throws HDF5LibraryException {
+ public void closeH5file() throws HDF5LibraryException
+ {
if (H5did >= 0)
- try {H5.H5Dclose(H5did);} catch (Exception ex) {}
+ try {
+ H5.H5Dclose(H5did);
+ }
+ catch (Exception ex) {
+ }
if (H5dsid > 0)
- try {H5.H5Sclose(H5dsid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(H5dsid);
+ }
+ catch (Exception ex) {
+ }
if (H5fid > 0)
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
- H5fid = HDF5Constants.H5I_INVALID_HID;
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
+ H5fid = HDF5Constants.H5I_INVALID_HID;
H5dsid = HDF5Constants.H5I_INVALID_HID;
- H5did = HDF5Constants.H5I_INVALID_HID;
+ H5did = HDF5Constants.H5I_INVALID_HID;
System.out.println();
}
@Before
- public void verifyCount()
- throws NullPointerException, HDF5Exception {
- assertTrue("H5 open ids is 0", H5.getOpenIDCount()==0);
+ public void verifyCount() throws NullPointerException, HDF5Exception
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
}
// Test v1.12 APIs params
@Test
- public void testH5Rget_object() {
- int ref_type = HDF5Constants.H5R_OBJECT1;
- long f_type = HDF5Constants.H5I_INVALID_HID;
- int obj_type = -1;
- int ndims = 1;
- long ret_val = -1;
+ public void testH5Rget_object()
+ {
+ int ref_type = HDF5Constants.H5R_OBJECT1;
+ long f_type = HDF5Constants.H5I_INVALID_HID;
+ int obj_type = -1;
+ int ndims = 1;
+ long ret_val = -1;
byte[][] refbuf = null;
- String name = "";
- String objName = "/DS_NA";
+ String name = "";
+ String objName = "/DS_NA";
try {
openH5file(H5_DREG_FILE, objName);
@@ -120,18 +136,22 @@ public class TestH5Rref {
fail("testH5Rget_object: openH5file: " + err);
}
try {
- f_type = H5.H5Dget_type(H5did);
+ f_type = H5.H5Dget_type(H5did);
int result = H5.H5Tget_class(f_type);
assertTrue("testH5Rget_object: H5Tget_class", result > 0);
String class_name = H5.H5Tget_class_name(result);
- assertTrue("testH5Rget_object: H5Tget_class", class_name.compareTo("H5T_REFERENCE")==0);
+ assertTrue("testH5Rget_object: H5Tget_class", class_name.compareTo("H5T_REFERENCE") == 0);
}
catch (Throwable err) {
err.printStackTrace();
fail("testH5Rget_object: " + err);
}
finally {
- try {H5.H5Tclose(f_type);} catch (Exception ex) {}
+ try {
+ H5.H5Tclose(f_type);
+ }
+ catch (Exception ex) {
+ }
}
try {
ndims = (int)H5.H5Sget_simple_extent_npoints(H5dsid);
@@ -143,9 +163,8 @@ public class TestH5Rref {
refbuf = new byte[ndims][HDF5Constants.H5R_REF_BUF_SIZE];
// Read the reference from the dataset.
try {
- H5.H5Dread(H5did, HDF5Constants.H5T_STD_REF,
- HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, refbuf);
+ H5.H5Dread(H5did, HDF5Constants.H5T_STD_REF, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5P_DEFAULT, refbuf);
}
catch (Exception err) {
err.printStackTrace();
@@ -155,7 +174,7 @@ public class TestH5Rref {
for (int i = 0; i < ndims; i++) {
try {
ret_val = H5.H5Rget_type(refbuf[i]);
- assertTrue("testH5Rget_object: H5Rget_type["+i+"]="+ret_val, ret_val == ref_type);
+ assertTrue("testH5Rget_object: H5Rget_type[" + i + "]=" + ret_val, ret_val == ref_type);
if (!byteArrayCheck(refbuf[i])) {
try {
obj_type = H5.H5Rget_obj_type3(refbuf[i], HDF5Constants.H5P_DEFAULT);
@@ -178,14 +197,15 @@ public class TestH5Rref {
}
@Test
- public void testH5Rget_obj_type3() {
- long f_type = HDF5Constants.H5I_INVALID_HID;
- int ref_type = HDF5Constants.H5R_DATASET_REGION2;
- int obj_type = -1;
- int ndims = 1;
- long ret_val = -1;
+ public void testH5Rget_obj_type3()
+ {
+ long f_type = HDF5Constants.H5I_INVALID_HID;
+ int ref_type = HDF5Constants.H5R_DATASET_REGION2;
+ int obj_type = -1;
+ int ndims = 1;
+ long ret_val = -1;
byte[][] refbuf = null;
- String objName = "/Dataset1";
+ String objName = "/Dataset1";
try {
openH5file(H5_DREG_FILE, objName);
@@ -195,18 +215,23 @@ public class TestH5Rref {
fail("testH5Rget_obj_type3: openH5file: " + err);
}
try {
- f_type = H5.H5Dget_type(H5did);
+ f_type = H5.H5Dget_type(H5did);
int result = H5.H5Tget_class(f_type);
assertTrue("testH5Rget_obj_type3: H5Tget_class", result > 0);
String class_name = H5.H5Tget_class_name(result);
- assertTrue("testH5Rget_obj_type3: H5Tget_class="+class_name, class_name.compareTo("H5T_REFERENCE")==0);
+ assertTrue("testH5Rget_obj_type3: H5Tget_class=" + class_name,
+ class_name.compareTo("H5T_REFERENCE") == 0);
}
catch (Throwable err) {
err.printStackTrace();
fail("testH5Rget_obj_type3: " + err);
}
finally {
- try {H5.H5Tclose(f_type);} catch (Exception ex) {}
+ try {
+ H5.H5Tclose(f_type);
+ }
+ catch (Exception ex) {
+ }
}
try {
ndims = (int)H5.H5Sget_simple_extent_npoints(H5dsid);
@@ -218,9 +243,8 @@ public class TestH5Rref {
refbuf = new byte[ndims][HDF5Constants.H5R_REF_BUF_SIZE];
// Read the reference from the dataset.
try {
- H5.H5Dread(H5did, HDF5Constants.H5T_STD_REF,
- HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, refbuf);
+ H5.H5Dread(H5did, HDF5Constants.H5T_STD_REF, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5P_DEFAULT, refbuf);
}
catch (Exception err) {
err.printStackTrace();
@@ -230,7 +254,7 @@ public class TestH5Rref {
for (int i = 0; i < ndims; i++) {
try {
ret_val = H5.H5Rget_type(refbuf[i]);
- assertTrue("testH5Rget_obj_type3: H5Rget_type["+i+"]="+ret_val, ret_val == ref_type);
+ assertTrue("testH5Rget_obj_type3: H5Rget_type[" + i + "]=" + ret_val, ret_val == ref_type);
if (!byteArrayCheck(refbuf[i])) {
try {
obj_type = H5.H5Rget_obj_type3(refbuf[i], HDF5Constants.H5P_DEFAULT);
@@ -252,312 +276,341 @@ public class TestH5Rref {
}
}
- @Test
- public void testH5Rget_region_dataset() {
- long f_type = HDF5Constants.H5I_INVALID_HID;
- long loc_id = HDF5Constants.H5I_INVALID_HID;
- long loc_sid = HDF5Constants.H5I_INVALID_HID;
- int ref_type = HDF5Constants.H5R_DATASET_REGION2;
- int ndims = 1;
- long ret_val = -1;
- byte[][] refbuf = null;
- String name = "";
- String objName = "/Dataset1";
-
- try {
- openH5file(H5_DREG_FILE, objName);
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("testH5Rget_region_dataset: openH5file: " + err);
- }
- try {
- f_type = H5.H5Dget_type(H5did);
- int result = H5.H5Tget_class(f_type);
- assertTrue("testH5Rget_region_dataset: H5Tget_class", result > 0);
- String class_name = H5.H5Tget_class_name(result);
- assertTrue("testH5Rget_region_dataset: H5Tget_class="+class_name, class_name.compareTo("H5T_REFERENCE")==0);
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("testH5Rget_region_dataset: " + err);
- }
- finally {
- try {H5.H5Tclose(f_type);} catch (Exception ex) {}
- }
- try {
- ndims = (int)H5.H5Sget_simple_extent_npoints(H5dsid);
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("testH5Rget_region_dataset: H5Sget_simple_extent_ndims: " + err);
- }
- refbuf = new byte[ndims][HDF5Constants.H5R_REF_BUF_SIZE];
- // Read the reference from the dataset.
- try {
- H5.H5Dread(H5did, HDF5Constants.H5T_STD_REF,
- HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, refbuf);
- }
- catch (Exception err) {
- err.printStackTrace();
- fail("testH5Rget_obj_type3: H5Dread: " + err);
- }
- for (int i = 0; i < ndims; i++) {
- try {
- try {
- ret_val = H5.H5Rget_type(refbuf[i]);
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("testH5Rget_region_dataset: H5Rget_type["+i+"]: " + err);
- }
- assertTrue("testH5Rget_region_dataset: H5Rget_type["+i+"]="+ret_val, ret_val == ref_type);
- try {
- loc_id = H5.H5Ropen_object(refbuf[i], HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
- assertTrue(loc_id >= 0);
- try {
- loc_sid = H5.H5Ropen_region(refbuf[i], HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
- assertTrue(loc_sid >= 0);
- int region_type = -1;
- try {
- int reg_ndims = H5.H5Sget_simple_extent_ndims(loc_sid);
- region_type = H5.H5Sget_select_type(loc_sid);
- if (i == 1)
- assertTrue(region_type == HDF5Constants.H5S_SEL_POINTS);
- else
- assertTrue(region_type == HDF5Constants.H5S_SEL_HYPERSLABS);
- if (region_type == HDF5Constants.H5S_SEL_POINTS) {
- long reg_npoints = H5.H5Sget_select_elem_npoints(loc_sid);
- // Coordinates for get point selection
- long getcoord[] = new long[reg_ndims * (int)reg_npoints];
- // Known coordinates for point selection
- long coord[][] = {{6,9},{2,2},{8,4},{1,6},{2,8},{3,2},
- {0,4},{9,0},{7,1},{3,3}};
- try {
- H5.H5Sget_select_elem_pointlist(loc_sid, 0, reg_npoints, getcoord);
- assertTrue("H5.H5Sget_select_elem_pointlist", coord[0][0] == getcoord[0]);
- assertTrue("H5.H5Sget_select_elem_pointlist", coord[0][1] == getcoord[1]);
- assertTrue("H5.H5Sget_select_elem_pointlist", coord[1][0] == getcoord[2]);
- assertTrue("H5.H5Sget_select_elem_pointlist", coord[1][1] == getcoord[3]);
- assertTrue("H5.H5Sget_select_elem_pointlist", coord[2][0] == getcoord[4]);
- assertTrue("H5.H5Sget_select_elem_pointlist", coord[2][1] == getcoord[5]);
- }
- catch (Throwable err3) {
- err3.printStackTrace();
- fail("H5.H5Sget_select_elem_pointlist: " + err3);
- }
- }
- else if (region_type == HDF5Constants.H5S_SEL_HYPERSLABS) {
- long reg_nblocks = H5.H5Sget_select_hyper_nblocks(loc_sid);
- assertTrue("H5Sget_select_hyper_nblocks", reg_nblocks == 1);
- // Coordinates for get block selection
- long getblocks[] = new long[reg_ndims * (int)reg_nblocks * 2];
- long start[] = {2,2};
- long block[] = {8,8};
- try {
- H5.H5Sget_select_hyper_blocklist(loc_sid, 0, reg_nblocks, getblocks);
- assertTrue("H5.H5Sget_select_hyper_blocklist", start[0] == getblocks[0]);
- assertTrue("H5.H5Sget_select_hyper_blocklist", start[1] == getblocks[1]);
- assertTrue("H5.H5Sget_select_hyper_blocklist", (block[0]-1) == getblocks[2]);
- assertTrue("H5.H5Sget_select_hyper_blocklist", (block[1]-1) == getblocks[3]);
- }
- catch (Throwable err3) {
- err3.printStackTrace();
- fail("H5.H5Sget_select_hyper_blocklist: " + err3);
- }
- }
- }
- catch (Throwable err2) {
- err2.printStackTrace();
- assertTrue("testH5Rget_region_dataset: H5Sget_select_type: " + err2, i > 1);
- }
- }
- catch (Throwable err1) {
- err1.printStackTrace();
- fail("testH5Rget_region_dataset: " + err1);
- }
- finally {
- try {H5.H5Sclose(loc_sid);} catch (Exception ex) {}
- }
- }
- catch (Throwable err0) {
- err0.printStackTrace();
- fail("testH5Rget_region_dataset: " + err0);
- }
- finally {
- try {H5.H5Dclose(loc_id);} catch (Exception ex) {}
- }
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("testH5Rget_region_dataset: H5Rget_type: " + err);
- }
- finally {
- H5.H5Rdestroy(refbuf[i]);
- }
- } //for (int i = 0; i < ndims; i++)
- }
-
- @Test
- public void testH5Rget_region_attribute() {
- long f_type = HDF5Constants.H5I_INVALID_HID;
- long loc_id = HDF5Constants.H5I_INVALID_HID;
- long loc_sid = HDF5Constants.H5I_INVALID_HID;
- int ref_type = HDF5Constants.H5R_ATTR;
- int obj_type = -1;
- int ndims = 1;
- long ret_val = -1;
- byte[][] refbuf = null;
- String objName = "/Dataset3";
+ @Test
+ public void testH5Rget_region_dataset()
+ {
+ long f_type = HDF5Constants.H5I_INVALID_HID;
+ long loc_id = HDF5Constants.H5I_INVALID_HID;
+ long loc_sid = HDF5Constants.H5I_INVALID_HID;
+ int ref_type = HDF5Constants.H5R_DATASET_REGION2;
+ int ndims = 1;
+ long ret_val = -1;
+ byte[][] refbuf = null;
+ String name = "";
+ String objName = "/Dataset1";
- try {
- openH5file(H5_AREG_FILE, objName);
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("testH5Rget_region_attribute: openH5file: " + err);
- }
- try {
- f_type = H5.H5Dget_type(H5did);
- int result = H5.H5Tget_class(f_type);
- assertTrue("testH5Rget_region_attribute: H5Tget_class", result > 0);
- String class_name = H5.H5Tget_class_name(result);
- assertTrue("testH5Rget_region_attribute: H5Tget_class="+class_name, class_name.compareTo("H5T_REFERENCE")==0);
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("testH5Rget_region_attribute: " + err);
- }
- finally {
- try {H5.H5Tclose(f_type);} catch (Exception ex) {}
- }
- try {
- ndims = (int)H5.H5Sget_simple_extent_npoints(H5dsid);
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("testH5Rget_region_attribute: H5Sget_simple_extent_ndims: " + err);
- }
- refbuf = new byte[ndims][HDF5Constants.H5R_REF_BUF_SIZE];
- // Read the reference from the dataset.
- try {
- H5.H5Dread(H5did, HDF5Constants.H5T_STD_REF,
- HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
- HDF5Constants.H5P_DEFAULT, refbuf);
- }
- catch (Exception err) {
- err.printStackTrace();
- fail("testH5Rget_region_attribute: H5Dread: " + err);
- }
+ try {
+ openH5file(H5_DREG_FILE, objName);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("testH5Rget_region_dataset: openH5file: " + err);
+ }
+ try {
+ f_type = H5.H5Dget_type(H5did);
+ int result = H5.H5Tget_class(f_type);
+ assertTrue("testH5Rget_region_dataset: H5Tget_class", result > 0);
+ String class_name = H5.H5Tget_class_name(result);
+ assertTrue("testH5Rget_region_dataset: H5Tget_class=" + class_name,
+ class_name.compareTo("H5T_REFERENCE") == 0);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("testH5Rget_region_dataset: " + err);
+ }
+ finally {
+ try {
+ H5.H5Tclose(f_type);
+ }
+ catch (Exception ex) {
+ }
+ }
+ try {
+ ndims = (int)H5.H5Sget_simple_extent_npoints(H5dsid);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("testH5Rget_region_dataset: H5Sget_simple_extent_ndims: " + err);
+ }
+ refbuf = new byte[ndims][HDF5Constants.H5R_REF_BUF_SIZE];
+ // Read the reference from the dataset.
+ try {
+ H5.H5Dread(H5did, HDF5Constants.H5T_STD_REF, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5P_DEFAULT, refbuf);
+ }
+ catch (Exception err) {
+ err.printStackTrace();
+ fail("testH5Rget_obj_type3: H5Dread: " + err);
+ }
+ for (int i = 0; i < ndims; i++) {
+ try {
+ try {
+ ret_val = H5.H5Rget_type(refbuf[i]);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("testH5Rget_region_dataset: H5Rget_type[" + i + "]: " + err);
+ }
+ assertTrue("testH5Rget_region_dataset: H5Rget_type[" + i + "]=" + ret_val,
+ ret_val == ref_type);
+ try {
+ loc_id =
+ H5.H5Ropen_object(refbuf[i], HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ assertTrue(loc_id >= 0);
+ try {
+ loc_sid = H5.H5Ropen_region(refbuf[i], HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
+ assertTrue(loc_sid >= 0);
+ int region_type = -1;
+ try {
+ int reg_ndims = H5.H5Sget_simple_extent_ndims(loc_sid);
+ region_type = H5.H5Sget_select_type(loc_sid);
+ if (i == 1)
+ assertTrue(region_type == HDF5Constants.H5S_SEL_POINTS);
+ else
+ assertTrue(region_type == HDF5Constants.H5S_SEL_HYPERSLABS);
+ if (region_type == HDF5Constants.H5S_SEL_POINTS) {
+ long reg_npoints = H5.H5Sget_select_elem_npoints(loc_sid);
+ // Coordinates for get point selection
+ long getcoord[] = new long[reg_ndims * (int)reg_npoints];
+ // Known coordinates for point selection
+ long coord[][] = {{6, 9}, {2, 2}, {8, 4}, {1, 6}, {2, 8},
+ {3, 2}, {0, 4}, {9, 0}, {7, 1}, {3, 3}};
+ try {
+ H5.H5Sget_select_elem_pointlist(loc_sid, 0, reg_npoints, getcoord);
+ assertTrue("H5.H5Sget_select_elem_pointlist", coord[0][0] == getcoord[0]);
+ assertTrue("H5.H5Sget_select_elem_pointlist", coord[0][1] == getcoord[1]);
+ assertTrue("H5.H5Sget_select_elem_pointlist", coord[1][0] == getcoord[2]);
+ assertTrue("H5.H5Sget_select_elem_pointlist", coord[1][1] == getcoord[3]);
+ assertTrue("H5.H5Sget_select_elem_pointlist", coord[2][0] == getcoord[4]);
+ assertTrue("H5.H5Sget_select_elem_pointlist", coord[2][1] == getcoord[5]);
+ }
+ catch (Throwable err3) {
+ err3.printStackTrace();
+ fail("H5.H5Sget_select_elem_pointlist: " + err3);
+ }
+ }
+ else if (region_type == HDF5Constants.H5S_SEL_HYPERSLABS) {
+ long reg_nblocks = H5.H5Sget_select_hyper_nblocks(loc_sid);
+ assertTrue("H5Sget_select_hyper_nblocks", reg_nblocks == 1);
+ // Coordinates for get block selection
+ long getblocks[] = new long[reg_ndims * (int)reg_nblocks * 2];
+ long start[] = {2, 2};
+ long block[] = {8, 8};
+ try {
+ H5.H5Sget_select_hyper_blocklist(loc_sid, 0, reg_nblocks, getblocks);
+ assertTrue("H5.H5Sget_select_hyper_blocklist", start[0] == getblocks[0]);
+ assertTrue("H5.H5Sget_select_hyper_blocklist", start[1] == getblocks[1]);
+ assertTrue("H5.H5Sget_select_hyper_blocklist",
+ (block[0] - 1) == getblocks[2]);
+ assertTrue("H5.H5Sget_select_hyper_blocklist",
+ (block[1] - 1) == getblocks[3]);
+ }
+ catch (Throwable err3) {
+ err3.printStackTrace();
+ fail("H5.H5Sget_select_hyper_blocklist: " + err3);
+ }
+ }
+ }
+ catch (Throwable err2) {
+ err2.printStackTrace();
+ assertTrue("testH5Rget_region_dataset: H5Sget_select_type: " + err2, i > 1);
+ }
+ }
+ catch (Throwable err1) {
+ err1.printStackTrace();
+ fail("testH5Rget_region_dataset: " + err1);
+ }
+ finally {
+ try {
+ H5.H5Sclose(loc_sid);
+ }
+ catch (Exception ex) {
+ }
+ }
+ }
+ catch (Throwable err0) {
+ err0.printStackTrace();
+ fail("testH5Rget_region_dataset: " + err0);
+ }
+ finally {
+ try {
+ H5.H5Dclose(loc_id);
+ }
+ catch (Exception ex) {
+ }
+ }
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("testH5Rget_region_dataset: H5Rget_type: " + err);
+ }
+ finally {
+ H5.H5Rdestroy(refbuf[i]);
+ }
+ } // for (int i = 0; i < ndims; i++)
+ }
- for (int i = 0; i < ndims; i++) {
- try {
- ret_val = H5.H5Rget_type(refbuf[i]);
- assertTrue("testH5Rget_region_attribute: H5Rget_type["+i+"]="+ret_val, ret_val == ref_type);
- try {
- loc_id = H5.H5Ropen_attr(refbuf[i], HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
- assertTrue(loc_id >= 0);
- if (!byteArrayCheck(refbuf[i])) {
- try {
- loc_sid = H5.H5Aget_space(loc_id);
- assertTrue(loc_sid >= 0);
- }
- catch (Throwable err1) {
- err1.printStackTrace();
- fail("testH5Rget_region_attribute: " + err1);
- }
- finally {
- try {H5.H5Sclose(loc_sid);} catch (Exception ex) {}
- }
- }
- }
- catch (Throwable err0) {
- err0.printStackTrace();
- // second attribute is null
- assertTrue("testH5Rget_region_attribute: " + err0, i == 1);
- }
- finally {
- try {H5.H5Aclose(loc_id);} catch (Exception ex) {}
- }
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("testH5Rget_region_attribute: H5Rget_type: " + err);
- }
- finally {
- H5.H5Rdestroy(refbuf[i]);
- }
- }
- }
+ @Test
+ public void testH5Rget_region_attribute()
+ {
+ long f_type = HDF5Constants.H5I_INVALID_HID;
+ long loc_id = HDF5Constants.H5I_INVALID_HID;
+ long loc_sid = HDF5Constants.H5I_INVALID_HID;
+ int ref_type = HDF5Constants.H5R_ATTR;
+ int obj_type = -1;
+ int ndims = 1;
+ long ret_val = -1;
+ byte[][] refbuf = null;
+ String objName = "/Dataset3";
+ try {
+ openH5file(H5_AREG_FILE, objName);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("testH5Rget_region_attribute: openH5file: " + err);
+ }
+ try {
+ f_type = H5.H5Dget_type(H5did);
+ int result = H5.H5Tget_class(f_type);
+ assertTrue("testH5Rget_region_attribute: H5Tget_class", result > 0);
+ String class_name = H5.H5Tget_class_name(result);
+ assertTrue("testH5Rget_region_attribute: H5Tget_class=" + class_name,
+ class_name.compareTo("H5T_REFERENCE") == 0);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("testH5Rget_region_attribute: " + err);
+ }
+ finally {
+ try {
+ H5.H5Tclose(f_type);
+ }
+ catch (Exception ex) {
+ }
+ }
+ try {
+ ndims = (int)H5.H5Sget_simple_extent_npoints(H5dsid);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("testH5Rget_region_attribute: H5Sget_simple_extent_ndims: " + err);
+ }
+ refbuf = new byte[ndims][HDF5Constants.H5R_REF_BUF_SIZE];
+ // Read the reference from the dataset.
+ try {
+ H5.H5Dread(H5did, HDF5Constants.H5T_STD_REF, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
+ HDF5Constants.H5P_DEFAULT, refbuf);
+ }
+ catch (Exception err) {
+ err.printStackTrace();
+ fail("testH5Rget_region_attribute: H5Dread: " + err);
+ }
-// These tests need to be updated with new APIs
-// @Test//
-// public void testH5Rget_group() {
-// long loc_id = H5fid;
-// int ref_type = HDF5Constants.H5R_OBJECT2;
-// long ret_val = -1;
-// byte[] ref = null;
-// String name = "";
-// String objName = "/dset";
-//
-// try {
-// ref = H5.H5Rcreate_object(H5fid, objName, HDF5Constants.H5P_DEFAULT);
-// }
-// catch (Throwable err) {
-// err.printStackTrace();
-// fail("testH5Rget_object: H5Rcreate_object " + err);
-// }
-// try {
-// dataset_id= H5.H5Rdereference(H5fid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5R_DATASET_REGION, ref1);
-//
-// //Create reference on group
-// ref2 = H5.H5Rcreate(H5gid, "/Group1", HDF5Constants.H5R_OBJECT, -1);
-// group_id= H5.H5Rdereference(H5gid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5R_OBJECT, ref2);
-// assertNotNull(ref1);
-// assertNotNull(ref2);
-// assertTrue(dataset_id >= 0);
-// assertTrue(group_id >= 0);
-// }
-// catch (Throwable err) {
-// err.printStackTrace();
-// fail("TestH5Rdereference " + err);
-// }
-// finally {
-// try {H5.H5Dclose(dataset_id);} catch (Exception ex) {}
-// try {H5.H5Gclose(group_id);} catch (Exception ex) {}
-// }
-// }
+ for (int i = 0; i < ndims; i++) {
+ try {
+ ret_val = H5.H5Rget_type(refbuf[i]);
+ assertTrue("testH5Rget_region_attribute: H5Rget_type[" + i + "]=" + ret_val,
+ ret_val == ref_type);
+ try {
+ loc_id = H5.H5Ropen_attr(refbuf[i], HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ assertTrue(loc_id >= 0);
+ if (!byteArrayCheck(refbuf[i])) {
+ try {
+ loc_sid = H5.H5Aget_space(loc_id);
+ assertTrue(loc_sid >= 0);
+ }
+ catch (Throwable err1) {
+ err1.printStackTrace();
+ fail("testH5Rget_region_attribute: " + err1);
+ }
+ finally {
+ try {
+ H5.H5Sclose(loc_sid);
+ }
+ catch (Exception ex) {
+ }
+ }
+ }
+ }
+ catch (Throwable err0) {
+ err0.printStackTrace();
+ // second attribute is null
+ assertTrue("testH5Rget_region_attribute: " + err0, i == 1);
+ }
+ finally {
+ try {
+ H5.H5Aclose(loc_id);
+ }
+ catch (Exception ex) {
+ }
+ }
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("testH5Rget_region_attribute: H5Rget_type: " + err);
+ }
+ finally {
+ H5.H5Rdestroy(refbuf[i]);
+ }
+ }
+ }
-// @Test//
-// public void testH5Rget_attr() {
-// long loc_id = H5fid;
-// int ref_type = HDF5Constants.H5R_OBJECT2;
-// long ret_val = -1;
-// byte[] ref = null;
-// String name = "";
-// String objName = "/dset";
-//
-// try {
-// ref = H5.H5Rcreate_object(H5fid, objName, HDF5Constants.H5P_DEFAULT);
-// }
-// catch (Throwable err) {
-// err.printStackTrace();
-// fail("testH5Rget_object: H5Rcreate_object " + err);
-// }
-// try {
-// dsid = H5.H5Rget_region(H5fid, HDF5Constants.H5R_DATASET_REGION, ref);
-// assertNotNull(ref);
-// assertTrue(dsid >= 0);
-// }
-// catch (Throwable err) {
-// err.printStackTrace();
-// fail("TestH5Rget_region: " + err);
-// }
-// finally {
-// try {H5.H5Sclose(dsid);} catch (Exception ex) {}
-// }
-// }
+ // These tests need to be updated with new APIs
+ // @Test//
+ // public void testH5Rget_group() {
+ // long loc_id = H5fid;
+ // int ref_type = HDF5Constants.H5R_OBJECT2;
+ // long ret_val = -1;
+ // byte[] ref = null;
+ // String name = "";
+ // String objName = "/dset";
+ //
+ // try {
+ // ref = H5.H5Rcreate_object(H5fid, objName, HDF5Constants.H5P_DEFAULT);
+ // }
+ // catch (Throwable err) {
+ // err.printStackTrace();
+ // fail("testH5Rget_object: H5Rcreate_object " + err);
+ // }
+ // try {
+ // dataset_id= H5.H5Rdereference(H5fid, HDF5Constants.H5P_DEFAULT,
+ // HDF5Constants.H5R_DATASET_REGION, ref1);
+ //
+ // //Create reference on group
+ // ref2 = H5.H5Rcreate(H5gid, "/Group1", HDF5Constants.H5R_OBJECT, -1);
+ // group_id= H5.H5Rdereference(H5gid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5R_OBJECT,
+ // ref2); assertNotNull(ref1); assertNotNull(ref2); assertTrue(dataset_id >= 0);
+ // assertTrue(group_id >= 0);
+ // }
+ // catch (Throwable err) {
+ // err.printStackTrace();
+ // fail("TestH5Rdereference " + err);
+ // }
+ // finally {
+ // try {H5.H5Dclose(dataset_id);} catch (Exception ex) {}
+ // try {H5.H5Gclose(group_id);} catch (Exception ex) {}
+ // }
+ // }
+ // @Test//
+ // public void testH5Rget_attr() {
+ // long loc_id = H5fid;
+ // int ref_type = HDF5Constants.H5R_OBJECT2;
+ // long ret_val = -1;
+ // byte[] ref = null;
+ // String name = "";
+ // String objName = "/dset";
+ //
+ // try {
+ // ref = H5.H5Rcreate_object(H5fid, objName, HDF5Constants.H5P_DEFAULT);
+ // }
+ // catch (Throwable err) {
+ // err.printStackTrace();
+ // fail("testH5Rget_object: H5Rcreate_object " + err);
+ // }
+ // try {
+ // dsid = H5.H5Rget_region(H5fid, HDF5Constants.H5R_DATASET_REGION, ref);
+ // assertNotNull(ref);
+ // assertTrue(dsid >= 0);
+ // }
+ // catch (Throwable err) {
+ // err.printStackTrace();
+ // fail("TestH5Rget_region: " + err);
+ // }
+ // finally {
+ // try {H5.H5Sclose(dsid);} catch (Exception ex) {}
+ // }
+ // }
}
diff --git a/java/test/TestH5S.java b/java/test/TestH5S.java
index 7eeed7a..6e081a6 100644
--- a/java/test/TestH5S.java
+++ b/java/test/TestH5S.java
@@ -12,10 +12,10 @@
package test;
-
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
+
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
import hdf.hdf5lib.exceptions.HDF5Exception;
@@ -28,16 +28,17 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5S {
- @Rule public TestName testname = new TestName();
- long H5sid = HDF5Constants.H5I_INVALID_HID;
- int H5rank = 2;
- long H5dims[] = {5, 5};
- long H5maxdims[] = {10, 10};
+ @Rule
+ public TestName testname = new TestName();
+ long H5sid = HDF5Constants.H5I_INVALID_HID;
+ int H5rank = 2;
+ long H5dims[] = {5, 5};
+ long H5maxdims[] = {10, 10};
@Before
- public void createH5file()
- throws NullPointerException, HDF5Exception {
- assertTrue("H5 open ids is 0", H5.getOpenIDCount()==0);
+ public void createH5file() throws NullPointerException, HDF5Exception
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
H5sid = H5.H5Screate_simple(H5rank, H5dims, H5maxdims);
@@ -45,15 +46,21 @@ public class TestH5S {
}
@After
- public void deleteH5file() throws HDF5LibraryException {
+ public void deleteH5file() throws HDF5LibraryException
+ {
if (H5sid > 0) {
- try {H5.H5Sclose(H5sid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(H5sid);
+ }
+ catch (Exception ex) {
+ }
}
System.out.println();
}
@Test
- public void testH5Sget_simple_extent_ndims() {
+ public void testH5Sget_simple_extent_ndims()
+ {
int read_rank = -1;
try {
read_rank = H5.H5Sget_simple_extent_ndims(H5sid);
@@ -66,7 +73,8 @@ public class TestH5S {
}
@Test
- public void testH5Sget_simple_extent_dims_null() {
+ public void testH5Sget_simple_extent_dims_null()
+ {
int read_rank = -1;
try {
@@ -80,9 +88,10 @@ public class TestH5S {
}
@Test
- public void testH5Sget_simple_extent_dims() {
- int read_rank = -1;
- long dims[] = {5, 5};
+ public void testH5Sget_simple_extent_dims()
+ {
+ int read_rank = -1;
+ long dims[] = {5, 5};
long maxdims[] = {10, 10};
try {
@@ -98,11 +107,12 @@ public class TestH5S {
}
@Test
- public void testH5Sget_simple_extent_npoints() {
+ public void testH5Sget_simple_extent_npoints()
+ {
long num_elements = -1;
try {
num_elements = H5.H5Sget_simple_extent_npoints(H5sid);
- assertTrue("H5.H5Sget_simple_extent_npoints", (H5dims[0]*H5dims[1]) == num_elements);
+ assertTrue("H5.H5Sget_simple_extent_npoints", (H5dims[0] * H5dims[1]) == num_elements);
}
catch (Throwable err) {
err.printStackTrace();
@@ -111,7 +121,8 @@ public class TestH5S {
}
@Test
- public void testH5Sget_simple_extent_type() {
+ public void testH5Sget_simple_extent_type()
+ {
int read_type = -1;
try {
read_type = H5.H5Sget_simple_extent_type(H5sid);
@@ -124,7 +135,8 @@ public class TestH5S {
}
@Test
- public void testH5Sis_simple() {
+ public void testH5Sis_simple()
+ {
boolean result = false;
try {
@@ -138,12 +150,13 @@ public class TestH5S {
}
@Test
- public void testH5Sset_extent_simple() {
+ public void testH5Sset_extent_simple()
+ {
long num_elements = -1;
try {
H5.H5Sset_extent_simple(H5sid, H5rank, H5maxdims, H5maxdims);
num_elements = H5.H5Sget_simple_extent_npoints(H5sid);
- assertTrue("H5.H5Sget_simple_extent_npoints", (H5maxdims[0]*H5maxdims[1]) == num_elements);
+ assertTrue("H5.H5Sget_simple_extent_npoints", (H5maxdims[0] * H5maxdims[1]) == num_elements);
}
catch (Throwable err) {
err.printStackTrace();
@@ -152,7 +165,8 @@ public class TestH5S {
}
@Test
- public void testH5Sget_select_type() {
+ public void testH5Sget_select_type()
+ {
int read_type = -1;
try {
read_type = H5.H5Sget_select_type(H5sid);
@@ -165,12 +179,13 @@ public class TestH5S {
}
@Test
- public void testH5Sset_extent_none() {
+ public void testH5Sset_extent_none()
+ {
int read_type = -1;
try {
H5.H5Sset_extent_none(H5sid);
read_type = H5.H5Sget_simple_extent_type(H5sid);
- assertTrue("H5.H5Sget_simple_extent_type: "+read_type, HDF5Constants.H5S_NULL == read_type);
+ assertTrue("H5.H5Sget_simple_extent_type: " + read_type, HDF5Constants.H5S_NULL == read_type);
}
catch (Throwable err) {
err.printStackTrace();
@@ -179,8 +194,9 @@ public class TestH5S {
}
@Test
- public void testH5Scopy() {
- long sid = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Scopy()
+ {
+ long sid = HDF5Constants.H5I_INVALID_HID;
int read_rank = -1;
try {
@@ -194,13 +210,18 @@ public class TestH5S {
fail("H5.H5Scopy: " + err);
}
finally {
- try {H5.H5Sclose(sid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(sid);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Sextent_copy() {
- long sid = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Sextent_copy()
+ {
+ long sid = HDF5Constants.H5I_INVALID_HID;
int class_type = -1;
try {
@@ -215,18 +236,23 @@ public class TestH5S {
fail("H5.H5Sextent_copy: " + err);
}
finally {
- try {H5.H5Sclose(sid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(sid);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Sextent_equal() {
- long sid = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Sextent_equal()
+ {
+ long sid = HDF5Constants.H5I_INVALID_HID;
boolean result = false;
try {
sid = H5.H5Screate(HDF5Constants.H5S_NULL);
- assertTrue("H5.H5Screate_null",sid > 0);
+ assertTrue("H5.H5Screate_null", sid > 0);
}
catch (Throwable err) {
err.printStackTrace();
@@ -235,7 +261,7 @@ public class TestH5S {
try {
result = H5.H5Sextent_equal(sid, H5sid);
- assertFalse("H5.testH5Sextent_equal",result);
+ assertFalse("H5.testH5Sextent_equal", result);
H5.H5Sextent_copy(sid, H5sid);
result = H5.H5Sextent_equal(sid, H5sid);
assertTrue("H5.testH5Sextent_equal", result);
@@ -245,16 +271,21 @@ public class TestH5S {
fail("H5.H5Sextent_copy " + err);
}
finally {
- try {H5.H5Sclose(sid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(sid);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Sencode_decode_null_dataspace() {
- long sid = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Sencode_decode_null_dataspace()
+ {
+ long sid = HDF5Constants.H5I_INVALID_HID;
long decoded_sid = HDF5Constants.H5I_INVALID_HID;
byte[] null_sbuf = null;
- boolean result = false;
+ boolean result = false;
try {
sid = H5.H5Screate(HDF5Constants.H5S_NULL);
@@ -267,21 +298,25 @@ public class TestH5S {
try {
null_sbuf = H5.H5Sencode(sid);
- assertFalse("H5.testH5Sencode", null_sbuf==null);
+ assertFalse("H5.testH5Sencode", null_sbuf == null);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Sencode " + err);
}
finally {
- if(null_sbuf == null) {
- try {H5.H5Sclose(sid);} catch (Exception ex) {}
+ if (null_sbuf == null) {
+ try {
+ H5.H5Sclose(sid);
+ }
+ catch (Exception ex) {
+ }
}
}
try {
decoded_sid = H5.H5Sdecode(null_sbuf);
- assertTrue("H5.testH5Sdecode", decoded_sid>0);
+ assertTrue("H5.testH5Sdecode", decoded_sid > 0);
result = H5.H5Sextent_equal(sid, decoded_sid);
assertTrue("H5.testH5Sextent_equal", result);
@@ -291,19 +326,28 @@ public class TestH5S {
fail("H5.H5Sdecode " + err);
}
finally {
- try {H5.H5Sclose(decoded_sid);} catch (Exception ex) {}
- try {H5.H5Sclose(sid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(decoded_sid);
+ }
+ catch (Exception ex) {
+ }
+ try {
+ H5.H5Sclose(sid);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Sencode_decode_scalar_dataspace() {
- long sid = HDF5Constants.H5I_INVALID_HID;
- long decoded_sid = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Sencode_decode_scalar_dataspace()
+ {
+ long sid = HDF5Constants.H5I_INVALID_HID;
+ long decoded_sid = HDF5Constants.H5I_INVALID_HID;
byte[] scalar_sbuf = null;
- boolean result = false;
- int iresult = -1;
- long lresult = -1;
+ boolean result = false;
+ int iresult = -1;
+ long lresult = -1;
try {
sid = H5.H5Screate(HDF5Constants.H5S_SCALAR);
@@ -316,52 +360,65 @@ public class TestH5S {
try {
scalar_sbuf = H5.H5Sencode(sid);
- assertFalse("H5.testH5Sencode", scalar_sbuf==null);
+ assertFalse("H5.testH5Sencode", scalar_sbuf == null);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Sencode " + err);
}
finally {
- if(scalar_sbuf == null) {
- try {H5.H5Sclose(sid);} catch (Exception ex) {}
+ if (scalar_sbuf == null) {
+ try {
+ H5.H5Sclose(sid);
+ }
+ catch (Exception ex) {
+ }
}
}
try {
decoded_sid = H5.H5Sdecode(scalar_sbuf);
- assertTrue("H5.testH5Sdecode", decoded_sid>0);
+ assertTrue("H5.testH5Sdecode", decoded_sid > 0);
result = H5.H5Sextent_equal(sid, decoded_sid);
assertTrue("H5.testH5Sextent_equal", result);
/* Verify decoded dataspace */
lresult = H5.H5Sget_simple_extent_npoints(decoded_sid);
- assertTrue("H5.testH5Sget_simple_extent_npoints", lresult==1);
+ assertTrue("H5.testH5Sget_simple_extent_npoints", lresult == 1);
iresult = H5.H5Sget_simple_extent_ndims(decoded_sid);
- assertTrue("H5.testH5Sget_simple_extent_ndims", iresult==0);
+ assertTrue("H5.testH5Sget_simple_extent_ndims", iresult == 0);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Sdecode " + err);
}
finally {
- try {H5.H5Sclose(decoded_sid);} catch (Exception ex) {}
- try {H5.H5Sclose(sid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(decoded_sid);
+ }
+ catch (Exception ex) {
+ }
+ try {
+ H5.H5Sclose(sid);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Sselect_none() {
+ public void testH5Sselect_none()
+ {
int read_type = -1;
try {
H5.H5Sselect_none(H5sid);
read_type = H5.H5Sget_select_type(H5sid);
- assertTrue("H5.H5Sget_select_type: "+read_type, HDF5Constants.H5S_SEL_NONE == read_type);
+ assertTrue("H5.H5Sget_select_type: " + read_type, HDF5Constants.H5S_SEL_NONE == read_type);
H5.H5Sselect_all(H5sid);
read_type = H5.H5Sget_select_type(H5sid);
- assertTrue("H5.H5Sget_select_type: "+read_type, HDF5Constants.H5S_SEL_ALL == read_type);
+ assertTrue("H5.H5Sget_select_type: " + read_type, HDF5Constants.H5S_SEL_ALL == read_type);
}
catch (Throwable err) {
err.printStackTrace();
@@ -370,13 +427,14 @@ public class TestH5S {
}
@Test
- public void testH5Sget_select_npoints() {
- long coord[][] = {{0,1},{2,4},{5,6}}; /* Coordinates for point selection */
+ public void testH5Sget_select_npoints()
+ {
+ long coord[][] = {{0, 1}, {2, 4}, {5, 6}}; /* Coordinates for point selection */
long num_elements = -1;
try {
H5.H5Sselect_elements(H5sid, HDF5Constants.H5S_SELECT_SET, 3, coord);
num_elements = H5.H5Sget_select_npoints(H5sid);
- assertTrue("H5.H5Sget_select_npoints: "+num_elements, 3 == num_elements);
+ assertTrue("H5.H5Sget_select_npoints: " + num_elements, 3 == num_elements);
}
catch (Throwable err) {
err.printStackTrace();
@@ -385,9 +443,10 @@ public class TestH5S {
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Sget_select_elem_pointlist_invalid() throws Throwable {
- long coord[][] = {{0,1},{2,4},{5,6}}; /* Coordinates for point selection */
- long getcoord[] = {-1,-1}; /* Coordinates for get point selection */
+ public void testH5Sget_select_elem_pointlist_invalid() throws Throwable
+ {
+ long coord[][] = {{0, 1}, {2, 4}, {5, 6}}; /* Coordinates for point selection */
+ long getcoord[] = {-1, -1}; /* Coordinates for get point selection */
try {
H5.H5Sselect_elements(H5sid, HDF5Constants.H5S_SELECT_SET, 3, coord);
}
@@ -399,9 +458,10 @@ public class TestH5S {
}
@Test
- public void testH5Sget_select_elem_pointlist() {
- long coord[][] = {{0,1},{2,3},{4,5}}; /* Coordinates for point selection */
- long getcoord[] = {-1,-1,-1,-1,-1,-1}; /* Coordinates for get point selection */
+ public void testH5Sget_select_elem_pointlist()
+ {
+ long coord[][] = {{0, 1}, {2, 3}, {4, 5}}; /* Coordinates for point selection */
+ long getcoord[] = {-1, -1, -1, -1, -1, -1}; /* Coordinates for get point selection */
try {
H5.H5Sselect_elements(H5sid, HDF5Constants.H5S_SELECT_SET, 3, coord);
H5.H5Sget_select_elem_pointlist(H5sid, 0, 3, getcoord);
@@ -419,15 +479,16 @@ public class TestH5S {
}
@Test
- public void testH5Sget_select_bounds() {
- long lowbounds[] = {-1,-1};
- long hibounds[] = {-1,-1};
+ public void testH5Sget_select_bounds()
+ {
+ long lowbounds[] = {-1, -1};
+ long hibounds[] = {-1, -1};
try {
H5.H5Sget_select_bounds(H5sid, lowbounds, hibounds);
assertTrue("H5.H5Sget_select_bounds", 0 == lowbounds[0]);
assertTrue("H5.H5Sget_select_bounds", 0 == lowbounds[1]);
- assertTrue("H5.H5Sget_select_bounds", (H5dims[0]-1) == hibounds[0]);
- assertTrue("H5.H5Sget_select_bounds", (H5dims[1]-1) == hibounds[1]);
+ assertTrue("H5.H5Sget_select_bounds", (H5dims[0] - 1) == hibounds[0]);
+ assertTrue("H5.H5Sget_select_bounds", (H5dims[1] - 1) == hibounds[1]);
}
catch (Throwable err) {
err.printStackTrace();
@@ -436,30 +497,31 @@ public class TestH5S {
}
@Test
- public void testH5Soffset_simple() {
- long coord[][] = {{2,2},{2,4},{4,2},{4,4}}; /* Coordinates for point selection */
- long lowbounds[] = {-1,-1};
- long hibounds[] = {-1,-1};
+ public void testH5Soffset_simple()
+ {
+ long coord[][] = {{2, 2}, {2, 4}, {4, 2}, {4, 4}}; /* Coordinates for point selection */
+ long lowbounds[] = {-1, -1};
+ long hibounds[] = {-1, -1};
try {
H5.H5Sselect_elements(H5sid, HDF5Constants.H5S_SELECT_SET, 4, coord);
H5.H5Sget_select_bounds(H5sid, lowbounds, hibounds);
assertTrue("H5.H5Sget_select_bounds", 2 == lowbounds[0]);
assertTrue("H5.H5Sget_select_bounds", 2 == lowbounds[1]);
- assertTrue("H5.H5Sget_select_bounds", (H5dims[0]-1) == hibounds[0]);
- assertTrue("H5.H5Sget_select_bounds", (H5dims[1]-1) == hibounds[1]);
+ assertTrue("H5.H5Sget_select_bounds", (H5dims[0] - 1) == hibounds[0]);
+ assertTrue("H5.H5Sget_select_bounds", (H5dims[1] - 1) == hibounds[1]);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Sget_select_bounds: " + err);
}
try {
- long offset[] = {-1,-1};
+ long offset[] = {-1, -1};
H5.H5Soffset_simple(H5sid, offset);
H5.H5Sget_select_bounds(H5sid, lowbounds, hibounds);
assertTrue("H5.H5Sget_select_bounds", 1 == lowbounds[0]);
assertTrue("H5.H5Sget_select_bounds", 1 == lowbounds[1]);
- assertTrue("H5.H5Sget_select_bounds", (H5dims[0]-2) == hibounds[0]);
- assertTrue("H5.H5Sget_select_bounds", (H5dims[1]-2) == hibounds[1]);
+ assertTrue("H5.H5Sget_select_bounds", (H5dims[0] - 2) == hibounds[0]);
+ assertTrue("H5.H5Sget_select_bounds", (H5dims[1] - 2) == hibounds[1]);
}
catch (Throwable err) {
err.printStackTrace();
@@ -468,14 +530,15 @@ public class TestH5S {
}
@Test
- public void testH5Sget_select_hyper() {
- long space1 = HDF5Constants.H5I_INVALID_HID;
- long start[] = {0,0};
- long stride[] = {1,1};
- long count[] = {1,1};
- long block[] = {4,4};
- long nblocks; // Number of hyperslab blocks
- long blocks[] = {-1, -1, -1, -1, -1, -1, -1, -1}; // List of blocks
+ public void testH5Sget_select_hyper()
+ {
+ long space1 = HDF5Constants.H5I_INVALID_HID;
+ long start[] = {0, 0};
+ long stride[] = {1, 1};
+ long count[] = {1, 1};
+ long block[] = {4, 4};
+ long nblocks; // Number of hyperslab blocks
+ long blocks[] = {-1, -1, -1, -1, -1, -1, -1, -1}; // List of blocks
try {
// Copy "all" selection & space
space1 = H5.H5Scopy(H5sid);
@@ -493,26 +556,31 @@ public class TestH5S {
// Verify that the correct block is defined
assertTrue("H5.H5Sget_select_hyper_blocklist", start[0] == blocks[0]);
assertTrue("H5.H5Sget_select_hyper_blocklist", start[1] == blocks[1]);
- assertTrue("H5.H5Sget_select_hyper_blocklist", (block[0]-1) == blocks[2]);
- assertTrue("H5.H5Sget_select_hyper_blocklist", (block[1]-1) == blocks[3]);
+ assertTrue("H5.H5Sget_select_hyper_blocklist", (block[0] - 1) == blocks[2]);
+ assertTrue("H5.H5Sget_select_hyper_blocklist", (block[1] - 1) == blocks[3]);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Sget_select_bounds: " + err);
}
finally {
- try {H5.H5Sclose(space1);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(space1);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Sget_select_valid() {
- long space1 = HDF5Constants.H5I_INVALID_HID;
- long start[] = {1,0};
- long stride[] = {1,1};
- long count[] = {2,3};
- long block[] = {1,1};
- long offset[] = {0,0}; // Offset of selection
+ public void testH5Sget_select_valid()
+ {
+ long space1 = HDF5Constants.H5I_INVALID_HID;
+ long start[] = {1, 0};
+ long stride[] = {1, 1};
+ long count[] = {2, 3};
+ long block[] = {1, 1};
+ long offset[] = {0, 0}; // Offset of selection
try {
// Copy "all" selection & space
@@ -522,20 +590,20 @@ public class TestH5S {
H5.H5Sselect_hyperslab(space1, HDF5Constants.H5S_SELECT_SET, start, stride, count, block);
// Check a valid offset
- offset[0]=-1;
- offset[1]=0;
+ offset[0] = -1;
+ offset[1] = 0;
H5.H5Soffset_simple(space1, offset);
assertTrue("H5Sselect_valid", H5.H5Sselect_valid(space1));
// Check an invalid offset
- offset[0]=10;
- offset[1]=0;
+ offset[0] = 10;
+ offset[1] = 0;
H5.H5Soffset_simple(space1, offset);
assertFalse("H5Sselect_valid", H5.H5Sselect_valid(space1));
/* Reset offset */
- offset[0]=0;
- offset[1]=0;
+ offset[0] = 0;
+ offset[1] = 0;
H5.H5Soffset_simple(space1, offset);
assertTrue("H5Sselect_valid", H5.H5Sselect_valid(space1));
}
@@ -544,20 +612,25 @@ public class TestH5S {
fail("testH5Sget_select_valid: " + err);
}
finally {
- try {H5.H5Sclose(space1);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(space1);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Shyper_regular() {
- long start[] = {1,0};
- long stride[] = {1,1};
- long count[] = {2,3};
- long block[] = {1,1};
- long q_start[] = new long[2];
- long q_stride[] = new long[2];
- long q_count[] = new long[2];
- long q_block[] = new long[2];
+ public void testH5Shyper_regular()
+ {
+ long start[] = {1, 0};
+ long stride[] = {1, 1};
+ long count[] = {2, 3};
+ long block[] = {1, 1};
+ long q_start[] = new long[2];
+ long q_stride[] = new long[2];
+ long q_count[] = new long[2];
+ long q_block[] = new long[2];
boolean is_regular = false;
try {
@@ -572,7 +645,7 @@ public class TestH5S {
H5.H5Sget_regular_hyperslab(H5sid, q_start, q_stride, q_count, q_block);
/* Verify the hyperslab parameters */
- for(int u = 0; u < H5rank; u++) {
+ for (int u = 0; u < H5rank; u++) {
assertTrue("H5Sget_regular_hyperslab, start", start[u] == q_start[u]);
assertTrue("H5Sget_regular_hyperslab, stride", stride[u] == q_stride[u]);
assertTrue("H5Sget_regular_hyperslab, count", count[u] == q_count[u]);
diff --git a/java/test/TestH5Sbasic.java b/java/test/TestH5Sbasic.java
index 548ac95..3b92c92 100644
--- a/java/test/TestH5Sbasic.java
+++ b/java/test/TestH5Sbasic.java
@@ -14,6 +14,7 @@ package test;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
+
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
@@ -25,56 +26,68 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5Sbasic {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
@Before
- public void checkOpenIDs() {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ public void checkOpenIDs()
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
}
@After
- public void nextTestName() {
+ public void nextTestName()
+ {
System.out.println();
}
- @Test//(expected = HDF5LibraryException.class)
- public void testH5Sclose_invalid() throws Throwable {
+ @Test //(expected = HDF5LibraryException.class)
+ public void testH5Sclose_invalid() throws Throwable
+ {
long sid = H5.H5Sclose(-1);
assertTrue(sid == 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Screate_invalid() throws Throwable {
+ public void testH5Screate_invalid() throws Throwable
+ {
H5.H5Screate(-1);
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Sget_simple_extent_type_invalid() throws Throwable {
+ public void testH5Sget_simple_extent_type_invalid() throws Throwable
+ {
H5.H5Sget_simple_extent_type(-1);
}
@Test
- public void testH5Screate_scalar() {
- long sid = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Screate_scalar()
+ {
+ long sid = HDF5Constants.H5I_INVALID_HID;
int class_type = -1;
try {
sid = H5.H5Screate(HDF5Constants.H5S_SCALAR);
- assertTrue("H5.H5Screate_scalar",sid > 0);
+ assertTrue("H5.H5Screate_scalar", sid > 0);
class_type = H5.H5Sget_simple_extent_type(sid);
- assertTrue("H5.H5Screate_scalar: type",class_type == HDF5Constants.H5S_SCALAR);
+ assertTrue("H5.H5Screate_scalar: type", class_type == HDF5Constants.H5S_SCALAR);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Screate: " + err);
}
finally {
- try {H5.H5Sclose(sid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(sid);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Screate_null() {
- long sid = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Screate_null()
+ {
+ long sid = HDF5Constants.H5I_INVALID_HID;
int class_type = -1;
try {
sid = H5.H5Screate(HDF5Constants.H5S_NULL);
@@ -87,47 +100,56 @@ public class TestH5Sbasic {
fail("H5.H5Screate: " + err);
}
finally {
- try {H5.H5Sclose(sid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(sid);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test(expected = NullPointerException.class)
- public void testH5Screate_simple_dims_null() throws Throwable {
+ public void testH5Screate_simple_dims_null() throws Throwable
+ {
H5.H5Screate_simple(2, (long[])null, null);
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Screate_simple_rank_invalid() throws Throwable {
+ public void testH5Screate_simple_rank_invalid() throws Throwable
+ {
long dims[] = {5, 5};
H5.H5Screate_simple(-1, dims, null);
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Screate_simple_dims_invalid() throws Throwable {
+ public void testH5Screate_simple_dims_invalid() throws Throwable
+ {
long dims[] = {2, 2};
H5.H5Screate_simple(5, dims, null);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Screate_simple_dims_exceed() throws Throwable {
- long dims[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,
- 21,22,23,24,25,26,27,28,29,30,31,32,33,35};
+ public void testH5Screate_simple_dims_exceed() throws Throwable
+ {
+ long dims[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 35};
H5.H5Screate_simple(35, dims, null);
}
-//H5Screate_simple was changed to allow a dim of 0
-// @Ignore(expected = HDF5LibraryException.class)
-// public void testH5Screate_simple_dims_zero() {
-// long dims[] = {0, 0};
-// H5.H5Screate_simple(2, dims, null);
-// }
+ // H5Screate_simple was changed to allow a dim of 0
+ // @Ignore(expected = HDF5LibraryException.class)
+ // public void testH5Screate_simple_dims_zero() {
+ // long dims[] = {0, 0};
+ // H5.H5Screate_simple(2, dims, null);
+ // }
@Test
- public void testH5Screate_simple() {
- long sid = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Screate_simple()
+ {
+ long sid = HDF5Constants.H5I_INVALID_HID;
int class_type = -1;
- int rank = 2;
- long dims[] = {5, 5};
+ int rank = 2;
+ long dims[] = {5, 5};
long maxdims[] = {10, 10};
try {
@@ -141,16 +163,21 @@ public class TestH5Sbasic {
fail("H5.H5Screate_simple: " + err);
}
finally {
- try {H5.H5Sclose(sid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(sid);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Screate_simple_unlimted() {
- long sid = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Screate_simple_unlimted()
+ {
+ long sid = HDF5Constants.H5I_INVALID_HID;
int class_type = -1;
- int rank = 2;
- long dims[] = {5, 5};
+ int rank = 2;
+ long dims[] = {5, 5};
long maxdims[] = {HDF5Constants.H5S_UNLIMITED, HDF5Constants.H5S_UNLIMITED};
try {
@@ -164,16 +191,21 @@ public class TestH5Sbasic {
fail("H5.H5Screate_simple: " + err);
}
finally {
- try {H5.H5Sclose(sid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(sid);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Screate_simple_unlimted_1d() {
- long sid = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Screate_simple_unlimted_1d()
+ {
+ long sid = HDF5Constants.H5I_INVALID_HID;
int class_type = -1;
- int rank = 1;
- long dims[] = {5};
+ int rank = 1;
+ long dims[] = {5};
long maxdims[] = {HDF5Constants.H5S_UNLIMITED};
try {
@@ -187,14 +219,19 @@ public class TestH5Sbasic {
fail("H5.H5Screate_simple: " + err);
}
finally {
- try {H5.H5Sclose(sid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(sid);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Screate_simple_max_default() {
- long sid = HDF5Constants.H5I_INVALID_HID;
- int rank = 2;
+ public void testH5Screate_simple_max_default()
+ {
+ long sid = HDF5Constants.H5I_INVALID_HID;
+ int rank = 2;
long dims[] = {5, 5};
try {
@@ -206,20 +243,25 @@ public class TestH5Sbasic {
fail("H5.H5Screate_simple: " + err);
}
finally {
- try {H5.H5Sclose(sid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(sid);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Screate_simple_extent() {
- long sid = HDF5Constants.H5I_INVALID_HID;
- int rank = 2;
- long dims[] = {5, 5};
+ public void testH5Screate_simple_extent()
+ {
+ long sid = HDF5Constants.H5I_INVALID_HID;
+ int rank = 2;
+ long dims[] = {5, 5};
long maxdims[] = {10, 10};
try {
sid = H5.H5Screate(HDF5Constants.H5S_SIMPLE);
- assertTrue("H5.H5Screate_simple_extent",sid > 0);
+ assertTrue("H5.H5Screate_simple_extent", sid > 0);
H5.H5Sset_extent_simple(sid, rank, dims, maxdims);
}
catch (Throwable err) {
@@ -227,156 +269,195 @@ public class TestH5Sbasic {
fail("H5.H5Screate: " + err);
}
finally {
- try {H5.H5Sclose(sid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(sid);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Sencode_invalid() throws Throwable {
+ public void testH5Sencode_invalid() throws Throwable
+ {
H5.H5Sencode(-1);
}
@Test(expected = NullPointerException.class)
- public void testH5Sdecode_null() throws Throwable {
+ public void testH5Sdecode_null() throws Throwable
+ {
H5.H5Sdecode(null);
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Sget_regular_hyperslab_invalid() throws Throwable {
- long q_start[] = new long[2];
+ public void testH5Sget_regular_hyperslab_invalid() throws Throwable
+ {
+ long q_start[] = new long[2];
long q_stride[] = new long[2];
- long q_count[] = new long[2];
- long q_block[] = new long[2];
+ long q_count[] = new long[2];
+ long q_block[] = new long[2];
H5.H5Sget_regular_hyperslab(-1, q_start, q_stride, q_count, q_block);
}
@Test(expected = hdf.hdf5lib.exceptions.HDF5FunctionArgumentException.class)
- public void testH5Sselect_copy_invalid() throws Throwable {
+ public void testH5Sselect_copy_invalid() throws Throwable
+ {
H5.H5Sselect_copy(-1, -1);
}
@Test(expected = hdf.hdf5lib.exceptions.HDF5DataspaceInterfaceException.class)
- public void testH5Sselect_shape_same_invalid() throws Throwable {
+ public void testH5Sselect_shape_same_invalid() throws Throwable
+ {
H5.H5Sselect_shape_same(-1, -1);
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Sselect_adjust_invalid() throws Throwable {
- long offset[][] = {{0,1},{2,4},{5,6}};
+ public void testH5Sselect_adjust_invalid() throws Throwable
+ {
+ long offset[][] = {{0, 1}, {2, 4}, {5, 6}};
H5.H5Sselect_adjust(-1, offset);
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Sselect_adjust_rank_offset() throws Throwable {
- long sid = HDF5Constants.H5I_INVALID_HID;
- long offset[][] = {{0,1},{2,4},{5,6}};
+ public void testH5Sselect_adjust_rank_offset() throws Throwable
+ {
+ long sid = HDF5Constants.H5I_INVALID_HID;
+ long offset[][] = {{0, 1}, {2, 4}, {5, 6}};
try {
sid = H5.H5Screate(HDF5Constants.H5S_SIMPLE);
- assertTrue("H5.H5Screate_simple_extent",sid > 0);
+ assertTrue("H5.H5Screate_simple_extent", sid > 0);
H5.H5Sselect_adjust(sid, offset);
}
finally {
- try {H5.H5Sclose(sid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(sid);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Sselect_intersect_block_invalid() throws Throwable {
+ public void testH5Sselect_intersect_block_invalid() throws Throwable
+ {
long start[] = new long[2];
- long end[] = new long[2];
+ long end[] = new long[2];
H5.H5Sselect_intersect_block(-1, start, end);
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Sselect_intersect_block_rank_start() throws Throwable {
- long sid = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Sselect_intersect_block_rank_start() throws Throwable
+ {
+ long sid = HDF5Constants.H5I_INVALID_HID;
long start[] = new long[2];
- long end[] = null;
+ long end[] = null;
try {
sid = H5.H5Screate(HDF5Constants.H5S_SIMPLE);
- assertTrue("H5.H5Screate_simple_extent",sid > 0);
+ assertTrue("H5.H5Screate_simple_extent", sid > 0);
H5.H5Sselect_intersect_block(sid, start, end);
}
finally {
- try {H5.H5Sclose(sid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(sid);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Sselect_intersect_block_rank_end() throws Throwable {
- long sid = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Sselect_intersect_block_rank_end() throws Throwable
+ {
+ long sid = HDF5Constants.H5I_INVALID_HID;
long start[] = null;
- long end[] = new long[2];
+ long end[] = new long[2];
try {
sid = H5.H5Screate(HDF5Constants.H5S_SIMPLE);
- assertTrue("H5.H5Screate_simple_extent",sid > 0);
+ assertTrue("H5.H5Screate_simple_extent", sid > 0);
H5.H5Sselect_intersect_block(sid, start, end);
}
finally {
- try {H5.H5Sclose(sid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(sid);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test(expected = hdf.hdf5lib.exceptions.HDF5DataspaceInterfaceException.class)
- public void testH5Sselect_project_intersection_invalid() throws Throwable {
+ public void testH5Sselect_project_intersection_invalid() throws Throwable
+ {
H5.H5Sselect_project_intersection(-1, -1, -1);
}
@Test(expected = hdf.hdf5lib.exceptions.HDF5FunctionArgumentException.class)
- public void testH5Scombine_hyperslab_invalid() throws Throwable {
+ public void testH5Scombine_hyperslab_invalid() throws Throwable
+ {
long start[] = new long[2];
long count[] = new long[2];
H5.H5Scombine_hyperslab(-1, 0, start, null, count, null);
}
@Test(expected = NullPointerException.class)
- public void testH5Scombine_hyperslab_null_start() throws Throwable {
- long sid = HDF5Constants.H5I_INVALID_HID;
- long start[] = null;
+ public void testH5Scombine_hyperslab_null_start() throws Throwable
+ {
+ long sid = HDF5Constants.H5I_INVALID_HID;
+ long start[] = null;
long stride[] = null;
- long count[] = new long[2];
- long block[] = null;
+ long count[] = new long[2];
+ long block[] = null;
try {
sid = H5.H5Screate(HDF5Constants.H5S_SIMPLE);
- assertTrue("H5.H5Screate_simple_extent",sid > 0);
+ assertTrue("H5.H5Screate_simple_extent", sid > 0);
H5.H5Scombine_hyperslab(sid, 0, start, stride, count, block);
}
finally {
- try {H5.H5Sclose(sid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(sid);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test(expected = NullPointerException.class)
- public void testH5Scombine_hyperslab_null_count() throws Throwable {
- long sid = HDF5Constants.H5I_INVALID_HID;
- long start[] = new long[2];
+ public void testH5Scombine_hyperslab_null_count() throws Throwable
+ {
+ long sid = HDF5Constants.H5I_INVALID_HID;
+ long start[] = new long[2];
long stride[] = null;
- long count[] = null;
- long block[] = null;
+ long count[] = null;
+ long block[] = null;
try {
sid = H5.H5Screate(HDF5Constants.H5S_SIMPLE);
- assertTrue("H5.H5Screate_simple_extent",sid > 0);
+ assertTrue("H5.H5Screate_simple_extent", sid > 0);
H5.H5Scombine_hyperslab(sid, 0, start, stride, count, block);
}
finally {
- try {H5.H5Sclose(sid);} catch (Exception ex) {}
+ try {
+ H5.H5Sclose(sid);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test(expected = hdf.hdf5lib.exceptions.HDF5FunctionArgumentException.class)
- public void testH5Smodify_select_invalid() throws Throwable {
+ public void testH5Smodify_select_invalid() throws Throwable
+ {
H5.H5Smodify_select(-1, 0, -1);
}
@Test(expected = hdf.hdf5lib.exceptions.HDF5FunctionArgumentException.class)
- public void testH5Scombine_select_invalid() throws Throwable {
+ public void testH5Scombine_select_invalid() throws Throwable
+ {
H5.H5Scombine_select(-1, 0, -1);
}
-
}
diff --git a/java/test/TestH5T.java b/java/test/TestH5T.java
index ed4e2a9..0121cc2 100644
--- a/java/test/TestH5T.java
+++ b/java/test/TestH5T.java
@@ -30,30 +30,38 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5T {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
private static final String H5_FILE = "testT.h5";
- long H5fid = HDF5Constants.H5I_INVALID_HID;
- long H5strdid = HDF5Constants.H5I_INVALID_HID;
+ long H5fid = HDF5Constants.H5I_INVALID_HID;
+ long H5strdid = HDF5Constants.H5I_INVALID_HID;
- private final void _deleteFile(String filename) {
+ private final void _deleteFile(String filename)
+ {
File file = null;
try {
file = new File(filename);
}
- catch (Throwable err) {}
+ catch (Throwable err) {
+ }
if (file.exists()) {
- try {file.delete();} catch (SecurityException e) {}
+ try {
+ file.delete();
+ }
+ catch (SecurityException e) {
+ }
}
}
@Before
- public void createH5file() throws NullPointerException, HDF5Exception {
- assertTrue("H5 open ids is 0", H5.getOpenIDCount()==0);
+ public void createH5file() throws NullPointerException, HDF5Exception
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
- H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
assertTrue("H5.H5Fcreate", H5fid > 0);
H5strdid = H5.H5Tcopy(HDF5Constants.H5T_C_S1);
assertTrue("H5.H5Tcopy", H5strdid > 0);
@@ -62,28 +70,39 @@ public class TestH5T {
}
@After
- public void deleteH5file() throws HDF5LibraryException {
+ public void deleteH5file() throws HDF5LibraryException
+ {
if (H5strdid >= 0)
- try {H5.H5Tclose(H5strdid);} catch (Exception ex) {}
+ try {
+ H5.H5Tclose(H5strdid);
+ }
+ catch (Exception ex) {
+ }
if (H5fid > 0)
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
_deleteFile(H5_FILE);
System.out.println();
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tequal_type_error() throws Throwable {
+ public void testH5Tequal_type_error() throws Throwable
+ {
H5.H5Tequal(HDF5Constants.H5T_INTEGER, H5strdid);
}
@Test
- public void testH5Tget_class() {
+ public void testH5Tget_class()
+ {
try {
int result = H5.H5Tget_class(H5strdid);
assertTrue("H5.H5Tget_class", result > 0);
String class_name = H5.H5Tget_class_name(result);
- assertTrue("H5.H5Tget_class", class_name.compareTo("H5T_STRING")==0);
+ assertTrue("H5.H5Tget_class", class_name.compareTo("H5T_STRING") == 0);
}
catch (Throwable err) {
err.printStackTrace();
@@ -92,7 +111,8 @@ public class TestH5T {
}
@Test
- public void testH5Tget_size() {
+ public void testH5Tget_size()
+ {
long dt_size = -1;
try {
@@ -106,7 +126,8 @@ public class TestH5T {
}
@Test
- public void testH5Tset_size() {
+ public void testH5Tset_size()
+ {
long dt_size = 5;
try {
@@ -127,89 +148,105 @@ public class TestH5T {
}
@Test
- public void testH5Tarray_create() {
- long filetype_id = HDF5Constants.H5I_INVALID_HID;
- long[] adims = { 3, 5 };
-
- try {
- filetype_id = H5.H5Tarray_create(HDF5Constants.H5T_STD_I64LE, 2, adims);
- assertTrue("testH5Tarray_create", filetype_id >= 0);
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("testH5Tarray_create.H5Tarray_create " + err);
- }
- finally {
- if (filetype_id >= 0)
- try {H5.H5Tclose(filetype_id);} catch (Exception ex) {}
- }
+ public void testH5Tarray_create()
+ {
+ long filetype_id = HDF5Constants.H5I_INVALID_HID;
+ long[] adims = {3, 5};
+
+ try {
+ filetype_id = H5.H5Tarray_create(HDF5Constants.H5T_STD_I64LE, 2, adims);
+ assertTrue("testH5Tarray_create", filetype_id >= 0);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("testH5Tarray_create.H5Tarray_create " + err);
+ }
+ finally {
+ if (filetype_id >= 0)
+ try {
+ H5.H5Tclose(filetype_id);
+ }
+ catch (Exception ex) {
+ }
+ }
}
@Test
- public void testH5Tget_array_ndims() {
- long filetype_id = HDF5Constants.H5I_INVALID_HID;
- int ndims = 0;
- long[] adims = { 3, 5 };
-
- try {
- filetype_id = H5.H5Tarray_create(HDF5Constants.H5T_STD_I64LE, 2, adims);
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("testH5Tarray_create.H5Tarray_create " + err);
- }
- assertTrue("testH5Tget_array_ndims:H5Tarray_create", filetype_id >= 0);
- try {
- ndims = H5.H5Tget_array_ndims(filetype_id);
- assertTrue("testH5Tget_array_ndims", ndims == 2);
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("testH5Tget_array_ndims.H5Tget_array_ndims " + err);
- }
- finally {
- if (filetype_id >= 0)
- try {H5.H5Tclose(filetype_id);} catch (Exception ex) {}
- }
+ public void testH5Tget_array_ndims()
+ {
+ long filetype_id = HDF5Constants.H5I_INVALID_HID;
+ int ndims = 0;
+ long[] adims = {3, 5};
+
+ try {
+ filetype_id = H5.H5Tarray_create(HDF5Constants.H5T_STD_I64LE, 2, adims);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("testH5Tarray_create.H5Tarray_create " + err);
+ }
+ assertTrue("testH5Tget_array_ndims:H5Tarray_create", filetype_id >= 0);
+ try {
+ ndims = H5.H5Tget_array_ndims(filetype_id);
+ assertTrue("testH5Tget_array_ndims", ndims == 2);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("testH5Tget_array_ndims.H5Tget_array_ndims " + err);
+ }
+ finally {
+ if (filetype_id >= 0)
+ try {
+ H5.H5Tclose(filetype_id);
+ }
+ catch (Exception ex) {
+ }
+ }
}
@Test
- public void testH5Tget_array_dims() {
- long filetype_id = HDF5Constants.H5I_INVALID_HID;
- int ndims = 0;
- long[] adims = { 3, 5 };
- long[] rdims = new long[2];
-
- try {
- filetype_id = H5.H5Tarray_create(HDF5Constants.H5T_STD_I64LE, 2, adims);
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("testH5Tarray_create.H5Tarray_create " + err);
- }
- assertTrue("testH5Tget_array_dims:H5Tarray_create", filetype_id >= 0);
- try {
- ndims = H5.H5Tget_array_dims(filetype_id, rdims);
- assertTrue("testH5Tget_array_dims", ndims == 2);
- assertTrue("testH5Tget_array_dims", adims[0] == rdims[0]);
- assertTrue("testH5Tget_array_dims", adims[1] == rdims[1]);
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("testH5Tget_array_dims.H5Tget_array_dims " + err);
- }
- finally {
- if (filetype_id >= 0)
- try {H5.H5Tclose(filetype_id);} catch (Exception ex) {}
- }
+ public void testH5Tget_array_dims()
+ {
+ long filetype_id = HDF5Constants.H5I_INVALID_HID;
+ int ndims = 0;
+ long[] adims = {3, 5};
+ long[] rdims = new long[2];
+
+ try {
+ filetype_id = H5.H5Tarray_create(HDF5Constants.H5T_STD_I64LE, 2, adims);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("testH5Tarray_create.H5Tarray_create " + err);
+ }
+ assertTrue("testH5Tget_array_dims:H5Tarray_create", filetype_id >= 0);
+ try {
+ ndims = H5.H5Tget_array_dims(filetype_id, rdims);
+ assertTrue("testH5Tget_array_dims", ndims == 2);
+ assertTrue("testH5Tget_array_dims", adims[0] == rdims[0]);
+ assertTrue("testH5Tget_array_dims", adims[1] == rdims[1]);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("testH5Tget_array_dims.H5Tget_array_dims " + err);
+ }
+ finally {
+ if (filetype_id >= 0)
+ try {
+ H5.H5Tclose(filetype_id);
+ }
+ catch (Exception ex) {
+ }
+ }
}
@Test
- public void testH5Tenum_functions() {
- long filetype_id = HDF5Constants.H5I_INVALID_HID;
- String enum_type ="Enum_type";
- byte[] enum_val = new byte[1];
- String enum_name = null;
+ public void testH5Tenum_functions()
+ {
+ long filetype_id = HDF5Constants.H5I_INVALID_HID;
+ String enum_type = "Enum_type";
+ byte[] enum_val = new byte[1];
+ String enum_name = null;
// Create a enumerate datatype
try {
@@ -221,15 +258,15 @@ public class TestH5T {
}
assertTrue("testH5Tenum_functions:H5Tcreate", filetype_id >= 0);
try {
- enum_val[0]=10;
+ enum_val[0] = 10;
H5.H5Tenum_insert(filetype_id, "RED", enum_val);
- enum_val[0]=11;
+ enum_val[0] = 11;
H5.H5Tenum_insert(filetype_id, "GREEN", enum_val);
- enum_val[0]=12;
+ enum_val[0] = 12;
H5.H5Tenum_insert(filetype_id, "BLUE", enum_val);
- enum_val[0]=13;
+ enum_val[0] = 13;
H5.H5Tenum_insert(filetype_id, "ORANGE", enum_val);
- enum_val[0]=14;
+ enum_val[0] = 14;
H5.H5Tenum_insert(filetype_id, "YELLOW", enum_val);
// Query member number and member index by member name, for enumeration type.
@@ -237,7 +274,8 @@ public class TestH5T {
assertTrue("Can't get correct index number", H5.H5Tget_member_index(filetype_id, "ORANGE") == 3);
// Commit enumeration datatype and close it */
- H5.H5Tcommit(H5fid, enum_type, filetype_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ H5.H5Tcommit(H5fid, enum_type, filetype_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
H5.H5Tclose(filetype_id);
@@ -250,17 +288,17 @@ public class TestH5T {
assertTrue("Can't get correct index number", H5.H5Tget_member_index(filetype_id, "ORANGE") == 3);
// Query member value by member name, for enumeration type
- H5.H5Tenum_valueof (filetype_id, "ORANGE", enum_val);
- assertTrue("Incorrect value for enum member", enum_val[0]==13);
+ H5.H5Tenum_valueof(filetype_id, "ORANGE", enum_val);
+ assertTrue("Incorrect value for enum member", enum_val[0] == 13);
// Query member value by member index, for enumeration type
- H5.H5Tget_member_value (filetype_id, 2, enum_val);
- assertTrue("Incorrect value for enum member", enum_val[0]==12);
+ H5.H5Tget_member_value(filetype_id, 2, enum_val);
+ assertTrue("Incorrect value for enum member", enum_val[0] == 12);
// Query member name by member value, for enumeration type
enum_val[0] = 14;
- enum_name = H5.H5Tenum_nameof(filetype_id, enum_val, 16);
- assertTrue("Incorrect name for enum member", enum_name.compareTo("YELLOW")==0);
+ enum_name = H5.H5Tenum_nameof(filetype_id, enum_val, 16);
+ assertTrue("Incorrect name for enum member", enum_name.compareTo("YELLOW") == 0);
}
catch (Throwable err) {
err.printStackTrace();
@@ -268,14 +306,19 @@ public class TestH5T {
}
finally {
if (filetype_id >= 0)
- try {H5.H5Tclose(filetype_id);} catch (Exception ex) {}
+ try {
+ H5.H5Tclose(filetype_id);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Tenum_create_functions() {
- long filetype_id = HDF5Constants.H5I_INVALID_HID;
- byte[] enum_val = new byte[1];
+ public void testH5Tenum_create_functions()
+ {
+ long filetype_id = HDF5Constants.H5I_INVALID_HID;
+ byte[] enum_val = new byte[1];
// Create a enumerate datatype
try {
@@ -287,15 +330,15 @@ public class TestH5T {
}
assertTrue("testH5Tenum_create_functions:H5Tcreate", filetype_id >= 0);
try {
- enum_val[0]=10;
+ enum_val[0] = 10;
H5.H5Tenum_insert(filetype_id, "RED", enum_val);
- enum_val[0]=11;
+ enum_val[0] = 11;
H5.H5Tenum_insert(filetype_id, "GREEN", enum_val);
- enum_val[0]=12;
+ enum_val[0] = 12;
H5.H5Tenum_insert(filetype_id, "BLUE", enum_val);
- enum_val[0]=13;
+ enum_val[0] = 13;
H5.H5Tenum_insert(filetype_id, "ORANGE", enum_val);
- enum_val[0]=14;
+ enum_val[0] = 14;
H5.H5Tenum_insert(filetype_id, "YELLOW", enum_val);
// Query member number and member index by member name, for enumeration type.
@@ -308,14 +351,19 @@ public class TestH5T {
}
finally {
if (filetype_id >= 0)
- try {H5.H5Tclose(filetype_id);} catch (Exception ex) {}
+ try {
+ H5.H5Tclose(filetype_id);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Topaque_functions() {
- long filetype_id = HDF5Constants.H5I_INVALID_HID;
- String opaque_name = null;
+ public void testH5Topaque_functions()
+ {
+ long filetype_id = HDF5Constants.H5I_INVALID_HID;
+ String opaque_name = null;
// Create a opaque datatype
try {
@@ -330,7 +378,7 @@ public class TestH5T {
try {
H5.H5Tset_tag(filetype_id, "opaque type");
opaque_name = H5.H5Tget_tag(filetype_id);
- assertTrue("Incorrect tag for opaque type", opaque_name.compareTo("opaque type")==0);
+ assertTrue("Incorrect tag for opaque type", opaque_name.compareTo("opaque type") == 0);
}
catch (Throwable err) {
err.printStackTrace();
@@ -338,67 +386,83 @@ public class TestH5T {
}
finally {
if (filetype_id >= 0)
- try {H5.H5Tclose(filetype_id);} catch (Exception ex) {}
+ try {
+ H5.H5Tclose(filetype_id);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Tvlen_create() {
+ public void testH5Tvlen_create()
+ {
long filetype_id = HDF5Constants.H5I_INVALID_HID;
- try {
- filetype_id = H5.H5Tvlen_create(HDF5Constants.H5T_C_S1);
- assertTrue("testH5Tvlen_create", filetype_id >= 0);
-
- // Check if datatype is VL type
- int vlclass = H5.H5Tget_class(filetype_id);
- assertTrue("testH5Tvlen_create:H5Tget_class", vlclass == HDF5Constants.H5T_VLEN);
- assertFalse("testH5Tis_variable_str:H5Tget_class", vlclass == HDF5Constants.H5T_STRING);
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("testH5Tvlen_create.H5Tvlen_create " + err);
- }
- finally {
- if (filetype_id >= 0)
- try {H5.H5Tclose(filetype_id);} catch (Exception ex) {}
- }
+ try {
+ filetype_id = H5.H5Tvlen_create(HDF5Constants.H5T_C_S1);
+ assertTrue("testH5Tvlen_create", filetype_id >= 0);
+
+ // Check if datatype is VL type
+ int vlclass = H5.H5Tget_class(filetype_id);
+ assertTrue("testH5Tvlen_create:H5Tget_class", vlclass == HDF5Constants.H5T_VLEN);
+ assertFalse("testH5Tis_variable_str:H5Tget_class", vlclass == HDF5Constants.H5T_STRING);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("testH5Tvlen_create.H5Tvlen_create " + err);
+ }
+ finally {
+ if (filetype_id >= 0)
+ try {
+ H5.H5Tclose(filetype_id);
+ }
+ catch (Exception ex) {
+ }
+ }
}
@Test
- public void testH5Tis_variable_str() {
- long filetype_id = HDF5Constants.H5I_INVALID_HID;
-
- try {
- filetype_id = H5.H5Tcopy(HDF5Constants.H5T_C_S1);
- assertTrue("testH5Tis_variable_str.H5Tcopy: ", filetype_id >= 0);
-
- // Convert to variable-length string
- H5.H5Tset_size(filetype_id, HDF5Constants.H5T_VARIABLE);
-
- // Check if datatype is VL string
- int vlclass = H5.H5Tget_class(filetype_id);
- assertTrue("testH5Tis_variable_str:H5Tget_class", vlclass == HDF5Constants.H5T_STRING);
- assertFalse("testH5Tvlen_create:H5Tget_class", vlclass == HDF5Constants.H5T_VLEN);
-
- assertTrue("testH5Tis_variable_str:H5Tis_variable_str", H5.H5Tis_variable_str(filetype_id));
-
- // Verify that the class detects as a string
- assertTrue("testH5Tis_variable_str:H5Tdetect_class", H5.H5Tdetect_class(filetype_id, HDF5Constants.H5T_STRING));
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("testH5Tis_variable_str " + err);
- }
- finally {
- if (filetype_id >= 0)
- try {H5.H5Tclose(filetype_id);} catch (Exception ex) {}
- }
+ public void testH5Tis_variable_str()
+ {
+ long filetype_id = HDF5Constants.H5I_INVALID_HID;
+
+ try {
+ filetype_id = H5.H5Tcopy(HDF5Constants.H5T_C_S1);
+ assertTrue("testH5Tis_variable_str.H5Tcopy: ", filetype_id >= 0);
+
+ // Convert to variable-length string
+ H5.H5Tset_size(filetype_id, HDF5Constants.H5T_VARIABLE);
+
+ // Check if datatype is VL string
+ int vlclass = H5.H5Tget_class(filetype_id);
+ assertTrue("testH5Tis_variable_str:H5Tget_class", vlclass == HDF5Constants.H5T_STRING);
+ assertFalse("testH5Tvlen_create:H5Tget_class", vlclass == HDF5Constants.H5T_VLEN);
+
+ assertTrue("testH5Tis_variable_str:H5Tis_variable_str", H5.H5Tis_variable_str(filetype_id));
+
+ // Verify that the class detects as a string
+ assertTrue("testH5Tis_variable_str:H5Tdetect_class",
+ H5.H5Tdetect_class(filetype_id, HDF5Constants.H5T_STRING));
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("testH5Tis_variable_str " + err);
+ }
+ finally {
+ if (filetype_id >= 0)
+ try {
+ H5.H5Tclose(filetype_id);
+ }
+ catch (Exception ex) {
+ }
+ }
}
@Test
- public void testH5Tcompound_functions() {
- long filetype_id = HDF5Constants.H5I_INVALID_HID;
+ public void testH5Tcompound_functions()
+ {
+ long filetype_id = HDF5Constants.H5I_INVALID_HID;
// Create a compound datatype
try {
@@ -420,28 +484,34 @@ public class TestH5T {
// We started to support this function for compound type in 1.8.6 release.
int order = H5.H5Tget_order(filetype_id);
assertFalse("Can't get order for compound type.", order == HDF5Constants.H5T_ORDER_ERROR);
- assertTrue("Wrong order for this type.", (order == HDF5Constants.H5T_ORDER_LE) || (order == HDF5Constants.H5T_ORDER_BE));
+ assertTrue("Wrong order for this type.",
+ (order == HDF5Constants.H5T_ORDER_LE) || (order == HDF5Constants.H5T_ORDER_BE));
// Make certain that the correct classes can be detected
- assertTrue("Can't get correct class", H5.H5Tdetect_class(filetype_id, HDF5Constants.H5T_COMPOUND));
+ assertTrue("Can't get correct class",
+ H5.H5Tdetect_class(filetype_id, HDF5Constants.H5T_COMPOUND));
assertTrue("Can't get correct class", H5.H5Tdetect_class(filetype_id, HDF5Constants.H5T_FLOAT));
// Make certain that an incorrect class is not detected
assertFalse("Can get incorrect class", H5.H5Tdetect_class(filetype_id, HDF5Constants.H5T_TIME));
// Query member name by member index
- String index_name = H5.H5Tget_member_name (filetype_id, 0);
- assertTrue("Incorrect name for member index", index_name.compareTo("Lon")==0);
+ String index_name = H5.H5Tget_member_name(filetype_id, 0);
+ assertTrue("Incorrect name for member index", index_name.compareTo("Lon") == 0);
// Query member offset by member no
- long index_offset = H5.H5Tget_member_offset (filetype_id, 1);
+ long index_offset = H5.H5Tget_member_offset(filetype_id, 1);
assertTrue("Incorrect offset for member no", index_offset == 8);
// Query member type by member index
- long index_type = H5.H5Tget_member_type (filetype_id, 0);
- assertTrue("Incorrect type for member index", H5.H5Tequal(HDF5Constants.H5T_NATIVE_DOUBLE, index_type));
+ long index_type = H5.H5Tget_member_type(filetype_id, 0);
+ assertTrue("Incorrect type for member index",
+ H5.H5Tequal(HDF5Constants.H5T_NATIVE_DOUBLE, index_type));
if (index_type >= 0)
- try {H5.H5Tclose(index_type);} catch (Exception ex) {}
-
+ try {
+ H5.H5Tclose(index_type);
+ }
+ catch (Exception ex) {
+ }
}
catch (Throwable err) {
err.printStackTrace();
@@ -449,8 +519,11 @@ public class TestH5T {
}
finally {
if (filetype_id >= 0)
- try {H5.H5Tclose(filetype_id);} catch (Exception ex) {}
+ try {
+ H5.H5Tclose(filetype_id);
+ }
+ catch (Exception ex) {
+ }
}
}
-
}
diff --git a/java/test/TestH5Tbasic.java b/java/test/TestH5Tbasic.java
index 7aac2ab..8fb1e58 100644
--- a/java/test/TestH5Tbasic.java
+++ b/java/test/TestH5Tbasic.java
@@ -15,6 +15,7 @@ package test;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
+
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
@@ -25,24 +26,28 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5Tbasic {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
@Before
- public void checkOpenIDs() {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ public void checkOpenIDs()
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
}
@After
- public void nextTestName() {
+ public void nextTestName()
+ {
System.out.println();
}
@Test
- public void testH5Tcopy() {
+ public void testH5Tcopy()
+ {
long H5strdid = HDF5Constants.H5I_INVALID_HID;
try {
H5strdid = H5.H5Tcopy(HDF5Constants.H5T_C_S1);
- assertTrue("H5.H5Tcopy",H5strdid > 0);
+ assertTrue("H5.H5Tcopy", H5strdid > 0);
}
catch (Throwable err) {
err.printStackTrace();
@@ -50,18 +55,23 @@ public class TestH5Tbasic {
}
finally {
if (H5strdid >= 0)
- try {H5.H5Tclose(H5strdid);} catch (Exception ex) {}
+ try {
+ H5.H5Tclose(H5strdid);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Tequal() {
+ public void testH5Tequal()
+ {
long H5strdid = HDF5Constants.H5I_INVALID_HID;
try {
H5strdid = H5.H5Tcopy(HDF5Constants.H5T_C_S1);
- assertTrue("H5.H5Tcopy",H5strdid > 0);
+ assertTrue("H5.H5Tcopy", H5strdid > 0);
boolean teq = H5.H5Tequal(HDF5Constants.H5T_C_S1, H5strdid);
- assertTrue("H5.H5Tequal",teq);
+ assertTrue("H5.H5Tequal", teq);
}
catch (Throwable err) {
err.printStackTrace();
@@ -69,18 +79,23 @@ public class TestH5Tbasic {
}
finally {
if (H5strdid >= 0)
- try {H5.H5Tclose(H5strdid);} catch (Exception ex) {}
+ try {
+ H5.H5Tclose(H5strdid);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Tequal_not() {
+ public void testH5Tequal_not()
+ {
long H5strdid = HDF5Constants.H5I_INVALID_HID;
try {
H5strdid = H5.H5Tcopy(HDF5Constants.H5T_STD_U64LE);
- assertTrue("H5.H5Tcopy",H5strdid > 0);
+ assertTrue("H5.H5Tcopy", H5strdid > 0);
boolean teq = H5.H5Tequal(HDF5Constants.H5T_IEEE_F32BE, H5strdid);
- assertFalse("H5.H5Tequal",teq);
+ assertFalse("H5.H5Tequal", teq);
}
catch (Throwable err) {
err.printStackTrace();
@@ -88,22 +103,27 @@ public class TestH5Tbasic {
}
finally {
if (H5strdid >= 0)
- try {H5.H5Tclose(H5strdid);} catch (Exception ex) {}
+ try {
+ H5.H5Tclose(H5strdid);
+ }
+ catch (Exception ex) {
+ }
}
}
@Test
- public void testH5Tconvert() {
- String[] strs = {"a1234","b1234"};
- int srcLen = 5;
- int dstLen = 10;
- long srcId = HDF5Constants.H5I_INVALID_HID;
- long dstId = HDF5Constants.H5I_INVALID_HID;
- int dimSize = strs.length;
- byte[] buf = new byte[dimSize*dstLen];
-
- for (int i=0; i<dimSize; i++)
- System.arraycopy(strs[i].getBytes(), 0, buf, i*srcLen, 5);
+ public void testH5Tconvert()
+ {
+ String[] strs = {"a1234", "b1234"};
+ int srcLen = 5;
+ int dstLen = 10;
+ long srcId = HDF5Constants.H5I_INVALID_HID;
+ long dstId = HDF5Constants.H5I_INVALID_HID;
+ int dimSize = strs.length;
+ byte[] buf = new byte[dimSize * dstLen];
+
+ for (int i = 0; i < dimSize; i++)
+ System.arraycopy(strs[i].getBytes(), 0, buf, i * srcLen, 5);
try {
srcId = H5.H5Tcopy(HDF5Constants.H5T_C_S1);
@@ -119,22 +139,31 @@ public class TestH5Tbasic {
fail("testH5Tconvert: " + err);
}
finally {
- try {H5.H5Tclose(srcId);} catch (Exception ex) {}
- try {H5.H5Tclose(dstId);} catch (Exception ex) {}
+ try {
+ H5.H5Tclose(srcId);
+ }
+ catch (Exception ex) {
+ }
+ try {
+ H5.H5Tclose(dstId);
+ }
+ catch (Exception ex) {
+ }
}
- for (int i=0; i<strs.length; i++) {
- assertTrue((new String(buf, i*dstLen, dstLen)).startsWith(strs[i]));
+ for (int i = 0; i < strs.length; i++) {
+ assertTrue((new String(buf, i * dstLen, dstLen)).startsWith(strs[i]));
}
}
@Test
- public void testH5Torder_size() {
+ public void testH5Torder_size()
+ {
long H5strdid = HDF5Constants.H5I_INVALID_HID;
try {
// Fixed length string
H5strdid = H5.H5Tcopy(HDF5Constants.H5T_C_S1);
- assertTrue("H5.H5Tcopy",H5strdid > 0);
+ assertTrue("H5.H5Tcopy", H5strdid > 0);
H5.H5Tset_size(H5strdid, (long)5);
assertTrue(HDF5Constants.H5T_ORDER_NONE == H5.H5Tget_order(H5strdid));
H5.H5Tset_order(H5strdid, HDF5Constants.H5T_ORDER_NONE);
@@ -152,7 +181,11 @@ public class TestH5Tbasic {
}
finally {
if (H5strdid >= 0)
- try {H5.H5Tclose(H5strdid);} catch (Exception ex) {}
+ try {
+ H5.H5Tclose(H5strdid);
+ }
+ catch (Exception ex) {
+ }
}
}
}
diff --git a/java/test/TestH5Tparams.java b/java/test/TestH5Tparams.java
index 92a034c..a1710af 100644
--- a/java/test/TestH5Tparams.java
+++ b/java/test/TestH5Tparams.java
@@ -13,6 +13,7 @@
package test;
import static org.junit.Assert.assertTrue;
+
import hdf.hdf5lib.H5;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
@@ -23,385 +24,459 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5Tparams {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
@Before
- public void checkOpenIDs() {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ public void checkOpenIDs()
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
}
@After
- public void nextTestName() {
+ public void nextTestName()
+ {
System.out.println();
}
- @Test//(expected = HDF5LibraryException.class)
- public void testH5Tclose_invalid() throws Throwable {
+ @Test //(expected = HDF5LibraryException.class)
+ public void testH5Tclose_invalid() throws Throwable
+ {
long tid = H5.H5Tclose(-1);
assertTrue(tid == 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tcopy_invalid() throws Throwable {
+ public void testH5Tcopy_invalid() throws Throwable
+ {
H5.H5Tcopy(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tequal_invalid() throws Throwable {
+ public void testH5Tequal_invalid() throws Throwable
+ {
H5.H5Tequal(-1, -1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tlock_invalid() throws Throwable {
+ public void testH5Tlock_invalid() throws Throwable
+ {
H5.H5Tlock(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tget_class_invalid() throws Throwable {
+ public void testH5Tget_class_invalid() throws Throwable
+ {
H5.H5Tget_class(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tget_size_invalid() throws Throwable {
+ public void testH5Tget_size_invalid() throws Throwable
+ {
H5.H5Tget_size(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tset_size_invalid() throws Throwable {
+ public void testH5Tset_size_invalid() throws Throwable
+ {
H5.H5Tset_size(-1, 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tget_order_invalid() throws Throwable {
+ public void testH5Tget_order_invalid() throws Throwable
+ {
H5.H5Tget_order(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tset_order_invalid() throws Throwable {
+ public void testH5Tset_order_invalid() throws Throwable
+ {
H5.H5Tset_order(-1, 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tget_precision_invalid() throws Throwable {
+ public void testH5Tget_precision_invalid() throws Throwable
+ {
H5.H5Tget_precision(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tget_precision_long_invalid() throws Throwable {
+ public void testH5Tget_precision_long_invalid() throws Throwable
+ {
H5.H5Tget_precision_long(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tset_precision_invalid() throws Throwable {
+ public void testH5Tset_precision_invalid() throws Throwable
+ {
H5.H5Tset_precision(-1, 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tget_offset_invalid() throws Throwable {
+ public void testH5Tget_offset_invalid() throws Throwable
+ {
H5.H5Tget_offset(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tset_offset_invalid() throws Throwable {
+ public void testH5Tset_offset_invalid() throws Throwable
+ {
H5.H5Tset_offset(-1, 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tcreate_invalid() throws Throwable {
+ public void testH5Tcreate_invalid() throws Throwable
+ {
H5.H5Tcreate(-1, (long)0);
}
@Test(expected = NullPointerException.class)
- public void testH5Topen_null() throws Throwable {
+ public void testH5Topen_null() throws Throwable
+ {
H5.H5Topen(-1, null, 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Topen_invalid() throws Throwable {
+ public void testH5Topen_invalid() throws Throwable
+ {
H5.H5Topen(-1, "Bogus", 0);
}
@Test(expected = NullPointerException.class)
- public void testH5Tcommit_null() throws Throwable {
+ public void testH5Tcommit_null() throws Throwable
+ {
H5.H5Tcommit(-1, null, 0, -1, -1, -1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tcommit_invalid() throws Throwable {
+ public void testH5Tcommit_invalid() throws Throwable
+ {
H5.H5Tcommit(-1, "Bogus", -1, -1, -1, -1);
}
@Test(expected = NullPointerException.class)
- public void testH5Tget_pad_null() throws Throwable {
+ public void testH5Tget_pad_null() throws Throwable
+ {
H5.H5Tget_pad(-1, null);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tget_pad_invalid() throws Throwable {
+ public void testH5Tget_pad_invalid() throws Throwable
+ {
int[] pad = new int[2];
H5.H5Tget_pad(-1, pad);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tset_pad_invalid() throws Throwable {
+ public void testH5Tset_pad_invalid() throws Throwable
+ {
H5.H5Tset_pad(-1, -1, -1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tget_sign_invalid() throws Throwable {
+ public void testH5Tget_sign_invalid() throws Throwable
+ {
H5.H5Tget_sign(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tset_sign_invalid() throws Throwable {
+ public void testH5Tset_sign_invalid() throws Throwable
+ {
H5.H5Tset_sign(-1, 0);
}
@Test(expected = NullPointerException.class)
- public void testH5Tget_fields_null() throws Throwable {
+ public void testH5Tget_fields_null() throws Throwable
+ {
H5.H5Tget_fields(-1, (long[])null);
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Tget_fields_length_invalid() throws Throwable {
+ public void testH5Tget_fields_length_invalid() throws Throwable
+ {
long[] fields = new long[2];
H5.H5Tget_fields(-1, fields);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tget_fields_invalid() throws Throwable {
+ public void testH5Tget_fields_invalid() throws Throwable
+ {
long[] fields = new long[5];
H5.H5Tget_fields(-1, fields);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tset_fields_invalid() throws Throwable {
+ public void testH5Tset_fields_invalid() throws Throwable
+ {
H5.H5Tset_fields(-1, -1, -1, -1, -1, -1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tget_ebias_invalid() throws Throwable {
+ public void testH5Tget_ebias_invalid() throws Throwable
+ {
H5.H5Tget_ebias(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tget_ebias_long_invalid() throws Throwable {
+ public void testH5Tget_ebias_long_invalid() throws Throwable
+ {
H5.H5Tget_ebias_long(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tset_ebias_invalid() throws Throwable {
+ public void testH5Tset_ebias_invalid() throws Throwable
+ {
H5.H5Tset_ebias(-1, 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tget_norm_invalid() throws Throwable {
+ public void testH5Tget_norm_invalid() throws Throwable
+ {
H5.H5Tget_norm(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tset_norm_invalid() throws Throwable {
+ public void testH5Tset_norm_invalid() throws Throwable
+ {
H5.H5Tset_norm(-1, 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tget_inpad_invalid() throws Throwable {
+ public void testH5Tget_inpad_invalid() throws Throwable
+ {
H5.H5Tget_inpad(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tset_inpad_invalid() throws Throwable {
+ public void testH5Tset_inpad_invalid() throws Throwable
+ {
H5.H5Tset_inpad(-1, 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tget_cset_invalid() throws Throwable {
+ public void testH5Tget_cset_invalid() throws Throwable
+ {
H5.H5Tget_cset(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tset_cset_invalid() throws Throwable {
+ public void testH5Tset_cset_invalid() throws Throwable
+ {
H5.H5Tset_cset(-1, 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tget_strpad_invalid() throws Throwable {
+ public void testH5Tget_strpad_invalid() throws Throwable
+ {
H5.H5Tget_strpad(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tset_strpad_invalid() throws Throwable {
+ public void testH5Tset_strpad_invalid() throws Throwable
+ {
H5.H5Tset_strpad(-1, 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tget_nmembers_invalid() throws Throwable {
+ public void testH5Tget_nmembers_invalid() throws Throwable
+ {
H5.H5Tget_nmembers(-1);
}
@Test(expected = NullPointerException.class)
- public void testH5Tget_member_index_null() throws Throwable {
+ public void testH5Tget_member_index_null() throws Throwable
+ {
H5.H5Tget_member_index(-1, null);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tget_member_index_invalid() throws Throwable {
+ public void testH5Tget_member_index_invalid() throws Throwable
+ {
H5.H5Tget_member_index(-1, "Bogus");
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tget_member_type_invalid() throws Throwable {
+ public void testH5Tget_member_type_invalid() throws Throwable
+ {
H5.H5Tget_member_type(-1, -1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tget_member_class_invalid() throws Throwable {
+ public void testH5Tget_member_class_invalid() throws Throwable
+ {
H5.H5Tget_member_class(-1, -1);
}
@Test(expected = NullPointerException.class)
- public void testH5Tinsert_null() throws Throwable {
+ public void testH5Tinsert_null() throws Throwable
+ {
H5.H5Tinsert(-1, null, 0, 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tinsert_invalid() throws Throwable {
+ public void testH5Tinsert_invalid() throws Throwable
+ {
H5.H5Tinsert(-1, "Bogus", 0, 0);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tpack_invalid() throws Throwable {
+ public void testH5Tpack_invalid() throws Throwable
+ {
H5.H5Tpack(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Treclaim_invalid() throws Throwable {
+ public void testH5Treclaim_invalid() throws Throwable
+ {
byte[] buf = new byte[2];
H5.H5Treclaim(-1, -1, -1, buf);
}
@Test(expected = NullPointerException.class)
- public void testH5Treclaim_null() throws Throwable {
+ public void testH5Treclaim_null() throws Throwable
+ {
H5.H5Treclaim(-1, -1, -1, null);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tvlen_create_invalid() throws Throwable {
+ public void testH5Tvlen_create_invalid() throws Throwable
+ {
H5.H5Tvlen_create(-1);
}
@Test(expected = NullPointerException.class)
- public void testH5Tset_tag_null() throws Throwable {
+ public void testH5Tset_tag_null() throws Throwable
+ {
H5.H5Tset_tag(-1, null);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tset_tag_invalid() throws Throwable {
+ public void testH5Tset_tag_invalid() throws Throwable
+ {
H5.H5Tset_tag(-1, "Bogus");
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tget_super_invalid() throws Throwable {
+ public void testH5Tget_super_invalid() throws Throwable
+ {
H5.H5Tget_super(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tenum_create_invalid() throws Throwable {
+ public void testH5Tenum_create_invalid() throws Throwable
+ {
H5.H5Tenum_create(-1);
}
@Test(expected = NullPointerException.class)
- public void testH5Tenum_insert_name_null() throws Throwable {
+ public void testH5Tenum_insert_name_null() throws Throwable
+ {
H5.H5Tenum_insert(-1, null, (byte[])null);
}
@Test(expected = NullPointerException.class)
- public void testH5Tenum_insert_null() throws Throwable {
+ public void testH5Tenum_insert_null() throws Throwable
+ {
H5.H5Tenum_insert(-1, "bogus", (byte[])null);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tenum_insert_invalid() throws Throwable {
+ public void testH5Tenum_insert_invalid() throws Throwable
+ {
byte[] enumtype = new byte[2];
H5.H5Tenum_insert(-1, "bogus", enumtype);
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Tenum_nameof_invalid_size() throws Throwable {
+ public void testH5Tenum_nameof_invalid_size() throws Throwable
+ {
H5.H5Tenum_nameof(-1, null, -1);
}
@Test(expected = NullPointerException.class)
- public void testH5Tenum_nameof_value_null() throws Throwable {
+ public void testH5Tenum_nameof_value_null() throws Throwable
+ {
H5.H5Tenum_nameof(-1, null, 1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tenum_nameof_invalid() throws Throwable {
+ public void testH5Tenum_nameof_invalid() throws Throwable
+ {
byte[] btype = new byte[2];
H5.H5Tenum_nameof(-1, btype, 1);
}
@Test(expected = NullPointerException.class)
- public void testH5Tenum_valueof_name_null() throws Throwable {
+ public void testH5Tenum_valueof_name_null() throws Throwable
+ {
H5.H5Tenum_valueof(-1, null, (byte[])null);
}
@Test(expected = NullPointerException.class)
- public void testH5Tenum_valueof_null() throws Throwable {
+ public void testH5Tenum_valueof_null() throws Throwable
+ {
H5.H5Tenum_valueof(-1, "bogus", (byte[])null);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tenum_valueof_invalid() throws Throwable {
+ public void testH5Tenum_valueof_invalid() throws Throwable
+ {
byte[] btype = new byte[2];
H5.H5Tenum_valueof(-1, "bogus", btype);
}
@Test(expected = NullPointerException.class)
- public void testH5Tget_member_value_null() throws Throwable {
+ public void testH5Tget_member_value_null() throws Throwable
+ {
H5.H5Tget_member_value(-1, -1, (byte[])null);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tget_member_value_invalid() throws Throwable {
+ public void testH5Tget_member_value_invalid() throws Throwable
+ {
byte[] btype = new byte[2];
H5.H5Tget_member_value(-1, -1, btype);
}
@Test(expected = IllegalArgumentException.class)
- public void testH5Tarray_create_invalid() throws Throwable {
+ public void testH5Tarray_create_invalid() throws Throwable
+ {
H5.H5Tarray_create(-1, -1, null);
}
@Test(expected = NullPointerException.class)
- public void testH5Tarray_create_value_null() throws Throwable {
+ public void testH5Tarray_create_value_null() throws Throwable
+ {
H5.H5Tarray_create(-1, 1, null);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tget_array_ndims_invalid() throws Throwable {
+ public void testH5Tget_array_ndims_invalid() throws Throwable
+ {
H5.H5Tget_array_ndims(-1);
}
@Test(expected = NullPointerException.class)
- public void testH5Tget_array_dims_null() throws Throwable {
+ public void testH5Tget_array_dims_null() throws Throwable
+ {
H5.H5Tget_array_dims(-1, null);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tget_native_type_invalid() throws Throwable {
+ public void testH5Tget_native_type_invalid() throws Throwable
+ {
H5.H5Tget_native_type(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Tflush_invalid() throws Throwable {
+ public void testH5Tflush_invalid() throws Throwable
+ {
H5.H5Tflush(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Trefresh_invalid() throws Throwable {
+ public void testH5Trefresh_invalid() throws Throwable
+ {
H5.H5Trefresh(-1);
}
-
}
diff --git a/java/test/TestH5VL.java b/java/test/TestH5VL.java
index 4253d20..99505ae 100644
--- a/java/test/TestH5VL.java
+++ b/java/test/TestH5VL.java
@@ -16,12 +16,13 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
+
+import java.io.File;
+
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
-import java.io.File;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
@@ -29,28 +30,37 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5VL {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
- private final void _deleteFile(String filename) {
+ private final void _deleteFile(String filename)
+ {
File file = new File(filename);
if (file.exists()) {
- try {file.delete();} catch (SecurityException e) {}
+ try {
+ file.delete();
+ }
+ catch (SecurityException e) {
+ }
}
}
@Before
- public void checkOpenIDs() {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ public void checkOpenIDs()
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
}
@After
- public void nextTestName() {
+ public void nextTestName()
+ {
System.out.println();
}
@Test
- public void testH5VLnative_init() {
+ public void testH5VLnative_init()
+ {
try {
boolean is_registered;
@@ -70,11 +80,12 @@ public class TestH5VL {
}
@Test
- public void testH5VLget_connector_id() {
+ public void testH5VLget_connector_id()
+ {
String H5_FILE = "testFvl.h5";
- long H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ long H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
try {
long native_id = H5.H5VLget_connector_id(H5fid);
@@ -95,14 +106,19 @@ public class TestH5VL {
}
finally {
if (H5fid > 0) {
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
}
_deleteFile(H5_FILE);
}
}
@Test
- public void testH5VLget_connector_id_by_name() {
+ public void testH5VLget_connector_id_by_name()
+ {
try {
long native_id = H5.H5VLget_connector_id_by_name(HDF5Constants.H5VL_NATIVE_NAME);
assertTrue("H5.H5VLget_connector_id_by_name H5VL_NATIVE_NAME", native_id >= 0);
@@ -115,7 +131,8 @@ public class TestH5VL {
}
@Test
- public void testH5VLget_connector_id_by_value() {
+ public void testH5VLget_connector_id_by_value()
+ {
try {
long native_id = H5.H5VLget_connector_id_by_value(HDF5Constants.H5VL_NATIVE_VALUE);
assertTrue("H5.H5VLget_connector_id_by_value H5VL_NATIVE_VALUE", native_id >= 0);
@@ -128,11 +145,12 @@ public class TestH5VL {
}
@Test
- public void testH5VLget_connector_name() {
+ public void testH5VLget_connector_name()
+ {
String H5_FILE = "testFvl.h5";
- long H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC,
- HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
+ long H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT,
+ HDF5Constants.H5P_DEFAULT);
H5.H5Fflush(H5fid, HDF5Constants.H5F_SCOPE_LOCAL);
try {
@@ -145,7 +163,8 @@ public class TestH5VL {
*/
String connector = System.getenv("HDF5_VOL_CONNECTOR");
if (connector == null)
- assertTrue("H5.H5VLget_connector_name H5VL_NATIVE", native_name.compareToIgnoreCase(HDF5Constants.H5VL_NATIVE_NAME)==0);
+ assertTrue("H5.H5VLget_connector_name H5VL_NATIVE",
+ native_name.compareToIgnoreCase(HDF5Constants.H5VL_NATIVE_NAME) == 0);
}
catch (Throwable err) {
err.printStackTrace();
@@ -153,20 +172,25 @@ public class TestH5VL {
}
finally {
if (H5fid > 0) {
- try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
+ try {
+ H5.H5Fclose(H5fid);
+ }
+ catch (Exception ex) {
+ }
}
_deleteFile(H5_FILE);
}
}
@Test(expected = HDF5LibraryException.class)
- public void testH5VLclose_NegativeID() throws Throwable {
+ public void testH5VLclose_NegativeID() throws Throwable
+ {
H5.H5VLclose(-1);
}
@Test(expected = HDF5LibraryException.class)
- public void testH5VLunregister_connector_NegativeID() throws Throwable {
+ public void testH5VLunregister_connector_NegativeID() throws Throwable
+ {
H5.H5VLunregister_connector(-1);
}
}
-
diff --git a/java/test/TestH5Z.java b/java/test/TestH5Z.java
index fde8f1a..bc6bfc0 100644
--- a/java/test/TestH5Z.java
+++ b/java/test/TestH5Z.java
@@ -14,6 +14,7 @@ package test;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
+
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
@@ -25,20 +26,24 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5Z {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
@Before
- public void checkOpenIDs() {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ public void checkOpenIDs()
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
}
@After
- public void nextTestName() {
+ public void nextTestName()
+ {
System.out.println();
}
@Test
- public void testH5Zfilter_avail() {
+ public void testH5Zfilter_avail()
+ {
try {
int filter_found;
@@ -64,34 +69,46 @@ public class TestH5Z {
}
@Test
- public void testH5Zget_filter_info() {
+ public void testH5Zget_filter_info()
+ {
try {
int filter_flag;
filter_flag = H5.H5Zget_filter_info(HDF5Constants.H5Z_FILTER_FLETCHER32);
- assertTrue("H5.H5Zget_filter_info_FLETCHER32_DECODE_ENABLED", (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) > 0);
- assertTrue("H5.H5Zget_filter_info_FLETCHER32_ENCODE_ENABLED", (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) > 0);
+ assertTrue("H5.H5Zget_filter_info_FLETCHER32_DECODE_ENABLED",
+ (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) > 0);
+ assertTrue("H5.H5Zget_filter_info_FLETCHER32_ENCODE_ENABLED",
+ (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) > 0);
filter_flag = H5.H5Zget_filter_info(HDF5Constants.H5Z_FILTER_NBIT);
- assertTrue("H5.H5Zget_filter_info_NBIT_DECODE_ENABLED", (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) > 0);
- assertTrue("H5.H5Zget_filter_info_NBIT_ENCODE_ENABLED", (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) > 0);
+ assertTrue("H5.H5Zget_filter_info_NBIT_DECODE_ENABLED",
+ (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) > 0);
+ assertTrue("H5.H5Zget_filter_info_NBIT_ENCODE_ENABLED",
+ (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) > 0);
filter_flag = H5.H5Zget_filter_info(HDF5Constants.H5Z_FILTER_SCALEOFFSET);
- assertTrue("H5.H5Zget_filter_info_SCALEOFFSET_DECODE_ENABLED", (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) > 0);
- assertTrue("H5.H5Zget_filter_info_SCALEOFFSET_ENCODE_ENABLED", (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) > 0);
+ assertTrue("H5.H5Zget_filter_info_SCALEOFFSET_DECODE_ENABLED",
+ (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) > 0);
+ assertTrue("H5.H5Zget_filter_info_SCALEOFFSET_ENCODE_ENABLED",
+ (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) > 0);
filter_flag = H5.H5Zget_filter_info(HDF5Constants.H5Z_FILTER_SHUFFLE);
- assertTrue("H5.H5Zget_filter_info_DECODE_SHUFFLE_ENABLED", (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) > 0);
- assertTrue("H5.H5Zget_filter_info_ENCODE_SHUFFLE_ENABLED", (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) > 0);
+ assertTrue("H5.H5Zget_filter_info_DECODE_SHUFFLE_ENABLED",
+ (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) > 0);
+ assertTrue("H5.H5Zget_filter_info_ENCODE_SHUFFLE_ENABLED",
+ (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) > 0);
- if(1 == H5.H5Zfilter_avail(HDF5Constants.H5Z_FILTER_DEFLATE)) {
+ if (1 == H5.H5Zfilter_avail(HDF5Constants.H5Z_FILTER_DEFLATE)) {
filter_flag = H5.H5Zget_filter_info(HDF5Constants.H5Z_FILTER_DEFLATE);
- assertTrue("H5.H5Zget_filter_info_DEFLATE_DECODE_ENABLED", (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) > 0);
- assertTrue("H5.H5Zget_filter_info_DEFLATE_ENCODE_ENABLED", (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) > 0);
+ assertTrue("H5.H5Zget_filter_info_DEFLATE_DECODE_ENABLED",
+ (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) > 0);
+ assertTrue("H5.H5Zget_filter_info_DEFLATE_ENCODE_ENABLED",
+ (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) > 0);
}
- if(1 == H5.H5Zfilter_avail(HDF5Constants.H5Z_FILTER_SZIP)) {
+ if (1 == H5.H5Zfilter_avail(HDF5Constants.H5Z_FILTER_SZIP)) {
filter_flag = H5.H5Zget_filter_info(HDF5Constants.H5Z_FILTER_SZIP);
// Decode should always be available, but we have no way of determining
// if encode is so don't assert on that.
- assertTrue("H5.H5Zget_filter_info_DECODE_SZIP_ENABLED", (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) > 0);
+ assertTrue("H5.H5Zget_filter_info_DECODE_SZIP_ENABLED",
+ (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) > 0);
}
}
catch (Throwable err) {
@@ -101,7 +118,8 @@ public class TestH5Z {
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Zunregister_predefined() throws Throwable {
+ public void testH5Zunregister_predefined() throws Throwable
+ {
int filter_found = H5.H5Zfilter_avail(HDF5Constants.H5Z_FILTER_SHUFFLE);
assertTrue("H5.H5Zfilter_avail", filter_found > 0);
diff --git a/release_docs/HISTORY-1_0-1_8_0_rc3.txt b/release_docs/HISTORY-1_0-1_8_0_rc3.txt
index f54ba64..3669f4d 100644
--- a/release_docs/HISTORY-1_0-1_8_0_rc3.txt
+++ b/release_docs/HISTORY-1_0-1_8_0_rc3.txt
@@ -1245,7 +1245,7 @@ Known Problems
causes failures in several HDF5 library tests.
* For HPUX 11.23 many tools tests failed for 64-bit version when linked to the
shared libraries (tested for 1.8.0-beta2)
-* For SNL, Red Storm: only paralle HDF5 is supported. The serial tests pass
+* For SNL, Red Storm: only parallel HDF5 is supported. The serial tests pass
and the parallel tests also pass with lots of non-fatal error messages.
* For LLNL, uP: both serial and parallel pass. Zeus: serial passes but
parallel fails with a known proglem in MPI. ubgl: serial passes but
diff --git a/release_docs/HISTORY-1_13.txt b/release_docs/HISTORY-1_13.txt
index bc9ae3f..208b572 100644
--- a/release_docs/HISTORY-1_13.txt
+++ b/release_docs/HISTORY-1_13.txt
@@ -948,6 +948,14 @@ New Features
Tools:
------
+ - h5repack added an optional verbose value for reporting R/W timing.
+
+ In addition to adding timing capture around the read/write calls in
+ h5repack, added help text to indicate how to show timing for read/write;
+ -v N, --verbose=N Verbose mode, print object information.
+ N - is an integer greater than 1, 2 displays read/write timing
+ (ADB - 2021/11/08)
+
- Added a new (unix ONLY) parallel meta tool 'h5dwalk', which utilizes the
mpifileutils (https://hpc.github.io/mpifileutils) open source utility
library to enable parallel execution of other HDF5 tools.
diff --git a/release_docs/HISTORY-1_8_0-1_10_0.txt b/release_docs/HISTORY-1_8_0-1_10_0.txt
index 575d070..7b84fbc 100644
--- a/release_docs/HISTORY-1_8_0-1_10_0.txt
+++ b/release_docs/HISTORY-1_8_0-1_10_0.txt
@@ -1581,7 +1581,7 @@ Known Problems
causes failures in several HDF5 library tests.
* For HPUX 11.23 many tools tests failed for 64-bit version when linked to the
shared libraries (tested for 1.8.0-beta2)
-* For SNL, Red Storm: only paralle HDF5 is supported. The serial tests pass
+* For SNL, Red Storm: only parallel HDF5 is supported. The serial tests pass
and the parallel tests also pass with lots of non-fatal error messages.
* on SUN 5.10 C++ test fails in the "Testing Shared Datatypes with Attributes" test
* configuring with --enable-debug=all produces compiler errors on most
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index 5e488be..b0d9bc8 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -151,7 +151,12 @@ Bug Fixes since HDF5-1.13.1 release
Fortran API
-----------
- -
+ - h5open_f and h5close_f fixes
+ * Fixed it so both h5open_f and h5close_f can be called multiple times.
+ * Fixed an issue with open objects remaining after h5close_f was called.
+ * Added additional tests.
+ (MSB, 2022/04/19, HDFFV-11306)
+
High-Level Library
diff --git a/src/H5.c b/src/H5.c
index 1585dd3..8fbd874 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -226,7 +226,7 @@ H5_init_library(void)
* Install atexit() library cleanup routines unless the H5dont_atexit()
* has been called. Once we add something to the atexit() list it stays
* there permanently, so we set H5_dont_atexit_g after we add it to prevent
- * adding it again later if the library is cosed and reopened.
+ * adding it again later if the library is closed and reopened.
*/
if (!H5_dont_atexit_g) {
diff --git a/src/H5A.c b/src/H5A.c
index b5cc77a..34d1004 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -117,7 +117,7 @@ H5A__create_common(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, const
void *attr = NULL; /* Attribute created */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(vol_obj);
@@ -162,7 +162,7 @@ H5A__create_api_common(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t
H5VL_loc_params_t loc_params; /* Location parameters for object access */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if (H5I_ATTR == H5I_get_type(loc_id))
@@ -308,7 +308,7 @@ H5A__create_by_name_api_common(hid_t loc_id, const char *obj_name, const char *a
H5VL_loc_params_t loc_params; /* Location parameters for object access */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if (H5I_ATTR == H5I_get_type(loc_id))
@@ -453,7 +453,7 @@ H5A__open_common(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, const ch
void *attr = NULL; /* attr object from VOL connector */
hid_t ret_value = H5I_INVALID_HID;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(vol_obj);
@@ -497,7 +497,7 @@ H5A__open_api_common(hid_t loc_id, const char *attr_name, hid_t aapl_id, void **
H5VL_loc_params_t loc_params; /* Location parameters for object access */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if (H5I_ATTR == H5I_get_type(loc_id))
@@ -619,7 +619,7 @@ H5A__open_by_name_api_common(hid_t loc_id, const char *obj_name, const char *att
H5VL_loc_params_t loc_params; /* Location parameters for object access */
hid_t ret_value = H5I_INVALID_HID;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if (H5I_ATTR == H5I_get_type(loc_id))
@@ -751,7 +751,7 @@ H5A__open_by_idx_api_common(hid_t loc_id, const char *obj_name, H5_index_t idx_t
H5VL_loc_params_t loc_params; /* Location parameters for object access */
hid_t ret_value = H5I_INVALID_HID;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if (H5I_ATTR == H5I_get_type(loc_id))
@@ -887,7 +887,7 @@ H5A__write_api_common(hid_t attr_id, hid_t type_id, const void *buf, void **toke
(_vol_obj_ptr ? _vol_obj_ptr : &tmp_vol_obj); /* Ptr to object ptr for loc_id */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if (H5I_DATATYPE != H5I_get_type(type_id))
@@ -995,7 +995,7 @@ H5A__read_api_common(hid_t attr_id, hid_t dtype_id, void *buf, void **token_ptr,
(_vol_obj_ptr ? _vol_obj_ptr : &tmp_vol_obj); /* Ptr to object ptr for loc_id */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if (H5I_DATATYPE != H5I_get_type(dtype_id))
@@ -1587,7 +1587,7 @@ H5A__rename_common(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, const
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(vol_obj);
@@ -1632,7 +1632,7 @@ H5A__rename_api_common(hid_t loc_id, const char *old_name, const char *new_name,
H5VL_loc_params_t loc_params; /* Location parameters for object access */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if (H5I_ATTR == H5I_get_type(loc_id))
@@ -1745,7 +1745,7 @@ H5A__rename_by_name_api_common(hid_t loc_id, const char *obj_name, const char *o
H5VL_loc_params_t loc_params; /* Location parameters for object access */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if (H5I_ATTR == H5I_get_type(loc_id))
@@ -2330,7 +2330,7 @@ H5A__exists_common(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, const
H5VL_attr_specific_args_t vol_cb_args; /* Arguments to VOL callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(vol_obj);
@@ -2371,7 +2371,7 @@ H5A__exists_api_common(hid_t obj_id, const char *attr_name, hbool_t *attr_exists
H5VL_loc_params_t loc_params; /* Location parameters for object access */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if (H5I_ATTR == H5I_get_type(obj_id))
@@ -2487,7 +2487,7 @@ H5A__exists_by_name_api_common(hid_t loc_id, const char *obj_name, const char *a
H5VL_loc_params_t loc_params; /* Location parameters for object access */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if (H5I_ATTR == H5I_get_type(loc_id))
diff --git a/src/H5AC.c b/src/H5AC.c
index 0171956..037b297 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -2198,7 +2198,7 @@ H5AC__check_if_write_permitted(const H5F_t
#endif /* H5_HAVE_PARALLEL */
hbool_t write_permitted = TRUE;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
#ifdef H5_HAVE_PARALLEL
/* Sanity checks */
@@ -2245,7 +2245,7 @@ H5AC__ext_config_2_int_config(const H5AC_cache_config_t *ext_conf_ptr, H5C_auto_
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if ((ext_conf_ptr == NULL) || (ext_conf_ptr->version != H5AC__CURR_CACHE_CONFIG_VERSION) ||
(int_conf_ptr == NULL))
@@ -2616,7 +2616,7 @@ H5AC__verify_tag(const H5AC_class_t *type)
haddr_t tag; /* Entry tag to validate */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Get the current tag */
tag = H5CX_get_tag();
diff --git a/src/H5ACmodule.h b/src/H5ACmodule.h
index d1f9697..a7f9a27 100644
--- a/src/H5ACmodule.h
+++ b/src/H5ACmodule.h
@@ -25,8 +25,7 @@
* reporting macros.
*/
#define H5AC_MODULE
-#define H5_MY_PKG H5AC
-#define H5_MY_PKG_ERR H5E_CACHE
-#define H5_MY_PKG_INIT YES
+#define H5_MY_PKG H5AC
+#define H5_MY_PKG_ERR H5E_CACHE
#endif /* H5ACmodule_H */
diff --git a/src/H5ACmpio.c b/src/H5ACmpio.c
index 7eaf751..36629db 100644
--- a/src/H5ACmpio.c
+++ b/src/H5ACmpio.c
@@ -273,7 +273,7 @@ H5AC__broadcast_candidate_list(H5AC_t *cache_ptr, unsigned *num_entries_ptr, had
unsigned num_entries;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(cache_ptr != NULL);
@@ -353,7 +353,7 @@ H5AC__broadcast_clean_list_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_uda
H5AC_addr_list_ud_t *udata = (H5AC_addr_list_ud_t *)_udata; /* Context for callback */
haddr_t addr;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(slist_entry_ptr);
@@ -406,7 +406,7 @@ H5AC__broadcast_clean_list(H5AC_t *cache_ptr)
unsigned num_entries = 0;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(cache_ptr != NULL);
@@ -493,7 +493,7 @@ H5AC__construct_candidate_list(H5AC_t *cache_ptr, H5AC_aux_t H5_ATTR_NDEBUG_UNUS
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(cache_ptr != NULL);
@@ -549,7 +549,7 @@ H5AC__copy_candidate_list_to_buffer_cb(void *_item, void H5_ATTR_UNUSED *_key, v
H5AC_slist_entry_t * slist_entry_ptr = (H5AC_slist_entry_t *)_item; /* Address of item */
H5AC_addr_list_ud_t *udata = (H5AC_addr_list_ud_t *)_udata; /* Context for callback */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(slist_entry_ptr);
@@ -607,7 +607,7 @@ H5AC__copy_candidate_list_to_buffer(const H5AC_t *cache_ptr, unsigned *num_entri
unsigned num_entries = 0;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(cache_ptr != NULL);
@@ -1221,7 +1221,7 @@ H5AC__propagate_and_apply_candidate_list(H5F_t *f)
unsigned num_candidates = 0;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f != NULL);
@@ -1384,7 +1384,7 @@ H5AC__propagate_flushed_and_still_clean_entries_list(H5F_t *f)
H5AC_aux_t *aux_ptr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f != NULL);
@@ -1435,7 +1435,7 @@ H5AC__receive_haddr_list(MPI_Comm mpi_comm, unsigned *num_entries_ptr, haddr_t *
unsigned num_entries;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(num_entries_ptr != NULL);
@@ -1507,7 +1507,7 @@ H5AC__receive_and_apply_clean_list(H5F_t *f)
unsigned num_entries = 0;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(f != NULL);
@@ -1567,7 +1567,7 @@ H5AC__receive_candidate_list(const H5AC_t *cache_ptr, unsigned *num_entries_ptr,
H5AC_aux_t *aux_ptr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(cache_ptr != NULL);
@@ -1648,7 +1648,7 @@ H5AC__rsp__dist_md_write__flush(H5F_t *f)
unsigned num_entries = 0;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f != NULL);
@@ -1792,7 +1792,7 @@ H5AC__rsp__dist_md_write__flush_to_min_clean(H5F_t *f)
hbool_t evictions_enabled;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f != NULL);
@@ -1873,7 +1873,7 @@ H5AC__rsp__p0_only__flush(H5F_t *f)
int mpi_result;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f != NULL);
@@ -1987,7 +1987,7 @@ H5AC__rsp__p0_only__flush_to_min_clean(H5F_t *f)
hbool_t evictions_enabled;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f != NULL);
@@ -2236,7 +2236,7 @@ H5AC__tidy_cache_0_lists(H5AC_t *cache_ptr, unsigned num_candidates, haddr_t *ca
H5AC_aux_t *aux_ptr;
unsigned u;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(cache_ptr != NULL);
diff --git a/src/H5ACproxy_entry.c b/src/H5ACproxy_entry.c
index 25e7e9a..4db9026 100644
--- a/src/H5ACproxy_entry.c
+++ b/src/H5ACproxy_entry.c
@@ -250,7 +250,7 @@ H5AC__proxy_entry_add_child_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_ud
H5AC_proxy_entry_t *pentry = (H5AC_proxy_entry_t *)_udata; /* Pointer to the proxy entry */
int ret_value = H5_ITER_CONT; /* Callback return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Add flush dependency on parent for proxy entry */
if (H5AC_create_flush_dependency(parent, pentry) < 0)
@@ -343,7 +343,7 @@ H5AC__proxy_entry_remove_child_cb(void *_item, void H5_ATTR_UNUSED *_key, void *
H5AC_proxy_entry_t *pentry = (H5AC_proxy_entry_t *)_udata; /* Pointer to the proxy entry */
int ret_value = H5_ITER_CONT; /* Callback return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Remove flush dependency on parent for proxy entry */
if (H5AC_destroy_flush_dependency(parent, pentry) < 0)
@@ -452,7 +452,7 @@ H5AC_proxy_entry_dest(H5AC_proxy_entry_t *pentry)
static herr_t
H5AC__proxy_entry_image_len(const void H5_ATTR_UNUSED *thing, size_t *image_len)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(image_len);
@@ -481,7 +481,7 @@ static herr_t
H5AC__proxy_entry_serialize(const H5F_t H5_ATTR_UNUSED *f, void H5_ATTR_UNUSED *image,
size_t H5_ATTR_UNUSED len, void H5_ATTR_UNUSED *thing)
{
- FUNC_ENTER_STATIC_NOERR /* Yes, even though this pushes an error on the stack */
+ FUNC_ENTER_PACKAGE_NOERR /* Yes, even though this pushes an error on the stack */
/* Should never be invoked */
HDassert(0 && "Invalid callback?!?");
@@ -509,7 +509,7 @@ H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *_thing)
H5AC_proxy_entry_t *pentry = (H5AC_proxy_entry_t *)_thing;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(pentry);
@@ -633,7 +633,7 @@ H5AC__proxy_entry_free_icr(void *_thing)
H5AC_proxy_entry_t *pentry = (H5AC_proxy_entry_t *)_thing;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Destroy the proxy entry */
if (H5AC_proxy_entry_dest(pentry) < 0)
diff --git a/src/H5Abtree2.c b/src/H5Abtree2.c
index 3274dd7..cc95d62 100644
--- a/src/H5Abtree2.c
+++ b/src/H5Abtree2.c
@@ -152,7 +152,7 @@ H5A__dense_fh_name_cmp(const void *obj, size_t obj_len, void *_udata)
hbool_t took_ownership = FALSE; /* Whether the "found" operator took ownership of the attribute */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Decode attribute information */
if (NULL ==
@@ -203,7 +203,7 @@ H5A__dense_btree2_name_store(void *_nrecord, const void *_udata)
const H5A_bt2_ud_ins_t * udata = (const H5A_bt2_ud_ins_t *)_udata;
H5A_dense_bt2_name_rec_t *nrecord = (H5A_dense_bt2_name_rec_t *)_nrecord;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Copy user information info native record */
nrecord->id = udata->id;
@@ -235,7 +235,7 @@ H5A__dense_btree2_name_compare(const void *_bt2_udata, const void *_bt2_rec, int
const H5A_dense_bt2_name_rec_t *bt2_rec = (const H5A_dense_bt2_name_rec_t *)_bt2_rec;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(bt2_udata);
@@ -301,7 +301,7 @@ H5A__dense_btree2_name_encode(uint8_t *raw, const void *_nrecord, void H5_ATTR_U
{
const H5A_dense_bt2_name_rec_t *nrecord = (const H5A_dense_bt2_name_rec_t *)_nrecord;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Encode the record's fields */
H5MM_memcpy(raw, nrecord->id.id, (size_t)H5O_FHEAP_ID_LEN);
@@ -331,7 +331,7 @@ H5A__dense_btree2_name_decode(const uint8_t *raw, void *_nrecord, void H5_ATTR_U
{
H5A_dense_bt2_name_rec_t *nrecord = (H5A_dense_bt2_name_rec_t *)_nrecord;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Decode the record's fields */
H5MM_memcpy(nrecord->id.id, raw, (size_t)H5O_FHEAP_ID_LEN);
@@ -362,7 +362,7 @@ H5A__dense_btree2_name_debug(FILE *stream, int indent, int fwidth, const void *_
{
const H5A_dense_bt2_name_rec_t *nrecord = (const H5A_dense_bt2_name_rec_t *)_nrecord;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDfprintf(stream, "%*s%-*s {%016" PRIx64 ", %02" PRIx8 ", %u, %08" PRIx32 "}\n", indent, "", fwidth,
"Record:", nrecord->id.val, nrecord->flags, (unsigned)nrecord->corder, nrecord->hash);
@@ -389,7 +389,7 @@ H5A__dense_btree2_corder_store(void *_nrecord, const void *_udata)
const H5A_bt2_ud_ins_t * udata = (const H5A_bt2_ud_ins_t *)_udata;
H5A_dense_bt2_corder_rec_t *nrecord = (H5A_dense_bt2_corder_rec_t *)_nrecord;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Copy user information info native record */
nrecord->id = udata->id;
@@ -419,7 +419,7 @@ H5A__dense_btree2_corder_compare(const void *_bt2_udata, const void *_bt2_rec, i
const H5A_bt2_ud_common_t * bt2_udata = (const H5A_bt2_ud_common_t *)_bt2_udata;
const H5A_dense_bt2_corder_rec_t *bt2_rec = (const H5A_dense_bt2_corder_rec_t *)_bt2_rec;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(bt2_udata);
@@ -454,7 +454,7 @@ H5A__dense_btree2_corder_encode(uint8_t *raw, const void *_nrecord, void H5_ATTR
{
const H5A_dense_bt2_corder_rec_t *nrecord = (const H5A_dense_bt2_corder_rec_t *)_nrecord;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Encode the record's fields */
H5MM_memcpy(raw, nrecord->id.id, (size_t)H5O_FHEAP_ID_LEN);
@@ -483,7 +483,7 @@ H5A__dense_btree2_corder_decode(const uint8_t *raw, void *_nrecord, void H5_ATTR
{
H5A_dense_bt2_corder_rec_t *nrecord = (H5A_dense_bt2_corder_rec_t *)_nrecord;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Decode the record's fields */
H5MM_memcpy(nrecord->id.id, raw, (size_t)H5O_FHEAP_ID_LEN);
@@ -513,7 +513,7 @@ H5A__dense_btree2_corder_debug(FILE *stream, int indent, int fwidth, const void
{
const H5A_dense_bt2_corder_rec_t *nrecord = (const H5A_dense_bt2_corder_rec_t *)_nrecord;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDfprintf(stream, "%*s%-*s {%016" PRIx64 ", %02" PRIx8 ", %u}\n", indent, "", fwidth,
"Record:", nrecord->id.val, nrecord->flags, (unsigned)nrecord->corder);
diff --git a/src/H5Adense.c b/src/H5Adense.c
index fa51f9d..26dcb8b 100644
--- a/src/H5Adense.c
+++ b/src/H5Adense.c
@@ -277,7 +277,7 @@ H5A__dense_fnd_cb(const H5A_t *attr, hbool_t *took_ownership, void *_user_attr)
const H5A_t **user_attr = (const H5A_t **)_user_attr; /* User data from v2 B-tree attribute lookup */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(attr);
@@ -580,7 +580,7 @@ H5A__dense_write_bt2_cb2(void *_record, void *_op_data, hbool_t *changed)
H5A_dense_bt2_corder_rec_t *record = (H5A_dense_bt2_corder_rec_t *)_record; /* Record from B-tree */
H5O_fheap_id_t *new_heap_id = (H5O_fheap_id_t *)_op_data; /* "op data" from v2 B-tree modify */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(record);
@@ -617,7 +617,7 @@ H5A__dense_write_bt2_cb(void *_record, void *_op_data, hbool_t *changed)
uint8_t attr_buf[H5A_ATTR_BUF_SIZE]; /* Buffer for serializing attribute */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(record);
@@ -820,7 +820,7 @@ H5A__dense_copy_fh_cb(const void *obj, size_t obj_len, void *_udata)
H5A_fh_ud_cp_t *udata = (H5A_fh_ud_cp_t *)_udata; /* User data for fractal heap 'op' callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Decode attribute information & keep a copy */
/* (we make a copy instead of calling the user/library callback directly in
@@ -1046,7 +1046,7 @@ H5A__dense_iterate_bt2_cb(const void *_record, void *_bt2_udata)
H5A_bt2_ud_it_t *bt2_udata = (H5A_bt2_ud_it_t *)_bt2_udata; /* User data for callback */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check for skipping attributes */
if (bt2_udata->skip > 0)
@@ -1276,7 +1276,7 @@ H5A__dense_remove_bt2_cb(const void *_record, void *_udata)
H5B2_t *bt2_corder = NULL; /* v2 B-tree handle for creation order index */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check for removing the link from the creation order index */
if (H5F_addr_defined(udata->corder_bt2_addr)) {
@@ -1428,7 +1428,7 @@ H5A__dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
hbool_t use_sh_loc; /* Whether to use the attribute's shared location or the separate one */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Set up the user data for fractal heap 'op' callback */
fh_udata.f = bt2_udata->f;
@@ -1762,7 +1762,7 @@ H5A__dense_delete_bt2_cb(const void *_record, void *_bt2_udata)
H5A_t * attr = NULL; /* Attribute being removed */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check for shared attribute */
if (record->flags & H5O_MSG_FLAG_SHARED) {
diff --git a/src/H5Aint.c b/src/H5Aint.c
index b0b91d0..16a573f 100644
--- a/src/H5Aint.c
+++ b/src/H5Aint.c
@@ -474,7 +474,7 @@ H5A__open_common(const H5G_loc_t *loc, H5A_t *attr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(loc);
@@ -1249,7 +1249,7 @@ H5A__close_cb(H5VL_object_t *attr_vol_obj, void **request)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(attr_vol_obj);
@@ -1478,7 +1478,7 @@ H5A__compact_build_table_cb(H5O_t H5_ATTR_UNUSED *oh, H5O_mesg_t *mesg /*in,out*
H5A_compact_bt_ud_t *udata = (H5A_compact_bt_ud_t *)_udata; /* Operator user data */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(mesg);
@@ -1594,7 +1594,7 @@ H5A__dense_build_table_cb(const H5A_t *attr, void *_udata)
H5A_dense_bt_ud_t *udata = (H5A_dense_bt_ud_t *)_udata; /* 'User data' passed in */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check arguments */
HDassert(attr);
@@ -1720,7 +1720,7 @@ done:
static int
H5A__attr_cmp_name_inc(const void *attr1, const void *attr2)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
FUNC_LEAVE_NOAPI(
HDstrcmp((*(const H5A_t *const *)attr1)->shared->name, (*(const H5A_t *const *)attr2)->shared->name))
@@ -1746,7 +1746,7 @@ H5A__attr_cmp_name_inc(const void *attr1, const void *attr2)
static int
H5A__attr_cmp_name_dec(const void *attr1, const void *attr2)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
FUNC_LEAVE_NOAPI(
HDstrcmp((*(const H5A_t *const *)attr2)->shared->name, (*(const H5A_t *const *)attr1)->shared->name))
@@ -1773,7 +1773,7 @@ H5A__attr_cmp_corder_inc(const void *attr1, const void *attr2)
{
int ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
if ((*(const H5A_t *const *)attr1)->shared->crt_idx < (*(const H5A_t *const *)attr2)->shared->crt_idx)
ret_value = -1;
@@ -1807,7 +1807,7 @@ H5A__attr_cmp_corder_dec(const void *attr1, const void *attr2)
{
int ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
if ((*(const H5A_t *const *)attr1)->shared->crt_idx < (*(const H5A_t *const *)attr2)->shared->crt_idx)
ret_value = 1;
@@ -1835,7 +1835,7 @@ H5A__attr_cmp_corder_dec(const void *attr1, const void *attr2)
static herr_t
H5A__attr_sort_table(H5A_attr_table_t *atable, H5_index_t idx_type, H5_iter_order_t order)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(atable);
@@ -2503,7 +2503,7 @@ H5A__dense_post_copy_file_cb(const H5A_t *attr_src, void *_udata)
H5A_t * attr_dst = NULL;
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check arguments */
HDassert(attr_src);
@@ -2653,7 +2653,7 @@ H5A__iterate_common(hid_t loc_id, H5_index_t idx_type, H5_iter_order_t order, hs
hsize_t last_attr; /* Index of last attribute examined */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Call attribute iteration routine */
last_attr = start_idx = (idx ? *idx : 0);
diff --git a/src/H5Amodule.h b/src/H5Amodule.h
index 9f86ddd..3586414 100644
--- a/src/H5Amodule.h
+++ b/src/H5Amodule.h
@@ -25,9 +25,8 @@
* reporting macros.
*/
#define H5A_MODULE
-#define H5_MY_PKG H5A
-#define H5_MY_PKG_ERR H5E_ATTR
-#define H5_MY_PKG_INIT YES
+#define H5_MY_PKG H5A
+#define H5_MY_PKG_ERR H5E_ATTR
/**\defgroup H5A H5A
*
diff --git a/src/H5B.c b/src/H5B.c
index a9aa312..5739552 100644
--- a/src/H5B.c
+++ b/src/H5B.c
@@ -388,7 +388,7 @@ H5B__split(H5F_t *f, H5B_ins_ud_t *bt_ud, unsigned idx, void *udata, H5B_ins_ud_
double split_ratios[3]; /* B-tree split ratios */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -693,7 +693,7 @@ H5B__insert_child(H5B_t *bt, unsigned *bt_flags, unsigned idx, haddr_t child, H5
H5B_shared_t *shared; /* Pointer to shared B-tree info */
uint8_t * base; /* Base offset for move */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(bt);
HDassert(bt_flags);
@@ -787,7 +787,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8
H5B_ins_t my_ins = H5B_INS_ERROR;
H5B_ins_t ret_value = H5B_INS_ERROR; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments
@@ -1120,7 +1120,7 @@ H5B__iterate_helper(H5F_t *f, const H5B_class_t *type, haddr_t addr, H5B_operato
unsigned u; /* Local index variable */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -1235,7 +1235,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u
int cmp = 1; /* Key comparison value */
H5B_ins_t ret_value = H5B_INS_ERROR;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(f);
HDassert(H5F_addr_defined(addr));
@@ -1778,7 +1778,7 @@ H5B__copy(const H5B_t *old_bt)
H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_t * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -1848,7 +1848,7 @@ H5B__get_info_helper(H5F_t *f, const H5B_class_t *type, haddr_t addr, const H5B_
haddr_t left_child; /* Address of left-most child in node */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
diff --git a/src/H5B2cache.c b/src/H5B2cache.c
index f38147b..37fa69e 100644
--- a/src/H5B2cache.c
+++ b/src/H5B2cache.c
@@ -168,7 +168,7 @@ H5B2__cache_hdr_get_initial_load_size(void *_udata, size_t *image_len)
{
H5B2_hdr_cache_ud_t *udata = (H5B2_hdr_cache_ud_t *)_udata; /* User data for callback */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(udata);
@@ -202,7 +202,7 @@ H5B2__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
uint32_t computed_chksum; /* Computed metadata checksum value */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(image);
@@ -242,7 +242,7 @@ H5B2__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void
const uint8_t * image = (const uint8_t *)_image; /* Pointer into raw data buffer */
H5B2_hdr_t * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(image);
@@ -331,7 +331,7 @@ H5B2__cache_hdr_image_len(const void *_thing, size_t *image_len)
{
const H5B2_hdr_t *hdr = (const H5B2_hdr_t *)_thing; /* Pointer to the B-tree header */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(hdr);
@@ -362,7 +362,7 @@ H5B2__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
uint8_t * image = (uint8_t *)_image; /* Pointer into raw data buffer */
uint32_t metadata_chksum; /* Computed metadata checksum value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check arguments */
HDassert(f);
@@ -430,7 +430,7 @@ H5B2__cache_hdr_notify(H5AC_notify_action_t action, void *_thing)
H5B2_hdr_t *hdr = (H5B2_hdr_t *)_thing;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -519,7 +519,7 @@ H5B2__cache_hdr_free_icr(void *thing)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(thing);
@@ -549,7 +549,7 @@ H5B2__cache_int_get_initial_load_size(void *_udata, size_t *image_len)
{
H5B2_internal_cache_ud_t *udata = (H5B2_internal_cache_ud_t *)_udata; /* User data for callback */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(udata);
@@ -585,7 +585,7 @@ H5B2__cache_int_verify_chksum(const void *_image, size_t H5_ATTR_UNUSED len, voi
uint32_t computed_chksum; /* Computed metadata checksum value */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(image);
@@ -631,7 +631,7 @@ H5B2__cache_int_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void
H5B2_internal_t * ret_value = NULL; /* Return value */
int node_nrec = 0;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(image);
@@ -745,7 +745,7 @@ H5B2__cache_int_image_len(const void *_thing, size_t *image_len)
const H5B2_internal_t *internal =
(const H5B2_internal_t *)_thing; /* Pointer to the B-tree internal node */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(internal);
@@ -781,7 +781,7 @@ H5B2__cache_int_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check arguments */
HDassert(f);
@@ -861,7 +861,7 @@ H5B2__cache_int_notify(H5AC_notify_action_t action, void *_thing)
H5B2_internal_t *internal = (H5B2_internal_t *)_thing;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -938,7 +938,7 @@ H5B2__cache_int_free_icr(void *_thing)
H5B2_internal_t *internal = (H5B2_internal_t *)_thing;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(internal);
@@ -968,7 +968,7 @@ H5B2__cache_leaf_get_initial_load_size(void *_udata, size_t *image_len)
{
H5B2_leaf_cache_ud_t *udata = (H5B2_leaf_cache_ud_t *)_udata; /* User data for callback */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(udata);
@@ -1004,7 +1004,7 @@ H5B2__cache_leaf_verify_chksum(const void *_image, size_t H5_ATTR_UNUSED len, vo
uint32_t computed_chksum; /* Computed metadata checksum value */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(image);
@@ -1047,7 +1047,7 @@ H5B2__cache_leaf_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void
unsigned u; /* Local index variable */
H5B2_leaf_t * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(image);
@@ -1137,7 +1137,7 @@ H5B2__cache_leaf_image_len(const void *_thing, size_t *image_len)
{
const H5B2_leaf_t *leaf = (const H5B2_leaf_t *)_thing; /* Pointer to the B-tree leaf node */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(leaf);
@@ -1173,7 +1173,7 @@ H5B2__cache_leaf_serialize(const H5F_t H5_ATTR_UNUSED *f, void *_image, size_t H
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check arguments */
HDassert(f);
@@ -1240,7 +1240,7 @@ H5B2__cache_leaf_notify(H5AC_notify_action_t action, void *_thing)
H5B2_leaf_t *leaf = (H5B2_leaf_t *)_thing;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -1317,7 +1317,7 @@ H5B2__cache_leaf_free_icr(void *_thing)
H5B2_leaf_t *leaf = (H5B2_leaf_t *)_thing;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(leaf);
diff --git a/src/H5B2int.c b/src/H5B2int.c
index ab43a5a..80dfb72 100644
--- a/src/H5B2int.c
+++ b/src/H5B2int.c
@@ -2013,7 +2013,7 @@ H5B2__update_child_flush_depends(H5B2_hdr_t *hdr, unsigned depth, H5B2_node_ptr_
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(hdr);
diff --git a/src/H5B2internal.c b/src/H5B2internal.c
index c00f555..c5e7c30 100644
--- a/src/H5B2internal.c
+++ b/src/H5B2internal.c
@@ -17,7 +17,7 @@
* Dec 01 2016
* Quincey Koziol
*
- * Purpose: Routines for managing v2 B-tree internal ndoes.
+ * Purpose: Routines for managing v2 B-tree internal nodes.
*
*-------------------------------------------------------------------------
*/
@@ -742,7 +742,7 @@ H5B2__shadow_internal(H5B2_internal_t *internal, H5B2_node_ptr_t *curr_node_ptr)
H5B2_hdr_t *hdr; /* B-tree header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
diff --git a/src/H5B2leaf.c b/src/H5B2leaf.c
index 20ace84..9cfc670 100644
--- a/src/H5B2leaf.c
+++ b/src/H5B2leaf.c
@@ -17,7 +17,7 @@
* Dec 01 2016
* Quincey Koziol
*
- * Purpose: Routines for managing v2 B-tree leaf ndoes.
+ * Purpose: Routines for managing v2 B-tree leaf nodes.
*
*-------------------------------------------------------------------------
*/
@@ -702,7 +702,7 @@ H5B2__shadow_leaf(H5B2_leaf_t *leaf, H5B2_node_ptr_t *curr_node_ptr)
H5B2_hdr_t *hdr; /* B-tree header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
diff --git a/src/H5B2module.h b/src/H5B2module.h
index aa0e163..6a3131b 100644
--- a/src/H5B2module.h
+++ b/src/H5B2module.h
@@ -25,8 +25,7 @@
* reporting macros.
*/
#define H5B2_MODULE
-#define H5_MY_PKG H5B2
-#define H5_MY_PKG_ERR H5E_BTREE
-#define H5_MY_PKG_INIT NO
+#define H5_MY_PKG H5B2
+#define H5_MY_PKG_ERR H5E_BTREE
#endif /* H5B2module_H */
diff --git a/src/H5B2test.c b/src/H5B2test.c
index 2b84332..c7ae456 100644
--- a/src/H5B2test.c
+++ b/src/H5B2test.c
@@ -134,7 +134,7 @@ H5B2__test_crt_context(void *_f)
H5B2_test_ctx_t *ctx; /* Callback context structure */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(f);
@@ -171,7 +171,7 @@ H5B2__test_dst_context(void *_ctx)
{
H5B2_test_ctx_t *ctx = (H5B2_test_ctx_t *)_ctx; /* Callback context structure */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(ctx);
@@ -198,7 +198,7 @@ H5B2__test_dst_context(void *_ctx)
static herr_t
H5B2__test_store(void *nrecord, const void *udata)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
*(hsize_t *)nrecord = *(const hsize_t *)udata;
@@ -222,7 +222,7 @@ H5B2__test_store(void *nrecord, const void *udata)
static herr_t
H5B2__test_compare(const void *rec1, const void *rec2, int *result)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
*result = (int)(*(const hssize_t *)rec1 - *(const hssize_t *)rec2);
@@ -247,7 +247,7 @@ H5B2__test_encode(uint8_t *raw, const void *nrecord, void *_ctx)
{
H5B2_test_ctx_t *ctx = (H5B2_test_ctx_t *)_ctx; /* Callback context structure */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(ctx);
@@ -275,7 +275,7 @@ H5B2__test_decode(const uint8_t *raw, void *nrecord, void *_ctx)
{
H5B2_test_ctx_t *ctx = (H5B2_test_ctx_t *)_ctx; /* Callback context structure */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(ctx);
@@ -301,7 +301,7 @@ H5B2__test_decode(const uint8_t *raw, void *nrecord, void *_ctx)
static herr_t
H5B2__test_debug(FILE *stream, int indent, int fwidth, const void *record, const void H5_ATTR_UNUSED *_udata)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(record);
@@ -326,7 +326,7 @@ H5B2__test_debug(FILE *stream, int indent, int fwidth, const void *record, const
static herr_t
H5B2__test2_store(void *nrecord, const void *udata)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
*(H5B2_test_rec_t *)nrecord = *(const H5B2_test_rec_t *)udata;
@@ -350,7 +350,7 @@ H5B2__test2_store(void *nrecord, const void *udata)
static herr_t
H5B2__test2_compare(const void *rec1, const void *rec2, int *result)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
*result = (int)(((const H5B2_test_rec_t *)rec1)->key - ((const H5B2_test_rec_t *)rec2)->key);
@@ -375,7 +375,7 @@ H5B2__test2_encode(uint8_t *raw, const void *nrecord, void *_ctx)
{
H5B2_test_ctx_t *ctx = (H5B2_test_ctx_t *)_ctx; /* Callback context structure */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(ctx);
@@ -404,7 +404,7 @@ H5B2__test2_decode(const uint8_t *raw, void *nrecord, void *_ctx)
{
H5B2_test_ctx_t *ctx = (H5B2_test_ctx_t *)_ctx; /* Callback context structure */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(ctx);
@@ -431,7 +431,7 @@ H5B2__test2_decode(const uint8_t *raw, void *nrecord, void *_ctx)
static herr_t
H5B2__test2_debug(FILE *stream, int indent, int fwidth, const void *record, const void H5_ATTR_UNUSED *_udata)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(record);
diff --git a/src/H5Bcache.c b/src/H5Bcache.c
index 9af146e..a351999 100644
--- a/src/H5Bcache.c
+++ b/src/H5Bcache.c
@@ -100,7 +100,7 @@ H5B__cache_get_initial_load_size(void *_udata, size_t *image_len)
H5B_cache_ud_t *udata = (H5B_cache_ud_t *)_udata; /* User data for callback */
H5B_shared_t * shared; /* Pointer to shared B-tree info */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(udata);
@@ -141,7 +141,7 @@ H5B__cache_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void *_uda
unsigned u; /* Local index variable */
H5B_t * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check arguments */
HDassert(image);
@@ -239,7 +239,7 @@ H5B__cache_image_len(const void *_thing, size_t *image_len)
const H5B_t * bt = (const H5B_t *)_thing; /* Pointer to the B-tree node */
H5B_shared_t *shared; /* Pointer to shared B-tree info */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(bt);
@@ -277,7 +277,7 @@ H5B__cache_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED len, vo
unsigned u; /* Local index counter */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check arguments */
HDassert(image);
@@ -355,7 +355,7 @@ H5B__cache_free_icr(void *thing)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(thing);
diff --git a/src/H5Bmodule.h b/src/H5Bmodule.h
index cfd3d53..9c0f73b 100644
--- a/src/H5Bmodule.h
+++ b/src/H5Bmodule.h
@@ -25,8 +25,7 @@
* reporting macros.
*/
#define H5B_MODULE
-#define H5_MY_PKG H5B
-#define H5_MY_PKG_ERR H5E_BTREE
-#define H5_MY_PKG_INIT NO
+#define H5_MY_PKG H5B
+#define H5_MY_PKG_ERR H5E_BTREE
#endif /* H5Bmodule_H */
diff --git a/src/H5C.c b/src/H5C.c
index 8052b3d..87882a8 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -707,7 +707,7 @@ H5C__free_tag_list_cb(void *_item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED
{
H5C_tag_info_t *tag_info = (H5C_tag_info_t *)_item;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(tag_info);
@@ -4581,7 +4581,7 @@ H5C__pin_entry_from_client(H5C_t
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(cache_ptr);
@@ -4625,9 +4625,9 @@ H5C__unpin_entry_real(H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr, hbool_t up
herr_t ret_value = SUCCEED; /* Return value */
#if H5C_DO_SANITY_CHECKS
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#else
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
#endif
/* Sanity checking */
@@ -4668,7 +4668,7 @@ H5C__unpin_entry_from_client(H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr, hbo
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checking */
HDassert(cache_ptr);
@@ -4726,7 +4726,7 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted)
enum H5C_resize_status status = in_spec; /* will change if needed */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(f);
HDassert(cache_ptr);
@@ -5006,7 +5006,7 @@ H5C__autoadjust__ageout(H5F_t *f, double hit_rate, enum H5C_resize_status *statu
size_t test_size;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(f);
HDassert(cache_ptr);
@@ -5102,7 +5102,7 @@ H5C__autoadjust__ageout__cycle_epoch_marker(H5C_t *cache_ptr)
int i;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(cache_ptr);
HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
@@ -5205,7 +5205,7 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitte
H5C_cache_entry_t *prev_ptr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(f);
HDassert(cache_ptr);
@@ -5388,7 +5388,7 @@ H5C__autoadjust__ageout__insert_new_marker(H5C_t *cache_ptr)
int i;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(cache_ptr);
HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
@@ -5453,7 +5453,7 @@ H5C__autoadjust__ageout__remove_all_markers(H5C_t *cache_ptr)
int i;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(cache_ptr);
HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
@@ -5523,7 +5523,7 @@ H5C__autoadjust__ageout__remove_excess_markers(H5C_t *cache_ptr)
int i;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(cache_ptr);
HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
@@ -5601,7 +5601,7 @@ H5C__flash_increase_cache_size(H5C_t *cache_ptr, size_t old_entry_size, size_t n
double hit_rate;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(cache_ptr);
HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
@@ -5793,7 +5793,7 @@ H5C__flush_invalidate_cache(H5F_t *f, unsigned flags)
H5C_ring_t ring;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(f);
HDassert(f->shared);
@@ -5986,7 +5986,7 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
#endif /* H5C_DO_SANITY_CHECKS */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(f);
HDassert(f->shared);
@@ -6508,7 +6508,7 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
int i;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(cache_ptr);
HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
@@ -7508,7 +7508,7 @@ H5C__verify_len_eoa(H5F_t *f, const H5C_class_t *type, haddr_t addr, size_t *len
haddr_t eoa; /* End-of-allocation in the file */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* if type == H5FD_MEM_GHEAP, H5F_block_read() forces
* type to H5FD_MEM_DRAW via its call to H5F__accum_read().
@@ -7588,7 +7588,7 @@ H5C__load_entry(H5F_t *f,
#endif /* H5_HAVE_PARALLEL */
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f);
@@ -7679,7 +7679,15 @@ H5C__load_entry(H5F_t *f,
H5C__RESET_PB_READ_HINTS(f->shared->cache)
- HGOTO_ERROR(H5E_CACHE, H5E_READERROR, NULL, "Can't read image*")
+#ifdef H5_HAVE_PARALLEL
+ if (coll_access) {
+ /* Push an error, but still participate in following MPI_Bcast */
+ HDmemset(image, 0, len);
+ HDONE_ERROR(H5E_CACHE, H5E_READERROR, NULL, "Can't read image*")
+ }
+ else
+#endif
+ HGOTO_ERROR(H5E_CACHE, H5E_READERROR, NULL, "Can't read image*")
}
H5C__RESET_PB_READ_HINTS(f->shared->cache)
@@ -7766,7 +7774,15 @@ H5C__load_entry(H5F_t *f,
H5C__RESET_PB_READ_HINTS(f->shared->cache)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, NULL, "can't read image")
+#ifdef H5_HAVE_PARALLEL
+ if (coll_access) {
+ /* Push an error, but still participate in following MPI_Bcast */
+ HDmemset(image + len, 0, actual_len - len);
+ HDONE_ERROR(H5E_CACHE, H5E_CANTLOAD, NULL, "can't read image")
+ }
+ else
+#endif
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, NULL, "can't read image")
}
H5C__RESET_PB_READ_HINTS(f->shared->cache)
@@ -8734,7 +8750,7 @@ H5C__mark_flush_dep_dirty(H5C_cache_entry_t *entry)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(entry);
@@ -8781,7 +8797,7 @@ H5C__mark_flush_dep_clean(H5C_cache_entry_t *entry)
int i; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(entry);
@@ -8829,7 +8845,7 @@ H5C__mark_flush_dep_serialized(H5C_cache_entry_t *entry_ptr)
int i; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(entry_ptr);
@@ -8879,7 +8895,7 @@ H5C__mark_flush_dep_unserialized(H5C_cache_entry_t *entry_ptr)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(entry_ptr);
@@ -8928,7 +8944,7 @@ H5C__assert_flush_dep_nocycle(const H5C_cache_entry_t *entry, const H5C_cache_en
{
unsigned u; /* Local index variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(entry);
@@ -9167,7 +9183,7 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring)
H5C_cache_entry_t *entry_ptr;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f);
@@ -9404,7 +9420,7 @@ H5C__serialize_single_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f);
@@ -9488,7 +9504,7 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr)
unsigned serialize_flags = H5C__SERIALIZE_NO_FLAGS_SET;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(f);
diff --git a/src/H5CS.c b/src/H5CS.c
index 0fabc0d..813c4a5 100644
--- a/src/H5CS.c
+++ b/src/H5CS.c
@@ -82,7 +82,7 @@ H5CS__get_stack(void)
{
H5CS_t *fstack;
- FUNC_ENTER_STATIC_NOERR_NOFS
+ FUNC_ENTER_PACKAGE_NOERR_NOFS
fstack = H5TS_get_thread_local_value(H5TS_funcstk_key_g);
if (!fstack) {
diff --git a/src/H5CX.c b/src/H5CX.c
index c5bb8e4..8c54b61 100644
--- a/src/H5CX.c
+++ b/src/H5CX.c
@@ -705,7 +705,7 @@ H5CX__get_context(void)
{
H5CX_node_t **ctx = NULL;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
ctx = (H5CX_node_t **)H5TS_get_thread_local_value(H5TS_apictx_key_g);
@@ -754,7 +754,7 @@ H5CX__push_common(H5CX_node_t *cnode)
{
H5CX_node_t **head = NULL; /* Pointer to head of API context list */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(cnode);
@@ -3588,9 +3588,9 @@ H5CX__pop_common(hbool_t update_dxpl_props)
H5CX_node_t * ret_value = NULL; /* Return value */
#ifdef H5_HAVE_PARALLEL
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#else
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
#endif
/* Sanity check */
diff --git a/src/H5CXmodule.h b/src/H5CXmodule.h
index 9fbaab4..f9844a1 100644
--- a/src/H5CXmodule.h
+++ b/src/H5CXmodule.h
@@ -25,8 +25,7 @@
* reporting macros.
*/
#define H5CX_MODULE
-#define H5_MY_PKG H5CX
-#define H5_MY_PKG_ERR H5E_CONTEXT
-#define H5_MY_PKG_INIT YES
+#define H5_MY_PKG H5CX
+#define H5_MY_PKG_ERR H5E_CONTEXT
#endif /* H5CXmodule_H */
diff --git a/src/H5Cepoch.c b/src/H5Cepoch.c
index 1518692..39c5680 100644
--- a/src/H5Cepoch.c
+++ b/src/H5Cepoch.c
@@ -108,7 +108,7 @@ const H5AC_class_t H5AC_EPOCH_MARKER[1] = {{
static herr_t
H5C__epoch_marker_get_initial_load_size(void H5_ATTR_UNUSED *udata_ptr, size_t H5_ATTR_UNUSED *image_len_ptr)
{
- FUNC_ENTER_STATIC_NOERR /* Yes, even though this pushes an error on the stack */
+ FUNC_ENTER_PACKAGE_NOERR /* Yes, even though this pushes an error on the stack */
HERROR(H5E_CACHE, H5E_SYSTEM, "called unreachable fcn.");
@@ -119,7 +119,7 @@ static herr_t
H5C__epoch_marker_get_final_load_size(const void H5_ATTR_UNUSED *image_ptr, size_t H5_ATTR_UNUSED image_len,
void H5_ATTR_UNUSED *udata_ptr, size_t H5_ATTR_UNUSED *actual_len)
{
- FUNC_ENTER_STATIC_NOERR /* Yes, even though this pushes an error on the stack */
+ FUNC_ENTER_PACKAGE_NOERR /* Yes, even though this pushes an error on the stack */
HERROR(H5E_CACHE, H5E_SYSTEM, "called unreachable fcn.");
@@ -130,7 +130,7 @@ static htri_t
H5C__epoch_marker_verify_chksum(const void H5_ATTR_UNUSED *image_ptr, size_t H5_ATTR_UNUSED len,
void H5_ATTR_UNUSED *udata_ptr)
{
- FUNC_ENTER_STATIC_NOERR /* Yes, even though this pushes an error on the stack */
+ FUNC_ENTER_PACKAGE_NOERR /* Yes, even though this pushes an error on the stack */
HERROR(H5E_CACHE, H5E_SYSTEM, "called unreachable fcn.");
@@ -141,7 +141,7 @@ static void *
H5C__epoch_marker_deserialize(const void H5_ATTR_UNUSED *image_ptr, size_t H5_ATTR_UNUSED len,
void H5_ATTR_UNUSED *udata, hbool_t H5_ATTR_UNUSED *dirty_ptr)
{
- FUNC_ENTER_STATIC_NOERR /* Yes, even though this pushes an error on the stack */
+ FUNC_ENTER_PACKAGE_NOERR /* Yes, even though this pushes an error on the stack */
HERROR(H5E_CACHE, H5E_SYSTEM, "called unreachable fcn.");
@@ -151,7 +151,7 @@ H5C__epoch_marker_deserialize(const void H5_ATTR_UNUSED *image_ptr, size_t H5_AT
static herr_t
H5C__epoch_marker_image_len(const void H5_ATTR_UNUSED *thing, size_t H5_ATTR_UNUSED *image_len_ptr)
{
- FUNC_ENTER_STATIC_NOERR /* Yes, even though this pushes an error on the stack */
+ FUNC_ENTER_PACKAGE_NOERR /* Yes, even though this pushes an error on the stack */
HERROR(H5E_CACHE, H5E_SYSTEM, "called unreachable fcn.");
@@ -164,7 +164,7 @@ H5C__epoch_marker_pre_serialize(H5F_t H5_ATTR_UNUSED *f, void H5_ATTR_UNUSED *th
haddr_t H5_ATTR_UNUSED *new_addr_ptr, size_t H5_ATTR_UNUSED *new_len_ptr,
unsigned H5_ATTR_UNUSED *flags_ptr)
{
- FUNC_ENTER_STATIC_NOERR /* Yes, even though this pushes an error on the stack */
+ FUNC_ENTER_PACKAGE_NOERR /* Yes, even though this pushes an error on the stack */
HERROR(H5E_CACHE, H5E_SYSTEM, "called unreachable fcn.");
@@ -175,7 +175,7 @@ static herr_t
H5C__epoch_marker_serialize(const H5F_t H5_ATTR_UNUSED *f, void H5_ATTR_UNUSED *image_ptr,
size_t H5_ATTR_UNUSED len, void H5_ATTR_UNUSED *thing)
{
- FUNC_ENTER_STATIC_NOERR /* Yes, even though this pushes an error on the stack */
+ FUNC_ENTER_PACKAGE_NOERR /* Yes, even though this pushes an error on the stack */
HERROR(H5E_CACHE, H5E_SYSTEM, "called unreachable fcn.");
@@ -185,7 +185,7 @@ H5C__epoch_marker_serialize(const H5F_t H5_ATTR_UNUSED *f, void H5_ATTR_UNUSED *
static herr_t
H5C__epoch_marker_notify(H5C_notify_action_t H5_ATTR_UNUSED action, void H5_ATTR_UNUSED *thing)
{
- FUNC_ENTER_STATIC_NOERR /* Yes, even though this pushes an error on the stack */
+ FUNC_ENTER_PACKAGE_NOERR /* Yes, even though this pushes an error on the stack */
HERROR(H5E_CACHE, H5E_SYSTEM, "called unreachable fcn.");
@@ -195,7 +195,7 @@ H5C__epoch_marker_notify(H5C_notify_action_t H5_ATTR_UNUSED action, void H5_ATTR
static herr_t
H5C__epoch_marker_free_icr(void H5_ATTR_UNUSED *thing)
{
- FUNC_ENTER_STATIC_NOERR /* Yes, even though this pushes an error on the stack */
+ FUNC_ENTER_PACKAGE_NOERR /* Yes, even though this pushes an error on the stack */
HERROR(H5E_CACHE, H5E_SYSTEM, "called unreachable fcn.");
@@ -205,7 +205,7 @@ H5C__epoch_marker_free_icr(void H5_ATTR_UNUSED *thing)
static herr_t
H5C__epoch_marker_fsf_size(const void H5_ATTR_UNUSED *thing, hsize_t H5_ATTR_UNUSED *fsf_size_ptr)
{
- FUNC_ENTER_STATIC_NOERR /* Yes, even though this pushes an error on the stack */
+ FUNC_ENTER_PACKAGE_NOERR /* Yes, even though this pushes an error on the stack */
HERROR(H5E_CACHE, H5E_SYSTEM, "called unreachable fcn.");
diff --git a/src/H5Cimage.c b/src/H5Cimage.c
index bec337b..1271bce 100644
--- a/src/H5Cimage.c
+++ b/src/H5Cimage.c
@@ -230,7 +230,7 @@ H5C__construct_cache_image_buffer(H5F_t *f, H5C_t *cache_ptr)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f);
@@ -814,7 +814,7 @@ done:
static herr_t
H5C__free_image_entries_array(H5C_t *cache_ptr)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(cache_ptr);
@@ -977,7 +977,7 @@ H5C__read_cache_image(H5F_t *f, H5C_t *cache_ptr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f);
@@ -1212,7 +1212,7 @@ H5C__image_entry_cmp(const void *_entry1, const void *_entry2)
(const H5C_image_entry_t *)_entry2; /* Pointer to second image entry to compare */
int ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(entry1);
@@ -1702,7 +1702,7 @@ H5C__cache_image_block_entry_header_size(const H5F_t *f)
{
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Set return value */
ret_value = (size_t)(1 + /* type */
@@ -1738,7 +1738,7 @@ H5C__cache_image_block_header_size(const H5F_t *f)
{
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Set return value */
ret_value = (size_t)(4 + /* signature */
@@ -1776,7 +1776,7 @@ H5C__decode_cache_image_header(const H5F_t *f, H5C_t *cache_ptr, const uint8_t *
const uint8_t *p;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(cache_ptr);
@@ -1873,7 +1873,7 @@ H5C__decode_cache_image_entry(const H5F_t *f, const H5C_t *cache_ptr, const uint
const uint8_t * p;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f);
@@ -2029,7 +2029,7 @@ H5C__destroy_pf_entry_child_flush_deps(H5C_t *cache_ptr, H5C_cache_entry_t *pf_e
hbool_t found;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(cache_ptr);
@@ -2145,7 +2145,7 @@ H5C__encode_cache_image_header(const H5F_t *f, const H5C_t *cache_ptr, uint8_t *
uint8_t *p; /* Pointer into cache image buffer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(cache_ptr);
@@ -2221,7 +2221,7 @@ H5C__encode_cache_image_entry(H5F_t *f, H5C_t *cache_ptr, uint8_t **buf, unsigne
unsigned u; /* Local index value */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f);
@@ -2381,7 +2381,7 @@ H5C__prep_for_file_close__compute_fd_heights(const H5C_t *cache_ptr)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* sanity checks */
HDassert(cache_ptr);
@@ -2603,7 +2603,7 @@ done:
static void
H5C__prep_for_file_close__compute_fd_heights_real(H5C_cache_entry_t *entry_ptr, uint32_t fd_height)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(entry_ptr);
@@ -2655,7 +2655,7 @@ H5C__prep_for_file_close__setup_image_entries_array(H5C_t *cache_ptr)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(cache_ptr);
@@ -2799,7 +2799,7 @@ H5C__prep_for_file_close__scan_entries(const H5F_t *f, H5C_t *cache_ptr)
unsigned j;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f);
@@ -3035,7 +3035,7 @@ H5C__reconstruct_cache_contents(H5F_t *f, H5C_t *cache_ptr)
unsigned u, v; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f);
@@ -3247,7 +3247,7 @@ H5C__reconstruct_cache_entry(const H5F_t *f, H5C_t *cache_ptr, const uint8_t **b
hbool_t file_is_rw;
H5C_cache_entry_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(cache_ptr);
@@ -3417,7 +3417,7 @@ H5C__write_cache_image_superblock_msg(H5F_t *f, hbool_t create)
unsigned mesg_flags = H5O_MSG_FLAG_FAIL_IF_UNKNOWN_ALWAYS;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f);
@@ -3472,7 +3472,7 @@ H5C__write_cache_image(H5F_t *f, const H5C_t *cache_ptr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f);
diff --git a/src/H5Clog_json.c b/src/H5Clog_json.c
index 18323ca..cf7cc76 100644
--- a/src/H5Clog_json.c
+++ b/src/H5Clog_json.c
@@ -164,7 +164,7 @@ H5C__json_write_log_message(H5C_log_json_udata_t *json_udata)
size_t n_chars;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(json_udata);
@@ -292,7 +292,7 @@ H5C__json_tear_down_logging(H5C_log_info_t *log_info)
H5C_log_json_udata_t *json_udata = NULL;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(log_info);
@@ -337,7 +337,7 @@ H5C__json_write_start_log_msg(void *udata)
H5C_log_json_udata_t *json_udata = (H5C_log_json_udata_t *)(udata);
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(json_udata);
@@ -380,7 +380,7 @@ H5C__json_write_stop_log_msg(void *udata)
H5C_log_json_udata_t *json_udata = (H5C_log_json_udata_t *)(udata);
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(json_udata);
@@ -422,7 +422,7 @@ H5C__json_write_create_cache_log_msg(void *udata, herr_t fxn_ret_value)
H5C_log_json_udata_t *json_udata = (H5C_log_json_udata_t *)(udata);
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(json_udata);
@@ -464,7 +464,7 @@ H5C__json_write_destroy_cache_log_msg(void *udata)
H5C_log_json_udata_t *json_udata = (H5C_log_json_udata_t *)(udata);
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(json_udata);
@@ -505,7 +505,7 @@ H5C__json_write_evict_cache_log_msg(void *udata, herr_t fxn_ret_value)
H5C_log_json_udata_t *json_udata = (H5C_log_json_udata_t *)(udata);
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(json_udata);
@@ -547,7 +547,7 @@ H5C__json_write_expunge_entry_log_msg(void *udata, haddr_t address, int type_id,
H5C_log_json_udata_t *json_udata = (H5C_log_json_udata_t *)(udata);
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(json_udata);
@@ -591,7 +591,7 @@ H5C__json_write_flush_cache_log_msg(void *udata, herr_t fxn_ret_value)
H5C_log_json_udata_t *json_udata = (H5C_log_json_udata_t *)(udata);
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(json_udata);
@@ -634,7 +634,7 @@ H5C__json_write_insert_entry_log_msg(void *udata, haddr_t address, int type_id,
H5C_log_json_udata_t *json_udata = (H5C_log_json_udata_t *)(udata);
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(json_udata);
@@ -681,7 +681,7 @@ H5C__json_write_mark_entry_dirty_log_msg(void *udata, const H5C_cache_entry_t *e
H5C_log_json_udata_t *json_udata = (H5C_log_json_udata_t *)(udata);
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(json_udata);
@@ -725,7 +725,7 @@ H5C__json_write_mark_entry_clean_log_msg(void *udata, const H5C_cache_entry_t *e
H5C_log_json_udata_t *json_udata = (H5C_log_json_udata_t *)(udata);
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(json_udata);
@@ -770,7 +770,7 @@ H5C__json_write_mark_unserialized_entry_log_msg(void *udata, const H5C_cache_ent
H5C_log_json_udata_t *json_udata = (H5C_log_json_udata_t *)(udata);
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(json_udata);
@@ -815,7 +815,7 @@ H5C__json_write_mark_serialized_entry_log_msg(void *udata, const H5C_cache_entry
H5C_log_json_udata_t *json_udata = (H5C_log_json_udata_t *)(udata);
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(json_udata);
@@ -860,7 +860,7 @@ H5C__json_write_move_entry_log_msg(void *udata, haddr_t old_addr, haddr_t new_ad
H5C_log_json_udata_t *json_udata = (H5C_log_json_udata_t *)(udata);
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(json_udata);
@@ -906,7 +906,7 @@ H5C__json_write_pin_entry_log_msg(void *udata, const H5C_cache_entry_t *entry, h
H5C_log_json_udata_t *json_udata = (H5C_log_json_udata_t *)(udata);
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(json_udata);
@@ -952,7 +952,7 @@ H5C__json_write_create_fd_log_msg(void *udata, const H5C_cache_entry_t *parent,
H5C_log_json_udata_t *json_udata = (H5C_log_json_udata_t *)(udata);
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(json_udata);
@@ -1001,7 +1001,7 @@ H5C__json_write_protect_entry_log_msg(void *udata, const H5C_cache_entry_t *entr
char rw_s[16];
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(json_udata);
@@ -1055,7 +1055,7 @@ H5C__json_write_resize_entry_log_msg(void *udata, const H5C_cache_entry_t *entry
H5C_log_json_udata_t *json_udata = (H5C_log_json_udata_t *)(udata);
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(json_udata);
@@ -1100,7 +1100,7 @@ H5C__json_write_unpin_entry_log_msg(void *udata, const H5C_cache_entry_t *entry,
H5C_log_json_udata_t *json_udata = (H5C_log_json_udata_t *)(udata);
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(json_udata);
@@ -1146,7 +1146,7 @@ H5C__json_write_destroy_fd_log_msg(void *udata, const H5C_cache_entry_t *parent,
H5C_log_json_udata_t *json_udata = (H5C_log_json_udata_t *)(udata);
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(json_udata);
@@ -1194,7 +1194,7 @@ H5C__json_write_unprotect_entry_log_msg(void *udata, haddr_t address, int type_i
H5C_log_json_udata_t *json_udata = (H5C_log_json_udata_t *)(udata);
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(json_udata);
@@ -1240,7 +1240,7 @@ H5C__json_write_set_cache_config_log_msg(void *udata, const H5AC_cache_config_t
H5C_log_json_udata_t *json_udata = (H5C_log_json_udata_t *)(udata);
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(json_udata);
@@ -1283,7 +1283,7 @@ H5C__json_write_remove_entry_log_msg(void *udata, const H5C_cache_entry_t *entry
H5C_log_json_udata_t *json_udata = (H5C_log_json_udata_t *)(udata);
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(json_udata);
diff --git a/src/H5Clog_trace.c b/src/H5Clog_trace.c
index d33d1b0..758a153 100644
--- a/src/H5Clog_trace.c
+++ b/src/H5Clog_trace.c
@@ -159,7 +159,7 @@ H5C__trace_write_log_message(H5C_log_trace_udata_t *trace_udata)
size_t n_chars;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(trace_udata);
@@ -290,7 +290,7 @@ H5C__trace_tear_down_logging(H5C_log_info_t *log_info)
H5C_log_trace_udata_t *trace_udata = NULL;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(log_info);
@@ -335,7 +335,7 @@ H5C__trace_write_expunge_entry_log_msg(void *udata, haddr_t address, int type_id
H5C_log_trace_udata_t *trace_udata = (H5C_log_trace_udata_t *)(udata);
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(trace_udata);
@@ -371,7 +371,7 @@ H5C__trace_write_flush_cache_log_msg(void *udata, herr_t fxn_ret_value)
H5C_log_trace_udata_t *trace_udata = (H5C_log_trace_udata_t *)(udata);
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(trace_udata);
@@ -407,7 +407,7 @@ H5C__trace_write_insert_entry_log_msg(void *udata, haddr_t address, int type_id,
H5C_log_trace_udata_t *trace_udata = (H5C_log_trace_udata_t *)(udata);
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(trace_udata);
@@ -443,7 +443,7 @@ H5C__trace_write_mark_entry_dirty_log_msg(void *udata, const H5C_cache_entry_t *
H5C_log_trace_udata_t *trace_udata = (H5C_log_trace_udata_t *)(udata);
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(trace_udata);
@@ -480,7 +480,7 @@ H5C__trace_write_mark_entry_clean_log_msg(void *udata, const H5C_cache_entry_t *
H5C_log_trace_udata_t *trace_udata = (H5C_log_trace_udata_t *)(udata);
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(trace_udata);
@@ -518,7 +518,7 @@ H5C__trace_write_mark_unserialized_entry_log_msg(void *udata, const H5C_cache_en
H5C_log_trace_udata_t *trace_udata = (H5C_log_trace_udata_t *)(udata);
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(trace_udata);
@@ -556,7 +556,7 @@ H5C__trace_write_mark_serialized_entry_log_msg(void *udata, const H5C_cache_entr
H5C_log_trace_udata_t *trace_udata = (H5C_log_trace_udata_t *)(udata);
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(trace_udata);
@@ -594,7 +594,7 @@ H5C__trace_write_move_entry_log_msg(void *udata, haddr_t old_addr, haddr_t new_a
H5C_log_trace_udata_t *trace_udata = (H5C_log_trace_udata_t *)(udata);
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(trace_udata);
@@ -630,7 +630,7 @@ H5C__trace_write_pin_entry_log_msg(void *udata, const H5C_cache_entry_t *entry,
H5C_log_trace_udata_t *trace_udata = (H5C_log_trace_udata_t *)(udata);
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(trace_udata);
@@ -669,7 +669,7 @@ H5C__trace_write_create_fd_log_msg(void *udata, const H5C_cache_entry_t *parent,
H5C_log_trace_udata_t *trace_udata = (H5C_log_trace_udata_t *)(udata);
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(trace_udata);
@@ -709,7 +709,7 @@ H5C__trace_write_protect_entry_log_msg(void *udata, const H5C_cache_entry_t *ent
H5C_log_trace_udata_t *trace_udata = (H5C_log_trace_udata_t *)(udata);
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(trace_udata);
@@ -747,7 +747,7 @@ H5C__trace_write_resize_entry_log_msg(void *udata, const H5C_cache_entry_t *entr
H5C_log_trace_udata_t *trace_udata = (H5C_log_trace_udata_t *)(udata);
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(trace_udata);
@@ -784,7 +784,7 @@ H5C__trace_write_unpin_entry_log_msg(void *udata, const H5C_cache_entry_t *entry
H5C_log_trace_udata_t *trace_udata = (H5C_log_trace_udata_t *)(udata);
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(trace_udata);
@@ -823,7 +823,7 @@ H5C__trace_write_destroy_fd_log_msg(void *udata, const H5C_cache_entry_t *parent
H5C_log_trace_udata_t *trace_udata = (H5C_log_trace_udata_t *)(udata);
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(trace_udata);
@@ -863,7 +863,7 @@ H5C__trace_write_unprotect_entry_log_msg(void *udata, haddr_t address, int type_
H5C_log_trace_udata_t *trace_udata = (H5C_log_trace_udata_t *)(udata);
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(trace_udata);
@@ -900,7 +900,7 @@ H5C__trace_write_set_cache_config_log_msg(void *udata, const H5AC_cache_config_t
H5C_log_trace_udata_t *trace_udata = (H5C_log_trace_udata_t *)(udata);
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(trace_udata);
@@ -949,7 +949,7 @@ H5C__trace_write_remove_entry_log_msg(void *udata, const H5C_cache_entry_t *entr
H5C_log_trace_udata_t *trace_udata = (H5C_log_trace_udata_t *)(udata);
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(trace_udata);
diff --git a/src/H5Cmodule.h b/src/H5Cmodule.h
index 26216ec..a3ef4d6 100644
--- a/src/H5Cmodule.h
+++ b/src/H5Cmodule.h
@@ -25,8 +25,7 @@
* reporting macros.
*/
#define H5C_MODULE
-#define H5_MY_PKG H5C
-#define H5_MY_PKG_ERR H5E_CACHE
-#define H5_MY_PKG_INIT NO
+#define H5_MY_PKG H5C
+#define H5_MY_PKG_ERR H5E_CACHE
#endif /* H5Cmodule_H */
diff --git a/src/H5Cmpio.c b/src/H5Cmpio.c
index d127961..ba6ff56 100644
--- a/src/H5Cmpio.c
+++ b/src/H5Cmpio.c
@@ -955,7 +955,7 @@ H5C__collective_write(H5F_t *f)
size_t buf_count;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f != NULL);
@@ -1125,7 +1125,7 @@ H5C__flush_candidate_entries(H5F_t *f, unsigned entries_to_flush[H5C_RING_NTYPES
H5C_t * cache_ptr;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(f);
HDassert(f->shared);
@@ -1245,7 +1245,7 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
H5C_cache_entry_t *entry_ptr;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f);
diff --git a/src/H5Cprefetched.c b/src/H5Cprefetched.c
index fd5153d..b89671c 100644
--- a/src/H5Cprefetched.c
+++ b/src/H5Cprefetched.c
@@ -110,7 +110,7 @@ static herr_t
H5C__prefetched_entry_get_initial_load_size(void H5_ATTR_UNUSED *udata_ptr,
size_t H5_ATTR_UNUSED *image_len_ptr)
{
- FUNC_ENTER_STATIC_NOERR /* Yes, even though this pushes an error on the stack */
+ FUNC_ENTER_PACKAGE_NOERR /* Yes, even though this pushes an error on the stack */
HERROR(H5E_CACHE, H5E_SYSTEM, "called unreachable fcn.");
@@ -122,7 +122,7 @@ H5C__prefetched_entry_get_final_load_size(const void H5_ATTR_UNUSED *image_ptr,
size_t H5_ATTR_UNUSED image_len, void H5_ATTR_UNUSED *udata_ptr,
size_t H5_ATTR_UNUSED *actual_len_ptr)
{
- FUNC_ENTER_STATIC_NOERR /* Yes, even though this pushes an error on the stack */
+ FUNC_ENTER_PACKAGE_NOERR /* Yes, even though this pushes an error on the stack */
HERROR(H5E_CACHE, H5E_SYSTEM, "called unreachable fcn.");
@@ -133,7 +133,7 @@ static htri_t
H5C__prefetched_entry_verify_chksum(const void H5_ATTR_UNUSED *image_ptr, size_t H5_ATTR_UNUSED len,
void H5_ATTR_UNUSED *udata_ptr)
{
- FUNC_ENTER_STATIC_NOERR /* Yes, even though this pushes an error on the stack */
+ FUNC_ENTER_PACKAGE_NOERR /* Yes, even though this pushes an error on the stack */
HERROR(H5E_CACHE, H5E_SYSTEM, "called unreachable fcn.");
@@ -144,7 +144,7 @@ static void *
H5C__prefetched_entry_deserialize(const void H5_ATTR_UNUSED *image_ptr, size_t H5_ATTR_UNUSED len,
void H5_ATTR_UNUSED *udata, hbool_t H5_ATTR_UNUSED *dirty_ptr)
{
- FUNC_ENTER_STATIC_NOERR /* Yes, even though this pushes an error on the stack */
+ FUNC_ENTER_PACKAGE_NOERR /* Yes, even though this pushes an error on the stack */
HERROR(H5E_CACHE, H5E_SYSTEM, "called unreachable fcn.");
@@ -154,7 +154,7 @@ H5C__prefetched_entry_deserialize(const void H5_ATTR_UNUSED *image_ptr, size_t H
static herr_t
H5C__prefetched_entry_image_len(const void H5_ATTR_UNUSED *thing, size_t H5_ATTR_UNUSED *image_len_ptr)
{
- FUNC_ENTER_STATIC_NOERR /* Yes, even though this pushes an error on the stack */
+ FUNC_ENTER_PACKAGE_NOERR /* Yes, even though this pushes an error on the stack */
HERROR(H5E_CACHE, H5E_SYSTEM, "called unreachable fcn.");
@@ -167,7 +167,7 @@ H5C__prefetched_entry_pre_serialize(H5F_t H5_ATTR_UNUSED *f, void H5_ATTR_UNUSED
haddr_t H5_ATTR_UNUSED *new_addr_ptr, size_t H5_ATTR_UNUSED *new_len_ptr,
unsigned H5_ATTR_UNUSED *flags_ptr)
{
- FUNC_ENTER_STATIC_NOERR /* Yes, even though this pushes an error on the stack */
+ FUNC_ENTER_PACKAGE_NOERR /* Yes, even though this pushes an error on the stack */
HERROR(H5E_CACHE, H5E_SYSTEM, "called unreachable fcn.");
@@ -178,7 +178,7 @@ static herr_t
H5C__prefetched_entry_serialize(const H5F_t H5_ATTR_UNUSED *f, void H5_ATTR_UNUSED *image_ptr,
size_t H5_ATTR_UNUSED len, void H5_ATTR_UNUSED *thing)
{
- FUNC_ENTER_STATIC_NOERR /* Yes, even though this pushes an error on the stack */
+ FUNC_ENTER_PACKAGE_NOERR /* Yes, even though this pushes an error on the stack */
HERROR(H5E_CACHE, H5E_SYSTEM, "called unreachable fcn.");
@@ -209,7 +209,7 @@ H5C__prefetched_entry_notify(H5C_notify_action_t action, void *_thing)
unsigned u;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(entry_ptr);
@@ -287,7 +287,7 @@ H5C__prefetched_entry_free_icr(void *_thing)
H5C_cache_entry_t *entry_ptr = (H5C_cache_entry_t *)_thing;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(entry_ptr);
@@ -314,7 +314,7 @@ done:
static herr_t
H5C__prefetched_entry_fsf_size(const void H5_ATTR_UNUSED *thing, hsize_t H5_ATTR_UNUSED *fsf_size_ptr)
{
- FUNC_ENTER_STATIC_NOERR /* Yes, even though this pushes an error on the stack */
+ FUNC_ENTER_PACKAGE_NOERR /* Yes, even though this pushes an error on the stack */
HERROR(H5E_CACHE, H5E_SYSTEM, "called unreachable fcn.");
diff --git a/src/H5Ctag.c b/src/H5Ctag.c
index 2095cf8..1a61ff8 100644
--- a/src/H5Ctag.c
+++ b/src/H5Ctag.c
@@ -357,7 +357,7 @@ H5C__iter_tagged_entries_real(H5C_t *cache, haddr_t tag, H5C_tag_iter_cb_t cb, v
herr_t ret_value = SUCCEED; /* Return value */
/* Function enter macro */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(cache != NULL);
@@ -458,7 +458,7 @@ H5C__evict_tagged_entries_cb(H5C_cache_entry_t *entry, void *_ctx)
int ret_value = H5_ITER_CONT; /* Return value */
/* Function enter macro */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Santify checks */
HDassert(entry);
@@ -585,7 +585,7 @@ static int
H5C__mark_tagged_entries_cb(H5C_cache_entry_t *entry, void H5_ATTR_UNUSED *_ctx)
{
/* Function enter macro */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(entry);
@@ -618,7 +618,7 @@ H5C__mark_tagged_entries(H5C_t *cache, haddr_t tag)
herr_t ret_value = SUCCEED; /* Return value */
/* Function enter macro */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(cache);
@@ -810,7 +810,7 @@ H5C__expunge_tag_type_metadata_cb(H5C_cache_entry_t *entry, void *_ctx)
int ret_value = H5_ITER_CONT; /* Return value */
/* Function enter macro */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Santify checks */
HDassert(entry);
@@ -889,7 +889,7 @@ H5C__expunge_all_tagged_metadata_cb(H5C_cache_entry_t *entry, void *_ctx)
int ret_value = H5_ITER_CONT; /* Return value */
/* Function enter macro */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Santify checks */
HDassert(entry);
diff --git a/src/H5Ctest.c b/src/H5Ctest.c
index cb0c046..d0578b0 100644
--- a/src/H5Ctest.c
+++ b/src/H5Ctest.c
@@ -91,7 +91,7 @@ H5C__verify_cork_tag_test_cb(H5C_cache_entry_t *entry, void *_ctx)
int ret_value = H5_ITER_CONT; /* Return value */
/* Function enter macro */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Santify checks */
HDassert(entry);
diff --git a/src/H5D.c b/src/H5D.c
index c10b079..8b7a88f 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -97,7 +97,7 @@ H5D__create_api_common(hid_t loc_id, const char *name, hid_t type_id, hid_t spac
H5VL_loc_params_t loc_params; /* Location parameters for object access */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if (!name)
@@ -340,7 +340,7 @@ H5D__open_api_common(hid_t loc_id, const char *name, hid_t dapl_id, void **token
H5VL_loc_params_t loc_params; /* Location parameters for object access */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
if (!name)
@@ -558,7 +558,7 @@ H5D__get_space_api_common(hid_t dset_id, void **token_ptr, H5VL_object_t **_vol_
H5VL_dataset_get_args_t vol_cb_args; /* Arguments to VOL callback */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
if (NULL == (*vol_obj_ptr = (H5VL_object_t *)H5I_object_verify(dset_id, H5I_DATASET)))
@@ -946,7 +946,7 @@ H5D__read_api_common(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t
(_vol_obj_ptr ? _vol_obj_ptr : &tmp_vol_obj); /* Ptr to object ptr for loc_id */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if (mem_space_id < 0)
@@ -1145,7 +1145,7 @@ H5D__write_api_common(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid_
(_vol_obj_ptr ? _vol_obj_ptr : &tmp_vol_obj); /* Ptr to object ptr for loc_id */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if (mem_space_id < 0)
@@ -1760,7 +1760,7 @@ H5D__set_extent_api_common(hid_t dset_id, const hsize_t size[], void **token_ptr
H5VL_dataset_specific_args_t vol_cb_args; /* Arguments to VOL callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
if (NULL == (*vol_obj_ptr = (H5VL_object_t *)H5I_object_verify(dset_id, H5I_DATASET)))
diff --git a/src/H5Dbtree.c b/src/H5Dbtree.c
index f495bd4..0bc0ad0 100644
--- a/src/H5Dbtree.c
+++ b/src/H5Dbtree.c
@@ -207,7 +207,7 @@ H5D__btree_get_shared(const H5F_t H5_ATTR_UNUSED *f, const void *_udata)
{
const H5D_chunk_common_ud_t *udata = (const H5D_chunk_common_ud_t *)_udata;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(udata);
HDassert(udata->storage);
@@ -246,7 +246,7 @@ H5D__btree_new_node(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5B_ins_t op, void *_lt_key,
unsigned u;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
@@ -313,7 +313,7 @@ H5D__btree_cmp2(void *_lt_key, void *_udata, void *_rt_key)
H5D_chunk_common_ud_t *udata = (H5D_chunk_common_ud_t *)_udata;
int ret_value = -1; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(lt_key);
HDassert(rt_key);
@@ -361,7 +361,7 @@ H5D__btree_cmp3(void *_lt_key, void *_udata, void *_rt_key)
H5D_chunk_common_ud_t *udata = (H5D_chunk_common_ud_t *)_udata;
int ret_value = 0;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(lt_key);
HDassert(rt_key);
@@ -425,7 +425,7 @@ H5D__btree_found(H5F_t H5_ATTR_UNUSED *f, haddr_t addr, const void *_lt_key, hbo
unsigned u;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(f);
@@ -473,7 +473,7 @@ H5D__chunk_disjoint(unsigned n, const hsize_t *scaled1, const hsize_t *scaled2)
unsigned u; /* Local index variable */
hbool_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(n);
@@ -530,7 +530,7 @@ H5D__btree_insert(H5F_t H5_ATTR_NDEBUG_UNUSED *f, haddr_t H5_ATTR_NDEBUG_UNUSED
unsigned u;
H5B_ins_t ret_value = H5B_INS_ERROR; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f);
@@ -613,7 +613,7 @@ H5D__btree_remove(H5F_t *f, haddr_t addr, void *_lt_key /*in,out */, hbool_t *lt
H5D_btree_key_t *lt_key = (H5D_btree_key_t *)_lt_key;
H5B_ins_t ret_value = H5B_INS_REMOVE; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Remove raw data chunk from file */
H5_CHECK_OVERFLOW(lt_key->nbytes, uint32_t, hsize_t);
@@ -649,7 +649,7 @@ H5D__btree_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(shared);
@@ -698,7 +698,7 @@ H5D__btree_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key
hsize_t tmp_offset; /* Temporary coordinate offset, from file */
unsigned u; /* Local index variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(shared);
@@ -739,7 +739,7 @@ H5D__btree_debug_key(FILE *stream, int indent, int fwidth, const void *_key, con
const H5D_btree_dbg_t *udata = (const H5D_btree_dbg_t *)_udata;
unsigned u;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(key);
@@ -771,7 +771,7 @@ H5D__btree_shared_free(void *_shared)
H5B_shared_t *shared = (H5B_shared_t *)_shared;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Free the chunk layout information */
shared->udata = H5FL_FREE(H5O_layout_chunk_t, shared->udata);
@@ -804,7 +804,7 @@ H5D__btree_shared_create(const H5F_t *f, H5O_storage_chunk_t *store, const H5O_l
size_t sizeof_rkey; /* Size of raw (disk) key */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Set the raw key size */
sizeof_rkey = 4 + /*storage size */
@@ -851,7 +851,7 @@ H5D__btree_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t H5_ATTR_UNUS
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(idx_info);
@@ -895,7 +895,7 @@ H5D__btree_idx_create(const H5D_chk_idx_info_t *idx_info)
H5D_chunk_common_ud_t udata; /* User data for B-tree callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(idx_info);
@@ -932,7 +932,7 @@ done:
static hbool_t
H5D__btree_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(storage);
@@ -958,7 +958,7 @@ H5D__btree_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(idx_info);
HDassert(idx_info->f);
@@ -999,7 +999,7 @@ H5D__btree_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udat
hbool_t found; /* Whether chunk was found */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(idx_info);
HDassert(idx_info->f);
@@ -1043,7 +1043,7 @@ H5D__btree_idx_iterate_cb(H5F_t H5_ATTR_UNUSED *f, const void *_lt_key, haddr_t
H5D_chunk_rec_t chunk_rec; /* Generic chunk record for callback */
int ret_value = -1; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check for memcpy() */
HDcompile_assert(offsetof(H5D_chunk_rec_t, nbytes) == offsetof(H5D_btree_key_t, nbytes));
@@ -1083,7 +1083,7 @@ H5D__btree_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t c
H5D_btree_it_ud_t udata; /* User data for B-tree iterator callback */
int ret_value = -1; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(idx_info);
HDassert(idx_info->f);
@@ -1126,7 +1126,7 @@ H5D__btree_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(idx_info);
HDassert(idx_info->f);
@@ -1165,7 +1165,7 @@ H5D__btree_idx_delete(const H5D_chk_idx_info_t *idx_info)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(idx_info);
@@ -1223,7 +1223,7 @@ H5D__btree_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src, const H5D_chk_
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC_TAG(H5AC__COPIED_TAG)
+ FUNC_ENTER_PACKAGE_TAG(H5AC__COPIED_TAG)
HDassert(idx_info_src);
HDassert(idx_info_src->f);
@@ -1270,7 +1270,7 @@ H5D__btree_idx_copy_shutdown(H5O_storage_chunk_t *storage_src, H5O_storage_chunk
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(storage_src);
HDassert(storage_dst);
@@ -1305,7 +1305,7 @@ H5D__btree_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size)
H5B_info_t bt_info; /* B-tree info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(idx_info);
@@ -1346,7 +1346,7 @@ done:
static herr_t
H5D__btree_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(storage);
@@ -1373,7 +1373,7 @@ H5D__btree_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
static herr_t
H5D__btree_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(storage);
HDassert(stream);
@@ -1400,7 +1400,7 @@ H5D__btree_idx_dest(const H5D_chk_idx_info_t *idx_info)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(idx_info);
HDassert(idx_info->f);
diff --git a/src/H5Dbtree2.c b/src/H5Dbtree2.c
index 12cd513..61cc2e3 100644
--- a/src/H5Dbtree2.c
+++ b/src/H5Dbtree2.c
@@ -220,7 +220,7 @@ H5D__bt2_crt_context(void *_udata)
uint32_t * my_dim = NULL; /* Pointer to copy of chunk dimension size */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(udata);
@@ -274,7 +274,7 @@ H5D__bt2_dst_context(void *_ctx)
{
H5D_bt2_ctx_t *ctx = (H5D_bt2_ctx_t *)_ctx; /* Callback context structure */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(ctx);
@@ -306,7 +306,7 @@ H5D__bt2_store(void *record, const void *_udata)
{
const H5D_bt2_ud_t *udata = (const H5D_bt2_ud_t *)_udata; /* User data */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
*(H5D_chunk_rec_t *)record = udata->rec;
@@ -335,7 +335,7 @@ H5D__bt2_compare(const void *_udata, const void *_rec2, int *result)
const H5D_chunk_rec_t *rec2 = (const H5D_chunk_rec_t *)_rec2; /* The native record */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(rec1);
@@ -367,7 +367,7 @@ H5D__bt2_unfilt_encode(uint8_t *raw, const void *_record, void *_ctx)
const H5D_chunk_rec_t *record = (const H5D_chunk_rec_t *)_record; /* The native record */
unsigned u; /* Local index variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(ctx);
@@ -401,7 +401,7 @@ H5D__bt2_unfilt_decode(const uint8_t *raw, void *_record, void *_ctx)
H5D_chunk_rec_t *record = (H5D_chunk_rec_t *)_record; /* The native record */
unsigned u; /* Local index variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(ctx);
@@ -435,7 +435,7 @@ H5D__bt2_unfilt_debug(FILE *stream, int indent, int fwidth, const void *_record,
const H5D_bt2_ctx_t * ctx = (const H5D_bt2_ctx_t *)_ctx; /* Callback context */
unsigned u; /* Local index variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(record);
@@ -472,7 +472,7 @@ H5D__bt2_filt_encode(uint8_t *raw, const void *_record, void *_ctx)
const H5D_chunk_rec_t *record = (const H5D_chunk_rec_t *)_record; /* The native record */
unsigned u; /* Local index variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(ctx);
@@ -510,7 +510,7 @@ H5D__bt2_filt_decode(const uint8_t *raw, void *_record, void *_ctx)
H5D_chunk_rec_t *record = (H5D_chunk_rec_t *)_record; /* The native record */
unsigned u; /* Local index variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(ctx);
@@ -549,7 +549,7 @@ H5D__bt2_filt_debug(FILE *stream, int indent, int fwidth, const void *_record, c
const H5D_bt2_ctx_t * ctx = (const H5D_bt2_ctx_t *)_ctx; /* Callback context */
unsigned u; /* Local index variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(record);
@@ -584,7 +584,7 @@ static herr_t
H5D__bt2_idx_init(const H5D_chk_idx_info_t H5_ATTR_UNUSED *idx_info, const H5S_t H5_ATTR_UNUSED *space,
haddr_t dset_ohdr_addr)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(H5F_addr_defined(dset_ohdr_addr));
@@ -616,7 +616,7 @@ H5D__btree2_idx_depend(const H5D_chk_idx_info_t *idx_info)
H5AC_proxy_entry_t *oh_proxy; /* Dataset's object header proxy */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(idx_info);
@@ -679,7 +679,7 @@ H5D__bt2_idx_open(const H5D_chk_idx_info_t *idx_info)
H5D_bt2_ctx_ud_t u_ctx; /* user data for creating context */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(idx_info);
@@ -730,7 +730,7 @@ H5D__bt2_idx_create(const H5D_chk_idx_info_t *idx_info)
H5D_bt2_ctx_ud_t u_ctx; /* data for context call */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(idx_info);
@@ -803,7 +803,7 @@ done:
static hbool_t
H5D__bt2_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(storage);
@@ -831,7 +831,7 @@ H5D__bt2_mod_cb(void *_record, void *_op_data, hbool_t *changed)
H5D_bt2_ud_t * op_data = (H5D_bt2_ud_t *)_op_data; /* User data for v2 B-tree calls */
H5D_chunk_rec_t *record = (H5D_chunk_rec_t *)_record; /* Chunk record */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
#ifndef NDEBUG
@@ -879,7 +879,7 @@ H5D__bt2_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata,
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(idx_info);
@@ -943,7 +943,7 @@ done:
static herr_t
H5D__bt2_found_cb(const void *nrecord, void *op_data)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
*(H5D_chunk_rec_t *)op_data = *(const H5D_chunk_rec_t *)nrecord;
@@ -973,7 +973,7 @@ H5D__bt2_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata)
hbool_t found; /* Whether chunk was found */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(idx_info);
@@ -1067,7 +1067,7 @@ H5D__bt2_idx_iterate_cb(const void *_record, void *_udata)
const H5D_chunk_rec_t *record = (const H5D_chunk_rec_t *)_record; /* Native record */
int ret_value = -1; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Make "generic chunk" callback */
if ((ret_value = (udata->cb)(record, udata->udata)) < 0)
@@ -1095,7 +1095,7 @@ H5D__bt2_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t chu
H5D_bt2_it_ud_t udata; /* User data for B-tree iterator callback */
int ret_value = FAIL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(idx_info);
@@ -1154,7 +1154,7 @@ H5D__bt2_remove_cb(const void *_record, void *_udata)
H5F_t * f = (H5F_t *)_udata; /* User data for removal callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f);
@@ -1187,7 +1187,7 @@ H5D__bt2_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *u
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(idx_info);
@@ -1249,7 +1249,7 @@ H5D__bt2_idx_delete(const H5D_chk_idx_info_t *idx_info)
H5D_bt2_ctx_ud_t u_ctx; /* data for context call */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(idx_info);
@@ -1300,7 +1300,7 @@ H5D__bt2_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src, const H5D_chk_id
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Source file */
HDassert(idx_info_src);
@@ -1353,7 +1353,7 @@ H5D__bt2_idx_copy_shutdown(H5O_storage_chunk_t *storage_src, H5O_storage_chunk_t
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(storage_src);
@@ -1393,7 +1393,7 @@ H5D__bt2_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size)
H5B2_t *bt2_cdset = NULL; /* Pointer to v2 B-tree structure */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(idx_info);
@@ -1438,7 +1438,7 @@ done:
static herr_t
H5D__bt2_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(storage);
@@ -1465,7 +1465,7 @@ H5D__bt2_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
static herr_t
H5D__bt2_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(storage);
@@ -1492,7 +1492,7 @@ H5D__bt2_idx_dest(const H5D_chk_idx_info_t *idx_info)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(idx_info);
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index 35916d2..44befeb 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -699,7 +699,7 @@ H5D__chunk_set_info_real(H5O_layout_chunk_t *layout, unsigned ndims, const hsize
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(layout);
@@ -851,7 +851,7 @@ H5D__chunk_construct(H5F_t H5_ATTR_UNUSED *f, H5D_t *dset)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f);
@@ -919,7 +919,7 @@ H5D__chunk_init(H5F_t *f, const H5D_t *const dset, hid_t dapl_id)
H5O_storage_chunk_t *sc = &(dset->shared->layout.storage.u.chunk);
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(f);
@@ -1078,7 +1078,7 @@ H5D__chunk_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_inf
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Get layout for dataset */
fm->layout = &(dataset->shared->layout);
@@ -1167,7 +1167,7 @@ H5D__chunk_io_init_selections(const H5D_io_info_t *io_info, const H5D_type_info_
char bogus; /* "bogus" buffer to pass to selection iterator */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Special case for only one element in selection */
/* (usually appending a record) */
@@ -1368,7 +1368,7 @@ H5D__chunk_mem_alloc(size_t size, const H5O_pline_t *pline)
{
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(size);
@@ -1399,7 +1399,7 @@ H5D__chunk_mem_xfree(void *chk, const void *_pline)
{
const H5O_pline_t *pline = (const H5O_pline_t *)_pline;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
if (chk) {
if (pline && pline->nused)
@@ -1443,7 +1443,7 @@ H5D__chunk_mem_realloc(void *chk, size_t size, const H5O_pline_t *pline)
{
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(size);
HDassert(pline);
@@ -1478,7 +1478,7 @@ H5D__free_chunk_info(void *item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED *
{
H5D_chunk_info_t *chunk_info = (H5D_chunk_info_t *)item;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(chunk_info);
@@ -1524,7 +1524,7 @@ H5D__create_chunk_map_single(H5D_chunk_map_t *fm, const H5D_io_info_t
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(fm->f_ndims > 0);
@@ -1618,7 +1618,7 @@ H5D__create_chunk_file_map_all(H5D_chunk_map_t *fm, const H5D_io_info_t
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(fm->f_ndims > 0);
@@ -1821,7 +1821,7 @@ H5D__create_chunk_file_map_hyper(H5D_chunk_map_t *fm, const H5D_io_info_t
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(fm->f_ndims > 0);
@@ -1993,7 +1993,7 @@ H5D__create_chunk_mem_map_hyper(const H5D_chunk_map_t *fm)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(fm->f_ndims > 0);
@@ -2116,7 +2116,7 @@ H5D__create_chunk_mem_map_1d(const H5D_chunk_map_t *fm)
H5SL_node_t * curr_node; /* Current node in skip list */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(fm->f_ndims > 0);
@@ -2203,7 +2203,7 @@ H5D__chunk_file_cb(void H5_ATTR_UNUSED *elem, const H5T_t H5_ATTR_UNUSED *type,
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Calculate the index of this chunk */
chunk_index = H5VM_chunk_index_scaled(ndims, coords, fm->layout->u.chunk.dim,
@@ -2317,7 +2317,7 @@ H5D__chunk_mem_cb(void H5_ATTR_UNUSED *elem, const H5T_t H5_ATTR_UNUSED *type, u
hsize_t chunk_index; /* Chunk index */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Calculate the index of this chunk */
chunk_index = H5VM_chunk_index(ndims, coords, fm->layout->u.chunk.dim, fm->layout->u.chunk.down_chunks);
@@ -2487,7 +2487,7 @@ H5D__chunk_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_
hbool_t skip_missing_chunks = FALSE; /* Whether to skip missing chunks */
herr_t ret_value = SUCCEED; /*return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(io_info);
@@ -2647,7 +2647,7 @@ H5D__chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize
uint32_t dst_accessed_bytes = 0; /* Total accessed size in a chunk */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(io_info);
@@ -2806,7 +2806,7 @@ H5D__chunk_flush(H5D_t *dset)
unsigned nerrors = 0; /* Count of any errors encountered when flushing chunks */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(dset);
@@ -2841,7 +2841,7 @@ H5D__chunk_io_term(const H5D_chunk_map_t *fm)
{
herr_t ret_value = SUCCEED; /*return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Single element I/O vs. multiple element I/O cleanup */
if (fm->use_single) {
@@ -2899,7 +2899,7 @@ H5D__chunk_index_close(const H5D_t *dset, bool destroy)
herr_t ret_value = SUCCEED;
H5D_chunk_close_func_t fn;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5D_CHUNK_STORAGE_INDEX_CHK(sc);
@@ -2939,7 +2939,7 @@ H5D__chunk_dest(H5D_t *dset)
int nerrors = 0; /* Accumulated count of errors */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC_TAG(dset->oloc.addr)
+ FUNC_ENTER_PACKAGE_TAG(dset->oloc.addr)
/* Sanity checks */
HDassert(dset);
@@ -3015,7 +3015,7 @@ done:
static herr_t
H5D__chunk_cinfo_cache_reset(H5D_chunk_cached_t *last)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(last);
@@ -3041,7 +3041,7 @@ H5D__chunk_cinfo_cache_reset(H5D_chunk_cached_t *last)
static herr_t
H5D__chunk_cinfo_cache_update(H5D_chunk_cached_t *last, const H5D_chunk_ud_t *udata)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(last);
@@ -3079,7 +3079,7 @@ H5D__chunk_cinfo_cache_found(const H5D_chunk_cached_t *last, H5D_chunk_ud_t *uda
{
hbool_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(last);
@@ -3184,7 +3184,7 @@ H5D__chunk_hash_val(const H5D_shared_t *shared, const hsize_t *scaled)
unsigned ret = 0; /* Value to return */
unsigned u; /* Local index variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(shared);
@@ -3381,7 +3381,7 @@ H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t reset)
H5O_storage_chunk_t *sc = &(dset->shared->layout.storage.u.chunk);
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(dset);
HDassert(dset->shared);
@@ -3570,7 +3570,7 @@ H5D__chunk_cache_evict(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t flush)
H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk);
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(dset);
@@ -3656,7 +3656,7 @@ H5D__chunk_cache_prune(const H5D_t *dset, size_t size)
int nerrors = 0; /* Accumulated error count during preemptions */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Preemption is accomplished by having multiple pointers (currently two)
@@ -3784,7 +3784,7 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata, hbool_t rel
void * chunk = NULL; /*the file chunk */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(io_info);
@@ -4172,7 +4172,7 @@ H5D__chunk_unlock(const H5D_io_info_t *io_info, const H5D_chunk_ud_t *udata, hbo
const H5D_rdcc_t * rdcc = &(io_info->dset->shared->cache.chunk);
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(io_info);
@@ -4267,7 +4267,7 @@ H5D__chunk_allocated_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
{
hsize_t *nbytes = (hsize_t *)_udata;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
*(hsize_t *)nbytes += chunk_rec->nbytes;
@@ -5012,7 +5012,7 @@ H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_fill_info_t *chunk_
size_t i; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* If a separate fill buffer is provided for partial chunks, ensure
@@ -5245,7 +5245,7 @@ H5D__chunk_cmp_coll_fill_info(const void *_entry1, const void *_entry2)
const struct chunk_coll_fill_info *entry1;
const struct chunk_coll_fill_info *entry2;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
entry1 = (const struct chunk_coll_fill_info *)_entry1;
entry2 = (const struct chunk_coll_fill_info *)_entry2;
@@ -5286,7 +5286,7 @@ H5D__chunk_prune_fill(H5D_chunk_it_ud1_t *udata, hbool_t new_unfilt_chunk)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Get the chunk's size */
HDassert(layout->u.chunk.size > 0);
@@ -5826,7 +5826,7 @@ H5D__chunk_addrmap_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
unsigned rank = udata->common.layout->ndims - 1; /* # of dimensions of dataset */
hsize_t chunk_index;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Compute the index for this chunk */
chunk_index = H5VM_array_offset_pre(rank, udata->common.layout->down_chunks, chunk_rec->scaled);
@@ -6110,7 +6110,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
H5Z_cb_t filter_cb; /* Filter failure callback struct */
int ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Get 'size_t' local value for number of bytes in chunk */
H5_CHECKED_ASSIGN(nbytes, size_t, chunk_rec->nbytes, uint32_t);
@@ -6701,7 +6701,7 @@ H5D__chunk_dump_index_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
{
H5D_chunk_it_ud4_t *udata = (H5D_chunk_it_ud4_t *)_udata; /* User data from caller */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
if (udata->stream) {
unsigned u; /* Local index variable */
@@ -6877,7 +6877,7 @@ H5D__nonexistent_readvv_cb(hsize_t H5_ATTR_UNUSED dst_off, hsize_t src_off, size
hbool_t fb_info_init = FALSE; /* Whether the fill value buffer has been initialized */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Initialize the fill value buffer */
if (H5D__fill_init(&fb_info, (udata->rbuf + src_off), NULL, NULL, NULL, NULL,
@@ -6926,7 +6926,7 @@ H5D__nonexistent_readvv(const H5D_io_info_t *io_info, size_t chunk_max_nseq, siz
H5D_chunk_readvv_ud_t udata; /* User data for H5VM_opvv() operator */
ssize_t ret_value = -1; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(io_info);
@@ -6972,7 +6972,7 @@ H5D__chunk_is_partial_edge_chunk(unsigned dset_ndims, const uint32_t *chunk_dims
unsigned u; /* Local index variable */
hbool_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(scaled);
@@ -7010,7 +7010,7 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old
hbool_t alloc_chunk = FALSE; /* Whether to allocate chunk */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(idx_info);
@@ -7147,7 +7147,7 @@ H5D__chunk_format_convert_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
void * buf = NULL; /* Pointer to buffer of chunk data */
int ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Set up */
new_idx_info = udata->new_idx_info;
@@ -7277,7 +7277,7 @@ H5D__chunk_index_empty_cb(const H5D_chunk_rec_t H5_ATTR_UNUSED *chunk_rec, void
hbool_t *empty = (hbool_t *)_udata;
int ret_value = H5_ITER_STOP;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
*empty = FALSE;
@@ -7364,7 +7364,7 @@ H5D__get_num_chunks_cb(const H5D_chunk_rec_t H5_ATTR_UNUSED *chunk_rec, void *_u
hsize_t *num_chunks = (hsize_t *)_udata;
int ret_value = H5_ITER_CONT; /* Callback return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(num_chunks);
@@ -7456,7 +7456,7 @@ H5D__get_chunk_info_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
H5D_chunk_info_iter_ud_t *chunk_info = (H5D_chunk_info_iter_ud_t *)_udata;
int ret_value = H5_ITER_CONT; /* Callback return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(chunk_rec);
@@ -7597,7 +7597,7 @@ H5D__get_chunk_info_by_coord_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
hsize_t ii; /* Local index value */
int ret_value = H5_ITER_CONT; /* Callback return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(chunk_rec);
@@ -7734,7 +7734,7 @@ H5D__chunk_iter_cb(const H5D_chunk_rec_t *chunk_rec, void *udata)
const H5D_chunk_iter_ud_t *data = (H5D_chunk_iter_ud_t *)udata;
int ret_value = H5_ITER_CONT;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check for callback failure and pass along return value */
if ((ret_value = (data->op)(chunk_rec->scaled, chunk_rec->filter_mask, chunk_rec->chunk_addr,
diff --git a/src/H5Dcompact.c b/src/H5Dcompact.c
index 356a54e..f9fd813 100644
--- a/src/H5Dcompact.c
+++ b/src/H5Dcompact.c
@@ -176,7 +176,7 @@ H5D__compact_construct(H5F_t *f, H5D_t *dset)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f);
@@ -225,7 +225,7 @@ done:
static hbool_t
H5D__compact_is_space_alloc(const H5O_storage_t H5_ATTR_UNUSED *storage)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(storage);
@@ -251,7 +251,7 @@ H5D__compact_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t H5_ATTR
hsize_t H5_ATTR_UNUSED nelmts, H5S_t H5_ATTR_UNUSED *file_space,
H5S_t H5_ATTR_UNUSED *mem_space, H5D_chunk_map_t H5_ATTR_UNUSED *cm)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
io_info->store->compact.buf = io_info->dset->shared->layout.storage.u.compact.buf;
io_info->store->compact.dirty = &io_info->dset->shared->layout.storage.u.compact.dirty;
@@ -278,7 +278,7 @@ H5D__compact_iovv_memmanage_cb(hsize_t dst_off, hsize_t src_off, size_t len, voi
H5FD_t * file_handle = NULL;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Retrieve pointer to file driver structure for ctl call */
if (H5F_shared_get_file_driver(udata->f_sh, &file_handle) < 0)
@@ -326,7 +326,7 @@ H5D__compact_readvv(const H5D_io_info_t *io_info, size_t dset_max_nseq, size_t *
{
ssize_t ret_value = -1; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(io_info);
@@ -385,7 +385,7 @@ H5D__compact_writevv(const H5D_io_info_t *io_info, size_t dset_max_nseq, size_t
{
ssize_t ret_value = -1; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(io_info);
@@ -436,7 +436,7 @@ H5D__compact_flush(H5D_t *dset)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(dset);
@@ -469,7 +469,7 @@ done:
static herr_t
H5D__compact_dest(H5D_t *dset)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(dset);
diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c
index 3828e8e..4c9321e 100644
--- a/src/H5Dcontig.c
+++ b/src/H5Dcontig.c
@@ -380,7 +380,7 @@ H5D__contig_construct(H5F_t *f, H5D_t *dset)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f);
@@ -451,7 +451,7 @@ H5D__contig_init(H5F_t H5_ATTR_UNUSED *f, const H5D_t *dset, hid_t H5_ATTR_UNUSE
size_t tmp_sieve_buf_size; /* Temporary holder for sieve buffer size */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(f);
@@ -570,7 +570,7 @@ H5D__contig_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t H5_ATTR_
hsize_t H5_ATTR_UNUSED nelmts, H5S_t H5_ATTR_UNUSED *file_space,
H5S_t H5_ATTR_UNUSED *mem_space, H5D_chunk_map_t H5_ATTR_UNUSED *cm)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
io_info->store->contig.dset_addr = io_info->dset->shared->layout.storage.u.contig.addr;
io_info->store->contig.dset_size = io_info->dset->shared->layout.storage.u.contig.size;
@@ -673,7 +673,7 @@ H5D__contig_write_one(H5D_io_info_t *io_info, hsize_t offset, size_t size)
size_t mem_curr_seq = 0; /* "Current sequence" in memory */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(io_info);
@@ -716,7 +716,7 @@ H5D__contig_readvv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *
hsize_t min; /* temporary minimum value (avoids some ugly macro nesting) */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Stash local copies of these value */
if (dset_contig->sieve_buf != NULL) {
@@ -870,7 +870,7 @@ H5D__contig_readvv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata
H5D_contig_readvv_ud_t *udata = (H5D_contig_readvv_ud_t *)_udata; /* User data for H5VM_opvv() operator */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Write data */
if (H5F_shared_block_read(udata->f_sh, H5FD_MEM_DRAW, (udata->dset_addr + dst_off), len,
@@ -906,7 +906,7 @@ H5D__contig_readvv(const H5D_io_info_t *io_info, size_t dset_max_nseq, size_t *d
{
ssize_t ret_value = -1; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(io_info);
@@ -983,7 +983,7 @@ H5D__contig_writevv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len, void
hsize_t min; /* temporary minimum value (avoids some ugly macro nesting) */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Stash local copies of these values */
if (dset_contig->sieve_buf != NULL) {
@@ -1188,7 +1188,7 @@ H5D__contig_writevv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udat
(H5D_contig_writevv_ud_t *)_udata; /* User data for H5VM_opvv() operator */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Write data */
if (H5F_shared_block_write(udata->f_sh, H5FD_MEM_DRAW, (udata->dset_addr + dst_off), len,
@@ -1224,7 +1224,7 @@ H5D__contig_writevv(const H5D_io_info_t *io_info, size_t dset_max_nseq, size_t *
{
ssize_t ret_value = -1; /* Return value (Size of sequence in bytes) */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(io_info);
@@ -1287,7 +1287,7 @@ H5D__contig_flush(H5D_t *dset)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(dset);
diff --git a/src/H5Dearray.c b/src/H5Dearray.c
index 0174a76..11c405a 100644
--- a/src/H5Dearray.c
+++ b/src/H5Dearray.c
@@ -220,7 +220,7 @@ H5D__earray_crt_context(void *_udata)
H5D_earray_ctx_ud_t *udata = (H5D_earray_ctx_ud_t *)_udata; /* User data for extensible array context */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(udata);
@@ -267,7 +267,7 @@ H5D__earray_dst_context(void *_ctx)
{
H5D_earray_ctx_t *ctx = (H5D_earray_ctx_t *)_ctx; /* Extensible array callback context */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(ctx);
@@ -296,7 +296,7 @@ H5D__earray_fill(void *nat_blk, size_t nelmts)
{
haddr_t fill_val = H5D_EARRAY_FILL; /* Value to fill elements with */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(nat_blk);
@@ -326,7 +326,7 @@ H5D__earray_encode(void *raw, const void *_elmt, size_t nelmts, void *_ctx)
H5D_earray_ctx_t *ctx = (H5D_earray_ctx_t *)_ctx; /* Extensible array callback context */
const haddr_t * elmt = (const haddr_t *)_elmt; /* Convenience pointer to native elements */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(raw);
@@ -370,7 +370,7 @@ H5D__earray_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx)
haddr_t * elmt = (haddr_t *)_elmt; /* Convenience pointer to native elements */
const uint8_t * raw = (const uint8_t *)_raw; /* Convenience pointer to raw elements */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(raw);
@@ -411,7 +411,7 @@ H5D__earray_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const void
{
char temp_str[128]; /* Temporary string, for formatting */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(stream);
@@ -442,7 +442,7 @@ H5D__earray_filt_fill(void *nat_blk, size_t nelmts)
{
H5D_earray_filt_elmt_t fill_val = H5D_EARRAY_FILT_FILL; /* Value to fill elements with */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(nat_blk);
@@ -475,7 +475,7 @@ H5D__earray_filt_encode(void *_raw, const void *_elmt, size_t nelmts, void *_ctx
const H5D_earray_filt_elmt_t *elmt =
(const H5D_earray_filt_elmt_t *)_elmt; /* Convenience pointer to native elements */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(raw);
@@ -522,7 +522,7 @@ H5D__earray_filt_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx
(H5D_earray_filt_elmt_t *)_elmt; /* Convenience pointer to native elements */
const uint8_t *raw = (const uint8_t *)_raw; /* Convenience pointer to raw elements */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(raw);
@@ -567,7 +567,7 @@ H5D__earray_filt_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const
(const H5D_earray_filt_elmt_t *)_elmt; /* Convenience pointer to native elements */
char temp_str[128]; /* Temporary string, for formatting */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(stream);
@@ -603,7 +603,7 @@ H5D__earray_crt_dbg_context(H5F_t *f, haddr_t obj_addr)
H5O_layout_t layout; /* Layout message */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f);
@@ -674,7 +674,7 @@ H5D__earray_dst_dbg_context(void *_dbg_ctx)
H5D_earray_ctx_ud_t *dbg_ctx =
(H5D_earray_ctx_ud_t *)_dbg_ctx; /* Context for extensible array callback */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(dbg_ctx);
@@ -707,7 +707,7 @@ H5D__earray_idx_depend(const H5D_chk_idx_info_t *idx_info)
H5AC_proxy_entry_t *oh_proxy; /* Dataset's object header proxy */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(idx_info);
@@ -771,7 +771,7 @@ H5D__earray_idx_open(const H5D_chk_idx_info_t *idx_info)
H5D_earray_ctx_ud_t udata; /* User data for extensible array open call */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(idx_info);
@@ -825,7 +825,7 @@ H5D__earray_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t *space, had
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(idx_info);
@@ -894,7 +894,7 @@ H5D__earray_idx_create(const H5D_chk_idx_info_t *idx_info)
H5D_earray_ctx_ud_t udata; /* User data for extensible array create call */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(idx_info);
@@ -971,7 +971,7 @@ done:
static hbool_t
H5D__earray_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(storage);
@@ -997,7 +997,7 @@ H5D__earray_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata
H5EA_t *ea; /* Pointer to extensible array structure */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(idx_info);
@@ -1068,7 +1068,7 @@ H5D__earray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *uda
hsize_t idx; /* Array index of chunk */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(idx_info);
@@ -1161,7 +1161,7 @@ done:
static herr_t
H5D__earray_idx_resize(H5O_layout_chunk_t *layout)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(layout);
@@ -1214,7 +1214,7 @@ H5D__earray_idx_iterate_cb(hsize_t H5_ATTR_UNUSED idx, const void *_elmt, void *
int curr_dim; /* Current dimension */
int ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Compose generic chunk record for callback */
if (udata->filtered) {
@@ -1277,7 +1277,7 @@ H5D__earray_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t
H5EA_stat_t ea_stat; /* Extensible array statistics */
int ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(idx_info);
@@ -1349,7 +1349,7 @@ H5D__earray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t
hsize_t idx; /* Array index of chunk */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(idx_info);
@@ -1462,7 +1462,7 @@ H5D__earray_idx_delete_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
H5F_t *f = (H5F_t *)_udata; /* User data for callback */
int ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(chunk_rec);
@@ -1502,7 +1502,7 @@ H5D__earray_idx_delete(const H5D_chk_idx_info_t *idx_info)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(idx_info);
@@ -1557,7 +1557,7 @@ H5D__earray_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src, const H5D_chk
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(idx_info_src);
@@ -1610,7 +1610,7 @@ H5D__earray_idx_copy_shutdown(H5O_storage_chunk_t *storage_src, H5O_storage_chun
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(storage_src);
@@ -1650,7 +1650,7 @@ H5D__earray_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size)
H5EA_stat_t ea_stat; /* Extensible array statistics */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(idx_info);
@@ -1701,7 +1701,7 @@ done:
static herr_t
H5D__earray_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(storage);
@@ -1731,7 +1731,7 @@ H5D__earray_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
static herr_t
H5D__earray_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(storage);
@@ -1759,7 +1759,7 @@ H5D__earray_idx_dest(const H5D_chk_idx_info_t *idx_info)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(idx_info);
diff --git a/src/H5Defl.c b/src/H5Defl.c
index a30955b..6bcfd83 100644
--- a/src/H5Defl.c
+++ b/src/H5Defl.c
@@ -126,7 +126,7 @@ H5D__efl_construct(H5F_t *f, H5D_t *dset)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f);
@@ -213,7 +213,7 @@ H5D__efl_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t H5_ATTR_UNU
hsize_t H5_ATTR_UNUSED nelmts, H5S_t H5_ATTR_UNUSED *file_space,
H5S_t H5_ATTR_UNUSED *mem_space, H5D_chunk_map_t H5_ATTR_UNUSED *cm)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
H5MM_memcpy(&io_info->store->efl, &(io_info->dset->shared->dcpl_cache.efl), sizeof(H5O_efl_t));
@@ -250,7 +250,7 @@ H5D__efl_read(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t size
char * full_name = NULL; /* File name with prefix */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(efl && efl->nused > 0);
@@ -338,7 +338,7 @@ H5D__efl_write(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t siz
char * full_name = NULL; /* File name with prefix */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(efl && efl->nused > 0);
@@ -417,7 +417,7 @@ H5D__efl_readvv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata)
H5D_efl_readvv_ud_t *udata = (H5D_efl_readvv_ud_t *)_udata; /* User data for H5VM_opvv() operator */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Read data */
if (H5D__efl_read(udata->efl, udata->dset, dst_off, len, (udata->rbuf + src_off)) < 0)
@@ -450,7 +450,7 @@ H5D__efl_readvv(const H5D_io_info_t *io_info, size_t dset_max_nseq, size_t *dset
H5D_efl_readvv_ud_t udata; /* User data for H5VM_opvv() operator */
ssize_t ret_value = -1; /* Return value (Total size of sequence in bytes) */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(io_info);
@@ -497,7 +497,7 @@ H5D__efl_writevv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata)
H5D_efl_writevv_ud_t *udata = (H5D_efl_writevv_ud_t *)_udata; /* User data for H5VM_opvv() operator */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Write data */
if (H5D__efl_write(udata->efl, udata->dset, dst_off, len, (udata->wbuf + src_off)) < 0)
@@ -530,7 +530,7 @@ H5D__efl_writevv(const H5D_io_info_t *io_info, size_t dset_max_nseq, size_t *dse
H5D_efl_writevv_ud_t udata; /* User data for H5VM_opvv() operator */
ssize_t ret_value = -1; /* Return value (Total size of sequence in bytes) */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(io_info);
diff --git a/src/H5Dfarray.c b/src/H5Dfarray.c
index 8c031e4..a9ec404 100644
--- a/src/H5Dfarray.c
+++ b/src/H5Dfarray.c
@@ -219,7 +219,7 @@ H5D__farray_crt_context(void *_udata)
H5D_farray_ctx_ud_t *udata = (H5D_farray_ctx_ud_t *)_udata; /* User data for fixed array context */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(udata);
@@ -265,7 +265,7 @@ H5D__farray_dst_context(void *_ctx)
{
H5D_farray_ctx_t *ctx = (H5D_farray_ctx_t *)_ctx; /* Fixed array callback context */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(ctx);
@@ -294,7 +294,7 @@ H5D__farray_fill(void *nat_blk, size_t nelmts)
{
haddr_t fill_val = H5D_FARRAY_FILL; /* Value to fill elements with */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(nat_blk);
@@ -324,7 +324,7 @@ H5D__farray_encode(void *raw, const void *_elmt, size_t nelmts, void *_ctx)
H5D_farray_ctx_t *ctx = (H5D_farray_ctx_t *)_ctx; /* Fixed array callback context */
const haddr_t * elmt = (const haddr_t *)_elmt; /* Convenience pointer to native elements */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(raw);
@@ -368,7 +368,7 @@ H5D__farray_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx)
haddr_t * elmt = (haddr_t *)_elmt; /* Convenience pointer to native elements */
const uint8_t * raw = (const uint8_t *)_raw; /* Convenience pointer to raw elements */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(raw);
@@ -409,7 +409,7 @@ H5D__farray_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const void
{
char temp_str[128]; /* Temporary string, for formatting */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(stream);
@@ -445,7 +445,7 @@ H5D__farray_crt_dbg_context(H5F_t *f, haddr_t obj_addr)
H5O_layout_t layout; /* Layout message */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f);
@@ -515,7 +515,7 @@ H5D__farray_dst_dbg_context(void *_dbg_ctx)
{
H5D_farray_ctx_ud_t *dbg_ctx = (H5D_farray_ctx_ud_t *)_dbg_ctx; /* Context for fixed array callback */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(dbg_ctx);
@@ -544,7 +544,7 @@ H5D__farray_filt_fill(void *nat_blk, size_t nelmts)
{
H5D_farray_filt_elmt_t fill_val = H5D_FARRAY_FILT_FILL; /* Value to fill elements with */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(nat_blk);
@@ -577,7 +577,7 @@ H5D__farray_filt_encode(void *_raw, const void *_elmt, size_t nelmts, void *_ctx
const H5D_farray_filt_elmt_t *elmt =
(const H5D_farray_filt_elmt_t *)_elmt; /* Convenience pointer to native elements */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(raw);
@@ -624,7 +624,7 @@ H5D__farray_filt_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx
(H5D_farray_filt_elmt_t *)_elmt; /* Convenience pointer to native elements */
const uint8_t *raw = (const uint8_t *)_raw; /* Convenience pointer to raw elements */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(raw);
@@ -669,7 +669,7 @@ H5D__farray_filt_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const
(const H5D_farray_filt_elmt_t *)_elmt; /* Convenience pointer to native elements */
char temp_str[128]; /* Temporary string, for formatting */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(stream);
@@ -705,7 +705,7 @@ H5D__farray_idx_depend(const H5D_chk_idx_info_t *idx_info)
H5AC_proxy_entry_t *oh_proxy; /* Dataset's object header proxy */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(idx_info);
@@ -761,7 +761,7 @@ static herr_t
H5D__farray_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t H5_ATTR_UNUSED *space,
haddr_t dset_ohdr_addr)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(idx_info);
@@ -793,7 +793,7 @@ H5D__farray_idx_open(const H5D_chk_idx_info_t *idx_info)
H5D_farray_ctx_ud_t udata; /* User data for fixed array open call */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(idx_info);
@@ -850,7 +850,7 @@ H5D__farray_idx_create(const H5D_chk_idx_info_t *idx_info)
H5D_farray_ctx_ud_t udata; /* User data for fixed array create call */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(idx_info);
@@ -921,7 +921,7 @@ done:
static hbool_t
H5D__farray_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(storage);
@@ -947,7 +947,7 @@ H5D__farray_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata
H5FA_t *fa; /* Pointer to fixed array structure */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(idx_info);
@@ -1018,7 +1018,7 @@ H5D__farray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *uda
hsize_t idx; /* Array index of chunk */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(idx_info);
@@ -1097,7 +1097,7 @@ H5D__farray_idx_iterate_cb(hsize_t H5_ATTR_UNUSED idx, const void *_elmt, void *
int curr_dim; /* Current dimension */
int ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Compose generic chunk record for callback */
if (udata->filtered) {
@@ -1156,7 +1156,7 @@ H5D__farray_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t
H5FA_stat_t fa_stat; /* Fixed array statistics */
int ret_value = FAIL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(idx_info);
@@ -1229,7 +1229,7 @@ H5D__farray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t
hsize_t idx; /* Array index of chunk */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(idx_info);
@@ -1324,7 +1324,7 @@ H5D__farray_idx_delete_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
H5F_t *f = (H5F_t *)_udata; /* User data for callback */
int ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(chunk_rec);
@@ -1360,7 +1360,7 @@ H5D__farray_idx_delete(const H5D_chk_idx_info_t *idx_info)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(idx_info);
@@ -1415,7 +1415,7 @@ H5D__farray_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src, const H5D_chk
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(idx_info_src);
@@ -1468,7 +1468,7 @@ H5D__farray_idx_copy_shutdown(H5O_storage_chunk_t *storage_src, H5O_storage_chun
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(storage_src);
@@ -1508,7 +1508,7 @@ H5D__farray_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size)
H5FA_stat_t fa_stat; /* Fixed array statistics */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(idx_info);
@@ -1558,7 +1558,7 @@ done:
static herr_t
H5D__farray_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(storage);
@@ -1586,7 +1586,7 @@ H5D__farray_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
static herr_t
H5D__farray_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(storage);
@@ -1614,7 +1614,7 @@ H5D__farray_idx_dest(const H5D_chk_idx_info_t *idx_info)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(idx_info);
diff --git a/src/H5Dfill.c b/src/H5Dfill.c
index cec7e8b..c546494 100644
--- a/src/H5Dfill.c
+++ b/src/H5Dfill.c
@@ -590,7 +590,7 @@ done:
static herr_t
H5D__fill_release(H5D_fill_buf_info_t *fb_info)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(fb_info);
diff --git a/src/H5Dint.c b/src/H5Dint.c
index cc17265..3896584 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -288,7 +288,7 @@ H5D__close_cb(H5VL_object_t *dset_vol_obj, void **request)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(dset_vol_obj);
@@ -423,7 +423,7 @@ H5D__new(hid_t dcpl_id, hid_t dapl_id, hbool_t creating, hbool_t vl_type)
H5P_genplist_t *plist; /* Property list created */
H5D_shared_t * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Allocate new shared dataset structure */
if (NULL == (new_dset = H5FL_MALLOC(H5D_shared_t)))
@@ -495,7 +495,7 @@ H5D__init_type(H5F_t *file, const H5D_t *dset, hid_t type_id, const H5T_t *type)
hbool_t use_at_least_v18; /* Flag indicating to use at least v18 format versions */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checking */
HDassert(file);
@@ -567,7 +567,7 @@ H5D__cache_dataspace_info(const H5D_t *dset)
unsigned u; /* Local index value */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checking */
HDassert(dset);
@@ -606,7 +606,7 @@ H5D__init_space(H5F_t *file, const H5D_t *dset, const H5S_t *space)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checking */
HDassert(file);
@@ -652,7 +652,7 @@ H5D__use_minimized_dset_headers(H5F_t *file, hbool_t *minimize)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(file);
HDassert(minimize);
@@ -693,7 +693,7 @@ H5D__calculate_minimum_header_size(H5F_t *file, H5D_t *dset, H5O_t *ohdr)
size_t get_value = 0;
size_t ret_value = 0;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(file);
HDassert(dset);
@@ -811,7 +811,7 @@ H5D__prepare_minimized_oh(H5F_t *file, H5D_t *dset, H5O_loc_t *oloc)
size_t ohdr_size = 0;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(file);
HDassert(dset);
@@ -858,7 +858,7 @@ H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id)
hbool_t use_minimized_header = FALSE; /* Flag to use minimized dataset object headers */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checking */
HDassert(file);
@@ -1060,7 +1060,7 @@ H5D__build_file_prefix(const H5D_t *dset, H5F_prefix_open_t prefix_type, char **
size_t file_prefix_len; /* length of expanded prefix */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(dset);
@@ -1598,7 +1598,7 @@ H5D__append_flush_setup(H5D_t *dset, hid_t dapl_id)
{
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(dset);
@@ -1677,7 +1677,7 @@ H5D__open_oid(H5D_t *dataset, hid_t dapl_id)
hbool_t layout_init = FALSE; /* Flag to indicate that chunk information was initialized */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC_TAG(dataset->oloc.addr)
+ FUNC_ENTER_PACKAGE_TAG(dataset->oloc.addr)
/* check args */
HDassert(dataset);
@@ -2388,7 +2388,7 @@ H5D__init_storage(const H5D_io_info_t *io_info, hbool_t full_overwrite, hsize_t
const H5D_t *dset = io_info->dset; /* dataset pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(dset);
@@ -2565,7 +2565,7 @@ H5D__vlen_get_buf_size_alloc(size_t size, void *info)
H5D_vlen_bufsize_common_t *vlen_bufsize_com = (H5D_vlen_bufsize_common_t *)info;
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check for increasing the size of the temporary space for VL data */
if (size > vlen_bufsize_com->vl_tbuf_size) {
@@ -2601,7 +2601,7 @@ H5D__vlen_get_buf_size_cb(void H5_ATTR_UNUSED *elem, hid_t type_id, unsigned H5_
H5D_vlen_bufsize_native_t *vlen_bufsize = (H5D_vlen_bufsize_native_t *)op_data;
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(H5I_DATATYPE == H5I_get_type(type_id));
@@ -2747,7 +2747,7 @@ H5D__vlen_get_buf_size_gen_cb(void H5_ATTR_UNUSED *elem, hid_t type_id, unsigned
H5T_t * dt; /* Datatype for operation */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(point);
@@ -2908,7 +2908,7 @@ H5D__check_filters(H5D_t *dataset)
H5O_fill_t *fill; /* Dataset's fill value */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(dataset);
@@ -3466,7 +3466,7 @@ H5D__flush_all_cb(void *_dataset, hid_t H5_ATTR_UNUSED id, void *_udata)
H5F_t *f = (H5F_t *)_udata; /* User data for callback */
int ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(dataset);
diff --git a/src/H5Dio.c b/src/H5Dio.c
index e226a0a..d87d052 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -538,7 +538,7 @@ done:
static herr_t
H5D__ioinfo_init(H5D_t *dset, const H5D_type_info_t *type_info, H5D_storage_t *store, H5D_io_info_t *io_info)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(dset);
@@ -605,7 +605,7 @@ H5D__typeinfo_init(const H5D_t *dset, hid_t mem_type_id, hbool_t do_write, H5D_t
H5Z_data_xform_t *data_transform; /* Data transform info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(type_info);
@@ -775,7 +775,7 @@ H5D__ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset, const H5S_t *file_
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(dset);
@@ -882,7 +882,7 @@ done:
static herr_t
H5D__typeinfo_term(const H5D_type_info_t *type_info)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check for releasing datatype conversion & background buffers */
if (type_info->tconv_buf_allocated) {
diff --git a/src/H5Dmodule.h b/src/H5Dmodule.h
index 596fd48..a05d717 100644
--- a/src/H5Dmodule.h
+++ b/src/H5Dmodule.h
@@ -25,9 +25,8 @@
* reporting macros.
*/
#define H5D_MODULE
-#define H5_MY_PKG H5D
-#define H5_MY_PKG_ERR H5E_DATASET
-#define H5_MY_PKG_INIT YES
+#define H5_MY_PKG H5D
+#define H5_MY_PKG_ERR H5E_DATASET
/**\defgroup H5D H5D
*
diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c
index 8577001..2ce6e3c 100644
--- a/src/H5Dmpio.c
+++ b/src/H5Dmpio.c
@@ -508,7 +508,7 @@ static FILE * debug_stream = NULL;
static void
H5D__mpio_parse_debug_str(const char *s)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(s);
@@ -555,7 +555,7 @@ H5D__mpio_debug_init(void)
const char *debug_str;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(!H5D_mpio_debug_inited);
@@ -963,7 +963,7 @@ H5D__mpio_get_sum_chunk(const H5D_io_info_t *io_info, const H5D_chunk_map_t *fm,
int mpi_code; /* MPI return code */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Get the number of chunks to perform I/O on */
num_chunkf = 0;
@@ -1110,7 +1110,7 @@ H5D__chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_inf
int mpi_size;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(io_info);
@@ -1348,7 +1348,7 @@ H5D__link_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *typ
int mpi_code; /* MPI return code */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Set the actual-chunk-opt-mode property. */
H5CX_set_mpio_actual_chunk_opt(H5D_MPIO_LINK_CHUNK);
@@ -1707,7 +1707,7 @@ H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_in
int mpi_code;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(io_info);
HDassert(type_info);
@@ -1907,7 +1907,7 @@ H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *ty
H5D_MPIO_NO_COLLECTIVE; /* Local variable for tracking the I/O mode used. */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Set the actual chunk opt mode property */
H5CX_set_mpio_actual_chunk_opt(H5D_MPIO_MULTI_CHUNK);
@@ -2159,7 +2159,7 @@ H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_i
int mpi_code;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(io_info);
HDassert(type_info);
@@ -2385,7 +2385,7 @@ H5D__inter_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_inf
#endif
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#ifdef H5Dmpio_DEBUG
mpi_rank = H5F_mpi_get_rank(io_info->dset->oloc.file);
@@ -2498,7 +2498,7 @@ H5D__final_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_inf
#endif
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#ifdef H5Dmpio_DEBUG
mpi_rank = H5F_mpi_get_rank(io_info->dset->oloc.file);
@@ -2550,7 +2550,7 @@ H5D__cmp_chunk_addr(const void *chunk_addr_info1, const void *chunk_addr_info2)
{
haddr_t addr1 = HADDR_UNDEF, addr2 = HADDR_UNDEF;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
addr1 = ((const H5D_chunk_addr_info_t *)chunk_addr_info1)->chunk_addr;
addr2 = ((const H5D_chunk_addr_info_t *)chunk_addr_info2)->chunk_addr;
@@ -2581,7 +2581,7 @@ H5D__cmp_filtered_collective_io_info_entry(const void *filtered_collective_io_in
haddr_t addr2 = HADDR_UNDEF;
int ret_value;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
entry1 = (const H5D_filtered_collective_io_info_t *)filtered_collective_io_info_entry1;
entry2 = (const H5D_filtered_collective_io_info_t *)filtered_collective_io_info_entry2;
@@ -2633,7 +2633,7 @@ H5D__cmp_chunk_redistribute_info(const void *_entry1, const void *_entry2)
hsize_t chunk_index2;
int ret_value;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
entry1 = (const H5D_chunk_redistribute_info_t *)_entry1;
entry2 = (const H5D_chunk_redistribute_info_t *)_entry2;
@@ -2676,7 +2676,7 @@ H5D__cmp_chunk_redistribute_info_orig_owner(const void *_entry1, const void *_en
int owner2 = -1;
int ret_value;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
entry1 = (const H5D_chunk_redistribute_info_t *)_entry1;
entry2 = (const H5D_chunk_redistribute_info_t *)_entry2;
@@ -2756,7 +2756,7 @@ H5D__sort_chunk(H5D_io_info_t *io_info, const H5D_chunk_map_t *fm,
int i; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Calculate the actual threshold to obtain all chunk addresses collectively
* The bigger this number is, the more possible the use of obtaining chunk
@@ -2943,7 +2943,7 @@ H5D__obtain_mpio_mode(H5D_io_info_t *io_info, H5D_chunk_map_t *fm, uint8_t assig
int mpi_code;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Assign the rank 0 to the root */
root = 0;
@@ -3119,7 +3119,7 @@ H5D__mpio_collective_filtered_chunk_io_setup(const H5D_io_info_t *io_info, const
size_t i;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(io_info);
HDassert(type_info);
@@ -3339,7 +3339,7 @@ H5D__mpio_redistribute_shared_chunks(H5D_filtered_collective_io_info_t *chunk_li
int mpi_code;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(chunk_list || 0 == chunk_list_num_entries);
HDassert(io_info);
@@ -3484,7 +3484,7 @@ H5D__mpio_redistribute_shared_chunks_int(H5D_filtered_collective_io_info_t *chun
int mpi_code;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(num_chunks_assigned_map);
HDassert(chunk_list || 0 == num_chunks_assigned_map[mpi_rank]);
@@ -3820,7 +3820,7 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk
int mpi_code;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(chunk_list_num_entries);
HDassert(chunk_list || 0 == *chunk_list_num_entries);
@@ -4173,7 +4173,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
#else
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HERROR(
H5E_DATASET, H5E_WRITEERROR,
"unable to send chunk modification data between MPI ranks - MPI version < 3 (MPI_Ibarrier missing)")
@@ -4210,7 +4210,7 @@ H5D__mpio_collective_filtered_chunk_common_io(H5D_filtered_collective_io_info_t
int mpi_code;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(chunk_list || 0 == chunk_list_num_entries);
HDassert(io_info);
@@ -4344,7 +4344,7 @@ H5D__mpio_collective_filtered_chunk_read(H5D_filtered_collective_io_info_t *chun
void * base_read_buf = NULL;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(chunk_list || 0 == chunk_list_num_entries);
HDassert(io_info);
@@ -4567,7 +4567,7 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch
void * base_read_buf = NULL;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(chunk_list || 0 == chunk_list_num_entries);
HDassert((chunk_msg_bufs && chunk_hash_table) || 0 == chunk_msg_bufs_len);
@@ -4908,7 +4908,7 @@ H5D__mpio_collective_filtered_chunk_reallocate(H5D_filtered_collective_io_info_t
int mpi_code;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(chunk_list || 0 == chunk_list_num_entries);
HDassert(io_info);
@@ -5098,7 +5098,7 @@ H5D__mpio_collective_filtered_chunk_reinsert(H5D_filtered_collective_io_info_t *
int mpi_code;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(chunk_list || 0 == chunk_list_num_entries);
HDassert(io_info);
@@ -5308,7 +5308,7 @@ H5D__mpio_get_chunk_redistribute_info_types(MPI_Datatype *contig_type, hbool_t *
int mpi_code;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(contig_type);
HDassert(contig_type_derived);
@@ -5449,7 +5449,7 @@ H5D__mpio_get_chunk_alloc_info_types(MPI_Datatype *contig_type, hbool_t *contig_
int mpi_code;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(contig_type);
HDassert(contig_type_derived);
@@ -5580,7 +5580,7 @@ H5D__mpio_get_chunk_insert_info_types(MPI_Datatype *contig_type, hbool_t *contig
int mpi_code;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(contig_type);
HDassert(contig_type_derived);
@@ -5706,7 +5706,7 @@ H5D__mpio_collective_filtered_io_type(H5D_filtered_collective_io_info_t *chunk_l
int mpi_code;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(chunk_list || 0 == num_entries);
HDassert(new_mem_type);
@@ -5943,7 +5943,7 @@ H5D__mpio_dump_collective_filtered_chunk_list(H5D_filtered_collective_io_info_t
size_t i;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
H5D_MPIO_DEBUG(mpi_rank, "CHUNK LIST: [");
for (i = 0; i < chunk_list_num_entries; i++) {
diff --git a/src/H5Dnone.c b/src/H5Dnone.c
index f724949..0220281 100644
--- a/src/H5Dnone.c
+++ b/src/H5Dnone.c
@@ -118,7 +118,7 @@ H5D__none_idx_create(const H5D_chk_idx_info_t *idx_info)
haddr_t addr; /* The address of dataset chunks */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(idx_info);
@@ -159,7 +159,7 @@ done:
static hbool_t
H5D__none_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(storage);
@@ -182,7 +182,7 @@ H5D__none_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
static herr_t
H5D__none_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(idx_info);
@@ -230,7 +230,7 @@ H5D__none_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t ch
hsize_t idx; /* Array index of chunk */
int ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(idx_info);
@@ -304,7 +304,7 @@ static herr_t
H5D__none_idx_remove(const H5D_chk_idx_info_t H5_ATTR_UNUSED *idx_info,
H5D_chunk_common_ud_t H5_ATTR_UNUSED *udata)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* NO OP */
@@ -329,7 +329,7 @@ H5D__none_idx_delete(const H5D_chk_idx_info_t *idx_info)
hsize_t nbytes; /* Size of all chunks */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(idx_info);
@@ -368,7 +368,7 @@ H5D__none_idx_copy_setup(const H5D_chk_idx_info_t H5_ATTR_NDEBUG_UNUSED *idx_inf
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(idx_info_src);
@@ -415,7 +415,7 @@ done:
static herr_t
H5D__none_idx_size(const H5D_chk_idx_info_t H5_ATTR_UNUSED *idx_info, hsize_t *index_size)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(index_size);
@@ -439,7 +439,7 @@ H5D__none_idx_size(const H5D_chk_idx_info_t H5_ATTR_UNUSED *idx_info, hsize_t *i
static herr_t
H5D__none_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(storage);
@@ -465,7 +465,7 @@ H5D__none_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
static herr_t
H5D__none_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(storage);
diff --git a/src/H5Doh.c b/src/H5Doh.c
index a991831..37ecc9c 100644
--- a/src/H5Doh.c
+++ b/src/H5Doh.c
@@ -99,7 +99,7 @@ H5O__dset_get_copy_file_udata(void)
{
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Allocate space for the 'copy file' user data for copying datasets */
if (NULL == (ret_value = H5FL_CALLOC(H5D_copy_file_ud_t)))
@@ -127,7 +127,7 @@ H5O__dset_free_copy_file_udata(void *_udata)
{
H5D_copy_file_ud_t *udata = (H5D_copy_file_ud_t *)_udata;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(udata);
@@ -173,7 +173,7 @@ H5O__dset_isa(const H5O_t *oh)
htri_t exists; /* Flag if header message of interest exists */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(oh);
@@ -213,7 +213,7 @@ H5O__dset_open(const H5G_loc_t *obj_loc, H5I_type_t *opened_type)
hid_t dapl_id; /* dapl to use to open this dataset */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(obj_loc);
@@ -276,7 +276,7 @@ H5O__dset_create(H5F_t *f, void *_crt_info, H5G_loc_t *obj_loc)
H5D_t * dset = NULL; /* New dataset created */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f);
@@ -324,7 +324,7 @@ H5O__dset_get_oloc(hid_t obj_id)
H5D_t * dset; /* Dataset opened */
H5O_loc_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Get the dataset */
if (NULL == (dset = (H5D_t *)H5VL_object(obj_id)))
@@ -362,7 +362,7 @@ H5O__dset_bh_info(const H5O_loc_t *loc, H5O_t *oh, H5_ih_info_t *bh_info)
htri_t exists; /* Flag if header message of interest exists */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(loc);
@@ -442,7 +442,7 @@ H5O__dset_flush(void *_obj_ptr)
H5O_type_t obj_type; /* Type of object at location */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(dset);
HDassert(&dset->oloc);
diff --git a/src/H5Dscatgath.c b/src/H5Dscatgath.c
index 500ea9e..a5b0b53 100644
--- a/src/H5Dscatgath.c
+++ b/src/H5Dscatgath.c
@@ -96,7 +96,7 @@ H5D__scatter_file(const H5D_io_info_t *_io_info, H5S_sel_iter_t *iter, size_t ne
size_t vec_size; /* Vector length */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(_io_info);
@@ -193,7 +193,7 @@ H5D__gather_file(const H5D_io_info_t *_io_info, H5S_sel_iter_t *iter, size_t nel
size_t vec_size; /* Vector length */
size_t ret_value = nelmts; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(_io_info);
@@ -751,7 +751,7 @@ H5D__compound_opt_read(size_t nelmts, H5S_sel_iter_t *iter, const H5D_type_info_
size_t vec_size; /* Vector length */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(nelmts > 0);
@@ -875,7 +875,7 @@ H5D__compound_opt_write(size_t nelmts, const H5D_type_info_t *type_info)
size_t src_stride, dst_stride; /* Strides through source & destination datatypes */
size_t i; /* Local index variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(nelmts > 0);
diff --git a/src/H5Dselect.c b/src/H5Dselect.c
index f464ca5..1a6292c 100644
--- a/src/H5Dselect.c
+++ b/src/H5Dselect.c
@@ -97,7 +97,7 @@ H5D__select_io(const H5D_io_info_t *io_info, size_t elmt_size, size_t nelmts, H5
ssize_t tmp_file_len; /* Temporary number of bytes in file sequence */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(io_info);
diff --git a/src/H5Dsingle.c b/src/H5Dsingle.c
index a843d88..88618b0 100644
--- a/src/H5Dsingle.c
+++ b/src/H5Dsingle.c
@@ -117,7 +117,7 @@ static herr_t
H5D__single_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t H5_ATTR_UNUSED *space,
haddr_t H5_ATTR_UNUSED dset_ohdr_addr)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(idx_info);
@@ -155,7 +155,7 @@ H5D__single_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t H5_ATTR_UNU
static herr_t
H5D__single_idx_create(const H5D_chk_idx_info_t *idx_info)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(idx_info);
@@ -189,7 +189,7 @@ H5D__single_idx_create(const H5D_chk_idx_info_t *idx_info)
static hbool_t
H5D__single_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(storage);
@@ -213,7 +213,7 @@ H5D__single_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(idx_info);
@@ -259,7 +259,7 @@ done:
static herr_t
H5D__single_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(idx_info);
@@ -303,7 +303,7 @@ H5D__single_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t
H5D_chunk_rec_t chunk_rec; /* generic chunk record */
int ret_value = -1; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(idx_info);
@@ -352,7 +352,7 @@ H5D__single_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t
hsize_t nbytes; /* Size of all chunks */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(idx_info);
@@ -393,7 +393,7 @@ H5D__single_idx_delete(const H5D_chk_idx_info_t *idx_info)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(idx_info);
@@ -427,7 +427,7 @@ H5D__single_idx_copy_setup(const H5D_chk_idx_info_t H5_ATTR_NDEBUG_UNUSED *idx_i
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(idx_info_src);
@@ -472,7 +472,7 @@ done:
static herr_t
H5D__single_idx_size(const H5D_chk_idx_info_t H5_ATTR_UNUSED *idx_info, hsize_t *index_size)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(index_size);
@@ -496,7 +496,7 @@ H5D__single_idx_size(const H5D_chk_idx_info_t H5_ATTR_UNUSED *idx_info, hsize_t
static herr_t
H5D__single_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(storage);
@@ -522,7 +522,7 @@ H5D__single_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
static herr_t
H5D__single_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(storage);
diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c
index 7158e05..c26697c 100644
--- a/src/H5Dvirtual.c
+++ b/src/H5Dvirtual.c
@@ -896,7 +896,7 @@ H5D__virtual_open_source_dset(const H5D_t *vdset, H5O_storage_virtual_ent_t *vir
hbool_t src_file_open = FALSE; /* Whether we have opened and need to close src_file */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(vdset);
@@ -994,7 +994,7 @@ H5D__virtual_reset_source_dset(H5O_storage_virtual_ent_t * virtual_ent,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(source_dset);
@@ -1076,7 +1076,7 @@ H5D__virtual_str_append(const char *src, size_t src_len, char **p, char **buf, s
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(src);
@@ -1268,7 +1268,7 @@ H5D__virtual_copy_parsed_name(H5O_storage_virtual_name_seg_t **dst, H5O_storage_
H5O_storage_virtual_name_seg_t **p_dst = &tmp_dst;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(dst);
@@ -1353,7 +1353,7 @@ H5D__virtual_build_source_name(char *source_name, const H5O_storage_virtual_name
char * tmp_name = NULL; /* Name buffer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(source_name);
@@ -1943,7 +1943,7 @@ H5D__virtual_init_all(const H5D_t *dset)
size_t i, j;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(dset);
@@ -2348,7 +2348,7 @@ H5D__virtual_is_data_cached(const H5D_shared_t *shared_dset)
size_t i, j; /* Local index variables */
hbool_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(shared_dset);
@@ -2404,7 +2404,7 @@ H5D__virtual_pre_io(H5D_io_info_t *io_info, H5O_storage_virtual_t *storage, H5S_
size_t i, j, k; /* Local index variables */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(storage);
@@ -2660,7 +2660,7 @@ H5D__virtual_post_io(H5O_storage_virtual_t *storage)
size_t i, j; /* Local index variables */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(storage);
@@ -2710,7 +2710,7 @@ H5D__virtual_read_one(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
H5S_t *projected_src_space = NULL; /* File space for selection in a single source dataset */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(source_dset);
@@ -2773,7 +2773,7 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsiz
size_t i, j; /* Local index variables */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(io_info);
@@ -2900,7 +2900,7 @@ H5D__virtual_write_one(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
H5S_t *projected_src_space = NULL; /* File space for selection in a single source dataset */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(source_dset);
@@ -2964,7 +2964,7 @@ H5D__virtual_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsi
size_t i, j; /* Local index variables */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(io_info);
@@ -3037,7 +3037,7 @@ H5D__virtual_flush(H5D_t *dset)
size_t i, j; /* Local index variables */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(dset);
@@ -3157,7 +3157,7 @@ H5D__virtual_refresh_source_dset(H5D_t **dset)
H5VL_object_t *vol_obj = NULL; /* VOL object stored with the ID */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(dset && *dset);
diff --git a/src/H5E.c b/src/H5E.c
index d203248..83a40eb 100644
--- a/src/H5E.c
+++ b/src/H5E.c
@@ -282,7 +282,7 @@ H5E_term_package(void)
static herr_t
H5E__set_default_auto(H5E_t *stk)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
#ifndef H5_NO_DEPRECATED_SYMBOLS
#ifdef H5_USE_16_API_DEFAULT
@@ -372,7 +372,7 @@ H5E__get_stack(void)
static herr_t
H5E__free_class(H5E_cls_t *cls)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(cls);
@@ -443,7 +443,7 @@ H5E__register_class(const char *cls_name, const char *lib_name, const char *vers
H5E_cls_t *cls = NULL; /* Pointer to error class */
H5E_cls_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(cls_name);
@@ -525,7 +525,7 @@ H5E__unregister_class(H5E_cls_t *cls, void H5_ATTR_UNUSED **request)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(cls);
@@ -594,7 +594,7 @@ H5E__get_class_name(const H5E_cls_t *cls, char *name, size_t size)
{
ssize_t len = -1; /* Length of error class's name */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(cls);
@@ -634,7 +634,7 @@ H5E__close_msg_cb(void *obj_ptr, hid_t obj_id, void *udata)
H5E_cls_t *cls = (H5E_cls_t *)udata;
int ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(err_msg);
@@ -698,7 +698,7 @@ done:
static herr_t
H5E__close_msg(H5E_msg_t *err, void H5_ATTR_UNUSED **request)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(err);
@@ -775,7 +775,7 @@ H5E__create_msg(H5E_cls_t *cls, H5E_type_t msg_type, const char *msg_str)
H5E_msg_t *msg = NULL; /* Pointer to new error message */
H5E_msg_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(cls);
@@ -931,7 +931,7 @@ H5E__get_current_stack(void)
unsigned u; /* Local index variable */
H5E_t * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Get a pointer to the current error stack */
if (NULL == (current_stack = H5E__get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean'
@@ -1050,7 +1050,7 @@ H5E__set_current_stack(H5E_t *estack)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(estack);
@@ -1148,7 +1148,7 @@ done:
static herr_t
H5E__close_stack(H5E_t *estack, void H5_ATTR_UNUSED **request)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(estack);
@@ -1224,7 +1224,7 @@ done:
static ssize_t
H5E__get_num(const H5E_t *estack)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(estack);
@@ -1444,7 +1444,7 @@ H5E__print2(hid_t err_stack, FILE *stream)
H5E_t *estack; /* Error stack to operate on */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Need to check for errors */
if (err_stack == H5E_DEFAULT) {
@@ -1755,7 +1755,7 @@ H5E__append_stack(H5E_t *dst_stack, const H5E_t *src_stack)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(dst_stack);
diff --git a/src/H5EA.c b/src/H5EA.c
index 66eb8cc..88180c1 100644
--- a/src/H5EA.c
+++ b/src/H5EA.c
@@ -120,7 +120,7 @@ H5EA__new(H5F_t *f, haddr_t ea_addr, hbool_t from_open, void *ctx_udata)
H5EA_hdr_t *hdr = NULL; /* The extensible array header information */
H5EA_t * ret_value = NULL;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(f);
@@ -339,7 +339,7 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned t
hbool_t hdr_dirty = FALSE; /* Whether the array header changed */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(ea);
diff --git a/src/H5EAcache.c b/src/H5EAcache.c
index ae1cfcc..593b95f 100644
--- a/src/H5EAcache.c
+++ b/src/H5EAcache.c
@@ -231,7 +231,7 @@ H5EA__cache_hdr_get_initial_load_size(void *_udata, size_t *image_len)
{
H5EA_hdr_cache_ud_t *udata = (H5EA_hdr_cache_ud_t *)_udata; /* User data for callback */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(udata);
@@ -265,7 +265,7 @@ H5EA__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
uint32_t computed_chksum; /* Computed metadata checksum value */
htri_t ret_value = TRUE;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(image);
@@ -302,7 +302,7 @@ H5EA__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, hbool_
uint32_t stored_chksum; /* Stored metadata checksum value */
void * ret_value = NULL;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(image);
@@ -423,7 +423,7 @@ H5EA__cache_hdr_image_len(const void *_thing, size_t *image_len)
{
const H5EA_hdr_t *hdr = (const H5EA_hdr_t *)_thing; /* Pointer to the object */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(hdr);
@@ -454,7 +454,7 @@ H5EA__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
uint8_t * image = (uint8_t *)_image; /* Pointer into raw data buffer */
uint32_t metadata_chksum; /* Computed metadata checksum value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check arguments */
HDassert(f);
@@ -524,7 +524,7 @@ H5EA__cache_hdr_notify(H5AC_notify_action_t action, void *_thing)
H5EA_hdr_t *hdr = (H5EA_hdr_t *)_thing; /* Pointer to the object */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(hdr);
@@ -604,7 +604,7 @@ H5EA__cache_hdr_free_icr(void *thing)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(thing);
@@ -635,7 +635,7 @@ H5EA__cache_iblock_get_initial_load_size(void *_udata, size_t *image_len)
H5EA_hdr_t * hdr = (H5EA_hdr_t *)_udata; /* User data for callback */
H5EA_iblock_t iblock; /* Fake index block for computing size */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(hdr);
@@ -675,7 +675,7 @@ H5EA__cache_iblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN
uint32_t computed_chksum; /* Computed metadata checksum value */
htri_t ret_value = TRUE;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(image);
@@ -713,7 +713,7 @@ H5EA__cache_iblock_deserialize(const void *_image, size_t len, void *_udata, hbo
size_t u; /* Local index variable */
void * ret_value = NULL;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(image);
@@ -814,7 +814,7 @@ H5EA__cache_iblock_image_len(const void *_thing, size_t *image_len)
{
const H5EA_iblock_t *iblock = (const H5EA_iblock_t *)_thing; /* Pointer to the object */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(iblock);
@@ -846,7 +846,7 @@ H5EA__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
uint32_t metadata_chksum; /* Computed metadata checksum value */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check arguments */
HDassert(f);
@@ -930,7 +930,7 @@ H5EA__cache_iblock_notify(H5AC_notify_action_t action, void *_thing)
H5EA_iblock_t *iblock = (H5EA_iblock_t *)_thing; /* Pointer to the object */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(iblock);
@@ -1005,7 +1005,7 @@ H5EA__cache_iblock_free_icr(void *thing)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(thing);
@@ -1036,7 +1036,7 @@ H5EA__cache_sblock_get_initial_load_size(void *_udata, size_t *image_len)
H5EA_sblock_cache_ud_t *udata = (H5EA_sblock_cache_ud_t *)_udata; /* User data */
H5EA_sblock_t sblock; /* Fake super block for computing size */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(udata);
@@ -1095,7 +1095,7 @@ H5EA__cache_sblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN
uint32_t computed_chksum; /* Computed metadata checksum value */
htri_t ret_value = TRUE;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(image);
@@ -1133,7 +1133,7 @@ H5EA__cache_sblock_deserialize(const void *_image, size_t len, void *_udata, hbo
size_t u; /* Local index variable */
void * ret_value = NULL;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(udata);
@@ -1231,7 +1231,7 @@ H5EA__cache_sblock_image_len(const void *_thing, size_t *image_len)
{
const H5EA_sblock_t *sblock = (const H5EA_sblock_t *)_thing; /* Pointer to the object */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(sblock);
@@ -1263,7 +1263,7 @@ H5EA__cache_sblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
uint32_t metadata_chksum; /* Computed metadata checksum value */
size_t u; /* Local index variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check arguments */
HDassert(f);
@@ -1334,7 +1334,7 @@ H5EA__cache_sblock_notify(H5AC_notify_action_t action, void *_thing)
H5EA_sblock_t *sblock = (H5EA_sblock_t *)_thing; /* Pointer to the object */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(sblock);
@@ -1430,7 +1430,7 @@ H5EA__cache_sblock_free_icr(void *thing)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(thing);
@@ -1461,7 +1461,7 @@ H5EA__cache_dblock_get_initial_load_size(void *_udata, size_t *image_len)
H5EA_dblock_cache_ud_t *udata = (H5EA_dblock_cache_ud_t *)_udata; /* User data */
H5EA_dblock_t dblock; /* Fake data block for computing size */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(udata);
@@ -1521,7 +1521,7 @@ H5EA__cache_dblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN
uint32_t computed_chksum; /* Computed metadata checksum value */
htri_t ret_value = TRUE;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(image);
@@ -1657,7 +1657,7 @@ H5EA__cache_dblock_image_len(const void *_thing, size_t *image_len)
{
const H5EA_dblock_t *dblock = (const H5EA_dblock_t *)_thing; /* Pointer to the object */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(dblock);
@@ -1692,7 +1692,7 @@ H5EA__cache_dblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
uint32_t metadata_chksum; /* Computed metadata checksum value */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check arguments */
HDassert(f);
@@ -1760,7 +1760,7 @@ H5EA__cache_dblock_notify(H5AC_notify_action_t action, void *_thing)
H5EA_dblock_t *dblock = (H5EA_dblock_t *)_thing; /* Pointer to the object */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(dblock);
@@ -1855,7 +1855,7 @@ H5EA__cache_dblock_free_icr(void *thing)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(thing);
@@ -1902,7 +1902,7 @@ H5EA__cache_dblock_fsf_size(const void *_thing, hsize_t *fsf_size)
{
const H5EA_dblock_t *dblock = (const H5EA_dblock_t *)_thing; /* Pointer to the object */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(dblock);
@@ -1932,7 +1932,7 @@ H5EA__cache_dblk_page_get_initial_load_size(void *_udata, size_t *image_len)
{
H5EA_dblk_page_cache_ud_t *udata = (H5EA_dblk_page_cache_ud_t *)_udata; /* User data */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(udata);
@@ -1966,7 +1966,7 @@ H5EA__cache_dblk_page_verify_chksum(const void *_image, size_t len, void H5_ATTR
uint32_t computed_chksum; /* Computed metadata checksum value */
htri_t ret_value = TRUE;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(image);
@@ -2003,7 +2003,7 @@ H5EA__cache_dblk_page_deserialize(const void *_image, size_t len, void *_udata,
uint32_t stored_chksum; /* Stored metadata checksum value */
void * ret_value = NULL;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(udata);
@@ -2071,7 +2071,7 @@ H5EA__cache_dblk_page_image_len(const void *_thing, size_t *image_len)
{
const H5EA_dblk_page_t *dblk_page = (const H5EA_dblk_page_t *)_thing; /* Pointer to the object */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(dblk_page);
@@ -2104,7 +2104,7 @@ H5EA__cache_dblk_page_serialize(const H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *_ima
uint32_t metadata_chksum; /* Computed metadata checksum value */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(f);
@@ -2153,7 +2153,7 @@ H5EA__cache_dblk_page_notify(H5AC_notify_action_t action, void *_thing)
H5EA_dblk_page_t *dblk_page = (H5EA_dblk_page_t *)_thing; /* Pointer to the object */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(dblk_page);
@@ -2249,7 +2249,7 @@ H5EA__cache_dblk_page_free_icr(void *thing)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(thing);
diff --git a/src/H5EAmodule.h b/src/H5EAmodule.h
index 1833e40..bba2a99 100644
--- a/src/H5EAmodule.h
+++ b/src/H5EAmodule.h
@@ -25,8 +25,7 @@
* reporting macros.
*/
#define H5EA_MODULE
-#define H5_MY_PKG H5EA
-#define H5_MY_PKG_ERR H5E_EARRAY
-#define H5_MY_PKG_INIT NO
+#define H5_MY_PKG H5EA
+#define H5_MY_PKG_ERR H5E_EARRAY
#endif /* H5EAmodule_H */
diff --git a/src/H5EAtest.c b/src/H5EAtest.c
index 24efbc2..d07d9d9 100644
--- a/src/H5EAtest.c
+++ b/src/H5EAtest.c
@@ -126,7 +126,7 @@ H5EA__test_crt_context(void *_udata)
H5EA__ctx_cb_t * udata = (H5EA__ctx_cb_t *)_udata; /* User data for context */
void * ret_value = NULL;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Allocate new context structure */
if (NULL == (ctx = H5FL_MALLOC(H5EA__test_ctx_t)))
@@ -162,7 +162,7 @@ H5EA__test_dst_context(void *_ctx)
{
H5EA__test_ctx_t *ctx = (H5EA__test_ctx_t *)_ctx; /* Callback context to destroy */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(H5EA__TEST_BOGUS_VAL == ctx->bogus);
@@ -191,7 +191,7 @@ H5EA__test_fill(void *nat_blk, size_t nelmts)
{
uint64_t fill_val = H5EA_TEST_FILL; /* Value to fill elements with */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(nat_blk);
@@ -222,7 +222,7 @@ H5EA__test_encode(void *raw, const void *_elmt, size_t nelmts, void *_ctx)
const uint64_t * elmt = (const uint64_t *)_elmt; /* Convenience pointer to native elements */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(raw);
@@ -274,7 +274,7 @@ H5EA__test_decode(const void *_raw, void *_elmt, size_t nelmts, void H5_ATTR_NDE
uint64_t * elmt = (uint64_t *)_elmt; /* Convenience pointer to native elements */
const uint8_t *raw = (const uint8_t *)_raw; /* Convenience pointer to raw elements */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(raw);
@@ -315,7 +315,7 @@ H5EA__test_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const void *
{
char temp_str[128]; /* Temporary string, for formatting */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(stream);
@@ -347,7 +347,7 @@ H5EA__test_crt_dbg_context(H5F_t H5_ATTR_UNUSED *f, haddr_t H5_ATTR_UNUSED obj_a
H5EA__ctx_cb_t *ctx; /* Context for callbacks */
void * ret_value = NULL;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Allocate new context structure */
if (NULL == (ctx = H5FL_MALLOC(H5EA__ctx_cb_t)))
@@ -378,7 +378,7 @@ H5EA__test_dst_dbg_context(void *_ctx)
{
H5EA__ctx_cb_t *ctx = (H5EA__ctx_cb_t *)_ctx; /* Callback context to destroy */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(_ctx);
diff --git a/src/H5ESint.c b/src/H5ESint.c
index 7eb5909..970085d 100644
--- a/src/H5ESint.c
+++ b/src/H5ESint.c
@@ -192,7 +192,7 @@ H5ES__close_cb(void *_es, void H5_ATTR_UNUSED **rt)
H5ES_t *es = (H5ES_t *)_es; /* The event set to close */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(es);
@@ -261,7 +261,7 @@ H5ES__insert(H5ES_t *es, H5VL_t *connector, void *request_token, const char *app
hbool_t ev_inserted = FALSE; /* Flag to indicate that event is in active list */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(es);
@@ -447,7 +447,7 @@ H5ES__get_requests_cb(H5ES_event_t *ev, void *_ctx)
H5ES_get_requests_ctx_t *ctx = (H5ES_get_requests_ctx_t *)_ctx; /* Callback context */
int ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(ev);
@@ -523,7 +523,7 @@ done:
static herr_t
H5ES__handle_fail(H5ES_t *es, H5ES_event_t *ev)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(es);
@@ -561,7 +561,7 @@ H5ES__op_complete(H5ES_t *es, H5ES_event_t *ev, H5VL_request_status_t ev_status)
hid_t err_stack_id = H5I_INVALID_HID; /* Error stack for failed operation */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(es);
@@ -657,7 +657,7 @@ H5ES__wait_cb(H5ES_event_t *ev, void *_ctx)
uint64_t start_time = 0, elapsed_time = 0; /* Start and elapsed times for waiting on an operation */
int ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(ev);
@@ -777,7 +777,7 @@ H5ES__cancel_cb(H5ES_event_t *ev, void *_ctx)
H5VL_request_status_t ev_status = H5VL_REQUEST_STATUS_SUCCEED; /* Status from event's operation */
int ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(ev);
@@ -885,7 +885,7 @@ H5ES__get_err_info_cb(H5ES_event_t *ev, void *_ctx)
H5ES_gei_ctx_t * ctx = (H5ES_gei_ctx_t *)_ctx; /* Callback context */
int ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(ev);
diff --git a/src/H5ESmodule.h b/src/H5ESmodule.h
index 5169b52..205089a 100644
--- a/src/H5ESmodule.h
+++ b/src/H5ESmodule.h
@@ -25,9 +25,8 @@
* reporting macros.
*/
#define H5ES_MODULE
-#define H5_MY_PKG H5ES
-#define H5_MY_PKG_ERR H5E_EVENTSET
-#define H5_MY_PKG_INIT YES
+#define H5_MY_PKG H5ES
+#define H5_MY_PKG_ERR H5E_EVENTSET
/**\defgroup H5ES H5ES
*
diff --git a/src/H5Eint.c b/src/H5Eint.c
index d744db3..b8b9238 100644
--- a/src/H5Eint.c
+++ b/src/H5Eint.c
@@ -190,7 +190,7 @@ H5E__walk1_cb(int n, H5E_error1_t *err_desc, void *client_data)
unsigned have_desc = 1; /* Flag to indicate whether the error has a "real" description */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(err_desc);
@@ -313,7 +313,7 @@ H5E__walk2_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data)
unsigned have_desc = 1; /* Flag to indicate whether the error has a "real" description */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(err_desc);
@@ -807,7 +807,7 @@ H5E__clear_entries(H5E_t *estack, size_t nentries)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(estack);
diff --git a/src/H5Emodule.h b/src/H5Emodule.h
index 58a3517..a2d59f3 100644
--- a/src/H5Emodule.h
+++ b/src/H5Emodule.h
@@ -25,9 +25,8 @@
* reporting macros.
*/
#define H5E_MODULE
-#define H5_MY_PKG H5E
-#define H5_MY_PKG_ERR H5E_ERROR
-#define H5_MY_PKG_INIT YES
+#define H5_MY_PKG H5E
+#define H5_MY_PKG_ERR H5E_ERROR
/**\defgroup H5E H5E
*
diff --git a/src/H5F.c b/src/H5F.c
index 6a2d247..222593b 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -202,7 +202,7 @@ H5F__get_all_count_cb(void H5_ATTR_UNUSED *obj_ptr, hid_t H5_ATTR_UNUSED obj_id,
H5F_trav_obj_cnt_t *udata = (H5F_trav_obj_cnt_t *)key;
int ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
udata->obj_count++;
@@ -309,7 +309,7 @@ H5F__get_all_ids_cb(void H5_ATTR_UNUSED *obj_ptr, hid_t obj_id, void *key)
H5F_trav_obj_ids_t *udata = (H5F_trav_obj_ids_t *)key;
int ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
if (udata->obj_count >= udata->max_objs)
HGOTO_DONE(H5_ITER_STOP);
@@ -524,7 +524,7 @@ H5F__post_open_api_common(H5VL_object_t *vol_obj, void **token_ptr)
uint64_t supported; /* Whether 'post open' operation is supported by VOL connector */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check for 'post open' callback */
supported = 0;
@@ -563,7 +563,7 @@ H5F__create_api_common(const char *filename, unsigned flags, hid_t fcpl_id, hid_
H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check/fix arguments */
if (!filename || !*filename)
@@ -757,7 +757,7 @@ H5F__open_api_common(const char *filename, unsigned flags, hid_t fapl_id, void *
H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if (!filename || !*filename)
@@ -934,7 +934,7 @@ H5F__flush_api_common(hid_t object_id, H5F_scope_t scope, void **token_ptr, H5VL
H5VL_file_specific_args_t vol_cb_args; /* Arguments to VOL callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Get the type of object we're flushing + sanity check */
obj_type = H5I_get_type(object_id);
@@ -1418,7 +1418,7 @@ H5F__reopen_api_common(hid_t file_id, void **token_ptr)
void * reopen_file = NULL; /* Pointer to the re-opened file object */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Get the file object */
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE)))
diff --git a/src/H5FA.c b/src/H5FA.c
index 3e81080..b964c1c 100644
--- a/src/H5FA.c
+++ b/src/H5FA.c
@@ -109,7 +109,7 @@ H5FA__new(H5F_t *f, haddr_t fa_addr, hbool_t from_open, void *ctx_udata)
H5FA_hdr_t *hdr = NULL; /* The fixed array header information */
H5FA_t * ret_value = NULL;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(f);
diff --git a/src/H5FAcache.c b/src/H5FAcache.c
index 05a8762..81ecc04 100644
--- a/src/H5FAcache.c
+++ b/src/H5FAcache.c
@@ -175,7 +175,7 @@ H5FA__cache_hdr_get_initial_load_size(void *_udata, size_t *image_len)
{
H5FA_hdr_cache_ud_t *udata = (H5FA_hdr_cache_ud_t *)_udata; /* User data for callback */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(udata);
@@ -209,7 +209,7 @@ H5FA__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
uint32_t computed_chksum; /* Computed metadata checksum value */
htri_t ret_value = TRUE;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(image);
@@ -247,7 +247,7 @@ H5FA__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len
uint32_t stored_chksum; /* Stored metadata checksum value */
void * ret_value = NULL;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(udata);
@@ -353,7 +353,7 @@ H5FA__cache_hdr_image_len(const void *_thing, size_t *image_len)
{
const H5FA_hdr_t *hdr = (const H5FA_hdr_t *)_thing; /* Pointer to the object */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(hdr);
@@ -384,7 +384,7 @@ H5FA__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
uint8_t * image = (uint8_t *)_image; /* Pointer into raw data buffer */
uint32_t metadata_chksum; /* Computed metadata checksum value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(f);
@@ -444,7 +444,7 @@ H5FA__cache_hdr_notify(H5AC_notify_action_t action, void *_thing)
H5FA_hdr_t *hdr = (H5FA_hdr_t *)_thing; /* Pointer to the object */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(hdr);
@@ -525,7 +525,7 @@ H5FA__cache_hdr_free_icr(void *thing)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(thing);
@@ -557,7 +557,7 @@ H5FA__cache_dblock_get_initial_load_size(void *_udata, size_t *image_len)
H5FA_dblock_t dblock; /* Fake data block for computing size */
size_t dblk_page_nelmts; /* # of elements per data block page */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(udata);
@@ -611,7 +611,7 @@ H5FA__cache_dblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN
uint32_t computed_chksum; /* Computed metadata checksum value */
htri_t ret_value = TRUE;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(image);
@@ -649,7 +649,7 @@ H5FA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
haddr_t arr_addr; /* Address of array header in the file */
void * ret_value = NULL;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(udata);
@@ -743,7 +743,7 @@ H5FA__cache_dblock_image_len(const void *_thing, size_t *image_len)
{
const H5FA_dblock_t *dblock = (const H5FA_dblock_t *)_thing; /* Pointer to the object */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(dblock);
@@ -778,7 +778,7 @@ H5FA__cache_dblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
uint32_t metadata_chksum; /* Computed metadata checksum value */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(f);
@@ -850,7 +850,7 @@ H5FA__cache_dblock_notify(H5AC_notify_action_t action, void *_thing)
H5FA_dblock_t *dblock = (H5FA_dblock_t *)_thing;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(dblock);
@@ -925,7 +925,7 @@ H5FA__cache_dblock_free_icr(void *_thing)
H5FA_dblock_t *dblock = (H5FA_dblock_t *)_thing; /* Pointer to the object */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(dblock);
@@ -972,7 +972,7 @@ H5FA__cache_dblock_fsf_size(const void *_thing, hsize_t *fsf_size)
{
const H5FA_dblock_t *dblock = (const H5FA_dblock_t *)_thing; /* Pointer to the object */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(dblock);
@@ -1002,7 +1002,7 @@ H5FA__cache_dblk_page_get_initial_load_size(void *_udata, size_t *image_len)
{
H5FA_dblk_page_cache_ud_t *udata = (H5FA_dblk_page_cache_ud_t *)_udata; /* User data */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(udata);
@@ -1037,7 +1037,7 @@ H5FA__cache_dblk_page_verify_chksum(const void *_image, size_t len, void H5_ATTR
uint32_t computed_chksum; /* Computed metadata checksum value */
htri_t ret_value = TRUE;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(image);
@@ -1075,7 +1075,7 @@ H5FA__cache_dblk_page_deserialize(const void *_image, size_t len, void *_udata,
void * ret_value = NULL;
/* Sanity check */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(udata);
HDassert(udata->hdr);
@@ -1143,7 +1143,7 @@ H5FA__cache_dblk_page_image_len(const void *_thing, size_t *image_len)
{
const H5FA_dblk_page_t *dblk_page = (const H5FA_dblk_page_t *)_thing; /* Pointer to the object */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(dblk_page);
@@ -1176,7 +1176,7 @@ H5FA__cache_dblk_page_serialize(const H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *_ima
uint32_t metadata_chksum; /* Computed metadata checksum value */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(f);
@@ -1225,7 +1225,7 @@ H5FA__cache_dblk_page_notify(H5AC_notify_action_t action, void *_thing)
H5FA_dblk_page_t *dblk_page = (H5FA_dblk_page_t *)_thing; /* Pointer to the object */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(dblk_page);
@@ -1288,7 +1288,7 @@ H5FA__cache_dblk_page_free_icr(void *thing)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(thing);
diff --git a/src/H5FAmodule.h b/src/H5FAmodule.h
index ef814ae..3fbdb90 100644
--- a/src/H5FAmodule.h
+++ b/src/H5FAmodule.h
@@ -25,8 +25,7 @@
* reporting macros.
*/
#define H5FA_MODULE
-#define H5_MY_PKG H5FA
-#define H5_MY_PKG_ERR H5E_FARRAY
-#define H5_MY_PKG_INIT NO
+#define H5_MY_PKG H5FA
+#define H5_MY_PKG_ERR H5E_FARRAY
#endif /* H5FAmodule_H */
diff --git a/src/H5FAtest.c b/src/H5FAtest.c
index b57f562..87d1db0 100644
--- a/src/H5FAtest.c
+++ b/src/H5FAtest.c
@@ -118,7 +118,7 @@ H5FA__test_crt_context(void H5_ATTR_UNUSED *udata)
H5FA__test_ctx_t *ctx; /* Context for callbacks */
void * ret_value = NULL;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Allocate new context structure */
if (NULL == (ctx = H5FL_MALLOC(H5FA__test_ctx_t)))
@@ -151,7 +151,7 @@ H5FA__test_dst_context(void *_ctx)
{
H5FA__test_ctx_t *ctx = (H5FA__test_ctx_t *)_ctx; /* Callback context to destroy */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(H5FA__TEST_BOGUS_VAL == ctx->bogus);
@@ -179,7 +179,7 @@ H5FA__test_fill(void *nat_blk, size_t nelmts)
{
uint64_t fill_val = H5FA_TEST_FILL; /* Value to fill elements with */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(nat_blk);
@@ -210,7 +210,7 @@ H5FA__test_encode(void *raw, const void *_elmt, size_t nelmts, void H5_ATTR_UNUS
#endif
const uint64_t *elmt = (const uint64_t *)_elmt; /* Convenience pointer to native elements */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(raw);
@@ -255,7 +255,7 @@ H5FA__test_decode(const void *_raw, void *_elmt, size_t nelmts, void H5_ATTR_UNU
uint64_t * elmt = (uint64_t *)_elmt; /* Convenience pointer to native elements */
const uint8_t *raw = (const uint8_t *)_raw; /* Convenience pointer to raw elements */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(raw);
@@ -296,7 +296,7 @@ H5FA__test_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const void *
{
char temp_str[128]; /* Temporary string, for formatting */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(stream);
@@ -329,7 +329,7 @@ H5FA__test_crt_dbg_context(H5F_t H5_ATTR_UNUSED *f, haddr_t H5_ATTR_UNUSED obj_a
H5FA__test_ctx_t *ctx; /* Context for callbacks */
void * ret_value = NULL;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Allocate new context structure */
if (NULL == (ctx = H5FL_MALLOC(H5FA__test_ctx_t)))
diff --git a/src/H5FD.c b/src/H5FD.c
index d3a3247..0f38848 100644
--- a/src/H5FD.c
+++ b/src/H5FD.c
@@ -175,7 +175,7 @@ H5FD__free_cls(H5FD_class_t *cls, void H5_ATTR_UNUSED **request)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(cls);
@@ -513,7 +513,7 @@ H5FD__sb_decode(H5FD_t *file, const char *name, const uint8_t *buf)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(file);
@@ -1134,7 +1134,7 @@ H5FD__query(const H5FD_t *file, unsigned long *flags /*out*/)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(file);
diff --git a/src/H5FDcore.c b/src/H5FDcore.c
index a1750ee..4022e82 100644
--- a/src/H5FDcore.c
+++ b/src/H5FDcore.c
@@ -218,7 +218,7 @@ H5FD__core_add_dirty_region(H5FD_core_t *file, haddr_t start, haddr_t end)
hbool_t create_new_node = TRUE;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(file);
HDassert(file->dirty_list);
@@ -317,7 +317,7 @@ H5FD__core_destroy_dirty_list(H5FD_core_t *file)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(file);
@@ -355,7 +355,7 @@ H5FD__core_write_to_bstore(H5FD_core_t *file, haddr_t addr, size_t size)
HDoff_t offset = (HDoff_t)addr; /* Offset to write at */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(file);
@@ -496,7 +496,7 @@ H5FD_core_init(void)
static herr_t
H5FD__core_term(void)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Reset VFL ID */
H5FD_CORE_g = 0;
@@ -697,7 +697,7 @@ H5FD__core_fapl_get(H5FD_t *_file)
H5FD_core_fapl_t *fa; /* Core VFD info */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if (NULL == (fa = (H5FD_core_fapl_t *)H5MM_calloc(sizeof(H5FD_core_fapl_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -744,7 +744,7 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr
H5FD_file_image_info_t file_image_info;
H5FD_t * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if (!name || !*name)
@@ -1000,7 +1000,7 @@ H5FD__core_close(H5FD_t *_file)
H5FD_core_t *file = (H5FD_core_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Flush any changed buffers */
if (H5FD__core_flush(_file, (hid_t)-1, TRUE) < 0)
@@ -1057,7 +1057,7 @@ H5FD__core_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
const H5FD_core_t *f2 = (const H5FD_core_t *)_f2;
int ret_value = 0;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
if (f1->fd >= 0 && f2->fd >= 0) {
/* Compare low level file information for backing store */
@@ -1140,7 +1140,7 @@ H5FD__core_query(const H5FD_t *_file, unsigned long *flags /* out */)
{
const H5FD_core_t *file = (const H5FD_core_t *)_file;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* clang-format off */
/* Set the VFL feature flags that this driver supports */
@@ -1183,7 +1183,7 @@ H5FD__core_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_core_t *file = (const H5FD_core_t *)_file;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
FUNC_LEAVE_NOAPI(file->eoa)
} /* end H5FD__core_get_eoa() */
@@ -1208,7 +1208,7 @@ H5FD__core_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
H5FD_core_t *file = (H5FD_core_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if (ADDR_OVERFLOW(addr))
HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "address overflow")
@@ -1240,7 +1240,7 @@ H5FD__core_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_core_t *file = (const H5FD_core_t *)_file;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
FUNC_LEAVE_NOAPI(file->eof)
} /* end H5FD__core_get_eof() */
@@ -1263,7 +1263,7 @@ H5FD__core_get_handle(H5FD_t *_file, hid_t fapl, void **file_handle)
H5FD_core_t *file = (H5FD_core_t *)_file; /* core VFD info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
if (!file_handle)
@@ -1327,7 +1327,7 @@ H5FD__core_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
H5FD_core_t *file = (H5FD_core_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(file && file->pub.cls);
HDassert(buf);
@@ -1386,7 +1386,7 @@ H5FD__core_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UN
H5FD_core_t *file = (H5FD_core_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(file && file->pub.cls);
HDassert(buf);
@@ -1471,7 +1471,7 @@ H5FD__core_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UN
H5FD_core_t *file = (H5FD_core_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Write to backing store */
if (file->dirty && file->fd >= 0 && file->backing_store) {
@@ -1555,7 +1555,7 @@ H5FD__core_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing
size_t new_eof; /* New size of memory buffer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(file);
@@ -1656,7 +1656,7 @@ H5FD__core_lock(H5FD_t *_file, hbool_t rw)
int lock_flags; /* file locking flags */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(file);
@@ -1701,7 +1701,7 @@ H5FD__core_unlock(H5FD_t *_file)
H5FD_core_t *file = (H5FD_core_t *)_file; /* VFD file struct */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(file);
@@ -1737,7 +1737,7 @@ H5FD__core_delete(const char *filename, hid_t fapl_id)
H5P_genplist_t * plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(filename);
diff --git a/src/H5FDdirect.c b/src/H5FDdirect.c
index 7a43117..a6139da 100644
--- a/src/H5FDdirect.c
+++ b/src/H5FDdirect.c
@@ -241,7 +241,7 @@ done:
static herr_t
H5FD__direct_term(void)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Reset VFL ID */
H5FD_DIRECT_g = 0;
@@ -343,7 +343,7 @@ H5FD__direct_populate_config(size_t boundary, size_t block_size, size_t cbuf_siz
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(fa_out);
@@ -398,7 +398,7 @@ H5FD__direct_fapl_get(H5FD_t *_file)
H5FD_direct_t *file = (H5FD_direct_t *)_file;
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Set return value */
ret_value = H5FD__direct_fapl_copy(&(file->fa));
@@ -426,7 +426,7 @@ H5FD__direct_fapl_copy(const void *_old_fa)
const H5FD_direct_fapl_t *old_fa = (const H5FD_direct_fapl_t *)_old_fa;
H5FD_direct_fapl_t * new_fa = H5MM_calloc(sizeof(H5FD_direct_fapl_t));
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(new_fa);
@@ -469,7 +469,7 @@ H5FD__direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad
void * buf1, *buf2;
H5FD_t * ret_value = NULL;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check on file offsets */
HDassert(sizeof(HDoff_t) >= sizeof(size_t));
@@ -623,7 +623,7 @@ H5FD__direct_close(H5FD_t *_file)
H5FD_direct_t *file = (H5FD_direct_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if (HDclose(file->fd) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_CANTCLOSEFILE, FAIL, "unable to close file")
@@ -657,7 +657,7 @@ H5FD__direct_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
const H5FD_direct_t *f2 = (const H5FD_direct_t *)_f2;
int ret_value = 0;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
#ifdef H5_HAVE_WIN32_API
if (f1->fileindexhi < f2->fileindexhi)
@@ -716,7 +716,7 @@ done:
static herr_t
H5FD__direct_query(const H5FD_t H5_ATTR_UNUSED *_f, unsigned long *flags /* out */)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Set the VFL feature flags that this driver supports */
if (flags) {
@@ -753,7 +753,7 @@ H5FD__direct_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_direct_t *file = (const H5FD_direct_t *)_file;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
FUNC_LEAVE_NOAPI(file->eoa)
}
@@ -779,7 +779,7 @@ H5FD__direct_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr
{
H5FD_direct_t *file = (H5FD_direct_t *)_file;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
file->eoa = addr;
@@ -809,7 +809,7 @@ H5FD__direct_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_direct_t *file = (const H5FD_direct_t *)_file;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
FUNC_LEAVE_NOAPI(file->eof)
}
@@ -832,7 +832,7 @@ H5FD__direct_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_ha
H5FD_direct_t *file = (H5FD_direct_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if (!file_handle)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid")
@@ -876,7 +876,7 @@ H5FD__direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_U
size_t copy_size = size; /* Size remaining to read when using copy buffer */
size_t copy_offset; /* Offset into copy buffer of the requested data */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(file && file->pub.cls);
HDassert(buf);
@@ -1059,7 +1059,7 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_
size_t copy_size = size; /* Size remaining to write when using copy buffer */
size_t copy_offset; /* Offset into copy buffer of the data to write */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(file && file->pub.cls);
HDassert(buf);
@@ -1273,7 +1273,7 @@ H5FD__direct_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_AT
H5FD_direct_t *file = (H5FD_direct_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(file);
@@ -1337,7 +1337,7 @@ H5FD__direct_lock(H5FD_t *_file, hbool_t rw)
int lock_flags; /* file locking flags */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(file);
@@ -1377,7 +1377,7 @@ H5FD__direct_unlock(H5FD_t *_file)
H5FD_direct_t *file = (H5FD_direct_t *)_file; /* VFD file struct */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(file);
@@ -1410,7 +1410,7 @@ H5FD__direct_delete(const char *filename, hid_t H5_ATTR_UNUSED fapl_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(filename);
diff --git a/src/H5FDdrvr_module.h b/src/H5FDdrvr_module.h
index 1d20fce..4a7a4d1 100644
--- a/src/H5FDdrvr_module.h
+++ b/src/H5FDdrvr_module.h
@@ -24,9 +24,7 @@
/* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error
* reporting macros.
*/
-#define H5_MY_PKG H5FD
-#define H5_MY_PKG_ERR H5E_FILE
-#define H5_MY_PKG_INIT YES
-#define H5_PKG_SINGLE_SOURCE
+#define H5_MY_PKG H5FD
+#define H5_MY_PKG_ERR H5E_FILE
#endif /* H5FDdrvr_module_H */
diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c
index 3f0080e..b4cf58e 100644
--- a/src/H5FDfamily.c
+++ b/src/H5FDfamily.c
@@ -166,7 +166,7 @@ H5FD__family_get_default_config(H5FD_family_fapl_t *fa_out)
H5P_genplist_t *plist;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(fa_out);
@@ -220,7 +220,7 @@ H5FD__family_get_default_printf_filename(const char *old_filename)
char * tmp_buffer = NULL;
char * ret_value = NULL;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(old_filename);
@@ -310,7 +310,7 @@ H5FD_family_init(void)
static herr_t
H5FD__family_term(void)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Reset VFL ID */
H5FD_FAMILY_g = 0;
@@ -436,7 +436,7 @@ H5FD__family_fapl_get(H5FD_t *_file)
H5P_genplist_t * plist; /* Property list pointer */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if (NULL == (fa = (H5FD_family_fapl_t *)H5MM_calloc(sizeof(H5FD_family_fapl_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -479,7 +479,7 @@ H5FD__family_fapl_copy(const void *_old_fa)
H5P_genplist_t * plist; /* Property list pointer */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if (NULL == (new_fa = (H5FD_family_fapl_t *)H5MM_malloc(sizeof(H5FD_family_fapl_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -529,7 +529,7 @@ H5FD__family_fapl_free(void *_fa)
H5FD_family_fapl_t *fa = (H5FD_family_fapl_t *)_fa;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if (H5I_dec_ref(fa->memb_fapl_id) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTDEC, FAIL, "can't close driver ID")
@@ -557,7 +557,7 @@ done:
static hsize_t
H5FD__family_sb_size(H5FD_t H5_ATTR_UNUSED *_file)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* 8 bytes field for the size of member file size field should be
* enough for now. */
@@ -587,7 +587,7 @@ H5FD__family_sb_encode(H5FD_t *_file, char *name /*out*/, unsigned char *buf /*o
{
H5FD_family_t *file = (H5FD_family_t *)_file;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Name and version number */
HDstrncpy(name, "NCSAfami", (size_t)9);
@@ -631,7 +631,7 @@ H5FD__family_sb_decode(H5FD_t *_file, const char H5_ATTR_UNUSED *name, const uns
uint64_t msize;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Read member file size. Skip name template for now although it's saved. */
UINT64DECODE(buf, msize);
@@ -695,7 +695,7 @@ H5FD__family_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad
unsigned t_flags = flags & ~H5F_ACC_CREAT;
H5FD_t * ret_value = NULL;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if (!name || !*name)
@@ -886,7 +886,7 @@ H5FD__family_close(H5FD_t *_file)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Close as many members as possible. Use private function here to avoid clearing
* the error stack. We need the error message to indicate wrong member file size. */
@@ -936,7 +936,7 @@ H5FD__family_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
const H5FD_family_t *f2 = (const H5FD_family_t *)_f2;
int ret_value = 0;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(f1->nmembs >= 1 && f1->memb[0]);
HDassert(f2->nmembs >= 1 && f2->memb[0]);
@@ -965,7 +965,7 @@ H5FD__family_query(const H5FD_t *_file, unsigned long *flags /* out */)
{
const H5FD_family_t *file = (const H5FD_family_t *)_file; /* Family VFD info */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Set the VFL feature flags that this driver supports */
if (flags) {
@@ -1005,7 +1005,7 @@ 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;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
FUNC_LEAVE_NOAPI(file->eoa)
}
@@ -1040,7 +1040,7 @@ H5FD__family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t abs_eoa)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Allocate space for the member name buffer */
if (NULL == (memb_name = (char *)H5MM_malloc(H5FD_FAM_MEMB_NAME_BUF_SIZE)))
@@ -1126,7 +1126,7 @@ H5FD__family_get_eof(const H5FD_t *_file, H5FD_mem_t type)
int i; /* Local index variable */
haddr_t ret_value = HADDR_UNDEF; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/*
* Find the last member that has a non-zero EOF and break out of the loop
@@ -1177,7 +1177,7 @@ H5FD__family_get_handle(H5FD_t *_file, hid_t fapl, void **file_handle)
int memb;
herr_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Get the plist structure and family offset */
if (NULL == (plist = H5P_object_verify(fapl, H5P_FILE_ACCESS)))
@@ -1225,7 +1225,7 @@ H5FD__family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, s
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Get the member data transfer property list. If the transfer property
@@ -1290,7 +1290,7 @@ H5FD__family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
H5P_genplist_t * plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Get the member data transfer property list. If the transfer property
@@ -1347,7 +1347,7 @@ H5FD__family_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
unsigned u, nerrors = 0;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
for (u = 0; u < file->nmembs; u++)
if (file->memb[u] && H5FD_flush(file->memb[u], closing) < 0)
@@ -1381,7 +1381,7 @@ H5FD__family_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closi
unsigned u, nerrors = 0;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
for (u = 0; u < file->nmembs; u++)
if (file->memb[u] && H5FD_truncate(file->memb[u], closing) < 0)
@@ -1415,7 +1415,7 @@ H5FD__family_lock(H5FD_t *_file, hbool_t rw)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Place the lock on all the member files */
for (u = 0; u < file->nmembs; u++)
@@ -1459,7 +1459,7 @@ H5FD__family_unlock(H5FD_t *_file)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Remove the lock on the member files */
for (u = 0; u < file->nmembs; u++)
@@ -1494,7 +1494,7 @@ H5FD__family_delete(const char *filename, hid_t fapl_id)
herr_t delete_error = FAIL;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(filename);
diff --git a/src/H5FDhdfs.c b/src/H5FDhdfs.c
index 4927a40..4e3ee9e 100644
--- a/src/H5FDhdfs.c
+++ b/src/H5FDhdfs.c
@@ -380,7 +380,7 @@ done:
static herr_t
H5FD__hdfs_term(void)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
#if HDFS_DEBUG
HDfprintf(stdout, "called %s.\n", __func__);
@@ -414,7 +414,7 @@ H5FD__hdfs_handle_open(const char *path, const char *namenode_name, const int32_
hdfs_t * handle = NULL;
hdfs_t * ret_value = NULL;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#if HDFS_DEBUG
HDfprintf(stdout, "called %s.\n", __func__);
@@ -499,7 +499,7 @@ H5FD__hdfs_handle_close(hdfs_t *handle)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#if HDFS_DEBUG
HDfprintf(stdout, "called %s.\n", __func__);
@@ -551,7 +551,7 @@ H5FD__hdfs_validate_config(const H5FD_hdfs_fapl_t *fa)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(fa != NULL);
@@ -679,7 +679,7 @@ H5FD__hdfs_fapl_get(H5FD_t *_file)
H5FD_hdfs_fapl_t *fa = NULL;
void * ret_value = NULL;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
fa = (H5FD_hdfs_fapl_t *)H5MM_calloc(sizeof(H5FD_hdfs_fapl_t));
if (fa == NULL)
@@ -718,7 +718,7 @@ H5FD__hdfs_fapl_copy(const void *_old_fa)
H5FD_hdfs_fapl_t * new_fa = NULL;
void * ret_value = NULL;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
new_fa = (H5FD_hdfs_fapl_t *)H5MM_malloc(sizeof(H5FD_hdfs_fapl_t));
if (new_fa == NULL)
@@ -751,7 +751,7 @@ H5FD__hdfs_fapl_free(void *_fa)
{
H5FD_hdfs_fapl_t *fa = (H5FD_hdfs_fapl_t *)_fa;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(fa != NULL); /* sanity check */
@@ -788,7 +788,7 @@ hdfs__reset_stats(H5FD_hdfs_t *file)
unsigned i = 0;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#if HDFS_DEBUG
HDfprintf(stdout, "called %s.\n", __func__);
@@ -846,7 +846,7 @@ H5FD__hdfs_open(const char *path, unsigned flags, hid_t fapl_id, haddr_t maxaddr
hdfs_t * handle = NULL;
H5FD_hdfs_fapl_t fa;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#if HDFS_DEBUG
HDfprintf(stdout, "called %s.\n", __func__);
@@ -978,7 +978,7 @@ hdfs__fprint_stats(FILE *stream, const H5FD_hdfs_t *file)
unsigned suffix_i = 0;
const char suffixes[] = {' ', 'K', 'M', 'G', 'T', 'P'};
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if (stream == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file stream cannot be null")
@@ -1184,7 +1184,7 @@ H5FD__hdfs_close(H5FD_t *_file)
H5FD_hdfs_t *file = (H5FD_hdfs_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#if HDFS_DEBUG
HDfprintf(stdout, "called %s.\n", __func__);
@@ -1240,7 +1240,7 @@ H5FD__hdfs_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
hdfsFileInfo * finfo1 = NULL;
hdfsFileInfo * finfo2 = NULL;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
#if HDFS_DEBUG
HDfprintf(stdout, "called %s.\n", __func__);
@@ -1313,7 +1313,7 @@ done:
static herr_t
H5FD__hdfs_query(const H5FD_t H5_ATTR_UNUSED *_file, unsigned long *flags)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
#if HDFS_DEBUG
HDfprintf(stdout, "called %s.\n", __func__);
@@ -1351,7 +1351,7 @@ H5FD__hdfs_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_hdfs_t *file = (const H5FD_hdfs_t *)_file;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
#if HDFS_DEBUG
HDfprintf(stdout, "called %s.\n", __func__);
@@ -1382,7 +1382,7 @@ H5FD__hdfs_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
{
H5FD_hdfs_t *file = (H5FD_hdfs_t *)_file;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
#if HDFS_DEBUG
HDfprintf(stdout, "called %s.\n", __func__);
@@ -1416,7 +1416,7 @@ H5FD__hdfs_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_hdfs_t *file = (const H5FD_hdfs_t *)_file;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
#if HDFS_DEBUG
HDfprintf(stdout, "called %s.\n", __func__);
@@ -1451,7 +1451,7 @@ H5FD__hdfs_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_hand
H5FD_hdfs_t *file = (H5FD_hdfs_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#if HDFS_DEBUG
HDfprintf(stdout, "called %s.\n", __func__);
@@ -1501,7 +1501,7 @@ H5FD__hdfs_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
unsigned bin_i = 0;
#endif /* HDFS_STATS */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#if HDFS_DEBUG
HDfprintf(stdout, "called %s.\n", __func__);
@@ -1573,7 +1573,7 @@ H5FD__hdfs_write(H5FD_t H5_ATTR_UNUSED *_file, H5FD_mem_t H5_ATTR_UNUSED type, h
{
herr_t ret_value = FAIL;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#if HDFS_DEBUG
HDfprintf(stdout, "called %s.\n", __func__);
@@ -1611,7 +1611,7 @@ H5FD__hdfs_truncate(H5FD_t H5_ATTR_UNUSED *_file, hid_t H5_ATTR_UNUSED dxpl_id,
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#if HDFS_DEBUG
HDfprintf(stdout, "called %s.\n", __func__);
diff --git a/src/H5FDint.c b/src/H5FDint.c
index b1b48c9..ffbc0cc 100644
--- a/src/H5FDint.c
+++ b/src/H5FDint.c
@@ -489,7 +489,7 @@ H5FD__get_driver_cb(void *obj, hid_t id, void *_op_data)
H5FD_class_t * cls = (H5FD_class_t *)obj;
int ret_value = H5_ITER_CONT; /* Callback return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
if (H5FD_GET_DRIVER_BY_NAME == op_data->key.kind) {
if (0 == HDstrcmp(cls->name, op_data->key.u.name)) {
diff --git a/src/H5FDlog.c b/src/H5FDlog.c
index af34682..1c8ff7d 100644
--- a/src/H5FDlog.c
+++ b/src/H5FDlog.c
@@ -278,7 +278,7 @@ H5FD_log_init(void)
static herr_t
H5FD__log_term(void)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Reset VFL ID */
H5FD_LOG_g = 0;
@@ -359,7 +359,7 @@ H5FD__log_fapl_get(H5FD_t *_file)
H5FD_log_t *file = (H5FD_log_t *)_file;
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Set return value */
ret_value = H5FD__log_fapl_copy(&(file->fa));
@@ -387,7 +387,7 @@ H5FD__log_fapl_copy(const void *_old_fa)
H5FD_log_fapl_t * new_fa = NULL; /* New FAPL info */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(old_fa);
@@ -434,7 +434,7 @@ H5FD__log_fapl_free(void *_fa)
{
H5FD_log_fapl_t *fa = (H5FD_log_fapl_t *)_fa;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Free the fapl information */
if (fa->logfile)
@@ -476,7 +476,7 @@ H5FD__log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
h5_stat_t sb;
H5FD_t * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check on file offsets */
HDcompile_assert(sizeof(HDoff_t) >= sizeof(size_t));
@@ -670,7 +670,7 @@ H5FD__log_close(H5FD_t *_file)
H5_timer_t close_timer; /* Timer for close() call */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(file);
@@ -828,7 +828,7 @@ H5FD__log_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
const H5FD_log_t *f2 = (const H5FD_log_t *)_f2;
int ret_value = 0;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
#ifdef H5_HAVE_WIN32_API
if (f1->dwVolumeSerialNumber < f2->dwVolumeSerialNumber)
@@ -891,7 +891,7 @@ H5FD__log_query(const H5FD_t *_file, unsigned long *flags /* out */)
{
const H5FD_log_t *file = (const H5FD_log_t *)_file;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Set the VFL feature flags that this driver supports */
if (flags) {
@@ -935,7 +935,7 @@ H5FD__log_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, hs
haddr_t addr;
haddr_t ret_value = HADDR_UNDEF; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Compute the address for the block to allocate */
addr = file->eoa;
@@ -980,7 +980,7 @@ H5FD__log_free(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
{
H5FD_log_t *file = (H5FD_log_t *)_file;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
if (file->fa.flags != 0) {
/* Reset the flavor of the information in the file */
@@ -1019,7 +1019,7 @@ H5FD__log_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_log_t *file = (const H5FD_log_t *)_file;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
FUNC_LEAVE_NOAPI(file->eoa)
} /* end H5FD__log_get_eoa() */
@@ -1043,7 +1043,7 @@ H5FD__log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr)
{
H5FD_log_t *file = (H5FD_log_t *)_file;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
if (file->fa.flags != 0) {
/* Check for increasing file size */
@@ -1110,7 +1110,7 @@ H5FD__log_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_log_t *file = (const H5FD_log_t *)_file;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
FUNC_LEAVE_NOAPI(file->eof)
} /* end H5FD__log_get_eof() */
@@ -1133,7 +1133,7 @@ H5FD__log_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_handl
H5FD_log_t *file = (H5FD_log_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if (!file_handle)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid")
@@ -1172,7 +1172,7 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
HDoff_t offset = (HDoff_t)addr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(file && file->pub.cls);
HDassert(buf);
@@ -1386,7 +1386,7 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha
HDoff_t offset = (HDoff_t)addr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(file && file->pub.cls);
HDassert(size > 0);
@@ -1597,7 +1597,7 @@ H5FD__log_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_
H5FD_log_t *file = (H5FD_log_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(file);
@@ -1705,7 +1705,7 @@ H5FD__log_lock(H5FD_t *_file, hbool_t rw)
int lock_flags; /* file locking flags */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(file);
@@ -1746,7 +1746,7 @@ H5FD__log_unlock(H5FD_t *_file)
H5FD_log_t *file = (H5FD_log_t *)_file; /* VFD file struct */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(file);
@@ -1779,7 +1779,7 @@ H5FD__log_delete(const char *filename, hid_t H5_ATTR_UNUSED fapl_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(filename);
diff --git a/src/H5FDmirror.c b/src/H5FDmirror.c
index e74901a..fdb4b68 100644
--- a/src/H5FDmirror.c
+++ b/src/H5FDmirror.c
@@ -247,7 +247,7 @@ done:
static herr_t
H5FD__mirror_term(void)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Reset VFL ID */
H5FD_MIRROR_g = 0;
@@ -1106,7 +1106,7 @@ H5FD__mirror_verify_reply(H5FD_mirror_t *file)
ssize_t read_ret = 0;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
LOG_OP_CALL(__func__);
@@ -1161,7 +1161,7 @@ H5FD__mirror_fapl_get(H5FD_t *_file)
H5FD_mirror_fapl_t *fa = NULL;
void * ret_value = NULL;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
LOG_OP_CALL(__func__);
@@ -1197,7 +1197,7 @@ H5FD__mirror_fapl_copy(const void *_old_fa)
H5FD_mirror_fapl_t * new_fa = NULL;
void * ret_value = NULL;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
LOG_OP_CALL(__func__);
@@ -1229,7 +1229,7 @@ H5FD__mirror_fapl_free(void *_fa)
{
H5FD_mirror_fapl_t *fa = (H5FD_mirror_fapl_t *)_fa;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
LOG_OP_CALL(__func__);
@@ -1347,7 +1347,7 @@ H5FD__mirror_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad
H5FD_mirror_xmit_open_t *open_xmit = NULL;
H5FD_t * ret_value = NULL;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
LOG_OP_CALL(__func__);
@@ -1472,7 +1472,7 @@ H5FD__mirror_close(H5FD_t *_file)
int xmit_encoded = 0; /* monitor point of failure */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
LOG_OP_CALL(__func__);
@@ -1544,7 +1544,7 @@ done:
static herr_t
H5FD__mirror_query(const H5FD_t H5_ATTR_UNUSED *_file, unsigned long *flags)
{
- FUNC_ENTER_STATIC_NOERR;
+ FUNC_ENTER_PACKAGE_NOERR;
LOG_OP_CALL(__func__);
@@ -1581,7 +1581,7 @@ H5FD__mirror_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_mirror_t *file = (const H5FD_mirror_t *)_file;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
LOG_OP_CALL(__func__);
@@ -1608,7 +1608,7 @@ H5FD__mirror_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr)
H5FD_mirror_t * file = (H5FD_mirror_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
LOG_OP_CALL(__func__);
@@ -1663,7 +1663,7 @@ H5FD__mirror_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_mirror_t *file = (const H5FD_mirror_t *)_file;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
LOG_OP_CALL(__func__);
@@ -1684,7 +1684,7 @@ static herr_t
H5FD__mirror_read(H5FD_t H5_ATTR_UNUSED *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED fapl_id,
haddr_t H5_ATTR_UNUSED addr, size_t H5_ATTR_UNUSED size, void H5_ATTR_UNUSED *buf)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
LOG_OP_CALL(__func__);
@@ -1717,7 +1717,7 @@ H5FD__mirror_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
H5FD_mirror_t * file = (H5FD_mirror_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
LOG_OP_CALL(__func__);
@@ -1780,7 +1780,7 @@ H5FD__mirror_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_AT
H5FD_mirror_t *file = (H5FD_mirror_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
LOG_OP_CALL(__func__);
@@ -1828,7 +1828,7 @@ H5FD__mirror_lock(H5FD_t *_file, hbool_t rw)
H5FD_mirror_t * file = (H5FD_mirror_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
LOG_OP_CALL(__func__);
@@ -1875,7 +1875,7 @@ H5FD__mirror_unlock(H5FD_t *_file)
H5FD_mirror_t *file = (H5FD_mirror_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
LOG_OP_CALL(__func__);
diff --git a/src/H5FDmodule.h b/src/H5FDmodule.h
index 0b92b27..728b4b8 100644
--- a/src/H5FDmodule.h
+++ b/src/H5FDmodule.h
@@ -25,8 +25,7 @@
* reporting macros.
*/
#define H5FD_MODULE
-#define H5_MY_PKG H5FD
-#define H5_MY_PKG_ERR H5E_VFL
-#define H5_MY_PKG_INIT YES
+#define H5_MY_PKG H5FD
+#define H5_MY_PKG_ERR H5E_VFL
#endif /* H5FDmodule_H */
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c
index 4aa8a96..6a168c7 100644
--- a/src/H5FDmpio.c
+++ b/src/H5FDmpio.c
@@ -172,7 +172,7 @@ static int H5FD_mpio_debug_rank_s = -1;
static void
H5FD__mpio_parse_debug_str(const char *s)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(s);
@@ -311,7 +311,7 @@ done:
static herr_t
H5FD__mpio_term(void)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Terminate MPI if the driver initialized it */
if (H5FD_mpi_self_initialized) {
@@ -834,7 +834,7 @@ H5FD__mpio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t H5_ATTR
int mpi_code; /* MPI return code */
H5FD_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Get a pointer to the fapl */
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
@@ -976,7 +976,7 @@ H5FD__mpio_close(H5FD_t *_file)
int mpi_code; /* MPI return code */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
@@ -1021,7 +1021,7 @@ done:
static herr_t
H5FD__mpio_query(const H5FD_t H5_ATTR_UNUSED *_file, unsigned long *flags /* out */)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Set the VFL feature flags that this driver supports */
if (flags) {
@@ -1056,7 +1056,7 @@ H5FD__mpio_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_mpio_t *file = (const H5FD_mpio_t *)_file;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(file);
@@ -1084,7 +1084,7 @@ H5FD__mpio_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
{
H5FD_mpio_t *file = (H5FD_mpio_t *)_file;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(file);
@@ -1126,7 +1126,7 @@ H5FD__mpio_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_mpio_t *file = (const H5FD_mpio_t *)_file;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(file);
@@ -1153,7 +1153,7 @@ H5FD__mpio_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_hand
H5FD_mpio_t *file = (H5FD_mpio_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if (!file_handle)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid")
@@ -1215,7 +1215,7 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
int mpi_code; /* MPI return code */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
@@ -1485,7 +1485,7 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h
int mpi_code; /* MPI return code */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
@@ -1684,7 +1684,7 @@ H5FD__mpio_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
int mpi_code; /* mpi return code */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
@@ -1741,7 +1741,7 @@ H5FD__mpio_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR
#endif
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
@@ -1841,7 +1841,7 @@ H5FD__mpio_delete(const char *filename, hid_t fapl_id)
int mpi_code; /* MPI return code */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(filename);
diff --git a/src/H5FDros3.c b/src/H5FDros3.c
index 922dac5..4b15616 100644
--- a/src/H5FDros3.c
+++ b/src/H5FDros3.c
@@ -342,7 +342,7 @@ done:
static herr_t
H5FD__ros3_term(void)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
#if ROS3_DEBUG
HDfprintf(stdout, "H5FD__ros3_term() called.\n");
@@ -422,7 +422,7 @@ H5FD__ros3_validate_config(const H5FD_ros3_fapl_t *fa)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(fa != NULL);
@@ -510,7 +510,7 @@ H5FD__ros3_fapl_get(H5FD_t *_file)
H5FD_ros3_fapl_t *fa = NULL;
void * ret_value = NULL;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
fa = (H5FD_ros3_fapl_t *)H5MM_calloc(sizeof(H5FD_ros3_fapl_t));
if (fa == NULL)
@@ -551,7 +551,7 @@ H5FD__ros3_fapl_copy(const void *_old_fa)
H5FD_ros3_fapl_t * new_fa = NULL;
void * ret_value = NULL;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
new_fa = (H5FD_ros3_fapl_t *)H5MM_malloc(sizeof(H5FD_ros3_fapl_t));
if (new_fa == NULL)
@@ -585,7 +585,7 @@ H5FD__ros3_fapl_free(void *_fa)
{
H5FD_ros3_fapl_t *fa = (H5FD_ros3_fapl_t *)_fa;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(fa != NULL); /* sanity check */
@@ -622,7 +622,7 @@ ros3_reset_stats(H5FD_ros3_t *file)
unsigned i = 0;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#if ROS3_DEBUG
HDprintf("ros3_reset_stats() called\n");
@@ -690,7 +690,7 @@ H5FD__ros3_open(const char *url, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
H5FD_ros3_fapl_t fa;
H5FD_t * ret_value = NULL;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#if ROS3_DEBUG
HDfprintf(stdout, "H5FD__ros3_open() called.\n");
@@ -847,7 +847,7 @@ ros3_fprint_stats(FILE *stream, const H5FD_ros3_t *file)
unsigned suffix_i = 0;
const char suffixes[] = {' ', 'K', 'M', 'G', 'T', 'P'};
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if (stream == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file stream cannot be null");
@@ -1075,7 +1075,7 @@ H5FD__ros3_close(H5FD_t H5_ATTR_UNUSED *_file)
H5FD_ros3_t *file = (H5FD_ros3_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#if ROS3_DEBUG
HDfprintf(stdout, "H5FD__ros3_close() called.\n");
@@ -1144,7 +1144,7 @@ H5FD__ros3_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
const parsed_url_t *purl2 = NULL;
int ret_value = 0;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
#if ROS3_DEBUG
HDfprintf(stdout, "H5FD__ros3_cmp() called.\n");
@@ -1256,7 +1256,7 @@ done:
static herr_t
H5FD__ros3_query(const H5FD_t H5_ATTR_UNUSED *_file, unsigned long *flags)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
#if ROS3_DEBUG
HDfprintf(stdout, "H5FD__ros3_query() called.\n");
@@ -1296,7 +1296,7 @@ H5FD__ros3_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_ros3_t *file = (const H5FD_ros3_t *)_file;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
#if ROS3_DEBUG
HDfprintf(stdout, "H5FD__ros3_get_eoa() called.\n");
@@ -1327,7 +1327,7 @@ H5FD__ros3_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
{
H5FD_ros3_t *file = (H5FD_ros3_t *)_file;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
#if ROS3_DEBUG
HDfprintf(stdout, "H5FD__ros3_set_eoa() called.\n");
@@ -1361,7 +1361,7 @@ H5FD__ros3_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_ros3_t *file = (const H5FD_ros3_t *)_file;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
#if ROS3_DEBUG
HDfprintf(stdout, "H5FD__ros3_get_eof() called.\n");
@@ -1393,7 +1393,7 @@ H5FD__ros3_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_hand
H5FD_ros3_t *file = (H5FD_ros3_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#if ROS3_DEBUG
HDfprintf(stdout, "H5FD__ros3_get_handle() called.\n");
@@ -1443,7 +1443,7 @@ H5FD__ros3_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
unsigned bin_i = 0;
#endif /* ROS3_STATS */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#if ROS3_DEBUG
HDfprintf(stdout, "H5FD__ros3_read() called.\n");
@@ -1513,7 +1513,7 @@ H5FD__ros3_write(H5FD_t H5_ATTR_UNUSED *_file, H5FD_mem_t H5_ATTR_UNUSED type, h
{
herr_t ret_value = FAIL;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#if ROS3_DEBUG
HDfprintf(stdout, "H5FD__ros3_write() called.\n");
@@ -1551,7 +1551,7 @@ H5FD__ros3_truncate(H5FD_t H5_ATTR_UNUSED *_file, hid_t H5_ATTR_UNUSED dxpl_id,
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#if ROS3_DEBUG
HDfprintf(stdout, "H5FD__ros3_truncate() called.\n");
diff --git a/src/H5FDs3comms.c b/src/H5FDs3comms.c
index ee5b5ec..747aa25 100644
--- a/src/H5FDs3comms.c
+++ b/src/H5FDs3comms.c
@@ -1935,7 +1935,7 @@ H5FD__s3comms_load_aws_creds_from_file(FILE *file, const char *profile_name, cha
int found_setting = 0;
char * line_buffer = &(buffer[0]);
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#if S3COMMS_DEBUG
HDfprintf(stdout, "called load_aws_creds_from_file.\n");
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index 46f5fd4..384ca11 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -238,7 +238,7 @@ H5FD_sec2_init(void)
static herr_t
H5FD__sec2_term(void)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Reset VFL ID */
H5FD_SEC2_g = 0;
@@ -306,7 +306,7 @@ H5FD__sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr
H5P_genplist_t *plist; /* Property list pointer */
H5FD_t * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check on file offsets */
HDcompile_assert(sizeof(HDoff_t) >= sizeof(size_t));
@@ -428,7 +428,7 @@ H5FD__sec2_close(H5FD_t *_file)
H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(file);
@@ -466,7 +466,7 @@ H5FD__sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
const H5FD_sec2_t *f2 = (const H5FD_sec2_t *)_f2;
int ret_value = 0;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
#ifdef H5_HAVE_WIN32_API
if (f1->dwVolumeSerialNumber < f2->dwVolumeSerialNumber)
@@ -527,7 +527,7 @@ H5FD__sec2_query(const H5FD_t *_file, unsigned long *flags /* out */)
{
const H5FD_sec2_t *file = (const H5FD_sec2_t *)_file; /* sec2 VFD info */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Set the VFL feature flags that this driver supports */
/* Notice: the Mirror VFD Writer currently uses only the Sec2 driver as
@@ -576,7 +576,7 @@ H5FD__sec2_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_sec2_t *file = (const H5FD_sec2_t *)_file;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
FUNC_LEAVE_NOAPI(file->eoa)
} /* end H5FD__sec2_get_eoa() */
@@ -600,7 +600,7 @@ H5FD__sec2_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
{
H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
file->eoa = addr;
@@ -627,7 +627,7 @@ H5FD__sec2_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_sec2_t *file = (const H5FD_sec2_t *)_file;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
FUNC_LEAVE_NOAPI(file->eof)
} /* end H5FD__sec2_get_eof() */
@@ -650,7 +650,7 @@ H5FD__sec2_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_hand
H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if (!file_handle)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid")
@@ -685,7 +685,7 @@ H5FD__sec2_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
HDoff_t offset = (HDoff_t)addr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(file && file->pub.cls);
HDassert(buf);
@@ -793,7 +793,7 @@ H5FD__sec2_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UN
HDoff_t offset = (HDoff_t)addr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(file && file->pub.cls);
HDassert(buf);
@@ -895,7 +895,7 @@ H5FD__sec2_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR
H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(file);
@@ -965,7 +965,7 @@ H5FD__sec2_lock(H5FD_t *_file, hbool_t rw)
int lock_flags; /* file locking flags */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(file);
@@ -1005,7 +1005,7 @@ H5FD__sec2_unlock(H5FD_t *_file)
H5FD_sec2_t *file = (H5FD_sec2_t *)_file; /* VFD file struct */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(file);
@@ -1038,7 +1038,7 @@ H5FD__sec2_delete(const char *filename, hid_t H5_ATTR_UNUSED fapl_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(filename);
@@ -1076,7 +1076,7 @@ H5FD__sec2_ctl(H5FD_t *_file, uint64_t op_code, uint64_t flags, const void H5_AT
H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(file);
diff --git a/src/H5FDspace.c b/src/H5FDspace.c
index 48b06ba..99f4d07 100644
--- a/src/H5FDspace.c
+++ b/src/H5FDspace.c
@@ -94,7 +94,7 @@ H5FD__extend(H5FD_t *file, H5FD_mem_t type, hsize_t size)
haddr_t eoa; /* Address of end-of-allocated space */
haddr_t ret_value = HADDR_UNDEF; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(file);
diff --git a/src/H5FDsplitter.c b/src/H5FDsplitter.c
index 509c18e..7458db3 100644
--- a/src/H5FDsplitter.c
+++ b/src/H5FDsplitter.c
@@ -219,7 +219,7 @@ H5FD_splitter_init(void)
static herr_t
H5FD__splitter_term(void)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
H5FD_SPLITTER_LOG_CALL(__func__);
@@ -244,7 +244,7 @@ H5FD__copy_plist(hid_t fapl_id, hid_t *id_out_ptr)
int ret_value = 0;
H5P_genplist_t *plist_ptr = NULL;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5FD_SPLITTER_LOG_CALL(__func__);
@@ -397,7 +397,7 @@ H5FD__splitter_populate_config(H5FD_splitter_vfd_config_t *vfd_config, H5FD_spli
hbool_t free_config = FALSE;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(fapl_out);
@@ -516,7 +516,7 @@ H5FD__splitter_get_default_wo_path(char *new_path, size_t new_path_len, const ch
char * file_extension = NULL;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(new_path);
HDassert(base_filename);
@@ -568,7 +568,7 @@ H5FD__splitter_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closin
H5FD_splitter_t *file = (H5FD_splitter_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5FD_SPLITTER_LOG_CALL(__func__);
@@ -603,7 +603,7 @@ H5FD__splitter_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR
H5FD_splitter_t *file = (H5FD_splitter_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5FD_SPLITTER_LOG_CALL(__func__);
@@ -643,7 +643,7 @@ H5FD__splitter_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr
H5P_genplist_t * plist_ptr = NULL;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5FD_SPLITTER_LOG_CALL(__func__);
@@ -679,7 +679,7 @@ H5FD__splitter_fapl_get(H5FD_t *_file)
H5FD_splitter_t *file = (H5FD_splitter_t *)_file;
void * ret_value = NULL;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
H5FD_SPLITTER_LOG_CALL(__func__);
@@ -704,7 +704,7 @@ H5FD__splitter_fapl_copy(const void *_old_fa)
H5FD_splitter_fapl_t * new_fa_ptr = NULL;
void * ret_value = NULL;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5FD_SPLITTER_LOG_CALL(__func__);
@@ -748,7 +748,7 @@ H5FD__splitter_fapl_free(void *_fapl)
H5FD_splitter_fapl_t *fapl = (H5FD_splitter_fapl_t *)_fapl;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5FD_SPLITTER_LOG_CALL(__func__);
@@ -787,7 +787,7 @@ H5FD__splitter_open(const char *name, unsigned flags, hid_t splitter_fapl_id, ha
H5P_genplist_t * plist_ptr = NULL;
H5FD_t * ret_value = NULL;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5FD_SPLITTER_LOG_CALL(__func__);
@@ -898,7 +898,7 @@ H5FD__splitter_close(H5FD_t *_file)
H5FD_splitter_t *file = (H5FD_splitter_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5FD_SPLITTER_LOG_CALL(__func__);
@@ -949,7 +949,7 @@ H5FD__splitter_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
const H5FD_splitter_t *file = (const H5FD_splitter_t *)_file;
haddr_t ret_value = HADDR_UNDEF;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5FD_SPLITTER_LOG_CALL(__func__);
@@ -980,7 +980,7 @@ H5FD__splitter_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t ad
H5FD_splitter_t *file = (H5FD_splitter_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5FD_SPLITTER_LOG_CALL(__func__)
@@ -1017,7 +1017,7 @@ H5FD__splitter_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
const H5FD_splitter_t *file = (const H5FD_splitter_t *)_file;
haddr_t ret_value = HADDR_UNDEF; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5FD_SPLITTER_LOG_CALL(__func__);
@@ -1046,7 +1046,7 @@ H5FD__splitter_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
H5FD_splitter_t *file = (H5FD_splitter_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5FD_SPLITTER_LOG_CALL(__func__);
@@ -1084,7 +1084,7 @@ H5FD__splitter_sb_size(H5FD_t *_file)
H5FD_splitter_t *file = (H5FD_splitter_t *)_file;
hsize_t ret_value = 0;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
H5FD_SPLITTER_LOG_CALL(__func__);
@@ -1112,7 +1112,7 @@ H5FD__splitter_sb_encode(H5FD_t *_file, char *name /*out*/, unsigned char *buf /
H5FD_splitter_t *file = (H5FD_splitter_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5FD_SPLITTER_LOG_CALL(__func__);
@@ -1143,7 +1143,7 @@ H5FD__splitter_sb_decode(H5FD_t *_file, const char *name, const unsigned char *b
H5FD_splitter_t *file = (H5FD_splitter_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5FD_SPLITTER_LOG_CALL(__func__);
@@ -1174,7 +1174,7 @@ H5FD__splitter_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
const H5FD_splitter_t *f2 = (const H5FD_splitter_t *)_f2;
herr_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
H5FD_SPLITTER_LOG_CALL(__func__);
@@ -1201,7 +1201,7 @@ H5FD__splitter_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_
H5FD_splitter_t *file = (H5FD_splitter_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5FD_SPLITTER_LOG_CALL(__func__);
@@ -1232,7 +1232,7 @@ H5FD__splitter_lock(H5FD_t *_file, hbool_t rw)
H5FD_splitter_t *file = (H5FD_splitter_t *)_file; /* VFD file struct */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5FD_SPLITTER_LOG_CALL(__func__);
@@ -1265,7 +1265,7 @@ H5FD__splitter_unlock(H5FD_t *_file)
H5FD_splitter_t *file = (H5FD_splitter_t *)_file; /* VFD file struct */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5FD_SPLITTER_LOG_CALL(__func__);
@@ -1312,7 +1312,7 @@ H5FD__splitter_ctl(H5FD_t *_file, uint64_t op_code, uint64_t flags, const void *
H5FD_splitter_t *file = (H5FD_splitter_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(file);
@@ -1356,7 +1356,7 @@ H5FD__splitter_query(const H5FD_t *_file, unsigned long *flags /* out */)
const H5FD_splitter_t *file = (const H5FD_splitter_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5FD_SPLITTER_LOG_CALL(__func__);
@@ -1393,7 +1393,7 @@ H5FD__splitter_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size
H5FD_splitter_t *file = (H5FD_splitter_t *)_file; /* VFD file struct */
haddr_t ret_value = HADDR_UNDEF; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5FD_SPLITTER_LOG_CALL(__func__);
@@ -1427,7 +1427,7 @@ H5FD__splitter_get_type_map(const H5FD_t *_file, H5FD_mem_t *type_map)
const H5FD_splitter_t *file = (const H5FD_splitter_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5FD_SPLITTER_LOG_CALL(__func__);
@@ -1457,7 +1457,7 @@ H5FD__splitter_free(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
H5FD_splitter_t *file = (H5FD_splitter_t *)_file; /* VFD file struct */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5FD_SPLITTER_LOG_CALL(__func__);
@@ -1492,7 +1492,7 @@ H5FD__splitter_delete(const char *filename, hid_t fapl_id)
H5P_genplist_t * plist;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(filename);
@@ -1556,7 +1556,7 @@ H5FD__splitter_log_error(const H5FD_splitter_t *file, const char *atfunc, const
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
H5FD_SPLITTER_LOG_CALL(__func__);
diff --git a/src/H5FDvfd_swmr.c b/src/H5FDvfd_swmr.c
index c79a357..fb88de3 100644
--- a/src/H5FDvfd_swmr.c
+++ b/src/H5FDvfd_swmr.c
@@ -172,7 +172,7 @@ H5FD_vfd_swmr_init(void)
static herr_t
H5FD__vfd_swmr_term(void)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Reset VFL ID */
H5FD_VFD_SWMR_g = 0;
@@ -226,7 +226,7 @@ H5FD__swmr_reader_open(H5FD_vfd_swmr_t *file)
hbool_t do_try; /* more tries remain */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
file->api_elapsed_nbuckets = file->config.max_lag + 1;
@@ -279,7 +279,7 @@ H5FD__vfd_swmr_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t max
H5F_vfd_swmr_config_t *vfd_swmr_config;
H5FD_t * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Get file access property list */
if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
@@ -368,7 +368,7 @@ H5FD__swmr_reader_close(H5FD_vfd_swmr_t *file)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if (file->api_elapsed_ticks != NULL)
H5MM_xfree(file->api_elapsed_ticks);
@@ -405,7 +405,7 @@ H5FD__vfd_swmr_close(H5FD_t *_file)
H5FD_vfd_swmr_t *file = (H5FD_vfd_swmr_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if (file->hdf5_file_lf != NULL) {
if (file->hdf5_file_lf->exc_owner != NULL) {
@@ -448,7 +448,7 @@ H5FD__vfd_swmr_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
const H5FD_vfd_swmr_t *f2 = (const H5FD_vfd_swmr_t *)_f2;
int ret_value = 0;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
ret_value = H5FD_cmp(f1->hdf5_file_lf, f2->hdf5_file_lf);
@@ -573,7 +573,7 @@ done:
static herr_t
H5FD__vfd_swmr_query(const H5FD_t H5_ATTR_UNUSED *_file, unsigned long *flags /* out */)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Set the VFL feature flags that this driver supports */
if (flags) {
@@ -625,7 +625,7 @@ H5FD__vfd_swmr_get_eoa(const H5FD_t *_file, H5FD_mem_t type)
const H5FD_vfd_swmr_t *file = (const H5FD_vfd_swmr_t *)_file;
haddr_t ret_value = HADDR_UNDEF;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if ((ret_value = H5FD_get_eoa(file->hdf5_file_lf, type)) == HADDR_UNDEF)
HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "unable to get HDF5 file eoa")
@@ -652,7 +652,7 @@ H5FD__vfd_swmr_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr)
H5FD_vfd_swmr_t *file = (H5FD_vfd_swmr_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if (H5FD_set_eoa(file->hdf5_file_lf, type, addr) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "unable to set HDF5 file eoa")
@@ -679,7 +679,7 @@ H5FD__vfd_swmr_get_eof(const H5FD_t *_file, H5FD_mem_t type)
const H5FD_vfd_swmr_t *file = (const H5FD_vfd_swmr_t *)_file;
haddr_t ret_value = HADDR_UNDEF;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* LATER: need to determine the metadata file or underlying HDF5 file ? */
if ((ret_value = H5FD_get_eof(file->hdf5_file_lf, type)) == HADDR_UNDEF)
@@ -704,7 +704,7 @@ H5FD__vfd_swmr_get_handle(H5FD_t *_file, hid_t fapl, void **file_handle)
H5FD_vfd_swmr_t *file = (H5FD_vfd_swmr_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if (!file_handle)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid")
@@ -771,7 +771,7 @@ H5FD__vfd_swmr_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id
if (file->writer)
return H5FD_read(file->hdf5_file_lf, type, addr, size, buf);
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(file && file->pub.cls);
HDassert(buf);
@@ -900,7 +900,7 @@ H5FD__vfd_swmr_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t clo
{
H5FD_vfd_swmr_t *file = (H5FD_vfd_swmr_t *)_file; /* VFD SWMR file struct */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* This routine should only be called if the VFD instance is opened
* for writing.
@@ -925,7 +925,7 @@ H5FD__vfd_swmr_lock(H5FD_t *_file, hbool_t rw)
H5FD_vfd_swmr_t *file = (H5FD_vfd_swmr_t *)_file; /* VFD SWMR file struct */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(file);
@@ -951,7 +951,7 @@ H5FD__vfd_swmr_unlock(H5FD_t *_file)
H5FD_vfd_swmr_t *file = (H5FD_vfd_swmr_t *)_file; /* VFD SWMR file struct */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(file);
@@ -1022,7 +1022,7 @@ H5FD__vfd_swmr_load_hdr_and_idx(H5FD_vfd_swmr_t *file, hbool_t open)
static uint64_t last_index_offset = 0;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
for (do_try = H5_retry_init(&retry, H5FD_VFD_SWMR_MD_LOAD_RETRY_MAX, H5_RETRY_ONE_SECOND / 10,
H5_RETRY_ONE_SECOND);
@@ -1144,7 +1144,7 @@ H5FD__vfd_swmr_header_deserialize(H5FD_vfd_swmr_t *file, H5FD_vfd_swmr_md_header
uint64_t index_length;
ssize_t nread;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Set file pointer to the beginning the file */
if (HDlseek(file->md_fd, H5FD_MD_HEADER_OFF, SEEK_SET) < 0)
@@ -1229,7 +1229,7 @@ H5FD__vfd_swmr_index_deserialize(const H5FD_vfd_swmr_t *file, H5FD_vfd_swmr_md_i
htri_t ret_value = TRUE;
ssize_t nread;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Allocate buffer for reading index */
if (NULL == (image = H5MM_malloc(md_header->index_length)))
diff --git a/src/H5FL.c b/src/H5FL.c
index a897a24..403b389 100644
--- a/src/H5FL.c
+++ b/src/H5FL.c
@@ -232,7 +232,7 @@ H5FL__malloc(size_t mem_size)
{
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Attempt to allocate the memory requested */
if (NULL == (ret_value = H5MM_malloc(mem_size))) {
@@ -269,7 +269,7 @@ H5FL__reg_init(H5FL_reg_head_t *head)
H5FL_reg_gc_node_t *new_node; /* Pointer to the node for the new list to garbage collect */
herr_t ret_value = SUCCEED; /* return value*/
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Allocate a new garbage collection node */
if (NULL == (new_node = (H5FL_reg_gc_node_t *)H5MM_malloc(sizeof(H5FL_reg_gc_node_t))))
@@ -513,7 +513,7 @@ H5FL__reg_gc_list(H5FL_reg_head_t *head)
{
H5FL_reg_node_t *free_list; /* Pointer to nodes in free list being garbage collected */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* For each free list being garbage collected, walk through the nodes and free them */
free_list = head->list;
@@ -562,7 +562,7 @@ H5FL__reg_gc(void)
H5FL_reg_gc_node_t *gc_node; /* Pointer into the list of things to garbage collect */
herr_t ret_value = SUCCEED; /* return value*/
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Walk through all the free lists, free()'ing the nodes */
gc_node = H5FL_reg_gc_head.first;
@@ -612,7 +612,7 @@ H5FL__reg_term(void)
{
H5FL_reg_gc_node_t *left; /* pointer to garbage collection lists with work left */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Free the nodes on the garbage collection list, keeping nodes with allocations outstanding */
left = NULL;
@@ -672,7 +672,7 @@ H5FL__blk_find_list(H5FL_blk_node_t **head, size_t size)
{
H5FL_blk_node_t *temp = NULL; /* Temp. pointer to node in the native list */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Find the correct free list */
temp = *head;
@@ -730,7 +730,7 @@ H5FL__blk_create_list(H5FL_blk_node_t **head, size_t size)
{
H5FL_blk_node_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Allocate room for the new free list node */
if (NULL == (ret_value = H5FL_CALLOC(H5FL_blk_node_t)))
@@ -772,7 +772,7 @@ H5FL__blk_init(H5FL_blk_head_t *head)
H5FL_blk_gc_node_t *new_node; /* Pointer to the node for the new list to garbage collect */
herr_t ret_value = SUCCEED; /* return value*/
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Allocate a new garbage collection node */
if (NULL == (new_node = (H5FL_blk_gc_node_t *)H5MM_malloc(sizeof(H5FL_blk_gc_node_t))))
@@ -1180,7 +1180,7 @@ H5FL__blk_gc_list(H5FL_blk_head_t *head)
{
H5FL_blk_node_t *blk_head; /* Temp. ptr to the free list page node */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Loop through all the nodes in the block free list queue */
blk_head = head->head;
@@ -1269,7 +1269,7 @@ H5FL__blk_gc(void)
H5FL_blk_gc_node_t *gc_node; /* Pointer into the list of things to garbage collect */
herr_t ret_value = SUCCEED; /* return value*/
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Walk through all the free lists, free()'ing the nodes */
gc_node = H5FL_blk_gc_head.first;
@@ -1313,7 +1313,7 @@ H5FL__blk_term(void)
{
H5FL_blk_gc_node_t *left; /* pointer to garbage collection lists with work left */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Free the nodes on the garbage collection list, keeping nodes with allocations outstanding */
left = NULL;
@@ -1372,7 +1372,7 @@ H5FL__arr_init(H5FL_arr_head_t *head)
size_t u; /* Local index variable */
herr_t ret_value = SUCCEED; /* return value*/
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Allocate a new garbage collection node */
if (NULL == (new_node = (H5FL_gc_arr_node_t *)H5MM_malloc(sizeof(H5FL_gc_arr_node_t))))
@@ -1748,7 +1748,7 @@ H5FL__arr_gc_list(H5FL_arr_head_t *head)
{
unsigned u; /* Counter for array of free lists */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Walk through the array of free lists */
for (u = 0; u < (unsigned)head->maxelem; u++) {
@@ -1811,7 +1811,7 @@ H5FL__arr_gc(void)
H5FL_gc_arr_node_t *gc_arr_node; /* Pointer into the list of things to garbage collect */
herr_t ret_value = SUCCEED; /* return value*/
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Walk through all the free lists, free()'ing the nodes */
gc_arr_node = H5FL_arr_gc_head.first;
@@ -1855,7 +1855,7 @@ H5FL__arr_term(void)
{
H5FL_gc_arr_node_t *left; /* pointer to garbage collection lists with work left */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Free the nodes on the garbage collection list, keeping nodes with allocations outstanding */
left = NULL;
@@ -2302,7 +2302,7 @@ H5FL__fac_gc_list(H5FL_fac_head_t *head)
{
H5FL_fac_node_t *free_list; /* Pointer to nodes in free list being garbage collected */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* For each free list being garbage collected, walk through the nodes and free them */
free_list = head->list;
@@ -2448,7 +2448,7 @@ done:
static int
H5FL__fac_term_all(void)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Free the nodes on the garbage collection list */
while (H5FL_fac_gc_head.first != NULL) {
diff --git a/src/H5FLmodule.h b/src/H5FLmodule.h
index 95c0b49..0485603 100644
--- a/src/H5FLmodule.h
+++ b/src/H5FLmodule.h
@@ -25,8 +25,7 @@
* reporting macros.
*/
#define H5FL_MODULE
-#define H5_MY_PKG H5FL
-#define H5_MY_PKG_ERR H5E_RESOURCE
-#define H5_MY_PKG_INIT NO
+#define H5_MY_PKG H5FL
+#define H5_MY_PKG_ERR H5E_RESOURCE
#endif /* H5FLmodule_H */
diff --git a/src/H5FS.c b/src/H5FS.c
index 3c259f4..aef9351b9 100644
--- a/src/H5FS.c
+++ b/src/H5FS.c
@@ -1074,7 +1074,7 @@ H5FS__sinfo_free_sect_cb(void *_sect, void H5_ATTR_UNUSED *key, void *op_data)
H5FS_section_info_t *sect = (H5FS_section_info_t *)_sect; /* Section to free */
const H5FS_sinfo_t * sinfo = (const H5FS_sinfo_t *)op_data; /* Free space manager for section */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(sect);
HDassert(sinfo);
@@ -1102,7 +1102,7 @@ H5FS__sinfo_free_node_cb(void *item, void H5_ATTR_UNUSED *key, void *op_data)
{
H5FS_node_t *fspace_node = (H5FS_node_t *)item; /* Temporary pointer to free space list node */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(fspace_node);
HDassert(op_data);
diff --git a/src/H5FScache.c b/src/H5FScache.c
index 8d94075..092cae3 100644
--- a/src/H5FScache.c
+++ b/src/H5FScache.c
@@ -160,7 +160,7 @@ H5FS__cache_hdr_get_initial_load_size(void *_udata, size_t *image_len)
{
H5FS_hdr_cache_ud_t *udata = (H5FS_hdr_cache_ud_t *)_udata; /* User-data for metadata cache callback */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(udata);
@@ -194,7 +194,7 @@ H5FS__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
uint32_t computed_chksum; /* Computed metadata checksum value */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(image);
@@ -235,7 +235,7 @@ H5FS__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len
unsigned nclasses; /* Number of section classes */
H5FS_t * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(image);
@@ -342,7 +342,7 @@ H5FS__cache_hdr_image_len(const void *_thing, size_t *image_len)
{
const H5FS_t *fspace = (const H5FS_t *)_thing; /* Pointer to the object */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(fspace);
@@ -392,7 +392,7 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT
H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(f);
@@ -690,7 +690,7 @@ H5FS__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UN
uint32_t metadata_chksum; /* Computed metadata checksum value */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(f);
@@ -854,7 +854,7 @@ H5FS__cache_hdr_free_icr(void *_thing)
H5FS_t *fspace = (H5FS_t *)_thing; /* Pointer to the object */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(fspace);
@@ -892,7 +892,7 @@ H5FS__cache_sinfo_get_initial_load_size(void *_udata, size_t *image_len)
const H5FS_t * fspace; /* free space manager */
H5FS_sinfo_cache_ud_t *udata = (H5FS_sinfo_cache_ud_t *)_udata; /* User data for callback */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(udata);
@@ -972,7 +972,7 @@ H5FS__cache_sinfo_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l
uint32_t stored_chksum; /* Stored metadata checksum */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(image);
@@ -1123,7 +1123,7 @@ H5FS__cache_sinfo_image_len(const void *_thing, size_t *image_len)
{
const H5FS_sinfo_t *sinfo = (const H5FS_sinfo_t *)_thing; /* Pointer to the object */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(sinfo);
@@ -1165,7 +1165,7 @@ H5FS__cache_sinfo_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_
haddr_t sinfo_addr; /* Address for section info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f);
@@ -1250,7 +1250,7 @@ H5FS__cache_sinfo_serialize(const H5F_t *f, void *_image, size_t len, void *_thi
unsigned bin; /* Current bin we are on */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f);
@@ -1394,7 +1394,7 @@ H5FS__cache_sinfo_free_icr(void *_thing)
H5FS_sinfo_t *sinfo = (H5FS_sinfo_t *)_thing; /* Pointer to the object */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(sinfo);
@@ -1433,7 +1433,7 @@ H5FS__sinfo_serialize_sect_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udat
H5FS_iter_ud_t * udata = (H5FS_iter_ud_t *)_udata; /* Callback info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(sect);
@@ -1487,7 +1487,7 @@ H5FS__sinfo_serialize_node_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udat
H5FS_iter_ud_t *udata = (H5FS_iter_ud_t *)_udata; /* Callback info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(fspace_node);
diff --git a/src/H5FSmodule.h b/src/H5FSmodule.h
index a40c103..841b8fd 100644
--- a/src/H5FSmodule.h
+++ b/src/H5FSmodule.h
@@ -25,8 +25,7 @@
* reporting macros.
*/
#define H5FS_MODULE
-#define H5_MY_PKG H5FS
-#define H5_MY_PKG_ERR H5E_FSPACE
-#define H5_MY_PKG_INIT NO
+#define H5_MY_PKG H5FS
+#define H5_MY_PKG_ERR H5E_FSPACE
#endif /* H5FSmodule_H */
diff --git a/src/H5FSsection.c b/src/H5FSsection.c
index 55f8a94..46aba93 100644
--- a/src/H5FSsection.c
+++ b/src/H5FSsection.c
@@ -197,7 +197,7 @@ H5FS__sinfo_lock(H5F_t *f, H5FS_t *fspace, unsigned accmode)
H5FS_sinfo_cache_ud_t cache_udata; /* User-data for cache callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#ifdef H5FS_SINFO_DEBUG
HDfprintf(stderr,
@@ -333,7 +333,7 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#ifdef H5FS_SINFO_DEBUG
HDfprintf(stderr,
"%s: Called, modified = %d, fspace->addr = %" PRIuHADDR ", fspace->sect_addr = %" PRIuHADDR
@@ -529,7 +529,7 @@ done:
static herr_t
H5FS__sect_serialize_size(H5FS_t *fspace)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
HDassert(fspace);
@@ -585,7 +585,7 @@ H5FS__sect_increase(H5FS_t *fspace, const H5FS_section_class_t *cls, unsigned fl
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(fspace);
@@ -640,7 +640,7 @@ H5FS__sect_decrease(H5FS_t *fspace, const H5FS_section_class_t *cls)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(fspace);
@@ -692,7 +692,7 @@ H5FS__size_node_decr(H5FS_sinfo_t *sinfo, unsigned bin, H5FS_node_t *fspace_node
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(sinfo);
@@ -779,7 +779,7 @@ H5FS__sect_unlink_size(H5FS_sinfo_t *sinfo, const H5FS_section_class_t *cls, H5F
unsigned bin; /* Bin to put the free space section in */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(sinfo);
@@ -829,7 +829,7 @@ H5FS__sect_unlink_rest(H5FS_t *fspace, const H5FS_section_class_t *cls, H5FS_sec
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(fspace);
@@ -875,7 +875,7 @@ H5FS__sect_remove_real(H5FS_t *fspace, H5FS_section_info_t *sect)
const H5FS_section_class_t *cls; /* Class of section */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(fspace);
@@ -960,7 +960,7 @@ H5FS__sect_link_size(H5FS_sinfo_t *sinfo, const H5FS_section_class_t *cls, H5FS_
unsigned bin; /* Bin to put the free space section in */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(sinfo);
@@ -1058,7 +1058,7 @@ H5FS__sect_link_rest(H5FS_t *fspace, const H5FS_section_class_t *cls, H5FS_secti
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(fspace);
@@ -1105,7 +1105,7 @@ H5FS__sect_link(H5FS_t *fspace, H5FS_section_info_t *sect, unsigned flags)
const H5FS_section_class_t *cls; /* Class of section */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(fspace);
@@ -1150,7 +1150,7 @@ H5FS__sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data)
htri_t status; /* Status value */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(fspace);
@@ -1642,7 +1642,7 @@ H5FS__sect_find_node(H5FS_t *fspace, hsize_t request, H5FS_section_info_t **node
const H5FS_section_class_t *cls; /* Class of section */
hsize_t alignment;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(fspace);
@@ -1848,7 +1848,7 @@ H5FS__iterate_sect_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udata)
H5FS_iter_ud_t * udata = (H5FS_iter_ud_t *)_udata; /* Callback info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(sect_info);
@@ -1883,7 +1883,7 @@ H5FS__iterate_node_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udata)
H5FS_iter_ud_t *udata = (H5FS_iter_ud_t *)_udata; /* Callback info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(fspace_node);
diff --git a/src/H5Faccum.c b/src/H5Faccum.c
index 4821272..cf3d359 100644
--- a/src/H5Faccum.c
+++ b/src/H5Faccum.c
@@ -273,7 +273,7 @@ H5F__accum_adjust(H5F_meta_accum_t *accum, H5FD_t *file, H5F_accum_adjust_t adju
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(accum);
HDassert(file);
diff --git a/src/H5Fefc.c b/src/H5Fefc.c
index 2c7dd92..49996dd 100644
--- a/src/H5Fefc.c
+++ b/src/H5Fefc.c
@@ -445,7 +445,7 @@ H5F__efc_release_real(H5F_efc_t *efc)
H5F_efc_ent_t *prev_ent = NULL; /* Previous EFC entry */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(efc);
@@ -586,7 +586,7 @@ H5F__efc_remove_ent(H5F_efc_t *efc, H5F_efc_ent_t *ent)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(efc);
@@ -652,7 +652,7 @@ H5F__efc_try_close_tag1(H5F_shared_t *sf, H5F_shared_t **tail)
H5F_efc_ent_t *ent = NULL; /* EFC entry */
H5F_shared_t * esf; /* Convenience pointer to ent->file->shared */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(sf);
@@ -725,7 +725,7 @@ H5F__efc_try_close_tag2(H5F_shared_t *sf, H5F_shared_t **tail)
H5F_efc_ent_t *ent = NULL; /* EFC entry */
H5F_shared_t * esf; /* Convenience pointer to ent->file->shared */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(sf);
diff --git a/src/H5Fint.c b/src/H5Fint.c
index 9909256..2822d9d 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -207,7 +207,7 @@ H5F__close_cb(H5VL_object_t *file_vol_obj, void **request)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(file_vol_obj);
@@ -273,7 +273,7 @@ H5F__set_vol_conn(H5F_t *file)
void * new_connector_info = NULL; /* Copy of connector info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(file);
@@ -529,7 +529,7 @@ H5F__get_objects(const H5F_t *f, unsigned types, size_t max_nobjs, hid_t *obj_id
H5F_olist_t olist; /* Structure to hold search results */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(obj_id_count_ptr);
@@ -631,7 +631,7 @@ H5F__get_objects_cb(void *obj_ptr, hid_t obj_id, void *key)
hbool_t add_obj = FALSE;
int ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(obj_ptr);
HDassert(olist);
@@ -743,7 +743,7 @@ H5F__build_name(const char *prefix, const char *file_name, char **full_name /*ou
size_t fname_len; /* Length of external link file name */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
prefix_len = HDstrlen(prefix);
fname_len = HDstrlen(file_name);
@@ -779,7 +779,7 @@ H5F__getenv_prefix_name(char **env_prefix /*in,out*/)
char *strret; /* Pointer to next separator */
char *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Set return value now */
ret_value = *env_prefix;
@@ -1090,7 +1090,7 @@ H5F__new(H5F_shared_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5F
H5F_t *f = NULL;
H5F_t *ret_value = NULL;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if (NULL == (f = H5FL_CALLOC(H5F_t)))
HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate top file structure")
@@ -1377,7 +1377,7 @@ H5F__dest(H5F_t *f, hbool_t flush)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(f);
@@ -1710,7 +1710,7 @@ H5F__check_if_using_file_locks(H5P_genplist_t *fapl, hbool_t *use_file_locking)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Make sure the out parameter has a value */
*use_file_locking = TRUE;
@@ -2266,7 +2266,7 @@ H5F__flush_phase1(H5F_t *f)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check arguments */
HDassert(f);
@@ -2303,7 +2303,7 @@ H5F__flush_phase2(H5F_t *f, hbool_t closing)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check arguments */
HDassert(f);
@@ -2814,7 +2814,7 @@ H5F__build_actual_name(const H5F_t *f, const H5P_genplist_t *fapl, const char *n
#endif /* H5_HAVE_SYMLINK */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(f);
diff --git a/src/H5Fmodule.h b/src/H5Fmodule.h
index 81c1ede..6047693 100644
--- a/src/H5Fmodule.h
+++ b/src/H5Fmodule.h
@@ -25,9 +25,8 @@
* reporting macros.
*/
#define H5F_MODULE
-#define H5_MY_PKG H5F
-#define H5_MY_PKG_ERR H5E_FILE
-#define H5_MY_PKG_INIT YES
+#define H5_MY_PKG H5F
+#define H5_MY_PKG_ERR H5E_FILE
/**\defgroup H5F H5F
*
diff --git a/src/H5Fmount.c b/src/H5Fmount.c
index 7d27234..ae5970b 100644
--- a/src/H5Fmount.c
+++ b/src/H5Fmount.c
@@ -440,7 +440,7 @@ H5F__mount_count_ids_recurse(H5F_t *f, unsigned *nopen_files, unsigned *nopen_ob
{
unsigned u; /* Local index value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(f);
@@ -523,7 +523,7 @@ H5F__flush_mounts_recurse(H5F_t *f)
unsigned u; /* Index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(f);
diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c
index bf02b06..4e4fe8d 100644
--- a/src/H5Fsuper.c
+++ b/src/H5Fsuper.c
@@ -91,7 +91,7 @@ H5F__super_ext_create(H5F_t *f, H5O_loc_t *ext_ptr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(f);
@@ -241,7 +241,7 @@ H5F__update_super_ext_driver_msg(H5F_t *f)
H5F_super_t *sblock; /* Pointer to the super block */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(f);
diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c
index 258570e..4b6ffbe 100644
--- a/src/H5Fsuper_cache.c
+++ b/src/H5Fsuper_cache.c
@@ -155,7 +155,7 @@ H5F__superblock_prefix_decode(H5F_super_t *sblock, const uint8_t **image_ref,
const uint8_t *image = (const uint8_t *)*image_ref; /* Pointer into raw data buffer */
htri_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(sblock);
@@ -234,7 +234,7 @@ H5F__drvrinfo_prefix_decode(H5O_drvinfo_t *drvrinfo, char *drv_name, const uint8
unsigned drv_vers; /* Version of driver info block */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(drvrinfo);
@@ -301,7 +301,7 @@ done:
static herr_t
H5F__cache_superblock_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t *image_len)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(image_len);
@@ -334,7 +334,7 @@ H5F__cache_superblock_get_final_load_size(const void *_image, size_t H5_ATTR_NDE
H5F_super_t sblock; /* Temporary file superblock */
htri_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(image);
@@ -380,7 +380,7 @@ H5F__cache_superblock_verify_chksum(const void *_image, size_t len, void *_udata
uint32_t computed_chksum; /* Computed metadata checksum value */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(image);
@@ -421,7 +421,7 @@ H5F__cache_superblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUS
const uint8_t * image = _image; /* Pointer into raw data buffer */
H5F_super_t * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(image);
@@ -609,7 +609,7 @@ H5F__cache_superblock_image_len(const void *_thing, size_t *image_len)
{
const H5F_super_t *sblock = (const H5F_super_t *)_thing; /* Pointer to the object */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(sblock);
@@ -643,7 +643,7 @@ H5F__cache_superblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNU
haddr_t rel_eof; /* Relative EOF for file */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(f);
@@ -782,7 +782,7 @@ H5F__cache_superblock_free_icr(void *_thing)
H5F_super_t *sblock = (H5F_super_t *)_thing; /* Pointer to the object */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(sblock);
@@ -812,7 +812,7 @@ done:
static herr_t
H5F__cache_drvrinfo_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t *image_len)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(image_len);
@@ -844,7 +844,7 @@ H5F__cache_drvrinfo_get_final_load_size(const void *_image, size_t H5_ATTR_NDEBU
H5O_drvinfo_t drvrinfo; /* Driver info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(image);
@@ -887,7 +887,7 @@ H5F__cache_drvrinfo_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
char drv_name[9]; /* Name of driver */
H5O_drvinfo_t * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(image);
@@ -941,7 +941,7 @@ H5F__cache_drvrinfo_image_len(const void *_thing, size_t *image_len)
{
const H5O_drvinfo_t *drvinfo = (const H5O_drvinfo_t *)_thing; /* Pointer to the object */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(drvinfo);
@@ -976,7 +976,7 @@ H5F__cache_drvrinfo_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBU
uint8_t * dbuf; /* Pointer to beginning of driver info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check arguments */
HDassert(f);
@@ -1034,7 +1034,7 @@ H5F__cache_drvrinfo_free_icr(void *_thing)
{
H5O_drvinfo_t *drvinfo = (H5O_drvinfo_t *)_thing; /* Pointer to the object */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(drvinfo);
@@ -1093,7 +1093,7 @@ H5F__cache_superblock_refresh(H5F_t *f, void *_thing, const void *_image, size_t
H5G_entry_t root_ent; /* Root group symbol table entry */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* santity checks */
HDassert(f);
diff --git a/src/H5Ftest.c b/src/H5Ftest.c
index 01c9706..0213cd1 100644
--- a/src/H5Ftest.c
+++ b/src/H5Ftest.c
@@ -584,7 +584,7 @@ H5F__count_shadow_defrees(shadow_defree_queue_t *shadow_defrees)
shadow_defree_t *shadow_defree;
unsigned count = 0;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
TAILQ_FOREACH(shadow_defree, shadow_defrees, link)
count++;
diff --git a/src/H5Fvfd_swmr.c b/src/H5Fvfd_swmr.c
index 64cc378..cd3a345 100644
--- a/src/H5Fvfd_swmr.c
+++ b/src/H5Fvfd_swmr.c
@@ -1318,7 +1318,7 @@ H5F__vfd_swmr_insert_eot_entry(eot_queue_entry_t *entry_ptr)
{
eot_queue_entry_t *prec_ptr; /* The predecessor entry on the EOT end of tick queue */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Find the insertion point for the entry on the EOT queue */
TAILQ_FOREACH_REVERSE(prec_ptr, &eot_queue_g, eot_queue, link)
@@ -1476,7 +1476,7 @@ H5F__vfd_swmr_update_end_of_tick_and_tick_num(H5F_shared_t *shared, hbool_t incr
int64_t new_end_nsecs; /* new end_of_tick in nanoseconds */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Get current time in struct timespec */
#ifdef H5_HAVE_WIN32_API
@@ -1549,7 +1549,7 @@ H5F__vfd_swmr_construct_write_md_hdr(H5F_shared_t *shared, uint32_t num_entries,
ssize_t nwritten;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Encode metadata file header */
p = image;
@@ -1616,7 +1616,7 @@ H5F__vfd_swmr_construct_write_md_idx(H5F_shared_t *shared, uint32_t num_entries,
unsigned i; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(num_entries == 0 || index != NULL);
@@ -1687,7 +1687,7 @@ H5F__idx_entry_cmp(const void *_entry1, const void *_entry2)
int ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(entry1);
@@ -1718,7 +1718,7 @@ H5F__vfd_swmr_create_index(H5F_shared_t *shared)
H5FD_vfd_swmr_idx_entry_t *index;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(shared->vfd_swmr);
HDassert(shared->mdf_idx == NULL);
@@ -1845,7 +1845,7 @@ H5F__vfd_swmr_writer_wait_a_tick(H5F_t *f)
H5F_shared_t *shared;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(f);
shared = f->shared;
@@ -1977,7 +1977,7 @@ H5F__vfd_swmr_construct_ud_hdr(H5F_vfd_swmr_updater_t *updater)
uint32_t metadata_chksum; /* Computed metadata checksum value */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Encode metadata file header */
p = image;
@@ -2029,7 +2029,7 @@ H5F__vfd_swmr_construct_ud_cl(H5F_vfd_swmr_updater_t *updater)
unsigned i; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Encode ud cl */
p = image;
@@ -2117,7 +2117,7 @@ H5F__generate_updater_file(H5F_t *f, uint32_t num_entries, uint16_t flags, uint8
int sz;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Updater file header fields */
updater.version = H5F_UD_VERSION;
diff --git a/src/H5G.c b/src/H5G.c
index deaf792..2593289 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -152,7 +152,7 @@ H5G__create_api_common(hid_t loc_id, const char *name, hid_t lcpl_id, hid_t gcpl
H5VL_loc_params_t loc_params; /* Location parameters for object access */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if (!name)
@@ -382,7 +382,7 @@ H5G__open_api_common(hid_t loc_id, const char *name, hid_t gapl_id, void **token
H5VL_loc_params_t loc_params; /* Location parameters for object access */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
if (!name)
@@ -549,7 +549,7 @@ H5G__get_info_api_common(hid_t loc_id, H5G_info_t *group_info /*out*/, void **to
H5I_type_t id_type; /* Type of ID */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
id_type = H5I_get_type(loc_id);
@@ -658,7 +658,7 @@ H5G__get_info_by_name_api_common(hid_t loc_id, const char *name, H5G_info_t *gro
H5VL_group_get_args_t vol_cb_args; /* Arguments to VOL callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
if (!group_info)
@@ -767,7 +767,7 @@ H5G__get_info_by_idx_api_common(hid_t loc_id, const char *group_name, H5_index_t
H5VL_group_get_args_t vol_cb_args; /* Arguments to VOL callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
if (!group_info)
diff --git a/src/H5Gbtree2.c b/src/H5Gbtree2.c
index dd147ae..eac1d51 100644
--- a/src/H5Gbtree2.c
+++ b/src/H5Gbtree2.c
@@ -149,7 +149,7 @@ H5G__dense_fh_name_cmp(const void *obj, size_t obj_len, void *_udata)
H5O_link_t * lnk; /* Pointer to link created from heap object */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Decode link information */
if (NULL == (lnk = (H5O_link_t *)H5O_msg_decode(udata->f, NULL, H5O_LINK_ID, obj_len,
@@ -191,7 +191,7 @@ H5G__dense_btree2_name_store(void *_nrecord, const void *_udata)
const H5G_bt2_ud_ins_t * udata = (const H5G_bt2_ud_ins_t *)_udata;
H5G_dense_bt2_name_rec_t *nrecord = (H5G_dense_bt2_name_rec_t *)_nrecord;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Copy user information info native record */
nrecord->hash = udata->common.name_hash;
@@ -221,7 +221,7 @@ H5G__dense_btree2_name_compare(const void *_bt2_udata, const void *_bt2_rec, int
const H5G_dense_bt2_name_rec_t *bt2_rec = (const H5G_dense_bt2_name_rec_t *)_bt2_rec;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(bt2_udata);
@@ -278,7 +278,7 @@ H5G__dense_btree2_name_encode(uint8_t *raw, const void *_nrecord, void H5_ATTR_U
{
const H5G_dense_bt2_name_rec_t *nrecord = (const H5G_dense_bt2_name_rec_t *)_nrecord;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Encode the record's fields */
UINT32ENCODE(raw, nrecord->hash)
@@ -305,7 +305,7 @@ H5G__dense_btree2_name_decode(const uint8_t *raw, void *_nrecord, void H5_ATTR_U
{
H5G_dense_bt2_name_rec_t *nrecord = (H5G_dense_bt2_name_rec_t *)_nrecord;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Decode the record's fields */
UINT32DECODE(raw, nrecord->hash)
@@ -334,7 +334,7 @@ H5G__dense_btree2_name_debug(FILE *stream, int indent, int fwidth, const void *_
const H5G_dense_bt2_name_rec_t *nrecord = (const H5G_dense_bt2_name_rec_t *)_nrecord;
unsigned u; /* Local index variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDfprintf(stream, "%*s%-*s {%x, ", indent, "", fwidth, "Record:", (unsigned)nrecord->hash);
for (u = 0; u < H5G_DENSE_FHEAP_ID_LEN; u++)
@@ -362,7 +362,7 @@ H5G__dense_btree2_corder_store(void *_nrecord, const void *_udata)
const H5G_bt2_ud_ins_t * udata = (const H5G_bt2_ud_ins_t *)_udata;
H5G_dense_bt2_corder_rec_t *nrecord = (H5G_dense_bt2_corder_rec_t *)_nrecord;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Copy user information info native record */
nrecord->corder = udata->common.corder;
@@ -391,7 +391,7 @@ H5G__dense_btree2_corder_compare(const void *_bt2_udata, const void *_bt2_rec, i
const H5G_bt2_ud_common_t * bt2_udata = (const H5G_bt2_ud_common_t *)_bt2_udata;
const H5G_dense_bt2_corder_rec_t *bt2_rec = (const H5G_dense_bt2_corder_rec_t *)_bt2_rec;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(bt2_udata);
@@ -426,7 +426,7 @@ H5G__dense_btree2_corder_encode(uint8_t *raw, const void *_nrecord, void H5_ATTR
{
const H5G_dense_bt2_corder_rec_t *nrecord = (const H5G_dense_bt2_corder_rec_t *)_nrecord;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Encode the record's fields */
INT64ENCODE(raw, nrecord->corder)
@@ -453,7 +453,7 @@ H5G__dense_btree2_corder_decode(const uint8_t *raw, void *_nrecord, void H5_ATTR
{
H5G_dense_bt2_corder_rec_t *nrecord = (H5G_dense_bt2_corder_rec_t *)_nrecord;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Decode the record's fields */
INT64DECODE(raw, nrecord->corder)
@@ -482,7 +482,7 @@ H5G__dense_btree2_corder_debug(FILE *stream, int indent, int fwidth, const void
const H5G_dense_bt2_corder_rec_t *nrecord = (const H5G_dense_bt2_corder_rec_t *)_nrecord;
unsigned u; /* Local index variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDfprintf(stream, "%*s%-*s {%llu, ", indent, "", fwidth, "Record:", (unsigned long long)nrecord->corder);
for (u = 0; u < H5G_DENSE_FHEAP_ID_LEN; u++)
diff --git a/src/H5Gcache.c b/src/H5Gcache.c
index 0ad3de0..4a7cb15 100644
--- a/src/H5Gcache.c
+++ b/src/H5Gcache.c
@@ -119,7 +119,7 @@ H5G__cache_node_get_initial_load_size(void *_udata, size_t *image_len)
{
H5F_t *f = (H5F_t *)_udata; /* User data for callback */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(f);
@@ -161,7 +161,7 @@ H5G__cache_node_deserialize(const void *_image, size_t len, void *_udata, hbool_
const uint8_t *image_end = image + len - 1; /* Pointer to end of image buffer */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(image);
@@ -225,7 +225,7 @@ H5G__cache_node_image_len(const void *_thing, size_t *image_len)
{
const H5G_node_t *sym = (const H5G_node_t *)_thing; /* Pointer to object */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(sym);
@@ -261,7 +261,7 @@ H5G__cache_node_serialize(const H5F_t *f, void *_image, size_t len, void *_thing
uint8_t * image = (uint8_t *)_image; /* Pointer into raw data buffer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f);
@@ -318,7 +318,7 @@ H5G__cache_node_free_icr(void *_thing)
H5G_node_t *sym = (H5G_node_t *)_thing; /* Pointer to the object */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(sym);
diff --git a/src/H5Gcompact.c b/src/H5Gcompact.c
index 4988738..d98e047 100644
--- a/src/H5Gcompact.c
+++ b/src/H5Gcompact.c
@@ -83,7 +83,7 @@ H5G__compact_build_table_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, void
H5G_iter_bt_t * udata = (H5G_iter_bt_t *)_udata; /* 'User data' passed in */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check arguments */
HDassert(lnk);
@@ -121,7 +121,7 @@ H5G__compact_build_table(const H5O_loc_t *oloc, const H5O_linfo_t *linfo, H5_ind
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(oloc);
@@ -266,7 +266,7 @@ H5G__compact_remove_common_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, vo
H5G_iter_rm_t * udata = (H5G_iter_rm_t *)_udata; /* 'User data' passed in */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check arguments */
HDassert(lnk);
@@ -435,7 +435,7 @@ H5G__compact_lookup_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, void *_ud
H5G_iter_lkp_t * udata = (H5G_iter_lkp_t *)_udata; /* 'User data' passed in */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check arguments */
HDassert(lnk);
diff --git a/src/H5Gdense.c b/src/H5Gdense.c
index 753936b..31ae1f3 100644
--- a/src/H5Gdense.c
+++ b/src/H5Gdense.c
@@ -458,7 +458,7 @@ H5G__dense_lookup_cb(const void *_lnk, void *_user_lnk)
H5O_link_t * user_lnk = (H5O_link_t *)_user_lnk; /* User data from v2 B-tree link lookup */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -555,7 +555,7 @@ H5G__dense_lookup_by_idx_fh_cb(const void *obj, size_t obj_len, void *_udata)
H5O_link_t * tmp_lnk = NULL; /* Temporary pointer to link */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Decode link information & keep a copy */
if (NULL == (tmp_lnk = (H5O_link_t *)H5O_msg_decode(udata->f, NULL, H5O_LINK_ID, obj_len,
@@ -594,7 +594,7 @@ H5G__dense_lookup_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
H5G_fh_ud_lbi_t fh_udata; /* User data for fractal heap 'op' callback */
int ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Prepare user data for callback */
/* down */
@@ -736,7 +736,7 @@ H5G__dense_build_table_cb(const H5O_link_t *lnk, void *_udata)
H5G_dense_bt_ud_t *udata = (H5G_dense_bt_ud_t *)_udata; /* 'User data' passed in */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check arguments */
HDassert(lnk);
@@ -834,7 +834,7 @@ H5G__dense_iterate_fh_cb(const void *obj, size_t obj_len, void *_udata)
H5G_fh_ud_it_t *udata = (H5G_fh_ud_it_t *)_udata; /* User data for fractal heap 'op' callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Decode link information & keep a copy */
/* (we make a copy instead of calling the user/library callback directly in
@@ -870,7 +870,7 @@ H5G__dense_iterate_bt2_cb(const void *_record, void *_bt2_udata)
H5G_bt2_ud_it_t * bt2_udata = (H5G_bt2_ud_it_t *)_bt2_udata; /* User data for callback */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check for skipping links */
if (bt2_udata->skip > 0)
@@ -1038,7 +1038,7 @@ H5G__dense_get_name_by_idx_fh_cb(const void *obj, size_t obj_len, void *_udata)
H5O_link_t * lnk; /* Pointer to link created from heap object */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Decode link information */
if (NULL == (lnk = (H5O_link_t *)H5O_msg_decode(udata->f, NULL, H5O_LINK_ID, obj_len,
@@ -1082,7 +1082,7 @@ H5G__dense_get_name_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
H5G_fh_ud_gnbi_t fh_udata; /* User data for fractal heap 'op' callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Prepare user data for callback */
/* down */
@@ -1236,7 +1236,7 @@ H5G__dense_remove_fh_cb(const void *obj, size_t obj_len, void *_udata)
H5B2_t * bt2 = NULL; /* v2 B-tree handle for index */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Decode link information */
if (NULL == (lnk = (H5O_link_t *)H5O_msg_decode(udata->f, NULL, H5O_LINK_ID, obj_len,
@@ -1301,7 +1301,7 @@ H5G__dense_remove_bt2_cb(const void *_record, void *_bt2_udata)
H5G_fh_ud_rm_t fh_udata; /* User data for fractal heap 'op' callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Set up the user data for fractal heap 'op' callback */
fh_udata.f = bt2_udata->common.f;
@@ -1403,7 +1403,7 @@ H5G__dense_remove_by_idx_fh_cb(const void *obj, size_t obj_len, void *_udata)
H5G_fh_ud_rmbi_t *udata = (H5G_fh_ud_rmbi_t *)_udata; /* User data for fractal heap 'op' callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Decode link information */
if (NULL == (udata->lnk = (H5O_link_t *)H5O_msg_decode(udata->f, NULL, H5O_LINK_ID, obj_len,
@@ -1437,7 +1437,7 @@ H5G__dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
const uint8_t * heap_id; /* Heap ID for link */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Determine the index being used */
if (bt2_udata->idx_type == H5_INDEX_NAME) {
diff --git a/src/H5Gdeprec.c b/src/H5Gdeprec.c
index 7c0404f..e00a90b 100644
--- a/src/H5Gdeprec.c
+++ b/src/H5Gdeprec.c
@@ -1009,7 +1009,7 @@ H5G__get_objinfo_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char *name,
H5G_trav_goi_t *udata = (H5G_trav_goi_t *)_udata; /* User data passed in */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the name in this group resolved to a valid link */
if (lnk == NULL && obj_loc == NULL)
diff --git a/src/H5Gint.c b/src/H5Gint.c
index ba0cb6d..0c4bee2 100644
--- a/src/H5Gint.c
+++ b/src/H5Gint.c
@@ -214,7 +214,7 @@ H5G__close_cb(H5VL_object_t *grp_vol_obj, void **request)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(grp_vol_obj);
@@ -531,7 +531,7 @@ H5G__open_oid(H5G_t *grp)
hbool_t obj_opened = FALSE;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(grp);
@@ -841,7 +841,7 @@ H5G__iterate_cb(const H5O_link_t *lnk, void *_udata)
H5G_iter_appcall_ud_t *udata = (H5G_iter_appcall_ud_t *)_udata; /* User data for callback */
herr_t ret_value = H5_ITER_ERROR; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(lnk);
@@ -949,7 +949,7 @@ done:
static herr_t
H5G__free_visit_visited(void *item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED *operator_data /*in,out*/)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
item = H5FL_FREE(H5_obj_t, item);
@@ -983,7 +983,7 @@ H5G__visit_cb(const H5O_link_t *lnk, void *_udata)
size_t len_needed; /* Length of path string needed */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(lnk);
diff --git a/src/H5Glink.c b/src/H5Glink.c
index 629cb11..a02935f 100644
--- a/src/H5Glink.c
+++ b/src/H5Glink.c
@@ -95,7 +95,7 @@ static int H5G__link_cmp_corder_dec(const void *lnk1, const void *lnk2);
static int
H5G__link_cmp_name_inc(const void *lnk1, const void *lnk2)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
FUNC_LEAVE_NOAPI(HDstrcmp(((const H5O_link_t *)lnk1)->name, ((const H5O_link_t *)lnk2)->name))
} /* end H5G__link_cmp_name_inc() */
@@ -120,7 +120,7 @@ H5G__link_cmp_name_inc(const void *lnk1, const void *lnk2)
static int
H5G__link_cmp_name_dec(const void *lnk1, const void *lnk2)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
FUNC_LEAVE_NOAPI(HDstrcmp(((const H5O_link_t *)lnk2)->name, ((const H5O_link_t *)lnk1)->name))
} /* end H5G__link_cmp_name_dec() */
@@ -146,7 +146,7 @@ H5G__link_cmp_corder_inc(const void *lnk1, const void *lnk2)
{
int ret_value = -1; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
if (((const H5O_link_t *)lnk1)->corder < ((const H5O_link_t *)lnk2)->corder)
ret_value = -1;
@@ -179,7 +179,7 @@ H5G__link_cmp_corder_dec(const void *lnk1, const void *lnk2)
{
int ret_value = -1; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
if (((const H5O_link_t *)lnk1)->corder < ((const H5O_link_t *)lnk2)->corder)
ret_value = 1;
diff --git a/src/H5Gloc.c b/src/H5Gloc.c
index 2844c66..346ecdc 100644
--- a/src/H5Gloc.c
+++ b/src/H5Gloc.c
@@ -389,7 +389,7 @@ H5G__loc_find_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char *name,
H5G_loc_fnd_t *udata = (H5G_loc_fnd_t *)_udata; /* User data passed in */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the name in this group resolved to a valid object */
if (obj_loc == NULL)
@@ -467,7 +467,7 @@ H5G__loc_find_by_idx_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_
hbool_t obj_exists = FALSE; /* Whether the object exists (unused) */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the name in this group resolved to a valid link */
if (obj_loc == NULL)
@@ -613,7 +613,7 @@ H5G__loc_exists_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ATTR_
hbool_t *exists = (hbool_t *)_udata; /* User data passed in */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the name in this group resolved to a valid object */
if (obj_loc == NULL)
@@ -685,7 +685,7 @@ H5G__loc_addr_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ATTR_UN
haddr_t *udata = (haddr_t *)_udata; /* User data passed in */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the name in this group resolved to a valid link */
if (obj_loc == NULL)
@@ -755,7 +755,7 @@ H5G__loc_info_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ATTR_UN
H5G_loc_info_t *udata = (H5G_loc_info_t *)_udata; /* User data passed in */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the name in this group resolved to a valid link */
if (obj_loc == NULL)
@@ -831,7 +831,7 @@ H5G__loc_native_info_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_
H5G_loc_native_info_t *udata = (H5G_loc_native_info_t *)_udata; /* User data passed in */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the name in this group resolved to a valid link */
if (obj_loc == NULL)
@@ -909,7 +909,7 @@ H5G__loc_set_comment_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_
htri_t exists; /* Whether a "comment" message already exists */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the name in this group resolved to a valid link */
if (obj_loc == NULL)
@@ -998,7 +998,7 @@ H5G__loc_get_comment_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_
H5O_name_t comment; /* Object header "comment" message */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the name in this group resolved to a valid link */
if (obj_loc == NULL)
diff --git a/src/H5Gmodule.h b/src/H5Gmodule.h
index a0e121d..93e7184 100644
--- a/src/H5Gmodule.h
+++ b/src/H5Gmodule.h
@@ -25,9 +25,8 @@
* reporting macros.
*/
#define H5G_MODULE
-#define H5_MY_PKG H5G
-#define H5_MY_PKG_ERR H5E_SYM
-#define H5_MY_PKG_INIT YES
+#define H5_MY_PKG H5G
+#define H5_MY_PKG_ERR H5E_SYM
/** \defgroup H5G H5G
*
diff --git a/src/H5Gname.c b/src/H5Gname.c
index c139a4e..7002daa 100644
--- a/src/H5Gname.c
+++ b/src/H5Gname.c
@@ -212,7 +212,7 @@ H5G__common_path(const H5RS_str_t *fullpath_r, const H5RS_str_t *prefix_r)
size_t nchars1, nchars2; /* Number of characters in components */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Get component of each name */
fullpath = H5RS_get_str(fullpath_r);
@@ -273,7 +273,7 @@ H5G__build_fullpath(const char *prefix, const char *name)
{
H5RS_str_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(prefix);
@@ -597,7 +597,7 @@ H5G__name_move_path(H5RS_str_t **path_r_ptr, const char *full_suffix, const char
size_t full_suffix_len; /* Length of full suffix */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(path_r_ptr && *path_r_ptr);
@@ -690,7 +690,7 @@ H5G__name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
hbool_t obj_in_child = FALSE; /* Flag to indicate that the object is in the child mount hier. */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(obj_ptr);
@@ -1086,7 +1086,7 @@ H5G__get_name_by_addr_cb(hid_t gid, const char *path, const H5L_info2_t *linfo,
hbool_t obj_found = FALSE; /* Object at 'path' found */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(path);
diff --git a/src/H5Gnode.c b/src/H5Gnode.c
index d73888e..aabb6a7 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -139,7 +139,7 @@ H5FL_SEQ_DEFINE(H5G_entry_t);
static H5UC_t *
H5G__node_get_shared(const H5F_t *f, const void H5_ATTR_UNUSED *_udata)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(f);
@@ -164,7 +164,7 @@ H5G__node_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key)
{
H5G_node_key_t *key = (H5G_node_key_t *)_key;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(shared);
HDassert(raw);
@@ -192,7 +192,7 @@ H5G__node_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key)
{
const H5G_node_key_t *key = (const H5G_node_key_t *)_key;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(shared);
HDassert(raw);
@@ -221,7 +221,7 @@ H5G__node_debug_key(FILE *stream, int indent, int fwidth, const void *_key, cons
const H5G_node_key_t * key = (const H5G_node_key_t *)_key;
const H5G_bt_common_t *udata = (const H5G_bt_common_t *)_udata;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(key);
@@ -300,7 +300,7 @@ H5G__node_create(H5F_t *f, H5B_ins_t H5_ATTR_UNUSED op, void *_lt_key, void H5_A
H5G_node_t * sym = NULL;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -370,7 +370,7 @@ H5G__node_cmp2(void *_lt_key, void *_udata, void *_rt_key)
const char * s1, *s2;
int ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(udata && udata->heap);
@@ -423,7 +423,7 @@ H5G__node_cmp3(void *_lt_key, void *_udata, void *_rt_key)
const char * s;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(udata && udata->heap);
@@ -481,7 +481,7 @@ H5G__node_found(H5F_t *f, haddr_t addr, const void H5_ATTR_UNUSED *_lt_key, hboo
const char * s;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -579,7 +579,7 @@ H5G__node_insert(H5F_t *f, haddr_t addr, void H5_ATTR_UNUSED *_lt_key, hbool_t H
H5G_entry_t ent; /* Entry to insert in node */
H5B_ins_t ret_value = H5B_INS_ERROR;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -737,7 +737,7 @@ H5G__node_remove(H5F_t *f, haddr_t addr, void H5_ATTR_NDEBUG_UNUSED *_lt_key /*i
int cmp = 1;
H5B_ins_t ret_value = H5B_INS_ERROR;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(f);
diff --git a/src/H5Gobj.c b/src/H5Gobj.c
index 66917c2..5412b52 100644
--- a/src/H5Gobj.c
+++ b/src/H5Gobj.c
@@ -358,7 +358,7 @@ H5G__obj_compact_to_dense_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, voi
H5G_obj_oh_it_ud1_t *udata = (H5G_obj_oh_it_ud1_t *)_udata; /* 'User data' passed in */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check arguments */
HDassert(lnk);
@@ -391,7 +391,7 @@ H5G__obj_stab_to_new_cb(const H5O_link_t *lnk, void *_udata)
H5G_obj_stab_it_ud1_t *udata = (H5G_obj_stab_it_ud1_t *)_udata; /* 'User data' passed in */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check arguments */
HDassert(lnk);
@@ -835,7 +835,7 @@ H5G__obj_remove_update_linfo(const H5O_loc_t *oloc, H5O_linfo_t *linfo)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(oloc);
diff --git a/src/H5Goh.c b/src/H5Goh.c
index 013ea3c..fcc62de 100644
--- a/src/H5Goh.c
+++ b/src/H5Goh.c
@@ -97,7 +97,7 @@ H5O__group_get_copy_file_udata(void)
{
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Allocate space for the 'copy file' user data for copying groups.
* Currently this is only a ginfo, so there is no specific struct type for
@@ -127,7 +127,7 @@ H5O__group_free_copy_file_udata(void *_udata)
{
H5G_copy_file_ud_t *udata = (H5G_copy_file_ud_t *)_udata;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(udata);
@@ -165,7 +165,7 @@ H5O__group_isa(const H5O_t *oh)
htri_t linfo_exists; /* Whether the 'linfo' message is in the object header */
htri_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(oh);
@@ -200,7 +200,7 @@ H5O__group_open(const H5G_loc_t *obj_loc, H5I_type_t *opened_type)
H5G_t *grp = NULL; /* Group opened */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(obj_loc);
@@ -240,7 +240,7 @@ H5O__group_create(H5F_t *f, void *_crt_info, H5G_loc_t *obj_loc)
H5G_t * grp = NULL; /* New group created */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f);
@@ -287,7 +287,7 @@ H5O__group_get_oloc(hid_t obj_id)
H5G_t * grp; /* Group opened */
H5O_loc_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Get the group */
if (NULL == (grp = (H5G_t *)H5VL_object(obj_id)))
@@ -323,7 +323,7 @@ H5O__group_bh_info(const H5O_loc_t *loc, H5O_t *oh, H5_ih_info_t *bh_info)
H5B2_t *bt2_corder = NULL; /* v2 B-tree handle for creation order index */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(loc);
diff --git a/src/H5Gstab.c b/src/H5Gstab.c
index ca74aa5..fb8c4d4 100644
--- a/src/H5Gstab.c
+++ b/src/H5Gstab.c
@@ -681,7 +681,7 @@ H5G__stab_get_name_by_idx_cb(const H5G_entry_t *ent, void *_udata)
const char * name; /* Pointer to name string in heap */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(ent);
@@ -808,7 +808,7 @@ H5G__stab_lookup_cb(const H5G_entry_t *ent, void *_udata)
H5G_stab_fnd_ud_t *udata = (H5G_stab_fnd_ud_t *)_udata; /* 'User data' passed in */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check for setting link info */
if (udata->lnk)
@@ -901,7 +901,7 @@ H5G__stab_lookup_by_idx_cb(const H5G_entry_t *ent, void *_udata)
const char * name; /* Pointer to name string in heap */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(ent);
diff --git a/src/H5Gtest.c b/src/H5Gtest.c
index 7ae41ed..4d7dfa4 100644
--- a/src/H5Gtest.c
+++ b/src/H5Gtest.c
@@ -721,7 +721,7 @@ H5G__verify_cached_stabs_test_cb(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, h
unsigned i;
int ret_value = H5_ITER_CONT;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(f);
diff --git a/src/H5Gtraverse.c b/src/H5Gtraverse.c
index af29614..15fb9a4 100644
--- a/src/H5Gtraverse.c
+++ b/src/H5Gtraverse.c
@@ -111,7 +111,7 @@ H5G__traverse_slink_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc, const char H5_ATTR_UNU
H5G_trav_slink_t *udata = (H5G_trav_slink_t *)_udata; /* User data passed in */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check for dangling soft link */
if (obj_loc == NULL) {
@@ -163,7 +163,7 @@ H5G__traverse_ud(const H5G_loc_t *grp_loc /*in,out*/, const H5O_link_t *lnk, H5G
hid_t cur_grp = (-1);
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(grp_loc);
@@ -284,7 +284,7 @@ H5G__traverse_slink(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, H5G_loc_t *
hbool_t tmp_grp_loc_set = FALSE; /* Flag to indicate that tmp group location is initialized */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(grp_loc);
@@ -475,7 +475,7 @@ H5G__traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, H5G
hbool_t last_comp = FALSE; /* Flag to indicate that a component is the last component in the name */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check parameters */
HDassert(_loc);
diff --git a/src/H5HFbtree2.c b/src/H5HFbtree2.c
index 353d7d7..8f33f45 100644
--- a/src/H5HFbtree2.c
+++ b/src/H5HFbtree2.c
@@ -192,7 +192,7 @@ H5HF__huge_bt2_crt_context(void *_f)
H5HF_huge_bt2_ctx_t *ctx; /* Callback context structure */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(f);
@@ -232,7 +232,7 @@ H5HF__huge_bt2_dst_context(void *_ctx)
{
H5HF_huge_bt2_ctx_t *ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(ctx);
@@ -317,7 +317,7 @@ done:
static herr_t
H5HF__huge_bt2_indir_store(void *nrecord, const void *udata)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
*(H5HF_huge_bt2_indir_rec_t *)nrecord = *(const H5HF_huge_bt2_indir_rec_t *)udata;
@@ -341,7 +341,7 @@ H5HF__huge_bt2_indir_store(void *nrecord, const void *udata)
static herr_t
H5HF__huge_bt2_indir_compare(const void *_rec1, const void *_rec2, int *result)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
*result = (int)(((const H5HF_huge_bt2_indir_rec_t *)_rec1)->id -
((const H5HF_huge_bt2_indir_rec_t *)_rec2)->id);
@@ -368,7 +368,7 @@ H5HF__huge_bt2_indir_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
H5HF_huge_bt2_ctx_t * ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
const H5HF_huge_bt2_indir_rec_t *nrecord = (const H5HF_huge_bt2_indir_rec_t *)_nrecord;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(ctx);
@@ -400,7 +400,7 @@ H5HF__huge_bt2_indir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
H5HF_huge_bt2_ctx_t * ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
H5HF_huge_bt2_indir_rec_t *nrecord = (H5HF_huge_bt2_indir_rec_t *)_nrecord;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(ctx);
@@ -432,7 +432,7 @@ H5HF__huge_bt2_indir_debug(FILE *stream, int indent, int fwidth, const void *_nr
{
const H5HF_huge_bt2_indir_rec_t *nrecord = (const H5HF_huge_bt2_indir_rec_t *)_nrecord;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE ", %" PRIuHSIZE "}\n", indent, "", fwidth,
"Record:", nrecord->addr, nrecord->len, nrecord->id);
@@ -515,7 +515,7 @@ done:
static herr_t
H5HF__huge_bt2_filt_indir_store(void *nrecord, const void *udata)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
*(H5HF_huge_bt2_filt_indir_rec_t *)nrecord = *(const H5HF_huge_bt2_filt_indir_rec_t *)udata;
@@ -539,7 +539,7 @@ H5HF__huge_bt2_filt_indir_store(void *nrecord, const void *udata)
static herr_t
H5HF__huge_bt2_filt_indir_compare(const void *_rec1, const void *_rec2, int *result)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
*result = (int)(((const H5HF_huge_bt2_filt_indir_rec_t *)_rec1)->id -
((const H5HF_huge_bt2_filt_indir_rec_t *)_rec2)->id);
@@ -566,7 +566,7 @@ H5HF__huge_bt2_filt_indir_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
H5HF_huge_bt2_ctx_t * ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
const H5HF_huge_bt2_filt_indir_rec_t *nrecord = (const H5HF_huge_bt2_filt_indir_rec_t *)_nrecord;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(ctx);
@@ -600,7 +600,7 @@ H5HF__huge_bt2_filt_indir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
H5HF_huge_bt2_ctx_t * ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
H5HF_huge_bt2_filt_indir_rec_t *nrecord = (H5HF_huge_bt2_filt_indir_rec_t *)_nrecord;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(ctx);
@@ -634,7 +634,7 @@ H5HF__huge_bt2_filt_indir_debug(FILE *stream, int indent, int fwidth, const void
{
const H5HF_huge_bt2_filt_indir_rec_t *nrecord = (const H5HF_huge_bt2_filt_indir_rec_t *)_nrecord;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE ", %x, %" PRIuHSIZE ", %" PRIuHSIZE "}\n",
indent, "", fwidth, "Record:", nrecord->addr, nrecord->len, nrecord->filter_mask,
@@ -693,7 +693,7 @@ done:
static herr_t
H5HF__huge_bt2_dir_store(void *nrecord, const void *udata)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
*(H5HF_huge_bt2_dir_rec_t *)nrecord = *(const H5HF_huge_bt2_dir_rec_t *)udata;
@@ -720,7 +720,7 @@ H5HF__huge_bt2_dir_compare(const void *_rec1, const void *_rec2, int *result)
const H5HF_huge_bt2_dir_rec_t *rec1 = (const H5HF_huge_bt2_dir_rec_t *)_rec1;
const H5HF_huge_bt2_dir_rec_t *rec2 = (const H5HF_huge_bt2_dir_rec_t *)_rec2;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
if (rec1->addr < rec2->addr)
*result = -1;
@@ -755,7 +755,7 @@ H5HF__huge_bt2_dir_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
H5HF_huge_bt2_ctx_t * ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
const H5HF_huge_bt2_dir_rec_t *nrecord = (const H5HF_huge_bt2_dir_rec_t *)_nrecord;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(ctx);
@@ -786,7 +786,7 @@ H5HF__huge_bt2_dir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
H5HF_huge_bt2_ctx_t * ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
H5HF_huge_bt2_dir_rec_t *nrecord = (H5HF_huge_bt2_dir_rec_t *)_nrecord;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(ctx);
@@ -817,7 +817,7 @@ H5HF__huge_bt2_dir_debug(FILE *stream, int indent, int fwidth, const void *_nrec
{
const H5HF_huge_bt2_dir_rec_t *nrecord = (const H5HF_huge_bt2_dir_rec_t *)_nrecord;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE "}\n", indent, "", fwidth,
"Record:", nrecord->addr, nrecord->len);
@@ -900,7 +900,7 @@ done:
static herr_t
H5HF__huge_bt2_filt_dir_store(void *nrecord, const void *udata)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
*(H5HF_huge_bt2_filt_dir_rec_t *)nrecord = *(const H5HF_huge_bt2_filt_dir_rec_t *)udata;
@@ -927,7 +927,7 @@ H5HF__huge_bt2_filt_dir_compare(const void *_rec1, const void *_rec2, int *resul
const H5HF_huge_bt2_filt_dir_rec_t *rec1 = (const H5HF_huge_bt2_filt_dir_rec_t *)_rec1;
const H5HF_huge_bt2_filt_dir_rec_t *rec2 = (const H5HF_huge_bt2_filt_dir_rec_t *)_rec2;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
if (rec1->addr < rec2->addr)
*result = -1;
@@ -962,7 +962,7 @@ H5HF__huge_bt2_filt_dir_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
H5HF_huge_bt2_ctx_t * ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
const H5HF_huge_bt2_filt_dir_rec_t *nrecord = (const H5HF_huge_bt2_filt_dir_rec_t *)_nrecord;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(ctx);
@@ -995,7 +995,7 @@ H5HF__huge_bt2_filt_dir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
H5HF_huge_bt2_ctx_t * ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
H5HF_huge_bt2_filt_dir_rec_t *nrecord = (H5HF_huge_bt2_filt_dir_rec_t *)_nrecord;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(ctx);
@@ -1028,7 +1028,7 @@ H5HF__huge_bt2_filt_dir_debug(FILE *stream, int indent, int fwidth, const void *
{
const H5HF_huge_bt2_filt_dir_rec_t *nrecord = (const H5HF_huge_bt2_filt_dir_rec_t *)_nrecord;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE ", %x, %" PRIuHSIZE "}\n", indent, "", fwidth,
"Record:", nrecord->addr, nrecord->len, nrecord->filter_mask, nrecord->obj_size);
diff --git a/src/H5HFcache.c b/src/H5HFcache.c
index 3a48018..f7e2e53 100644
--- a/src/H5HFcache.c
+++ b/src/H5HFcache.c
@@ -205,7 +205,7 @@ H5HF__hdr_prefix_decode(H5HF_hdr_t *hdr, const uint8_t **image_ref)
const uint8_t *image = *image_ref; /* Pointer into into supplied image */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(hdr);
@@ -248,7 +248,7 @@ done:
static herr_t
H5HF__dtable_decode(H5F_t *f, const uint8_t **pp, H5HF_dtable_t *dtable)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(f);
@@ -296,7 +296,7 @@ H5HF__dtable_decode(H5F_t *f, const uint8_t **pp, H5HF_dtable_t *dtable)
static herr_t
H5HF__dtable_encode(H5F_t *f, uint8_t **pp, const H5HF_dtable_t *dtable)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(f);
@@ -352,7 +352,7 @@ H5HF__cache_hdr_get_initial_load_size(void *_udata, size_t *image_len)
H5HF_hdr_cache_ud_t *udata = (H5HF_hdr_cache_ud_t *)_udata; /* Pointer to user data */
H5HF_hdr_t dummy_hdr; /* Dummy header -- to compute size */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(udata);
@@ -392,7 +392,7 @@ H5HF__cache_hdr_get_final_load_size(const void *_image, size_t H5_ATTR_NDEBUG_UN
H5HF_hdr_cache_ud_t *udata = (H5HF_hdr_cache_ud_t *)_udata; /* User data for callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(image);
@@ -436,7 +436,7 @@ H5HF__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
uint32_t computed_chksum; /* Computed metadata checksum value */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(image);
@@ -476,7 +476,7 @@ H5HF__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, hbool_
uint8_t heap_flags; /* Status flags for heap */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(image);
@@ -606,7 +606,7 @@ H5HF__cache_hdr_image_len(const void *_thing, size_t *image_len)
{
const H5HF_hdr_t *hdr = (const H5HF_hdr_t *)_thing; /* Fractal heap info */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(hdr);
@@ -647,7 +647,7 @@ H5HF__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t len,
H5HF_hdr_t *hdr = (H5HF_hdr_t *)_thing; /* Fractal heap info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f);
@@ -734,7 +734,7 @@ H5HF__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UN
uint32_t metadata_chksum; /* Computed metadata checksum value */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f);
@@ -846,7 +846,7 @@ H5HF__cache_hdr_free_icr(void *_thing)
H5HF_hdr_t *hdr = (H5HF_hdr_t *)_thing; /* Fractal heap info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(hdr);
@@ -880,7 +880,7 @@ H5HF__cache_iblock_get_initial_load_size(void *_udata, size_t *image_len)
{
H5HF_iblock_cache_ud_t *udata = (H5HF_iblock_cache_ud_t *)_udata; /* User data for callback */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(udata);
@@ -915,7 +915,7 @@ H5HF__cache_iblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN
uint32_t computed_chksum; /* Computed metadata checksum value */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(image);
@@ -962,7 +962,7 @@ H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
unsigned u; /* Local index variable */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(image);
@@ -1143,7 +1143,7 @@ H5HF__cache_iblock_image_len(const void *_thing, size_t *image_len)
{
const H5HF_indirect_t *iblock = (const H5HF_indirect_t *)_thing; /* Indirect block info */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(iblock);
@@ -1184,7 +1184,7 @@ H5HF__cache_iblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5
H5HF_indirect_t *iblock = (H5HF_indirect_t *)_thing; /* Indirect block info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f);
@@ -1312,7 +1312,7 @@ H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG
size_t u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(f);
@@ -1423,7 +1423,7 @@ H5HF__cache_iblock_notify(H5AC_notify_action_t action, void *_thing)
H5HF_indirect_t *iblock = (H5HF_indirect_t *)_thing; /* Indirect block info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(iblock);
@@ -1522,7 +1522,7 @@ H5HF__cache_iblock_free_icr(void *thing)
H5HF_indirect_t *iblock = (H5HF_indirect_t *)thing; /* Fractal heap indirect block to free */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(iblock);
@@ -1560,7 +1560,7 @@ H5HF__cache_dblock_get_initial_load_size(void *_udata, size_t *image_len)
const H5HF_parent_t * par_info; /* Pointer to parent information */
const H5HF_hdr_t * hdr; /* Shared fractal heap information */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(udata);
@@ -1615,7 +1615,7 @@ H5HF__cache_dblock_verify_chksum(const void *_image, size_t len, void *_udata)
uint8_t * chk_p; /* Pointer to the area for validating checksum */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(image);
@@ -1745,7 +1745,7 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbo
haddr_t heap_addr; /* Address of heap header in the file */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(image);
@@ -1921,7 +1921,7 @@ H5HF__cache_dblock_image_len(const void *_thing, size_t *image_len)
const H5HF_hdr_t * hdr; /* Shared fractal heap information */
size_t size;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(dblock);
@@ -2063,7 +2063,7 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
unsigned dblock_flags = 0;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f);
@@ -2427,7 +2427,7 @@ H5HF__cache_dblock_serialize(const H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *image,
H5HF_direct_t *dblock = (H5HF_direct_t *)_thing; /* Direct block info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(f);
@@ -2478,7 +2478,7 @@ H5HF__cache_dblock_notify(H5AC_notify_action_t action, void *_thing)
H5HF_direct_t *dblock = (H5HF_direct_t *)_thing; /* Fractal heap direct block */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(dblock);
@@ -2547,7 +2547,7 @@ H5HF__cache_dblock_free_icr(void *_thing)
H5HF_direct_t *dblock = (H5HF_direct_t *)_thing; /* Fractal heap direct block */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(dblock);
@@ -2582,7 +2582,7 @@ H5HF__cache_dblock_fsf_size(const void *_thing, hsize_t *fsf_size)
{
const H5HF_direct_t *dblock = (const H5HF_direct_t *)_thing; /* Fractal heap direct block */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(dblock);
@@ -2669,7 +2669,7 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
unsigned hdr_status = 0; /* Header cache entry status */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f);
@@ -3033,7 +3033,7 @@ H5HF__cache_verify_iblock_descendants_clean(H5F_t *f, haddr_t fd_parent_addr, H5
hbool_t has_iblocks = FALSE;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f);
@@ -3152,7 +3152,7 @@ H5HF__cache_verify_iblocks_dblocks_clean(H5F_t *f, haddr_t fd_parent_addr, H5HF_
haddr_t iblock_addr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f);
@@ -3317,7 +3317,7 @@ H5HF__cache_verify_descendant_iblocks_clean(H5F_t *f, haddr_t fd_parent_addr, H5
haddr_t iblock_addr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f);
diff --git a/src/H5HFdbg.c b/src/H5HFdbg.c
index d38ae20..41c9468 100644
--- a/src/H5HFdbg.c
+++ b/src/H5HFdbg.c
@@ -175,7 +175,7 @@ done:
static herr_t
H5HF__dtable_debug(const H5HF_dtable_t *dtable, FILE *stream, int indent, int fwidth)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/*
* Check arguments.
diff --git a/src/H5HFhdr.c b/src/H5HFhdr.c
index cd5ba23..cc315cd 100644
--- a/src/H5HFhdr.c
+++ b/src/H5HFhdr.c
@@ -148,7 +148,7 @@ H5HF__hdr_compute_free_space(H5HF_hdr_t *hdr, unsigned iblock_row)
unsigned curr_row; /* Current row in block */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/*
* Check arguments.
diff --git a/src/H5HFhuge.c b/src/H5HFhuge.c
index 83a61ec..824cfc9 100644
--- a/src/H5HFhuge.c
+++ b/src/H5HFhuge.c
@@ -96,7 +96,7 @@ H5HF__huge_bt2_create(H5HF_hdr_t *hdr)
H5B2_create_t bt2_cparam; /* v2 B-tree creation parameters */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -246,7 +246,7 @@ H5HF__huge_new_id(H5HF_hdr_t *hdr)
hsize_t new_id; /* New object's ID */
hsize_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -670,7 +670,7 @@ H5HF__huge_op_real(H5HF_hdr_t *hdr, const uint8_t *id, hbool_t is_read, H5HF_ope
unsigned filter_mask = 0; /* Filter mask for object (only used for filtered objects) */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
diff --git a/src/H5HFiblock.c b/src/H5HFiblock.c
index 9b69ec1..94538f7 100644
--- a/src/H5HFiblock.c
+++ b/src/H5HFiblock.c
@@ -99,7 +99,7 @@ H5HF__iblock_pin(H5HF_indirect_t *iblock)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(iblock);
@@ -164,7 +164,7 @@ H5HF__iblock_unpin(H5HF_indirect_t *iblock)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(iblock);
@@ -679,7 +679,7 @@ H5HF__man_iblock_root_halve(H5HF_indirect_t *iblock)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(iblock);
@@ -809,7 +809,7 @@ H5HF__man_iblock_root_revert(H5HF_indirect_t *root_iblock)
size_t dblock_size; /* Direct block's size */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
diff --git a/src/H5HFman.c b/src/H5HFman.c
index a362d99..90cbb57 100644
--- a/src/H5HFman.c
+++ b/src/H5HFman.c
@@ -306,7 +306,7 @@ H5HF__man_op_real(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op, void *
uint8_t *p; /* Temporary pointer to obj info in block */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
diff --git a/src/H5HFmodule.h b/src/H5HFmodule.h
index 7fab611..818c3d4 100644
--- a/src/H5HFmodule.h
+++ b/src/H5HFmodule.h
@@ -25,8 +25,7 @@
* reporting macros.
*/
#define H5HF_MODULE
-#define H5_MY_PKG H5HF
-#define H5_MY_PKG_ERR H5E_HEAP
-#define H5_MY_PKG_INIT NO
+#define H5_MY_PKG H5HF
+#define H5_MY_PKG_ERR H5E_HEAP
#endif /* H5HFmodule_H */
diff --git a/src/H5HFsection.c b/src/H5HFsection.c
index eec41a4..2472149 100644
--- a/src/H5HFsection.c
+++ b/src/H5HFsection.c
@@ -295,7 +295,7 @@ H5FS__sect_init_cls(H5FS_section_class_t *cls, H5HF_hdr_t *hdr)
H5HF_sect_private_t *cls_prvt; /* Pointer to class private info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(cls);
@@ -336,7 +336,7 @@ H5FS__sect_term_cls(H5FS_section_class_t *cls)
H5HF_sect_private_t *cls_prvt; /* Pointer to class private info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(cls);
@@ -375,7 +375,7 @@ H5FS__sect_node_new(unsigned sect_type, haddr_t sect_addr, hsize_t sect_size, H5
H5HF_free_section_t *new_sect; /* New section */
H5HF_free_section_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(H5F_addr_defined(sect_addr));
@@ -419,7 +419,7 @@ H5HF__sect_node_free(H5HF_free_section_t *sect, H5HF_indirect_t *iblock)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(sect);
@@ -507,7 +507,7 @@ H5HF__sect_single_locate_parent(H5HF_hdr_t *hdr, hbool_t refresh, H5HF_free_sect
hbool_t did_protect; /* Whether we protected the indirect block or not */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -713,7 +713,7 @@ H5HF__sect_single_full_dblock(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
size_t dblock_overhead; /* Direct block's overhead */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(sect);
@@ -776,7 +776,7 @@ H5HF__sect_single_add(H5FS_section_info_t **_sect, unsigned *flags, void *_udata
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Don't need to check section if we are deserializing, because it should
* have already been checked when it was first added
@@ -828,7 +828,7 @@ H5HF__sect_single_deserialize(const H5FS_section_class_t H5_ATTR_UNUSED *cls,
H5HF_free_section_t *new_sect; /* New section */
H5FS_section_info_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(H5F_addr_defined(sect_addr));
@@ -870,7 +870,7 @@ H5HF__sect_single_can_merge(const H5FS_section_info_t *_sect1, const H5FS_sectio
const H5HF_free_section_t *sect2 = (const H5HF_free_section_t *)_sect2; /* Fractal heap free section */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
HDassert(sect1);
@@ -915,7 +915,7 @@ H5HF__sect_single_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect
H5HF_hdr_t * hdr = udata->hdr; /* Fractal heap header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(sect1);
@@ -971,7 +971,7 @@ H5HF__sect_single_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
H5HF_hdr_t * hdr = udata->hdr; /* Fractal heap header */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
HDassert(sect);
@@ -1028,7 +1028,7 @@ H5HF__sect_single_shrink(H5FS_section_info_t **_sect, void *_udata)
size_t dblock_size; /* Section's direct block's size */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(sect);
@@ -1126,7 +1126,7 @@ H5HF__sect_single_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, const H5
{
const H5HF_free_section_t *sect = (const H5HF_free_section_t *)_sect; /* Pointer to section to check */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
HDassert(sect);
@@ -1215,7 +1215,7 @@ H5HF__sect_row_create(haddr_t sect_off, hsize_t sect_size, hbool_t is_first, uns
H5HF_free_section_t *sect = NULL; /* 'Row' section created */
H5HF_free_section_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(sect_size);
@@ -1260,7 +1260,7 @@ H5HF__sect_row_from_single(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, H5HF_dire
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -1425,7 +1425,7 @@ H5HF__sect_row_first(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(hdr);
@@ -1499,7 +1499,7 @@ H5HF__sect_row_parent_removed(H5HF_free_section_t *sect)
unsigned u; /* Local index value */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(sect);
@@ -1553,7 +1553,7 @@ H5HF__sect_row_init_cls(H5FS_section_class_t *cls, void *_udata)
H5HF_hdr_t *hdr = (H5HF_hdr_t *)_udata; /* Fractal heap header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(cls);
@@ -1595,7 +1595,7 @@ H5HF__sect_row_term_cls(H5FS_section_class_t *cls)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(cls);
@@ -1629,7 +1629,7 @@ H5HF__sect_row_serialize(const H5FS_section_class_t *cls, const H5FS_section_inf
const H5HF_free_section_t *sect = (const H5HF_free_section_t *)_sect;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(cls);
@@ -1672,7 +1672,7 @@ H5HF__sect_row_deserialize(const H5FS_section_class_t *cls, const uint8_t *buf,
H5HF_hdr_t * hdr; /* Fractal heap header */
H5FS_section_info_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(cls);
@@ -1715,7 +1715,7 @@ H5HF__sect_row_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section_i
H5HF_free_section_t * top_indir_sect1, *top_indir_sect2; /* Top indirect section for each row */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
HDassert(sect1);
@@ -1771,7 +1771,7 @@ H5HF__sect_row_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2,
H5HF_hdr_t * hdr = udata->hdr; /* Fractal heap header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(sect1);
@@ -1825,7 +1825,7 @@ H5HF__sect_row_can_shrink(const H5FS_section_info_t *_sect, void H5_ATTR_UNUSED
H5HF_hdr_t * hdr = udata->hdr; /* Fractal heap header */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
HDassert(sect);
@@ -1862,7 +1862,7 @@ H5HF__sect_row_shrink(H5FS_section_info_t **_sect, void *_udata)
H5HF_hdr_t * hdr = udata->hdr; /* Fractal heap header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(sect);
@@ -1902,7 +1902,7 @@ H5HF__sect_row_free_real(H5HF_free_section_t *sect)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(sect);
@@ -1934,7 +1934,7 @@ H5HF__sect_row_free(H5FS_section_info_t *_sect)
H5HF_free_section_t *sect = (H5HF_free_section_t *)_sect; /* Pointer to section to free */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(sect);
HDassert(sect->u.row.under);
@@ -1973,7 +1973,7 @@ H5HF__sect_row_valid(const H5FS_section_class_t *cls, const H5FS_section_info_t
const H5HF_free_section_t *indir_sect; /* Pointer to underlying indirect section */
unsigned H5_ATTR_NDEBUG_UNUSED indir_idx; /* Index of row in underlying indirect section's row array */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Basic sanity check */
HDassert(cls);
@@ -2029,7 +2029,7 @@ H5HF__sect_row_debug(const H5FS_section_info_t *_sect, FILE *stream, int indent,
{
const H5HF_free_section_t *sect = (const H5HF_free_section_t *)_sect; /* Section to dump info */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
HDassert(sect);
@@ -2067,7 +2067,7 @@ H5HF__sect_indirect_iblock_off(const H5HF_free_section_t *sect)
{
hsize_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/*
* Check arguments.
@@ -2097,7 +2097,7 @@ H5HF__sect_indirect_top(H5HF_free_section_t *sect)
{
H5HF_free_section_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/*
* Check arguments.
@@ -2132,7 +2132,7 @@ H5HF__sect_indirect_init_cls(H5FS_section_class_t *cls, void *_udata)
H5HF_hdr_t *hdr = (H5HF_hdr_t *)_udata; /* Fractal heap header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(cls);
@@ -2168,7 +2168,7 @@ H5HF__sect_indirect_term_cls(H5FS_section_class_t *cls)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(cls);
@@ -2201,7 +2201,7 @@ H5HF__sect_indirect_new(H5HF_hdr_t *hdr, haddr_t sect_off, hsize_t sect_size, H5
H5HF_free_section_t *sect = NULL; /* 'Indirect' free space section to add */
H5HF_free_section_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -2268,7 +2268,7 @@ H5HF__sect_indirect_for_row(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, H5HF_free_
H5HF_free_section_t *sect = NULL; /* 'Indirect' free space section to add */
H5HF_free_section_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -2340,7 +2340,7 @@ H5HF__sect_indirect_init_rows(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, hbool_
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -2658,7 +2658,7 @@ H5HF__sect_indirect_decr(H5HF_free_section_t *sect)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -2710,7 +2710,7 @@ H5HF__sect_indirect_revive_row(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
hbool_t did_protect; /* Whether we protected the indirect block or not */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -2754,7 +2754,7 @@ H5HF__sect_indirect_revive(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, H5HF_indi
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -2819,7 +2819,7 @@ H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect, h
H5HF_free_section_t *peer_sect = NULL; /* Peer indirect section */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -3085,7 +3085,7 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned
H5HF_free_section_t *peer_sect = NULL; /* Peer indirect section */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -3315,7 +3315,7 @@ H5HF__sect_indirect_is_first(H5HF_free_section_t *sect)
{
hbool_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(sect);
@@ -3348,7 +3348,7 @@ H5HF__sect_indirect_first(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(hdr);
@@ -3396,7 +3396,7 @@ done:
static H5HF_indirect_t *
H5HF__sect_indirect_get_iblock(H5HF_free_section_t *sect)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/*
* Check arguments.
@@ -3437,7 +3437,7 @@ H5HF__sect_indirect_merge_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect1, H
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check parameters */
HDassert(hdr);
@@ -3679,7 +3679,7 @@ H5HF__sect_indirect_build_parent(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
unsigned par_entry; /* Entry within parent indirect section */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check parameters */
HDassert(hdr);
@@ -3757,7 +3757,7 @@ H5HF__sect_indirect_shrink(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check parameters */
HDassert(hdr);
@@ -3812,7 +3812,7 @@ H5HF__sect_indirect_serialize(H5HF_hdr_t *hdr, const H5HF_free_section_t *sect,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(hdr);
@@ -3877,7 +3877,7 @@ H5HF__sect_indirect_deserialize(H5HF_hdr_t *hdr, const uint8_t *buf, haddr_t sec
unsigned end_col; /* End column in indirect block */
H5FS_section_info_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(hdr);
@@ -3946,7 +3946,7 @@ H5HF__sect_indirect_free(H5HF_free_section_t *sect)
H5HF_indirect_t *iblock = NULL; /* Indirect block for section */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(sect);
@@ -3993,7 +3993,7 @@ H5HF__sect_indirect_valid(const H5HF_hdr_t *hdr, const H5HF_free_section_t *sect
unsigned end_entry; /* Entry for last block covered */
unsigned u; /* Local index variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check arguments */
HDassert(hdr);
@@ -4090,7 +4090,7 @@ H5HF__sect_indirect_valid(const H5HF_hdr_t *hdr, const H5HF_free_section_t *sect
static herr_t
H5HF__sect_indirect_debug(const H5HF_free_section_t *sect, FILE *stream, int indent, int fwidth)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
HDassert(sect);
diff --git a/src/H5HFspace.c b/src/H5HFspace.c
index 67f9b6f..d166cf5 100644
--- a/src/H5HFspace.c
+++ b/src/H5HFspace.c
@@ -241,7 +241,7 @@ H5HF__space_revert_root_cb(H5FS_section_info_t *_sect, void H5_ATTR_UNUSED *_uda
H5HF_free_section_t *sect = (H5HF_free_section_t *)_sect; /* Section to dump info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -323,7 +323,7 @@ H5HF__space_create_root_cb(H5FS_section_info_t *_sect, void *_udata)
H5HF_indirect_t * root_iblock = (H5HF_indirect_t *)_udata; /* User data for callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
diff --git a/src/H5HFtiny.c b/src/H5HFtiny.c
index eca177c..f1fcf90 100644
--- a/src/H5HFtiny.c
+++ b/src/H5HFtiny.c
@@ -234,7 +234,7 @@ H5HF__tiny_op_real(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op, void
size_t enc_obj_size; /* Encoded object size */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
diff --git a/src/H5HG.c b/src/H5HG.c
index 101d90a..f0c9d20 100644
--- a/src/H5HG.c
+++ b/src/H5HG.c
@@ -129,7 +129,7 @@ H5HG__create(H5F_t *f, size_t size)
size_t n;
haddr_t ret_value = HADDR_UNDEF; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(f);
@@ -288,7 +288,7 @@ H5HG__alloc(H5F_t *f, H5HG_heap_t *heap, size_t size, unsigned *heap_flags_ptr)
size_t need = H5HG_SIZEOF_OBJHDR(f) + H5HG_ALIGN(size);
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(heap);
diff --git a/src/H5HGcache.c b/src/H5HGcache.c
index a4c55bb..1543232 100644
--- a/src/H5HGcache.c
+++ b/src/H5HGcache.c
@@ -115,7 +115,7 @@ H5HG__hdr_deserialize(H5HG_heap_t *heap, const uint8_t *image, const H5F_t *f)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(heap);
@@ -162,7 +162,7 @@ done:
static herr_t
H5HG__cache_heap_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t *image_len)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(image_len);
@@ -194,7 +194,7 @@ H5HG__cache_heap_get_final_load_size(const void *image, size_t H5_ATTR_NDEBUG_UN
H5HG_heap_t heap; /* Global heap */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(image);
@@ -239,7 +239,7 @@ H5HG__cache_heap_deserialize(const void *_image, size_t len, void *_udata, hbool
size_t nalloc; /* Number of objects allocated */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(_image);
@@ -383,7 +383,7 @@ H5HG__cache_heap_image_len(const void *_thing, size_t *image_len)
{
const H5HG_heap_t *heap = (const H5HG_heap_t *)_thing;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(heap);
@@ -418,7 +418,7 @@ H5HG__cache_heap_serialize(const H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *image, si
{
H5HG_heap_t *heap = (H5HG_heap_t *)_thing;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(f);
HDassert(image);
@@ -457,7 +457,7 @@ H5HG__cache_heap_free_icr(void *_thing)
H5HG_heap_t *heap = (H5HG_heap_t *)_thing;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(heap);
diff --git a/src/H5HGmodule.h b/src/H5HGmodule.h
index a75dea5..412223e 100644
--- a/src/H5HGmodule.h
+++ b/src/H5HGmodule.h
@@ -25,8 +25,7 @@
* reporting macros.
*/
#define H5HG_MODULE
-#define H5_MY_PKG H5HG
-#define H5_MY_PKG_ERR H5E_HEAP
-#define H5_MY_PKG_INIT NO
+#define H5_MY_PKG H5HG
+#define H5_MY_PKG_ERR H5E_HEAP
#endif /* H5HGmodule_H */
diff --git a/src/H5HL.c b/src/H5HL.c
index eb25875..11800c7 100644
--- a/src/H5HL.c
+++ b/src/H5HL.c
@@ -195,7 +195,7 @@ H5HL__minimize_heap_space(H5F_t *f, H5HL_t *heap)
size_t new_heap_size = heap->dblk_size; /* New size of heap */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(f);
@@ -468,7 +468,7 @@ H5HL__remove_free(H5HL_t *heap, H5HL_free_t *fl)
{
H5HL_free_t *ret_value = NULL;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
if (fl->prev)
fl->prev->next = fl->next;
@@ -501,7 +501,7 @@ H5HL__dirty(H5HL_t *heap)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(heap);
diff --git a/src/H5HLcache.c b/src/H5HLcache.c
index bcc8b2c..c0b043e 100644
--- a/src/H5HLcache.c
+++ b/src/H5HLcache.c
@@ -155,7 +155,7 @@ H5HL__hdr_deserialize(H5HL_t *heap, const uint8_t *image, H5HL_cache_prfx_ud_t *
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(heap);
@@ -212,7 +212,7 @@ H5HL__fl_deserialize(H5HL_t *heap)
hsize_t free_block; /* Offset of free block */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check arguments */
HDassert(heap);
@@ -280,7 +280,7 @@ H5HL__fl_serialize(const H5HL_t *heap)
{
H5HL_free_t *fl; /* Pointer to heap free list node */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check arguments */
HDassert(heap);
@@ -321,7 +321,7 @@ H5HL__fl_serialize(const H5HL_t *heap)
static herr_t
H5HL__cache_prefix_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t *image_len)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(image_len);
@@ -355,7 +355,7 @@ H5HL__cache_prefix_get_final_load_size(const void *_image, size_t H5_ATTR_NDEBUG
H5HL_t heap; /* Local heap */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(image);
@@ -406,7 +406,7 @@ H5HL__cache_prefix_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
H5HL_cache_prfx_ud_t *udata = (H5HL_cache_prfx_ud_t *)_udata; /* User data for callback */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(image);
@@ -498,7 +498,7 @@ H5HL__cache_prefix_image_len(const void *_thing, size_t *image_len)
{
const H5HL_prfx_t *prfx = (const H5HL_prfx_t *)_thing; /* Pointer to local heap prefix to query */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(prfx);
@@ -543,7 +543,7 @@ H5HL__cache_prefix_serialize(const H5_ATTR_NDEBUG_UNUSED H5F_t *f, void *_image,
uint8_t * image = (uint8_t *)_image; /* Pointer into image buffer */
size_t buf_size; /* expected size of the image buffer */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(f);
@@ -640,7 +640,7 @@ H5HL__cache_prefix_free_icr(void *_thing)
H5HL_prfx_t *prfx = (H5HL_prfx_t *)_thing; /* Pointer to local heap prefix to query */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(prfx);
@@ -676,7 +676,7 @@ H5HL__cache_datablock_get_initial_load_size(void *_udata, size_t *image_len)
{
H5HL_t *heap = (H5HL_t *)_udata; /* User data for callback */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(heap);
@@ -711,7 +711,7 @@ H5HL__cache_datablock_deserialize(const void *image, size_t len, void *_udata, h
H5HL_t * heap = (H5HL_t *)_udata; /* User data for callback */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(image);
@@ -770,7 +770,7 @@ H5HL__cache_datablock_image_len(const void *_thing, size_t *image_len)
{
const H5HL_dblk_t *dblk = (const H5HL_dblk_t *)_thing; /* Pointer to the local heap data block */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(dblk);
@@ -806,7 +806,7 @@ H5HL__cache_datablock_serialize(const H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *imag
H5HL_t * heap; /* Pointer to the local heap */
H5HL_dblk_t *dblk = (H5HL_dblk_t *)_thing; /* Pointer to the local heap data block */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(f);
@@ -851,7 +851,7 @@ H5HL__cache_datablock_notify(H5C_notify_action_t action, void *_thing)
H5HL_dblk_t *dblk = (H5HL_dblk_t *)_thing; /* Pointer to the local heap data block */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(dblk);
@@ -923,7 +923,7 @@ H5HL__cache_datablock_free_icr(void *_thing)
H5HL_dblk_t *dblk = (H5HL_dblk_t *)_thing; /* Pointer to the local heap data block */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(dblk);
diff --git a/src/H5HLmodule.h b/src/H5HLmodule.h
index 3004809..5432f1a 100644
--- a/src/H5HLmodule.h
+++ b/src/H5HLmodule.h
@@ -25,8 +25,7 @@
* reporting macros.
*/
#define H5HL_MODULE
-#define H5_MY_PKG H5HL
-#define H5_MY_PKG_ERR H5E_HEAP
-#define H5_MY_PKG_INIT NO
+#define H5_MY_PKG H5HL
+#define H5_MY_PKG_ERR H5E_HEAP
#endif /* H5HLmodule_H */
diff --git a/src/H5HLpkg.h b/src/H5HLpkg.h
index 0ba3b1c..5ee9aee 100644
--- a/src/H5HLpkg.h
+++ b/src/H5HLpkg.h
@@ -51,9 +51,8 @@ H5FL_BLK_EXTERN(lheap_chunk);
* error reporting macros.
*/
#ifdef H5HL_PACKAGE
-#define H5_MY_PKG H5HL
-#define H5_MY_PKG_ERR H5E_HEAP
-#define H5_MY_PKG_INIT NO
+#define H5_MY_PKG H5HL
+#define H5_MY_PKG_ERR H5E_HEAP
#endif
#define H5HL_SIZEOF_HDR(F) \
diff --git a/src/H5I.c b/src/H5I.c
index 0a4fa10..ddb6744 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -707,7 +707,7 @@ H5I__search_cb(void *obj, hid_t id, void *_udata)
herr_t cb_ret_val; /* User callback return value */
int ret_value = H5_ITER_ERROR; /* Callback return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
cb_ret_val = (*udata->app_cb)(obj, id, udata->app_key);
@@ -795,7 +795,7 @@ H5I__iterate_pub_cb(void H5_ATTR_UNUSED *obj, hid_t id, void *_udata)
herr_t cb_ret_val = FAIL; /* User callback return value */
int ret_value = H5_ITER_ERROR; /* Callback return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Invoke the callback */
cb_ret_val = (*udata->op)(id, udata->op_data);
diff --git a/src/H5Idbg.c b/src/H5Idbg.c
index 8bf8ecb..37232c5 100644
--- a/src/H5Idbg.c
+++ b/src/H5Idbg.c
@@ -80,7 +80,7 @@ H5I__id_dump_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
const H5G_name_t *path = NULL; /* Path to file object */
const void * object = NULL; /* Pointer to VOL connector object */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDfprintf(stderr, " id = %" PRIdHID "\n", info->id);
HDfprintf(stderr, " count = %u\n", info->count);
diff --git a/src/H5Iint.c b/src/H5Iint.c
index 1ea2ad7..ca6d208 100644
--- a/src/H5Iint.c
+++ b/src/H5Iint.c
@@ -258,7 +258,7 @@ H5I__unwrap(void *object, H5I_type_t type)
{
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(object);
@@ -370,7 +370,7 @@ H5I__mark_node(void *_info, void H5_ATTR_UNUSED *key, void *_udata)
H5I_clear_type_ud_t *udata = (H5I_clear_type_ud_t *)_udata; /* udata struct */
hbool_t mark = FALSE;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(info);
@@ -876,7 +876,7 @@ H5I__remove_verify(hid_t id, H5I_type_t type)
{
void *ret_value = NULL; /*return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Argument checking will be performed by H5I_remove() */
@@ -908,7 +908,7 @@ H5I__remove_common(H5I_type_info_t *type_info, hid_t id)
H5I_id_info_t *info = NULL; /* Pointer to the current ID */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(type_info);
@@ -1002,7 +1002,7 @@ H5I__dec_ref(hid_t id, void **request)
H5I_id_info_t *info = NULL; /* Pointer to the ID */
int ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(id >= 0);
@@ -1099,7 +1099,7 @@ H5I__dec_app_ref(hid_t id, void **request)
{
int ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(id >= 0);
@@ -1214,7 +1214,7 @@ H5I__dec_app_ref_always_close(hid_t id, void **request)
{
int ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(id >= 0);
@@ -1385,7 +1385,7 @@ H5I__inc_type_ref(H5I_type_t type)
H5I_type_info_t *type_info = NULL; /* Pointer to the type */
int ret_value = -1; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(type > 0 && (int)type < H5I_next_type_g);
@@ -1471,7 +1471,7 @@ H5I__get_type_ref(H5I_type_t type)
H5I_type_info_t *type_info = NULL; /* Pointer to the type */
int ret_value = -1; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(type >= 0);
@@ -1507,7 +1507,7 @@ H5I__iterate_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
H5I_iterate_ud_t *udata = (H5I_iterate_ud_t *)_udata; /* User data for callback */
int ret_value = H5_ITER_CONT; /* Callback return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Only invoke the callback function if this ID is visible externally and
* its reference count is positive.
@@ -1705,7 +1705,7 @@ H5I__find_id_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
const void * object = NULL;
int ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(info);
diff --git a/src/H5Imodule.h b/src/H5Imodule.h
index 08f8bb0..cd1cbcd 100644
--- a/src/H5Imodule.h
+++ b/src/H5Imodule.h
@@ -25,9 +25,8 @@
* reporting macros.
*/
#define H5I_MODULE
-#define H5_MY_PKG H5I
-#define H5_MY_PKG_ERR H5E_ID
-#define H5_MY_PKG_INIT NO
+#define H5_MY_PKG H5I
+#define H5_MY_PKG_ERR H5E_ID
/**\defgroup H5I H5I
*
diff --git a/src/H5L.c b/src/H5L.c
index 065cc5c..a6a73a5 100644
--- a/src/H5L.c
+++ b/src/H5L.c
@@ -304,7 +304,7 @@ H5L__create_soft_api_common(const char *link_target, hid_t link_loc_id, const ch
H5VL_loc_params_t loc_params; /* Location parameters for object access */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if (link_loc_id == H5L_SAME_LOC)
@@ -446,7 +446,7 @@ H5L__create_hard_api_common(hid_t cur_loc_id, const char *cur_name, hid_t link_l
H5VL_loc_params_t link_loc_params; /* Location parameters for link_loc_id object access */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if (cur_loc_id == H5L_SAME_LOC && link_loc_id == H5L_SAME_LOC)
@@ -817,7 +817,7 @@ H5L__delete_api_common(hid_t loc_id, const char *name, hid_t lapl_id, void **tok
H5VL_loc_params_t loc_params; /* Location parameters for object access */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
/* name is verified in H5VL_setup_name_args() */
@@ -933,7 +933,7 @@ H5L__delete_by_idx_api_common(hid_t loc_id, const char *group_name, H5_index_t i
H5VL_loc_params_t loc_params; /* Location parameters for object access */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if (!group_name || !*group_name)
@@ -1188,7 +1188,7 @@ H5L__exists_api_common(hid_t loc_id, const char *name, hbool_t *exists, hid_t la
H5VL_loc_params_t loc_params; /* Location parameters for object access */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
/* name is verified in H5VL_setup_name_args() */
@@ -1629,7 +1629,7 @@ H5L__iterate_api_common(hid_t group_id, H5_index_t idx_type, H5_iter_order_t ord
H5I_type_t id_type; /* Type of ID */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
id_type = H5I_get_type(group_id);
diff --git a/src/H5Ldeprec.c b/src/H5Ldeprec.c
index 01e77f9..896861a 100644
--- a/src/H5Ldeprec.c
+++ b/src/H5Ldeprec.c
@@ -93,7 +93,7 @@ H5L__iterate2_shim(hid_t group_id, const char *name, const H5L_info2_t *linfo2,
H5L_info1_t linfo;
herr_t ret_value = H5_ITER_CONT;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Copy the new-style members into the old-style struct */
if (linfo2) {
diff --git a/src/H5Lexternal.c b/src/H5Lexternal.c
index 2f7c7eb..b120ef8 100644
--- a/src/H5Lexternal.c
+++ b/src/H5Lexternal.c
@@ -122,7 +122,7 @@ H5L__extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group, cons
char * elink_prefix = NULL; /* Pointer to elink prefix */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(p);
@@ -281,7 +281,7 @@ H5L__extern_query(const char H5_ATTR_UNUSED *link_name, const void *_udata, size
const uint8_t *udata = (const uint8_t *)_udata; /* Pointer to external link buffer */
ssize_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check external link version & flags */
if (((*udata >> 4) & 0x0F) != H5L_EXT_VERSION)
diff --git a/src/H5Lint.c b/src/H5Lint.c
index 9e45124..9dc8d0b 100644
--- a/src/H5Lint.c
+++ b/src/H5Lint.c
@@ -267,7 +267,7 @@ H5L__find_class_idx(H5L_type_t id)
size_t i; /* Local index variable */
int ret_value = FAIL; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
for (i = 0; i < H5L_table_used_g; i++)
if (H5L_table_g[i].id == id)
@@ -544,7 +544,7 @@ H5L__link_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t H5_AT
hbool_t obj_created = FALSE; /* Whether an object was created (through a hard link) */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the name in this group resolved to a valid location */
/* (which is not what we want) */
@@ -708,7 +708,7 @@ H5L__create_real(const H5G_loc_t *link_loc, const char *link_name, H5G_name_t *o
H5L_trav_cr_t udata; /* User data for callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(link_loc);
@@ -958,7 +958,7 @@ H5L__get_val_real(const H5O_link_t *lnk, void *buf, size_t size)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(lnk);
@@ -1015,7 +1015,7 @@ H5L__get_val_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char *name, cons
H5L_trav_gv_t *udata = (H5L_trav_gv_t *)_udata; /* User data passed in */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the name in this group resolved to a valid link */
if (lnk == NULL)
@@ -1099,7 +1099,7 @@ H5L__get_val_by_idx_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_A
hbool_t lnk_copied = FALSE; /* Whether the link was copied */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the name of the group resolved to a valid object */
if (obj_loc == NULL)
@@ -1187,7 +1187,7 @@ H5L__delete_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *ln
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the group resolved to a valid link */
if (grp_loc == NULL)
@@ -1277,7 +1277,7 @@ H5L__delete_by_idx_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_AT
H5L_trav_gvbi_t *udata = (H5L_trav_gvbi_t *)_udata; /* User data passed in */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC_TAG((obj_loc) ? (obj_loc->oloc->addr) : HADDR_UNDEF)
+ FUNC_ENTER_PACKAGE_TAG((obj_loc) ? (obj_loc->oloc->addr) : HADDR_UNDEF)
/* Check if the name of the group resolved to a valid object */
if (obj_loc == NULL)
@@ -1361,7 +1361,7 @@ H5L__move_dest_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t
hbool_t temp_loc_init = FALSE;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Make sure an object with this name doesn't already exist */
if (obj_loc != NULL)
@@ -1472,7 +1472,7 @@ H5L__move_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *lnk,
hbool_t link_copied = FALSE; /* Has udata_out.lnk been allocated? */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the name in this group resolved to a valid link */
if (obj_loc == NULL)
@@ -1662,7 +1662,7 @@ H5L__exists_final_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ATT
{
H5L_trav_le_t *udata = (H5L_trav_le_t *)_udata; /* User data passed in */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check if the name in this group resolved to a valid link */
*udata->exists = (hbool_t)(lnk != NULL);
@@ -1695,7 +1695,7 @@ H5L__exists_inter_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ATT
H5L_trav_le_t *udata = (H5L_trav_le_t *)_udata; /* User data passed in */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the name in this group resolved to a valid link */
if (lnk != NULL) {
@@ -1859,7 +1859,7 @@ H5L__get_info_cb(H5G_loc_t *grp_loc /*in*/, const char H5_ATTR_UNUSED *name, con
H5L_trav_gi_t *udata = (H5L_trav_gi_t *)_udata; /* User data passed in */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the name in this group resolved to a valid link */
if (lnk == NULL)
@@ -1930,7 +1930,7 @@ H5L__get_info_by_idx_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_
hbool_t lnk_copied = FALSE; /* Whether the link was copied */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the name of the group resolved to a valid object */
if (obj_loc == NULL)
@@ -2016,7 +2016,7 @@ H5L__get_name_by_idx_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_
H5L_trav_gnbi_t *udata = (H5L_trav_gnbi_t *)_udata; /* User data passed in */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the name of the group resolved to a valid object */
if (obj_loc == NULL)
diff --git a/src/H5Lmodule.h b/src/H5Lmodule.h
index cffd25c..d52690e 100644
--- a/src/H5Lmodule.h
+++ b/src/H5Lmodule.h
@@ -25,9 +25,8 @@
* reporting macros.
*/
#define H5L_MODULE
-#define H5_MY_PKG H5L
-#define H5_MY_PKG_ERR H5E_LINK
-#define H5_MY_PKG_INIT YES
+#define H5_MY_PKG H5L
+#define H5_MY_PKG_ERR H5E_LINK
/**\defgroup H5L H5L
*
diff --git a/src/H5M.c b/src/H5M.c
index 59ce615..b20687e 100644
--- a/src/H5M.c
+++ b/src/H5M.c
@@ -168,7 +168,7 @@ H5M__close_cb(H5VL_object_t *map_vol_obj, void **request)
H5VL_optional_args_t vol_cb_args; /* Arguments to VOL callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(map_vol_obj);
@@ -214,7 +214,7 @@ H5M__create_api_common(hid_t loc_id, const char *name, hid_t key_type_id, hid_t
H5VL_map_args_t map_args; /* Arguments for map operations */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if (!name)
@@ -466,7 +466,7 @@ H5M__open_api_common(hid_t loc_id, const char *name, hid_t mapl_id, void **token
H5VL_map_args_t map_args; /* Arguments for map operations */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
if (!name)
@@ -935,7 +935,7 @@ H5M__put_api_common(hid_t map_id, hid_t key_mem_type_id, const void *key, hid_t
H5VL_map_args_t map_args; /* Arguments for map operations */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if (key_mem_type_id < 0)
@@ -1070,7 +1070,7 @@ H5M__get_api_common(hid_t map_id, hid_t key_mem_type_id, const void *key, hid_t
H5VL_map_args_t map_args; /* Arguments for map operations */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if (key_mem_type_id < 0)
diff --git a/src/H5MF.c b/src/H5MF.c
index 3428661..5905435 100644
--- a/src/H5MF.c
+++ b/src/H5MF.c
@@ -133,7 +133,7 @@ H5MF__defer_free(H5F_shared_t *shared, H5FD_mem_t alloc_type, haddr_t addr, hsiz
lower_defree_t *df = NULL;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if ((df = H5MM_malloc(sizeof(*df))) == NULL)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to allocate buffer")
@@ -445,7 +445,7 @@ H5MF__create_fstype(H5F_t *f, H5F_mem_page_t type)
H5AC_ring_t fsm_ring; /* Ring of FSM */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -571,7 +571,7 @@ H5MF__delete_fstype(H5F_t *f, H5F_mem_page_t type)
haddr_t tmp_fs_addr; /* Temporary holder for free space manager address */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f);
@@ -639,7 +639,7 @@ H5MF__close_fstype(H5F_t *f, H5F_mem_page_t type)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -953,7 +953,7 @@ H5MF__alloc_pagefs(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size)
H5MF_free_section_t *node = NULL; /* Free space section pointer */
haddr_t ret_value = HADDR_UNDEF; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#ifdef H5MF_ALLOC_DEBUG
HDfprintf(stderr, "%s: alloc_type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)alloc_type, size);
@@ -1183,7 +1183,7 @@ H5MF__xfree_inner_impl(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t si
H5AC_ring_t fsm_ring; /* Ring of FSM */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC_TAG(H5AC__FREESPACE_TAG)
+ FUNC_ENTER_PACKAGE_TAG(H5AC__FREESPACE_TAG)
H5MF__alloc_to_fs_type(f->shared, alloc_type, size, &fs_type);
@@ -1339,7 +1339,7 @@ H5MF__xfree_impl(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC_TAG(H5AC__FREESPACE_TAG)
+ FUNC_ENTER_PACKAGE_TAG(H5AC__FREESPACE_TAG)
ret_value = H5MF__xfree_inner_impl(f, alloc_type, addr, size);
@@ -1720,7 +1720,7 @@ H5MF__close_delete_fstype(H5F_t *f, H5F_mem_page_t type)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#ifdef H5MF_ALLOC_DEBUG
HDfprintf(stderr, "%s: Entering\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
@@ -1891,7 +1891,7 @@ H5MF__close_aggrfs(H5F_t *f)
H5FD_mem_t type; /* Memory type for iteration */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#ifdef H5MF_ALLOC_DEBUG
HDfprintf(stderr, "%s: Entering\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
@@ -2057,7 +2057,7 @@ H5MF__close_pagefs(H5F_t *f)
H5O_fsinfo_t fsinfo; /* File space info message */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#ifdef H5MF_ALLOC_DEBUG
HDfprintf(stderr, "%s: Entering\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
@@ -2236,7 +2236,7 @@ H5MF__close_shrink_eoa(H5F_t *f)
H5MF_sect_ud_t udata; /* User data for callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f);
@@ -2603,7 +2603,7 @@ H5MF__sects_cb(H5FS_section_info_t *_sect, void *_udata)
H5MF_free_section_t *sect = (H5MF_free_section_t *)_sect;
H5MF_sect_iter_ud_t *udata = (H5MF_sect_iter_ud_t *)_udata;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
if (udata->sect_idx < udata->sect_count) {
udata->sects[udata->sect_idx].addr = sect->sect_info.addr;
@@ -2632,7 +2632,7 @@ H5MF__get_free_sects(H5F_t *f, H5FS_t *fspace, H5MF_sect_iter_ud_t *sect_udata,
hsize_t hnums = 0; /* # of sections */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f);
@@ -3477,7 +3477,7 @@ static herr_t
H5MF__continue_alloc_fsm(H5F_shared_t *f_sh, H5FS_t *sm_hdr_fspace, H5FS_t *sm_sinfo_fspace,
H5FS_t *lg_hdr_fspace, H5FS_t *lg_sinfo_fspace, hbool_t *continue_alloc_fsm)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(f_sh);
@@ -3529,7 +3529,7 @@ H5MF__fsm_type_is_self_referential(H5F_shared_t *f_sh, H5F_mem_page_t fsm_type)
H5F_mem_page_t lg_fssinfo_fsm;
hbool_t result = FALSE;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(f_sh);
@@ -3582,7 +3582,7 @@ H5MF__fsm_is_self_referential(H5F_shared_t *f_sh, H5FS_t *fspace)
H5F_mem_page_t sm_fssinfo_fsm;
hbool_t result = FALSE;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(f_sh);
diff --git a/src/H5MFaggr.c b/src/H5MFaggr.c
index e7b966c..66a834a 100644
--- a/src/H5MFaggr.c
+++ b/src/H5MFaggr.c
@@ -149,7 +149,7 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F
haddr_t eoa = HADDR_UNDEF; /* Initial EOA for the file */
haddr_t ret_value = HADDR_UNDEF; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#ifdef H5MF_AGGR_DEBUG
HDfprintf(stderr, "%s: type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)type, size);
#endif /* H5MF_AGGR_DEBUG */
@@ -713,7 +713,7 @@ done:
H5FD_mem_t alloc_type; /* Type of file memory to work with */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(f);
@@ -841,7 +841,7 @@ done:
haddr_t eoa = HADDR_UNDEF; /* EOA for the file */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(f);
@@ -879,7 +879,7 @@ done:
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(f);
diff --git a/src/H5MFdbg.c b/src/H5MFdbg.c
index 60d7779..4bd3ec5 100644
--- a/src/H5MFdbg.c
+++ b/src/H5MFdbg.c
@@ -95,7 +95,7 @@ H5MF__sects_debug_cb(H5FS_section_info_t *_sect, void *_udata)
H5MF_debug_iter_ud_t *udata = (H5MF_debug_iter_ud_t *)_udata; /* User data for callbacks */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
diff --git a/src/H5MFmodule.h b/src/H5MFmodule.h
index 9726cec..3e806c6 100644
--- a/src/H5MFmodule.h
+++ b/src/H5MFmodule.h
@@ -25,8 +25,7 @@
* reporting macros.
*/
#define H5MF_MODULE
-#define H5_MY_PKG H5MF
-#define H5_MY_PKG_ERR H5E_RESOURCE
-#define H5_MY_PKG_INIT NO
+#define H5_MY_PKG H5MF
+#define H5_MY_PKG_ERR H5E_RESOURCE
#endif /* H5MFmodule_H */
diff --git a/src/H5MFsection.c b/src/H5MFsection.c
index 2f5103f..429b4ab 100644
--- a/src/H5MFsection.c
+++ b/src/H5MFsection.c
@@ -265,7 +265,7 @@ H5MF__sect_deserialize(const H5FS_section_class_t *cls, const uint8_t H5_ATTR_UN
H5MF_free_section_t *sect; /* New section */
H5FS_section_info_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(cls);
@@ -307,7 +307,7 @@ H5MF__sect_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, const H5FS_sect
const H5MF_free_section_t *sect = (const H5MF_free_section_t *)_sect; /* File free section */
#endif /* NDEBUG */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
HDassert(sect);
@@ -333,7 +333,7 @@ H5MF__sect_split(H5FS_section_info_t *sect, hsize_t frag_size)
{
H5MF_free_section_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Allocate space for new section */
if (NULL == (ret_value = H5MF__sect_new(sect->type, sect->addr, frag_size)))
@@ -374,7 +374,7 @@ H5MF__sect_simple_can_merge(const H5FS_section_info_t *_sect1, const H5FS_sectio
const H5MF_free_section_t *sect2 = (const H5MF_free_section_t *)_sect2; /* File free section */
htri_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
HDassert(sect1);
@@ -411,7 +411,7 @@ H5MF__sect_simple_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect
H5MF_free_section_t * sect2 = (H5MF_free_section_t *)_sect2; /* File free section */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(sect1);
@@ -453,7 +453,7 @@ H5MF__sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
haddr_t end; /* End of section to extend */
htri_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(sect);
@@ -557,7 +557,7 @@ H5MF__sect_simple_shrink(H5FS_section_info_t **_sect, void *_udata)
H5MF_sect_ud_t * udata = (H5MF_sect_ud_t *)_udata; /* User data for callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(sect);
@@ -625,7 +625,7 @@ H5MF__sect_small_add(H5FS_section_info_t **_sect, unsigned *flags, void *_udata)
hsize_t rem, prem;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#ifdef H5MF_ALLOC_DEBUG_MORE
HDfprintf(stderr, "%s: Entering, section {%" PRIuHADDR ", %" PRIuHSIZE "}\n", __func__,
@@ -688,7 +688,7 @@ H5MF__sect_small_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section
H5MF_sect_ud_t * udata = (H5MF_sect_ud_t *)_udata; /* User data for callback */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
HDassert(sect1);
@@ -735,7 +735,7 @@ H5MF__sect_small_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2
H5MF_sect_ud_t * udata = (H5MF_sect_ud_t *)_udata; /* User data for callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(sect1);
@@ -801,7 +801,7 @@ H5MF__sect_large_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section
const H5MF_free_section_t *sect2 = (const H5MF_free_section_t *)_sect2; /* File free section */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
HDassert(sect1);
@@ -839,7 +839,7 @@ H5MF__sect_large_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2
H5MF_free_section_t * sect2 = (H5MF_free_section_t *)_sect2; /* File free section */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(sect1);
@@ -880,7 +880,7 @@ H5MF__sect_large_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
haddr_t end; /* End of section to extend */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(sect);
@@ -933,7 +933,7 @@ H5MF__sect_large_shrink(H5FS_section_info_t **_sect, void *_udata)
hsize_t frag_size = 0; /* Fragment size */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(sect);
diff --git a/src/H5MVmodule.h b/src/H5MVmodule.h
index c6cbe19..22a5b4c 100644
--- a/src/H5MVmodule.h
+++ b/src/H5MVmodule.h
@@ -12,11 +12,11 @@
/*-------------------------------------------------------------------------
*
- * Created: H5MVmodule.h
+ * Created: H5MVmodule.h
*
- * Purpose: This file contains declarations which define macros for
- * the H5MV package. Including this header means that the
- * source file is part of the H5MV package.
+ * Purpose: This file contains declarations which define macros for
+ * the H5MV package. Including this header means that the
+ * source file is part of the H5MV package.
*
*-------------------------------------------------------------------------
*/
@@ -28,8 +28,7 @@
* reporting macros.
*/
#define H5MV_MODULE
-#define H5_MY_PKG H5MV
-#define H5_MY_PKG_ERR H5E_RESOURCE
-#define H5_MY_PKG_INIT NO
+#define H5_MY_PKG H5MV
+#define H5_MY_PKG_ERR H5E_RESOURCE
#endif /* _H5MVmodule_H */
diff --git a/src/H5MVsection.c b/src/H5MVsection.c
index c25bfeb..4440b91 100644
--- a/src/H5MVsection.c
+++ b/src/H5MVsection.c
@@ -188,7 +188,7 @@ H5MV__sect_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section_info_
const H5MV_free_section_t *sect2 = (const H5MV_free_section_t *)_sect2; /* File free section */
htri_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
HDassert(sect1);
@@ -221,7 +221,7 @@ H5MV__sect_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2, void
H5MV_free_section_t * sect2 = (H5MV_free_section_t *)_sect2; /* File free section */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(sect1);
@@ -261,7 +261,7 @@ H5MV__sect_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
haddr_t end; /* End of section to extend */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(sect);
@@ -300,7 +300,7 @@ H5MV__sect_shrink(H5FS_section_info_t **_sect, void *_udata)
H5MV_free_section_t **sect = (H5MV_free_section_t **)_sect; /* File free section */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(sect);
@@ -336,7 +336,7 @@ H5MV__sect_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, const H5FS_sect
{
const H5MV_free_section_t *sect = (const H5MV_free_section_t *)_sect; /* File free section */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
HDassert(sect);
@@ -360,7 +360,7 @@ H5MV__sect_split(H5FS_section_info_t *sect, hsize_t frag_size)
{
H5MV_free_section_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Allocate space for new section */
if (NULL == (ret_value = H5MV__sect_new(sect->addr, frag_size)))
diff --git a/src/H5Mmodule.h b/src/H5Mmodule.h
index 848f63f..e8d7c89 100644
--- a/src/H5Mmodule.h
+++ b/src/H5Mmodule.h
@@ -22,9 +22,8 @@
* reporting macros.
*/
#define H5M_MODULE
-#define H5_MY_PKG H5M
-#define H5_MY_PKG_ERR H5E_MAP
-#define H5_MY_PKG_INIT YES
+#define H5_MY_PKG H5M
+#define H5_MY_PKG_ERR H5E_MAP
/**\defgroup H5M H5M
*
diff --git a/src/H5O.c b/src/H5O.c
index db3ff31..0ffa3e0 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -106,7 +106,7 @@ H5O__open_api_common(hid_t loc_id, const char *name, hid_t lapl_id, void **token
H5VL_loc_params_t loc_params;
hid_t ret_value = H5I_INVALID_HID;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
@@ -234,7 +234,7 @@ H5O__open_by_idx_api_common(hid_t loc_id, const char *group_name, H5_index_t idx
H5VL_loc_params_t loc_params;
hid_t ret_value = H5I_INVALID_HID;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
/* group_name, idx_type, order are checked in H5VL_setup_idx-args() */
@@ -425,7 +425,7 @@ H5O__copy_api_common(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, c
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if (!src_name || !*src_name)
@@ -621,7 +621,7 @@ H5O__flush_api_common(hid_t obj_id, void **token_ptr, H5VL_object_t **_vol_obj_p
H5VL_loc_params_t loc_params; /* Location parameters for object access */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Setup and check args */
if (H5VL_setup_loc_args(obj_id, vol_obj_ptr, &loc_params) < 0)
@@ -727,7 +727,7 @@ H5O__refresh_api_common(hid_t oid, void **token_ptr, H5VL_object_t **_vol_obj_pt
H5VL_loc_params_t loc_params; /* Location parameters for object access */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Setup and check args */
if (H5VL_setup_loc_args(oid, vol_obj_ptr, &loc_params) < 0)
@@ -1160,7 +1160,7 @@ H5O__get_info_by_name_api_common(hid_t loc_id, const char *name, H5O_info2_t *oi
H5VL_loc_params_t loc_params; /* Location parameters for object access */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
if (!oinfo)
@@ -1941,7 +1941,7 @@ H5O__close_check_type(hid_t object_id)
{
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check for closeable object */
switch (H5I_get_type(object_id)) {
diff --git a/src/H5Oainfo.c b/src/H5Oainfo.c
index 03ea3df..39e6313 100644
--- a/src/H5Oainfo.c
+++ b/src/H5Oainfo.c
@@ -103,7 +103,7 @@ H5O__ainfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUS
unsigned char flags; /* Flags for encoding attribute info */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f);
@@ -173,7 +173,7 @@ H5O__ainfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c
const H5O_ainfo_t *ainfo = (const H5O_ainfo_t *)_mesg;
unsigned char flags; /* Flags for encoding attribute info */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
@@ -228,7 +228,7 @@ H5O__ainfo_copy(const void *_mesg, void *_dest)
H5O_ainfo_t * dest = (H5O_ainfo_t *)_dest;
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(ainfo);
@@ -266,7 +266,7 @@ H5O__ainfo_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const voi
const H5O_ainfo_t *ainfo = (const H5O_ainfo_t *)_mesg;
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Set return value */
ret_value =
@@ -297,7 +297,7 @@ H5O__ainfo_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const voi
static herr_t
H5O__ainfo_free(void *mesg)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(mesg);
@@ -326,7 +326,7 @@ H5O__ainfo_delete(H5F_t *f, H5O_t H5_ATTR_NDEBUG_UNUSED *open_oh, void *_mesg)
H5O_ainfo_t *ainfo = (H5O_ainfo_t *)_mesg;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f);
@@ -361,7 +361,7 @@ static herr_t
H5O__ainfo_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSED *native_src,
hbool_t *deleted, const H5O_copy_t *cpy_info, void H5_ATTR_UNUSED *udata)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(deleted);
@@ -398,7 +398,7 @@ H5O__ainfo_copy_file(H5F_t H5_ATTR_NDEBUG_UNUSED *file_src, void *mesg_src, H5F_
H5O_ainfo_t *ainfo_dst = NULL;
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(file_src);
@@ -461,7 +461,7 @@ H5O__ainfo_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_l
const H5O_ainfo_t *ainfo_src = (const H5O_ainfo_t *)mesg_src;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(ainfo_src);
@@ -491,7 +491,7 @@ H5O__ainfo_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int i
{
const H5O_ainfo_t *ainfo = (const H5O_ainfo_t *)_mesg;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c
index bad89ae..3bbf8e1 100644
--- a/src/H5Oalloc.c
+++ b/src/H5Oalloc.c
@@ -106,7 +106,7 @@ H5O__add_gap(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t *oh, unsigned chunkno, hbool_
size_t u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(oh);
@@ -229,7 +229,7 @@ H5O__eliminate_gap(H5O_t *oh, hbool_t *chk_dirtied, H5O_mesg_t *mesg, uint8_t *g
uint8_t *move_start, *move_end; /* Pointers to area of messages to move */
hbool_t null_before_gap; /* Flag whether the null message is before the gap or not */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(oh);
@@ -329,7 +329,7 @@ H5O__alloc_null(H5F_t *f, H5O_t *oh, size_t null_idx, const H5O_msg_class_t *new
H5O_mesg_t * alloc_msg; /* Pointer to null message to allocate out of */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(oh);
@@ -507,7 +507,7 @@ H5O__alloc_extend_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno, size_t size, size
size_t u; /* Local index variable */
htri_t ret_value = TRUE; /* return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f != NULL);
@@ -723,7 +723,7 @@ H5O__alloc_find_best_nonnull(const H5F_t *f, const H5O_t *oh, size_t *size, H5O_
size_t multi_size; /* Size of all the messages in the last chunk */
unsigned u; /* Local index variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(f);
@@ -1153,7 +1153,7 @@ H5O__alloc_new_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t *new_idx)
H5O_msg_alloc_info_t found_msg; /* Best fit non-null message */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(oh);
@@ -1200,7 +1200,7 @@ H5O__alloc_find_best_null(const H5O_t *oh, size_t size, size_t *mesg_idx)
size_t idx; /* Index of message which fits allocation */
ssize_t found_null; /* Best fit null message */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(oh);
@@ -1431,7 +1431,7 @@ H5O__move_cont(H5F_t *f, H5O_t *oh, unsigned cont_u)
hbool_t chk_dirtied = FALSE; /* Flags for unprotecting chunk */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(f);
@@ -1603,7 +1603,7 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh)
hbool_t did_packing = FALSE; /* Whether any messages were packed */
htri_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(oh);
@@ -1976,7 +1976,7 @@ H5O__merge_null(H5F_t *f, H5O_t *oh)
hbool_t did_merging = FALSE; /* Whether any messages were merged */
htri_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(oh != NULL);
@@ -2124,7 +2124,7 @@ H5O__remove_empty_chunks(H5F_t *f, H5O_t *oh)
hbool_t did_deleting = FALSE; /* Whether any chunks were deleted */
htri_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(oh != NULL);
@@ -2383,7 +2383,7 @@ H5O__alloc_shrink_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno)
size_t u; /* Index */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f);
diff --git a/src/H5Oattr.c b/src/H5Oattr.c
index 83c0370..2c8d537 100644
--- a/src/H5Oattr.c
+++ b/src/H5Oattr.c
@@ -129,7 +129,7 @@ H5O__attr_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, u
unsigned flags = 0; /* Attribute flags */
H5A_t * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f);
@@ -295,7 +295,7 @@ H5O__attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
unsigned flags = 0; /* Attribute flags */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f);
@@ -397,7 +397,7 @@ H5O__attr_copy(const void *_src, void *_dst)
{
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(_src);
@@ -433,7 +433,7 @@ H5O__attr_size(const H5F_t H5_ATTR_UNUSED *f, const void *_mesg)
size_t name_len;
size_t ret_value = 0;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(attr);
@@ -509,7 +509,7 @@ H5O__attr_free(void *mesg)
H5A_t *attr = (H5A_t *)mesg;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(mesg);
@@ -616,7 +616,7 @@ H5O__attr_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *native_src,
const H5A_t *attr_src = (const H5A_t *)native_src; /* Source attribute */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(deleted);
@@ -659,7 +659,7 @@ H5O__attr_copy_file(H5F_t *file_src, const H5O_msg_class_t H5_ATTR_UNUSED *mesg_
{
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(native_src);
@@ -702,7 +702,7 @@ H5O__attr_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_lo
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if (H5A__attr_post_copy_file(src_oloc, (const H5A_t *)mesg_src, dst_oloc, (H5A_t *)mesg_dst, cpy_info) <
0)
@@ -729,7 +729,7 @@ H5O__attr_get_crt_index(const void *_mesg, H5O_msg_crt_idx_t *crt_idx /*out*/)
{
const H5A_t *attr = (const H5A_t *)_mesg;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(attr);
HDassert(crt_idx);
@@ -757,7 +757,7 @@ H5O__attr_set_crt_index(void *_mesg, H5O_msg_crt_idx_t crt_idx)
{
H5A_t *attr = (H5A_t *)_mesg;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(attr);
@@ -793,7 +793,7 @@ H5O__attr_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidt
char buf[128]; /* Temporary string buffer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f);
diff --git a/src/H5Oattribute.c b/src/H5Oattribute.c
index b83b57e..05d60a4 100644
--- a/src/H5Oattribute.c
+++ b/src/H5Oattribute.c
@@ -162,7 +162,7 @@ H5O__attr_to_dense_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR_U
H5A_t * attr = (H5A_t *)mesg->native; /* Pointer to attribute to insert */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(oh);
@@ -402,7 +402,7 @@ H5O__attr_open_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence,
H5O_iter_opn_t *udata = (H5O_iter_opn_t *)_udata; /* Operator user data */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(oh);
@@ -545,7 +545,7 @@ H5O__attr_open_by_idx_cb(const H5A_t *attr, void *_ret_attr)
H5A_t **ret_attr = (H5A_t **)_ret_attr; /* 'User data' passed in */
herr_t ret_value = H5_ITER_STOP; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check arguments */
HDassert(attr);
@@ -652,7 +652,7 @@ H5O__attr_find_opened_attr(const H5O_loc_t *loc, H5A_t **attr, const char *name_
size_t num_open_attr; /* Number of opened attributes */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Get file serial number for the location of attribute */
if (H5F_get_fileno(loc->file, &loc_fnum) < 0)
@@ -803,7 +803,7 @@ H5O__attr_write_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR_UNUS
hbool_t chk_dirtied = FALSE; /* Flag for unprotecting chunk */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(oh);
@@ -959,7 +959,7 @@ H5O__attr_rename_chk_cb(H5O_t H5_ATTR_UNUSED *oh, H5O_mesg_t *mesg /*in,out*/,
H5O_iter_ren_t *udata = (H5O_iter_ren_t *)_udata; /* Operator user data */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(oh);
@@ -1005,7 +1005,7 @@ H5O__attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR
hbool_t chk_dirtied = FALSE; /* Flag for unprotecting chunk */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(oh);
@@ -1344,7 +1344,7 @@ H5O__attr_remove_update(const H5O_loc_t *loc, H5O_t *oh, H5O_ainfo_t *ainfo)
H5A_attr_table_t atable = {0, NULL}; /* Table of attributes */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(loc);
@@ -1464,7 +1464,7 @@ H5O__attr_remove_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR_UNU
H5O_iter_rm_t *udata = (H5O_iter_rm_t *)_udata; /* Operator user data */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(oh);
@@ -1735,7 +1735,7 @@ H5O__attr_exists_cb(H5O_t H5_ATTR_UNUSED *oh, H5O_mesg_t *mesg /*in,out*/, unsig
H5O_iter_xst_t *udata = (H5O_iter_xst_t *)_udata; /* Operator user data */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(mesg);
diff --git a/src/H5Obogus.c b/src/H5Obogus.c
index ea231d6..e311cd5 100644
--- a/src/H5Obogus.c
+++ b/src/H5Obogus.c
@@ -112,7 +112,7 @@ H5O__bogus_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUS
H5O_bogus_t *mesg = NULL;
void * ret_value; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f);
@@ -155,7 +155,7 @@ static herr_t
H5O__bogus_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
const void H5_ATTR_UNUSED *mesg)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
@@ -189,7 +189,7 @@ static size_t
H5O__bogus_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
const void H5_ATTR_UNUSED *mesg)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
FUNC_LEAVE_NOAPI(4)
} /* end H5O__bogus_size() */
@@ -211,7 +211,7 @@ H5O__bogus_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int i
{
const H5O_bogus_t *mesg = (const H5O_bogus_t *)_mesg;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
diff --git a/src/H5Obtreek.c b/src/H5Obtreek.c
index 1eaf3e5..d6a6e6d 100644
--- a/src/H5Obtreek.c
+++ b/src/H5Obtreek.c
@@ -80,7 +80,7 @@ H5O__btreek_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsig
H5O_btreek_t *mesg; /* Native message */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(f);
@@ -124,7 +124,7 @@ H5O__btreek_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_share
{
const H5O_btreek_t *mesg = (const H5O_btreek_t *)_mesg;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(f);
@@ -161,7 +161,7 @@ H5O__btreek_copy(const void *_mesg, void *_dest)
H5O_btreek_t * dest = (H5O_btreek_t *)_dest;
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(mesg);
@@ -200,7 +200,7 @@ H5O__btreek_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_s
{
size_t ret_value = 0;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(f);
@@ -230,7 +230,7 @@ H5O__btreek_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int
{
const H5O_btreek_t *mesg = (const H5O_btreek_t *)_mesg;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(f);
diff --git a/src/H5Ocache.c b/src/H5Ocache.c
index ccaf004..51c44f9 100644
--- a/src/H5Ocache.c
+++ b/src/H5Ocache.c
@@ -161,7 +161,7 @@ H5FL_SEQ_DEFINE(H5O_cont_t);
static herr_t
H5O__cache_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t *image_len)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(image_len);
@@ -192,7 +192,7 @@ H5O__cache_get_final_load_size(const void *image, size_t H5_ATTR_NDEBUG_UNUSED i
H5O_cache_ud_t *udata = (H5O_cache_ud_t *)_udata; /* User data for callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(image);
@@ -235,7 +235,7 @@ H5O__cache_verify_chksum(const void *_image, size_t len, void *_udata)
H5O_cache_ud_t *udata = (H5O_cache_ud_t *)_udata; /* User data for callback */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(image);
@@ -295,7 +295,7 @@ H5O__cache_deserialize(const void *image, size_t len, void *_udata, hbool_t *dir
H5O_cache_ud_t *udata = (H5O_cache_ud_t *)_udata; /* User data for callback */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(image);
@@ -374,7 +374,7 @@ H5O__cache_image_len(const void *_thing, size_t *image_len)
{
const H5O_t *oh = (const H5O_t *)_thing; /* Object header to query */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(oh);
@@ -409,7 +409,7 @@ H5O__cache_serialize(const H5F_t *f, void *image, size_t len, void *_thing)
uint8_t *chunk_image; /* Pointer to object header prefix buffer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(f);
@@ -549,7 +549,7 @@ H5O__cache_notify(H5AC_notify_action_t action, void *_thing)
H5O_t *oh = (H5O_t *)_thing;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -633,7 +633,7 @@ H5O__cache_free_icr(void *_thing)
H5O_t *oh = (H5O_t *)_thing; /* Object header to destroy */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(oh);
@@ -668,7 +668,7 @@ H5O__cache_chk_get_initial_load_size(void *_udata, size_t *image_len)
{
const H5O_chk_cache_ud_t *udata = (const H5O_chk_cache_ud_t *)_udata; /* User data for callback */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(udata);
@@ -702,7 +702,7 @@ H5O__cache_chk_verify_chksum(const void *_image, size_t len, void *_udata)
H5O_chk_cache_ud_t *udata = (H5O_chk_cache_ud_t *)_udata; /* User data for callback */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(image);
@@ -744,7 +744,7 @@ H5O__cache_chk_deserialize(const void *image, size_t len, void *_udata, hbool_t
H5O_chk_cache_ud_t *udata = (H5O_chk_cache_ud_t *)_udata; /* User data for callback */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(image);
@@ -821,7 +821,7 @@ H5O__cache_chk_image_len(const void *_thing, size_t *image_len)
{
const H5O_chunk_proxy_t *chk_proxy = (const H5O_chunk_proxy_t *)_thing; /* Chunk proxy to query */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(chk_proxy);
@@ -857,7 +857,7 @@ H5O__cache_chk_serialize(const H5F_t *f, void *image, size_t len, void *_thing)
H5O_chunk_proxy_t *chk_proxy = (H5O_chunk_proxy_t *)_thing; /* Object header chunk to serialize */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(f);
@@ -899,7 +899,7 @@ H5O__cache_chk_notify(H5AC_notify_action_t action, void *_thing)
H5O_chunk_proxy_t *chk_proxy = (H5O_chunk_proxy_t *)_thing;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -1030,7 +1030,7 @@ H5O__cache_chk_free_icr(void *_thing)
H5O_chunk_proxy_t *chk_proxy = (H5O_chunk_proxy_t *)_thing; /* Object header chunk proxy to release */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(chk_proxy);
@@ -1065,7 +1065,7 @@ H5O__add_cont_msg(H5O_cont_msgs_t *cont_msg_info, const H5O_cont_t *cont)
size_t contno; /* Continuation message index */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(cont_msg_info);
@@ -1112,7 +1112,7 @@ H5O__prefix_deserialize(const uint8_t *_image, H5O_cache_ud_t *udata)
H5O_t * oh = NULL; /* Object header read in */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(image);
@@ -1291,7 +1291,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t
FALSE; /* Whether any messages were modified when the object header was deserialized */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(oh);
@@ -1631,7 +1631,7 @@ H5O__chunk_serialize(const H5F_t *f, H5O_t *oh, unsigned chunkno)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(f);
diff --git a/src/H5Ocache_image.c b/src/H5Ocache_image.c
index 8f60a0e..ed4471d 100644
--- a/src/H5Ocache_image.c
+++ b/src/H5Ocache_image.c
@@ -97,7 +97,7 @@ H5O__mdci_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSE
H5O_mdci_t *mesg; /* Native message */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(f);
@@ -140,7 +140,7 @@ H5O__mdci_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
{
const H5O_mdci_t *mesg = (const H5O_mdci_t *)_mesg;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(f);
@@ -176,7 +176,7 @@ H5O__mdci_copy(const void *_mesg, void *_dest)
H5O_mdci_t * dest = (H5O_mdci_t *)_dest;
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(mesg);
@@ -214,7 +214,7 @@ H5O__mdci_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void
{
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Set return value */
ret_value = (size_t)(1 + /* Version number */
@@ -241,7 +241,7 @@ H5O__mdci_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void
static herr_t
H5O__mdci_free(void *mesg)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(mesg);
@@ -269,7 +269,7 @@ H5O__mdci_delete(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, void *_mesg)
haddr_t final_eoa; /* For sanity check */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f);
@@ -317,7 +317,7 @@ H5O__mdci_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int in
{
const H5O_mdci_t *mdci = (const H5O_mdci_t *)_mesg;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
diff --git a/src/H5Ocont.c b/src/H5Ocont.c
index 9dd04fe..a8420b2 100644
--- a/src/H5Ocont.c
+++ b/src/H5Ocont.c
@@ -90,7 +90,7 @@ H5O__cont_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSE
H5O_cont_t *cont = NULL;
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f);
@@ -129,7 +129,7 @@ H5O__cont_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
{
const H5O_cont_t *cont = (const H5O_cont_t *)_mesg;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
@@ -166,7 +166,7 @@ H5O__cont_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void
{
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Set return value */
ret_value = (size_t)(H5F_SIZEOF_ADDR(f) + /* Continuation header address */
@@ -190,7 +190,7 @@ H5O__cont_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void
static herr_t
H5O__cont_free(void *mesg)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(mesg);
@@ -217,7 +217,7 @@ H5O__cont_delete(H5F_t *f, H5O_t *open_oh, void *_mesg)
H5O_cont_t *mesg = (H5O_cont_t *)_mesg;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f);
@@ -249,7 +249,7 @@ H5O__cont_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int in
{
const H5O_cont_t *cont = (const H5O_cont_t *)_mesg;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c
index 0b0bb55..2d0222c 100644
--- a/src/H5Ocopy.c
+++ b/src/H5Ocopy.c
@@ -222,7 +222,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
size_t msghdr_size;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC_TAG(oloc_src->addr)
+ FUNC_ENTER_PACKAGE_TAG(oloc_src->addr)
HDassert(oloc_src);
HDassert(oloc_src->file);
@@ -904,7 +904,7 @@ H5O__copy_free_addrmap_cb(void *_item, void H5_ATTR_UNUSED *key, void H5_ATTR_UN
{
H5O_addr_map_t *item = (H5O_addr_map_t *)_item;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(item);
@@ -943,7 +943,7 @@ H5O__copy_header(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */, hid_t
unsigned cpy_option = 0; /* Copy options */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(oloc_src);
@@ -1040,7 +1040,7 @@ H5O__copy_obj(H5G_loc_t *src_loc, H5G_loc_t *dst_loc, const char *dst_name, hid_
hbool_t entry_inserted = FALSE; /* Flag to indicate that the new entry was inserted into a group */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(src_loc);
HDassert(src_loc->oloc->file);
@@ -1098,7 +1098,7 @@ H5O__copy_free_comm_dt_cb(void *item, void *_key, void H5_ATTR_UNUSED *_op_data)
haddr_t * addr = (haddr_t *)item;
H5O_copy_search_comm_dt_key_t *key = (H5O_copy_search_comm_dt_key_t *)_key;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(addr);
HDassert(key);
@@ -1133,7 +1133,7 @@ H5O__copy_comm_dt_cmp(const void *_key1, const void *_key2)
const H5O_copy_search_comm_dt_key_t *key2 = (const H5O_copy_search_comm_dt_key_t *)_key2;
int ret_value = 0;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check fileno. It is unlikely to be different so check if they are equal
* first so only one comparison needs to be made. */
@@ -1176,7 +1176,7 @@ H5O__copy_search_comm_dt_attr_cb(const H5A_t *attr, void *_udata)
hbool_t obj_inserted = FALSE; /* Object inserted into skip list */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(attr);
@@ -1256,7 +1256,7 @@ H5O__copy_search_comm_dt_check(H5O_loc_t *obj_oloc, H5O_copy_search_comm_dt_ud_t
const H5O_obj_class_t * obj_class = NULL; /* Type of object */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(obj_oloc);
@@ -1375,7 +1375,7 @@ H5O__copy_search_comm_dt_cb(hid_t H5_ATTR_UNUSED group, const char *name, const
hbool_t obj_found = FALSE; /* Object at 'name' found */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(name);
@@ -1436,7 +1436,7 @@ H5O__copy_search_comm_dt(H5F_t *file_src, H5O_t *oh_src, H5O_loc_t *oloc_dst /*i
H5O_copy_search_comm_dt_ud_t udata; /* Group iteration user data */
herr_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(oh_src);
@@ -1601,7 +1601,7 @@ H5O__copy_insert_comm_dt(H5F_t *file_src, H5O_t *oh_src, H5O_loc_t *oloc_dst, H5
haddr_t * addr = NULL; /* Destination object address */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(oh_src);
diff --git a/src/H5Ocopy_ref.c b/src/H5Ocopy_ref.c
index 1cda3ea..5fc27d1 100644
--- a/src/H5Ocopy_ref.c
+++ b/src/H5Ocopy_ref.c
@@ -97,7 +97,7 @@ H5O__copy_obj_by_ref(H5O_loc_t *src_oloc, H5O_loc_t *dst_oloc, H5G_loc_t *dst_ro
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(src_oloc);
HDassert(dst_oloc);
@@ -161,7 +161,7 @@ H5O__copy_expand_ref_object1(H5O_loc_t *src_oloc, const void *buf_src, H5O_loc_t
size_t token_size = H5F_SIZEOF_ADDR(src_oloc->file);
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Making equivalent references in the destination file */
for (i = 0; i < ref_count; i++) {
@@ -221,7 +221,7 @@ H5O__copy_expand_ref_region1(H5O_loc_t *src_oloc, const void *buf_src, H5O_loc_t
size_t i; /* Local index variable */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Making equivalent references in the destination file */
for (i = 0; i < ref_count; i++) {
@@ -305,7 +305,7 @@ H5O__copy_expand_ref_object2(H5O_loc_t *src_oloc, hid_t tid_src, const H5T_t *dt
const unsigned char zeros[H5R_REF_BUF_SIZE] = {0};
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Create datatype ID for src datatype. */
if ((tid_src == H5I_INVALID_HID) && (tid_src = H5I_register(H5I_DATATYPE, dt_src, FALSE)) < 0)
diff --git a/src/H5Odeprec.c b/src/H5Odeprec.c
index 7def20a..585eaf0 100644
--- a/src/H5Odeprec.c
+++ b/src/H5Odeprec.c
@@ -91,7 +91,7 @@ static herr_t H5O__get_info_old(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_p
static herr_t
H5O__reset_info1(H5O_info1_t *oinfo)
{
- FUNC_ENTER_STATIC_NOERR;
+ FUNC_ENTER_PACKAGE_NOERR;
/* Reset the passed-in info struct */
HDmemset(oinfo, 0, sizeof(H5O_info1_t));
@@ -124,7 +124,7 @@ H5O__iterate1_adapter(hid_t obj_id, const char *name, const H5O_info2_t *oinfo2,
unsigned nat_fields; /* Fields for native query */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(oinfo2);
@@ -223,7 +223,7 @@ H5O__get_info_old(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, H5O_inf
unsigned nat_fields; /* Fields for native query */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(vol_obj);
diff --git a/src/H5Odrvinfo.c b/src/H5Odrvinfo.c
index 69ab5b2..1c343f0 100644
--- a/src/H5Odrvinfo.c
+++ b/src/H5Odrvinfo.c
@@ -82,7 +82,7 @@ H5O__drvinfo_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
H5O_drvinfo_t *mesg; /* Native message */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(f);
@@ -139,7 +139,7 @@ H5O__drvinfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shar
{
const H5O_drvinfo_t *mesg = (const H5O_drvinfo_t *)_mesg;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(f);
@@ -178,7 +178,7 @@ H5O__drvinfo_copy(const void *_mesg, void *_dest)
H5O_drvinfo_t * dest = (H5O_drvinfo_t *)_dest;
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(mesg);
@@ -225,7 +225,7 @@ H5O__drvinfo_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_
const H5O_drvinfo_t *mesg = (const H5O_drvinfo_t *)_mesg;
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(f);
@@ -257,7 +257,7 @@ H5O__drvinfo_reset(void *_mesg)
{
H5O_drvinfo_t *mesg = (H5O_drvinfo_t *)_mesg;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(mesg);
@@ -285,7 +285,7 @@ H5O__drvinfo_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int
{
const H5O_drvinfo_t *mesg = (const H5O_drvinfo_t *)_mesg;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(f);
diff --git a/src/H5Odtype.c b/src/H5Odtype.c
index 9af79f4..e11836d 100644
--- a/src/H5Odtype.c
+++ b/src/H5Odtype.c
@@ -131,7 +131,7 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t
size_t z;
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(pp && *pp);
@@ -614,7 +614,7 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt)
size_t n, z;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(pp && *pp);
@@ -1124,7 +1124,7 @@ H5O__dtype_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign
H5T_t *dt = NULL;
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(p);
@@ -1167,7 +1167,7 @@ H5O__dtype_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *mesg)
const H5T_t *dt = (const H5T_t *)mesg;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f);
@@ -1206,7 +1206,7 @@ H5O__dtype_copy(const void *_src, void *_dst)
H5T_t * dst;
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(src);
@@ -1252,7 +1252,7 @@ H5O__dtype_size(const H5F_t *f, const void *_mesg)
unsigned u; /* Local index variable */
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(f);
HDassert(dt);
@@ -1380,7 +1380,7 @@ H5O__dtype_reset(void *_mesg)
{
H5T_t *dt = (H5T_t *)_mesg;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
if (dt)
H5T__free(dt);
@@ -1405,7 +1405,7 @@ H5O__dtype_free(void *mesg)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(mesg);
@@ -1436,7 +1436,7 @@ H5O__dtype_set_share(void *_mesg /*in,out*/, const H5O_shared_t *sh)
H5T_t *dt = (H5T_t *)_mesg;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(dt);
HDassert(sh);
@@ -1492,7 +1492,7 @@ H5O__dtype_can_share(const void *_mesg)
htri_t tri_ret;
htri_t ret_value = TRUE;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(mesg);
@@ -1535,7 +1535,7 @@ H5O__dtype_pre_copy_file(H5F_t *file_src, const void *mesg_src, hbool_t H5_ATTR_
H5D_copy_file_ud_t *udata = (H5D_copy_file_ud_t *)_udata; /* Dataset copying user data */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(file_src);
@@ -1590,7 +1590,7 @@ H5O__dtype_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const H5O_msg_class_t *mesg
H5T_t *dst_mesg; /* Destination datatype */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Perform a normal copy of the object header message */
if (NULL == (dst_mesg = (H5T_t *)H5O__dtype_copy(native_src, NULL)))
@@ -1630,7 +1630,7 @@ H5O__dtype_shared_post_copy_upd(const H5O_loc_t H5_ATTR_UNUSED *src_oloc, const
H5T_t *dt_dst = (H5T_t *)mesg_dst; /* Destination datatype */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if (dt_dst->sh_loc.type == H5O_SHARE_TYPE_COMMITTED) {
HDassert(H5T_is_named(dt_dst));
@@ -1674,7 +1674,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
unsigned i;
size_t k;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
diff --git a/src/H5Oefl.c b/src/H5Oefl.c
index 931fe0b..204460a 100644
--- a/src/H5Oefl.c
+++ b/src/H5Oefl.c
@@ -93,7 +93,7 @@ H5O__efl_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSED
size_t u; /* Local index variable */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(f);
@@ -192,7 +192,7 @@ H5O__efl_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, con
const H5O_efl_t *mesg = (const H5O_efl_t *)_mesg;
size_t u; /* Local index variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
@@ -256,7 +256,7 @@ H5O__efl_copy(const void *_mesg, void *_dest)
hbool_t slot_allocated = FALSE; /* Flag to indicate that dynamic allocation has begun */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(mesg);
@@ -321,7 +321,7 @@ H5O__efl_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void
const H5O_efl_t *mesg = (const H5O_efl_t *)_mesg;
size_t ret_value = 0;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
@@ -357,7 +357,7 @@ H5O__efl_reset(void *_mesg)
H5O_efl_t *mesg = (H5O_efl_t *)_mesg;
size_t u; /* Local index variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(mesg);
@@ -439,7 +439,7 @@ H5O__efl_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *mesg_src, H5F_t *file_d
size_t idx, size, name_offset, heap_size;
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC_TAG(H5AC__COPIED_TAG)
+ FUNC_ENTER_PACKAGE_TAG(H5AC__COPIED_TAG)
/* check args */
HDassert(efl_src);
@@ -520,7 +520,7 @@ H5O__efl_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int ind
const H5O_efl_t *mesg = (const H5O_efl_t *)_mesg;
size_t u;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
diff --git a/src/H5Ofill.c b/src/H5Ofill.c
index d905352..a9be74b 100644
--- a/src/H5Ofill.c
+++ b/src/H5Ofill.c
@@ -200,7 +200,7 @@ H5O__fill_new_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
const uint8_t *p_end = p + p_size - 1; /* End of the p buffer */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(f);
HDassert(p);
@@ -321,7 +321,7 @@ H5O__fill_old_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flag
const uint8_t *p_end = p + p_size - 1; /* End of the p buffer */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(f);
HDassert(p);
@@ -399,7 +399,7 @@ H5O__fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
{
const H5O_fill_t *fill = (const H5O_fill_t *)_fill;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(f);
HDassert(p);
@@ -495,7 +495,7 @@ H5O__fill_old_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
{
const H5O_fill_t *fill = (const H5O_fill_t *)_fill;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(f);
HDassert(p);
@@ -531,7 +531,7 @@ H5O__fill_copy(const void *_src, void *_dst)
H5O_fill_t * dst = (H5O_fill_t *)_dst;
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(src);
@@ -649,7 +649,7 @@ H5O__fill_new_size(const H5F_t H5_ATTR_UNUSED *f, const void *_fill)
const H5O_fill_t *fill = (const H5O_fill_t *)_fill;
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(f);
HDassert(fill);
@@ -695,7 +695,7 @@ H5O__fill_old_size(const H5F_t H5_ATTR_UNUSED *f, const void *_fill)
{
const H5O_fill_t *fill = (const H5O_fill_t *)_fill;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(fill);
@@ -784,7 +784,7 @@ H5O__fill_reset(void *_fill)
{
H5O_fill_t *fill = (H5O_fill_t *)_fill;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(fill);
@@ -814,7 +814,7 @@ H5O__fill_reset(void *_fill)
static herr_t
H5O__fill_free(void *fill)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(fill);
@@ -843,7 +843,7 @@ H5O__fill_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src, hb
const H5O_fill_t *fill_src = (const H5O_fill_t *)mesg_src; /* Source fill value */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(cpy_info);
@@ -876,7 +876,7 @@ H5O__fill_debug(H5F_t H5_ATTR_UNUSED *f, const void *_fill, FILE *stream, int in
const H5O_fill_t *fill = (const H5O_fill_t *)_fill;
H5D_fill_value_t fill_status; /* Whether the fill value is defined */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(f);
HDassert(fill);
diff --git a/src/H5Oflush.c b/src/H5Oflush.c
index ba1fa3e..870da13 100644
--- a/src/H5Oflush.c
+++ b/src/H5Oflush.c
@@ -152,7 +152,7 @@ H5O__oh_tag(const H5O_loc_t *oloc, haddr_t *tag)
H5O_t *oh = NULL; /* Object header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(oloc);
@@ -312,7 +312,7 @@ H5O__refresh_metadata_close(H5O_loc_t *oloc, H5G_loc_t *obj_loc, hid_t oid)
hbool_t corked = FALSE; /* Whether object's metadata is corked */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Make deep local copy of object's location information */
if (obj_loc) {
diff --git a/src/H5Ofsinfo.c b/src/H5Ofsinfo.c
index 7253f3e..853b5d8 100644
--- a/src/H5Ofsinfo.c
+++ b/src/H5Ofsinfo.c
@@ -99,7 +99,7 @@ H5O__fsinfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU
const uint8_t *p_end = p + p_size;
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f);
@@ -215,7 +215,7 @@ H5O__fsinfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
const H5O_fsinfo_t *fsinfo = (const H5O_fsinfo_t *)_mesg;
H5F_mem_page_t ptype; /* Memory type for iteration */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
@@ -260,7 +260,7 @@ H5O__fsinfo_copy(const void *_mesg, void *_dest)
H5O_fsinfo_t * dest = (H5O_fsinfo_t *)_dest;
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(fsinfo);
@@ -297,7 +297,7 @@ H5O__fsinfo_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const vo
const H5O_fsinfo_t *fsinfo = (const H5O_fsinfo_t *)_mesg;
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
ret_value = 3 /* Version, strategy & persist */
+ (size_t)H5F_SIZEOF_SIZE(f) /* Free-space section threshold */
@@ -326,7 +326,7 @@ H5O__fsinfo_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const vo
static herr_t
H5O__fsinfo_free(void *mesg)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(mesg);
@@ -352,7 +352,7 @@ H5O__fsinfo_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int
const H5O_fsinfo_t *fsinfo = (const H5O_fsinfo_t *)_mesg;
H5F_mem_page_t ptype; /* Free-space types for iteration */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
diff --git a/src/H5Oginfo.c b/src/H5Oginfo.c
index 304890c..066bd4b 100644
--- a/src/H5Oginfo.c
+++ b/src/H5Oginfo.c
@@ -96,7 +96,7 @@ H5O__ginfo_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign
unsigned char flags; /* Flags for encoding group info */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(p);
@@ -166,7 +166,7 @@ H5O__ginfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared
const H5O_ginfo_t *ginfo = (const H5O_ginfo_t *)_mesg;
unsigned char flags = 0; /* Flags for encoding group info */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(p);
@@ -217,7 +217,7 @@ H5O__ginfo_copy(const void *_mesg, void *_dest)
H5O_ginfo_t * dest = (H5O_ginfo_t *)_dest;
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(ginfo);
@@ -256,7 +256,7 @@ H5O__ginfo_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_sh
const H5O_ginfo_t *ginfo = (const H5O_ginfo_t *)_mesg;
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Set return value */
ret_value = 1 + /* Version */
@@ -288,7 +288,7 @@ H5O__ginfo_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_sh
static herr_t
H5O__ginfo_free(void *mesg)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(mesg);
@@ -314,7 +314,7 @@ H5O__ginfo_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int i
{
const H5O_ginfo_t *ginfo = (const H5O_ginfo_t *)_mesg;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
diff --git a/src/H5Oint.c b/src/H5Oint.c
index 2348790..93501a2 100644
--- a/src/H5Oint.c
+++ b/src/H5Oint.c
@@ -219,7 +219,7 @@ H5O__set_version(H5F_t *f, H5O_t *oh, uint8_t oh_flags, hbool_t store_msg_crt_id
uint8_t version; /* Message version */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check arguments */
HDassert(f);
@@ -1601,7 +1601,7 @@ H5O__delete_oh(H5F_t *f, H5O_t *oh)
unsigned u;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(f);
@@ -1675,7 +1675,7 @@ H5O__obj_type_real(const H5O_t *oh, H5O_type_t *obj_type)
{
const H5O_obj_class_t *obj_class; /* Class of object for header */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(oh);
@@ -1751,7 +1751,7 @@ H5O__obj_class_real(const H5O_t *oh)
size_t i; /* Local index variable */
const H5O_obj_class_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(oh);
@@ -2100,7 +2100,7 @@ H5O__get_hdr_info_real(const H5O_t *oh, H5O_hdr_info_t *hdr)
const H5O_chunk_t *curr_chunk; /* Pointer to current message being operated on */
unsigned u; /* Local index variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(oh);
@@ -2616,7 +2616,7 @@ done:
static herr_t
H5O__free_visit_visited(void *item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED *operator_data /*in,out*/)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
item = H5FL_FREE(H5_obj_t, item);
@@ -2646,7 +2646,7 @@ H5O__visit_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2_t *l
hbool_t obj_found = FALSE; /* Object at 'name' found */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(name);
@@ -3080,7 +3080,7 @@ done:
static herr_t
H5O__reset_info2(H5O_info2_t *oinfo)
{
- FUNC_ENTER_STATIC_NOERR;
+ FUNC_ENTER_PACKAGE_NOERR;
/* Reset the passed-in info struct */
HDmemset(oinfo, 0, sizeof(H5O_info2_t));
diff --git a/src/H5Olayout.c b/src/H5Olayout.c
index c939e72..eb3890a 100644
--- a/src/H5Olayout.c
+++ b/src/H5Olayout.c
@@ -98,7 +98,7 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU
const uint8_t *p_end = p + p_size - 1; /* End of the p buffer */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f);
@@ -599,7 +599,7 @@ H5O__layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
unsigned u;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f);
@@ -757,7 +757,7 @@ H5O__layout_copy(const void *_mesg, void *_dest)
H5O_layout_t * dest = (H5O_layout_t *)_dest;
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(mesg);
@@ -843,7 +843,7 @@ H5O__layout_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const vo
const H5O_layout_t *mesg = (const H5O_layout_t *)_mesg;
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
@@ -875,7 +875,7 @@ H5O__layout_reset(void *_mesg)
H5O_layout_t *mesg = (H5O_layout_t *)_mesg;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if (mesg) {
/* Free the compact storage buffer */
@@ -912,7 +912,7 @@ H5O__layout_free(void *_mesg)
{
H5O_layout_t *mesg = (H5O_layout_t *)_mesg;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(mesg);
@@ -942,7 +942,7 @@ H5O__layout_delete(H5F_t *f, H5O_t *open_oh, void *_mesg)
H5O_layout_t *mesg = (H5O_layout_t *)_mesg;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f);
@@ -1004,7 +1004,7 @@ H5O__layout_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src,
const H5O_layout_t *layout_src = (const H5O_layout_t *)mesg_src; /* Source layout */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(cpy_info);
@@ -1044,7 +1044,7 @@ H5O__layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst,
hbool_t copied = FALSE; /* Whether the data was copied */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(file_src);
@@ -1146,7 +1146,7 @@ H5O__layout_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int
const H5O_layout_t *mesg = (const H5O_layout_t *)_mesg;
size_t u;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
diff --git a/src/H5Olinfo.c b/src/H5Olinfo.c
index eacc916..a821bae 100644
--- a/src/H5Olinfo.c
+++ b/src/H5Olinfo.c
@@ -112,7 +112,7 @@ H5O__linfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUS
unsigned char index_flags; /* Flags for encoding link index info */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f);
@@ -183,7 +183,7 @@ H5O__linfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c
const H5O_linfo_t *linfo = (const H5O_linfo_t *)_mesg;
unsigned char index_flags; /* Flags for encoding link index info */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
@@ -238,7 +238,7 @@ H5O__linfo_copy(const void *_mesg, void *_dest)
H5O_linfo_t * dest = (H5O_linfo_t *)_dest;
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(linfo);
@@ -276,7 +276,7 @@ H5O__linfo_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const voi
const H5O_linfo_t *linfo = (const H5O_linfo_t *)_mesg;
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Set return value */
ret_value =
@@ -306,7 +306,7 @@ H5O__linfo_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const voi
static herr_t
H5O__linfo_free(void *mesg)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(mesg);
@@ -333,7 +333,7 @@ H5O__linfo_delete(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, void *_mesg)
H5O_linfo_t *linfo = (H5O_linfo_t *)_mesg;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f);
@@ -372,7 +372,7 @@ H5O__linfo_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *native_src, H5F_t *fi
H5G_copy_file_ud_t *udata = (H5G_copy_file_ud_t *)_udata;
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC_TAG(H5AC__COPIED_TAG)
+ FUNC_ENTER_PACKAGE_TAG(H5AC__COPIED_TAG)
/* check args */
HDassert(linfo_src);
@@ -438,7 +438,7 @@ H5O__linfo_post_copy_file_cb(const H5O_link_t *src_lnk, void *_udata)
hbool_t dst_lnk_init = FALSE; /* Whether the destination link is initialized */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(src_lnk);
@@ -488,7 +488,7 @@ H5O__linfo_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_l
H5O_linfo_t * linfo_dst = (H5O_linfo_t *)mesg_dst;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(src_oloc && src_oloc->file);
@@ -539,7 +539,7 @@ H5O__linfo_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int i
{
const H5O_linfo_t *linfo = (const H5O_linfo_t *)_mesg;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
diff --git a/src/H5Olink.c b/src/H5Olink.c
index 51c44a3..acc7ee2 100644
--- a/src/H5Olink.c
+++ b/src/H5Olink.c
@@ -120,7 +120,7 @@ H5O__link_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSE
const uint8_t *p_end = p + p_size; /* End of the p buffer */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f);
@@ -293,7 +293,7 @@ H5O__link_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
uint64_t len; /* Length of a string in the message */
unsigned char link_flags; /* Flags for encoding link info */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
@@ -417,7 +417,7 @@ H5O__link_copy(const void *_mesg, void *_dest)
H5O_link_t * dest = (H5O_link_t *)_dest;
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(lnk);
@@ -484,7 +484,7 @@ H5O__link_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void
size_t name_size; /* Size of encoded name length */
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDcompile_assert(sizeof(uint64_t) >= sizeof(size_t));
@@ -553,7 +553,7 @@ H5O__link_reset(void *_mesg)
{
H5O_link_t *lnk = (H5O_link_t *)_mesg;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
if (lnk) {
/* Free information for link (but don't free link pointer) */
@@ -586,7 +586,7 @@ H5O__link_free(void *_mesg)
{
H5O_link_t *lnk = (H5O_link_t *)_mesg;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(lnk);
@@ -682,7 +682,7 @@ static herr_t
H5O__link_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSED *native_src,
hbool_t *deleted, const H5O_copy_t *cpy_info, void H5_ATTR_UNUSED *udata)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(deleted);
@@ -721,7 +721,7 @@ H5O__link_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *native_src, H5F_t H5_A
H5O_link_t *link_src = (H5O_link_t *)native_src;
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(link_src);
@@ -761,7 +761,7 @@ H5O__link_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_lo
H5O_link_t * link_dst = (H5O_link_t *)mesg_dst;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(link_src);
@@ -798,7 +798,7 @@ H5O__link_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int in
const H5O_link_t *lnk = (const H5O_link_t *)_mesg;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f);
diff --git a/src/H5Omessage.c b/src/H5Omessage.c
index fa20aa1..8179853 100644
--- a/src/H5Omessage.c
+++ b/src/H5Omessage.c
@@ -579,7 +579,7 @@ H5O__msg_reset_real(const H5O_msg_class_t *type, void *native)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(type);
@@ -1020,7 +1020,7 @@ H5O__msg_remove_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence, un
htri_t try_remove = FALSE; /* Whether to try removing a message */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(mesg);
@@ -1882,7 +1882,7 @@ H5O__copy_mesg(H5F_t *f, H5O_t *oh, size_t idx, const H5O_msg_class_t *type, con
hbool_t chk_dirtied = FALSE; /* Flag for unprotecting chunk */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f);
diff --git a/src/H5Omodule.h b/src/H5Omodule.h
index 8afba29..18e329c 100644
--- a/src/H5Omodule.h
+++ b/src/H5Omodule.h
@@ -25,9 +25,8 @@
* reporting macros.
*/
#define H5O_MODULE
-#define H5_MY_PKG H5O
-#define H5_MY_PKG_ERR H5E_OHDR
-#define H5_MY_PKG_INIT YES
+#define H5_MY_PKG H5O
+#define H5_MY_PKG_ERR H5E_OHDR
/**\defgroup H5O H5O
*
diff --git a/src/H5Omtime.c b/src/H5Omtime.c
index 7d3c56a..a0bd2ab 100644
--- a/src/H5Omtime.c
+++ b/src/H5Omtime.c
@@ -120,7 +120,7 @@ H5O__mtime_new_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
uint32_t tmp_time; /* Temporary copy of the time */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f);
@@ -175,7 +175,7 @@ H5O__mtime_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign
int i; /* Local index variable */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f);
@@ -228,7 +228,7 @@ H5O__mtime_new_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_sh
{
const time_t *mesg = (const time_t *)_mesg;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
@@ -268,7 +268,7 @@ H5O__mtime_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared
const time_t *mesg = (const time_t *)_mesg;
struct tm * tm;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
@@ -305,7 +305,7 @@ H5O__mtime_copy(const void *_mesg, void *_dest)
time_t * dest = (time_t *)_dest;
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(mesg);
@@ -343,7 +343,7 @@ static size_t
H5O__mtime_new_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
const void H5_ATTR_UNUSED *mesg)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
@@ -373,7 +373,7 @@ static size_t
H5O__mtime_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
const void H5_ATTR_UNUSED *mesg)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
@@ -397,7 +397,7 @@ H5O__mtime_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_sh
static herr_t
H5O__mtime_free(void *mesg)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(mesg);
@@ -425,7 +425,7 @@ H5O__mtime_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int i
struct tm * tm;
char buf[128];
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
diff --git a/src/H5Oname.c b/src/H5Oname.c
index 35578a9..ec9ba12 100644
--- a/src/H5Oname.c
+++ b/src/H5Oname.c
@@ -84,7 +84,7 @@ H5O__name_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigne
H5O_name_t *mesg;
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f);
@@ -125,7 +125,7 @@ H5O__name_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
{
const H5O_name_t *mesg = (const H5O_name_t *)_mesg;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
@@ -160,7 +160,7 @@ H5O__name_copy(const void *_mesg, void *_dest)
H5O_name_t * dest = (H5O_name_t *)_dest;
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(mesg);
@@ -207,7 +207,7 @@ H5O__name_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_sha
const H5O_name_t *mesg = (const H5O_name_t *)_mesg;
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
@@ -236,7 +236,7 @@ H5O__name_reset(void *_mesg)
{
H5O_name_t *mesg = (H5O_name_t *)_mesg;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(mesg);
@@ -264,7 +264,7 @@ H5O__name_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int in
{
const H5O_name_t *mesg = (const H5O_name_t *)_mesg;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
diff --git a/src/H5Opline.c b/src/H5Opline.c
index 243f454..7f73801 100644
--- a/src/H5Opline.c
+++ b/src/H5Opline.c
@@ -122,7 +122,7 @@ H5O__pline_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign
const uint8_t * p_end = p + p_size - 1; /* End of the p buffer */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(p);
@@ -260,7 +260,7 @@ H5O__pline_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p /*out*/, const void *mesg)
const H5Z_filter_info_t *filter; /* Filter to encode */
size_t i, j; /* Local index variables */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(p);
@@ -362,7 +362,7 @@ H5O__pline_copy(const void *_src, void *_dst /*out*/)
size_t i; /* Local index variable */
H5O_pline_t * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Allocate pipeline message, if not provided */
if (!dst && NULL == (dst = H5FL_MALLOC(H5O_pline_t)))
@@ -453,7 +453,7 @@ H5O__pline_size(const H5F_t H5_ATTR_UNUSED *f, const void *mesg)
size_t i; /* Local index variable */
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Message header */
ret_value = (size_t)(1 + /*version */
@@ -515,7 +515,7 @@ H5O__pline_reset(void *mesg)
H5O_pline_t *pline = (H5O_pline_t *)mesg; /* Pipeline message */
size_t i; /* Local index variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* NOTE: This function can be called during error processing from
* other API calls so DO NOT ASSUME THAT ANY VALUES ARE SANE.
@@ -565,7 +565,7 @@ H5O__pline_reset(void *mesg)
static herr_t
H5O__pline_free(void *mesg)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(mesg);
@@ -597,7 +597,7 @@ H5O__pline_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src,
H5O_copy_file_ud_common_t *udata = (H5O_copy_file_ud_common_t *)_udata; /* Object copying user data */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(pline_src);
@@ -641,7 +641,7 @@ H5O__pline_debug(H5F_t H5_ATTR_UNUSED *f, const void *mesg, FILE *stream, int in
const H5O_pline_t *pline = (const H5O_pline_t *)mesg;
size_t i, j;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
diff --git a/src/H5Opublic.h b/src/H5Opublic.h
index 70f451e..ba352c8 100644
--- a/src/H5Opublic.h
+++ b/src/H5Opublic.h
@@ -291,10 +291,6 @@ H5_DLL hid_t H5Oopen_async(const char *app_file, const char *app_func, unsigned
* \details H5Oopen_by_token() opens an object specified by the object
* identifier, \p loc_id and object token, \p token.
*
- * \par Example
- * An example snippet from examples/h5_extlink.c:
- * \snippet h5_extlink.c H5Open_by_token_snip
- *
* \since 1.12.0
*
*/
diff --git a/src/H5Orefcount.c b/src/H5Orefcount.c
index 500ab0f..0da849d 100644
--- a/src/H5Orefcount.c
+++ b/src/H5Orefcount.c
@@ -91,7 +91,7 @@ H5O__refcount_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
H5O_refcount_t *refcount = NULL; /* Reference count */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f);
@@ -136,7 +136,7 @@ H5O__refcount_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_sha
{
const H5O_refcount_t *refcount = (const H5O_refcount_t *)_mesg;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
@@ -173,7 +173,7 @@ H5O__refcount_copy(const void *_mesg, void *_dest)
H5O_refcount_t * dest = (H5O_refcount_t *)_dest;
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(refcount);
@@ -211,7 +211,7 @@ H5O__refcount_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable
{
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Set return value */
ret_value = 1 /* Version */
@@ -235,7 +235,7 @@ H5O__refcount_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable
static herr_t
H5O__refcount_free(void *mesg)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(mesg);
@@ -263,7 +263,7 @@ H5O__refcount_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_U
hbool_t *deleted, const H5O_copy_t H5_ATTR_UNUSED *cpy_info,
void H5_ATTR_UNUSED *udata)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(deleted);
@@ -294,7 +294,7 @@ H5O__refcount_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, in
{
const H5O_refcount_t *refcount = (const H5O_refcount_t *)_mesg;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c
index 574103d..e94b7c4 100644
--- a/src/H5Osdspace.c
+++ b/src/H5Osdspace.c
@@ -114,7 +114,7 @@ H5O__sdspace_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UN
const uint8_t *p_end = p + p_size - 1; /* End of the p buffer */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f);
@@ -233,7 +233,7 @@ H5O__sdspace_encode(H5F_t *f, uint8_t *p, const void *_mesg)
unsigned flags = 0;
unsigned u; /* Local counting variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
@@ -301,7 +301,7 @@ H5O__sdspace_copy(const void *_mesg, void *_dest)
H5S_extent_t * dest = (H5S_extent_t *)_dest;
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(mesg);
@@ -346,7 +346,7 @@ H5O__sdspace_size(const H5F_t *f, const void *_mesg)
const H5S_extent_t *space = (const H5S_extent_t *)_mesg;
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Basic information for all dataspace messages */
ret_value = (size_t)(1 + /* Version */
@@ -382,7 +382,7 @@ H5O__sdspace_reset(void *_mesg)
{
H5S_extent_t *mesg = (H5S_extent_t *)_mesg;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
H5S__extent_release(mesg);
@@ -404,7 +404,7 @@ H5O__sdspace_reset(void *_mesg)
static herr_t
H5O__sdspace_free(void *mesg)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(mesg);
@@ -436,7 +436,7 @@ H5O__sdspace_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src,
H5D_copy_file_ud_t *udata = (H5D_copy_file_ud_t *)_udata; /* Dataset copying user data */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(file_src);
@@ -492,7 +492,7 @@ H5O__sdspace_debug(H5F_t H5_ATTR_UNUSED *f, const void *mesg, FILE *stream, int
{
const H5S_extent_t *sdim = (const H5S_extent_t *)mesg;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
diff --git a/src/H5Oshared.c b/src/H5Oshared.c
index 51ea145..249b32a 100644
--- a/src/H5Oshared.c
+++ b/src/H5Oshared.c
@@ -108,7 +108,7 @@ H5O__shared_read(H5F_t *f, H5O_t *open_oh, unsigned *ioflags, const H5O_shared_t
uint8_t mesg_buf[H5O_MESG_BUF_SIZE]; /* Buffer for deserializing messages */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f);
@@ -217,7 +217,7 @@ H5O__shared_link_adj(H5F_t *f, H5O_t *open_oh, const H5O_msg_class_t *type, H5O_
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f);
diff --git a/src/H5Oshared.h b/src/H5Oshared.h
index f164db3..d672032 100644
--- a/src/H5Oshared.h
+++ b/src/H5Oshared.h
@@ -217,7 +217,7 @@ H5O_SHARED_DELETE(H5F_t *f, H5O_t *open_oh, void *_mesg)
H5O_shared_t *sh_mesg = (H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#ifndef H5O_SHARED_TYPE
#error "Need to define H5O_SHARED_TYPE macro!"
@@ -268,7 +268,7 @@ H5O_SHARED_LINK(H5F_t *f, H5O_t *open_oh, void *_mesg)
H5O_shared_t *sh_mesg = (H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#ifndef H5O_SHARED_TYPE
#error "Need to define H5O_SHARED_TYPE macro!"
@@ -319,7 +319,7 @@ H5O_SHARED_COPY_FILE(H5F_t *file_src, void *_native_src, H5F_t *file_dst, hbool_
void *dst_mesg = NULL; /* Destination message */
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#ifndef H5O_SHARED_TYPE
#error "Need to define H5O_SHARED_TYPE macro!"
diff --git a/src/H5Oshmesg.c b/src/H5Oshmesg.c
index a4e8b8f..c04eeb1 100644
--- a/src/H5Oshmesg.c
+++ b/src/H5Oshmesg.c
@@ -77,7 +77,7 @@ H5O__shmesg_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU
H5O_shmesg_table_t *mesg; /* Native message */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(f);
@@ -116,7 +116,7 @@ H5O__shmesg_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
{
const H5O_shmesg_table_t *mesg = (const H5O_shmesg_table_t *)_mesg;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(f);
@@ -152,7 +152,7 @@ H5O__shmesg_copy(const void *_mesg, void *_dest)
H5O_shmesg_table_t * dest = (H5O_shmesg_table_t *)_dest;
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(mesg);
@@ -190,7 +190,7 @@ H5O__shmesg_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const vo
{
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(f);
@@ -219,7 +219,7 @@ H5O__shmesg_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int
{
const H5O_shmesg_table_t *mesg = (const H5O_shmesg_table_t *)_mesg;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(f);
diff --git a/src/H5Ostab.c b/src/H5Ostab.c
index 213b8a0..06480cf 100644
--- a/src/H5Ostab.c
+++ b/src/H5Ostab.c
@@ -95,7 +95,7 @@ H5O__stab_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSE
H5O_stab_t *stab = NULL;
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f);
@@ -135,7 +135,7 @@ H5O__stab_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
{
const H5O_stab_t *stab = (const H5O_stab_t *)_mesg;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
@@ -171,7 +171,7 @@ H5O__stab_copy(const void *_mesg, void *_dest)
H5O_stab_t * dest = (H5O_stab_t *)_dest;
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(stab);
@@ -209,7 +209,7 @@ H5O__stab_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void
{
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Set return value */
ret_value = (size_t)(2 * H5F_SIZEOF_ADDR(f));
@@ -232,7 +232,7 @@ H5O__stab_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void
static herr_t
H5O__stab_free(void *mesg)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(mesg);
@@ -258,7 +258,7 @@ H5O__stab_delete(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, void *mesg)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(f);
@@ -297,7 +297,7 @@ H5O__stab_copy_file(H5F_t *file_src, void *native_src, H5F_t *file_dst,
size_t size_hint; /* Local heap initial size */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(stab_src);
@@ -358,7 +358,7 @@ H5O__stab_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_lo
H5G_bt_it_cpy_t udata; /* B-tree user data */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(stab_src);
@@ -403,7 +403,7 @@ H5O__stab_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int in
{
const H5O_stab_t *stab = (const H5O_stab_t *)_mesg;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(f);
diff --git a/src/H5Ounknown.c b/src/H5Ounknown.c
index dc43a6c..99a3a72 100644
--- a/src/H5Ounknown.c
+++ b/src/H5Ounknown.c
@@ -74,7 +74,7 @@ H5FL_DEFINE(H5O_unknown_t);
static herr_t
H5O__unknown_free(void *mesg)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(mesg);
diff --git a/src/H5P.c b/src/H5P.c
index c671ea0..5586d47 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -1122,7 +1122,7 @@ H5P__iterate_cb(H5P_genprop_t *prop, void *_udata)
H5P_iter_ud_t *udata = (H5P_iter_ud_t *)_udata; /* Pointer to user data */
int ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(prop);
diff --git a/src/H5PB.c b/src/H5PB.c
index c528fd8..4eef191 100644
--- a/src/H5PB.c
+++ b/src/H5PB.c
@@ -2714,7 +2714,7 @@ H5PB__allocate_page(H5PB_t *page_buf, size_t size, hbool_t clean_image)
void * image_ptr = NULL;
H5PB_entry_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* sanity checks */
HDassert(page_buf);
@@ -2922,7 +2922,7 @@ done:
static void
H5PB__deallocate_page(H5PB_entry_t *entry_ptr)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* sanity checks */
HDassert(entry_ptr);
@@ -2989,7 +2989,7 @@ H5PB__evict_entry(H5F_shared_t *shared, H5PB_entry_t *entry_ptr, hbool_t force,
H5PB_t *page_buf = shared->page_buf;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* sanity checks */
HDassert(page_buf);
@@ -3108,7 +3108,7 @@ H5PB__flush_entry(H5F_shared_t *shared, H5PB_t *page_buf, H5PB_entry_t *const en
haddr_t eoa; /* Current EOA for the file */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* sanity checks */
HDassert(shared);
@@ -3215,7 +3215,7 @@ H5PB__load_page(H5F_shared_t *shared, H5PB_t *page_buf, haddr_t addr, H5FD_mem_t
void * image_ptr = NULL;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* sanity checks */
HDassert(shared);
@@ -3372,7 +3372,7 @@ H5PB__make_space(H5F_shared_t *shared, H5PB_t *page_buf, H5FD_mem_t inserted_typ
H5PB_entry_t *evict_ptr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* sanity checks */
HDassert(page_buf);
@@ -3486,7 +3486,7 @@ H5PB__mark_entry_clean(H5PB_t *page_buf, H5PB_entry_t *entry_ptr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* sanity checks */
HDassert(page_buf);
@@ -3546,7 +3546,7 @@ H5PB__mark_entry_dirty(H5F_shared_t *shared, H5PB_t *page_buf, H5PB_entry_t *ent
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* sanity checks */
HDassert(page_buf);
@@ -3762,7 +3762,7 @@ H5PB__read_meta(H5F_shared_t *shared, H5FD_mem_t type, haddr_t addr, size_t size
size_t clipped_size; /* possibley clipped size */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(shared);
@@ -4070,7 +4070,7 @@ H5PB__read_raw(H5F_shared_t *shared, H5FD_mem_t type, haddr_t addr, size_t size,
hsize_t i; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(shared);
@@ -4363,7 +4363,7 @@ H5PB__write_meta(H5F_shared_t *shared, H5FD_mem_t type, haddr_t addr, size_t siz
size_t offset; /* offset of write in page */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(shared);
@@ -4580,7 +4580,7 @@ H5PB__write_raw(H5F_shared_t *shared, H5FD_mem_t type, haddr_t addr, size_t size
size_t offset; /* offset of write in a page */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(shared);
diff --git a/src/H5PBmodule.h b/src/H5PBmodule.h
index 21294c8..39db5d9 100644
--- a/src/H5PBmodule.h
+++ b/src/H5PBmodule.h
@@ -25,8 +25,7 @@
* reporting macros.
*/
#define H5PB_MODULE
-#define H5_MY_PKG H5PB
-#define H5_MY_PKG_ERR H5E_RESOURCE
-#define H5_MY_PKG_INIT NO
+#define H5_MY_PKG H5PB
+#define H5_MY_PKG_ERR H5E_RESOURCE
#endif /* H5PBmodule_H */
diff --git a/src/H5PLmodule.h b/src/H5PLmodule.h
index a093096..4751a48 100644
--- a/src/H5PLmodule.h
+++ b/src/H5PLmodule.h
@@ -23,9 +23,8 @@
* reporting macros.
*/
#define H5PL_MODULE
-#define H5_MY_PKG H5PL
-#define H5_MY_PKG_ERR H5E_PLUGIN
-#define H5_MY_PKG_INIT YES
+#define H5_MY_PKG H5PL
+#define H5_MY_PKG_ERR H5E_PLUGIN
/**\defgroup H5PL H5PL
*
diff --git a/src/H5PLpath.c b/src/H5PLpath.c
index b86fd6e..291d259 100644
--- a/src/H5PLpath.c
+++ b/src/H5PLpath.c
@@ -105,7 +105,7 @@ H5PL__insert_at(const char *path, unsigned int idx)
char * path_copy = NULL; /* copy of path string (for storing) */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args - Just assert on package functions */
HDassert(path);
@@ -155,7 +155,7 @@ H5PL__make_space_at(unsigned int idx)
unsigned u; /* iterator */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args - Just assert on package functions */
HDassert(idx < H5PL_path_capacity_g);
@@ -186,7 +186,7 @@ H5PL__replace_at(const char *path, unsigned int idx)
char * path_copy = NULL; /* copy of path string (for storing) */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args - Just assert on package functions */
HDassert(path);
@@ -348,7 +348,7 @@ H5PL__expand_path_table(void)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Update the capacity */
H5PL_path_capacity_g += H5PL_PATH_CAPACITY_ADD;
@@ -610,7 +610,7 @@ H5PL__path_table_iterate_process_path(const char *plugin_path, H5PL_iterate_type
struct dirent *dp = NULL; /* Directory entry */
herr_t ret_value = H5_ITER_CONT;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(plugin_path);
HDassert(iter_op);
@@ -701,7 +701,7 @@ H5PL__path_table_iterate_process_path(const char *plugin_path, H5PL_iterate_type
char service[2048];
herr_t ret_value = H5_ITER_CONT;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args - Just assert on package functions */
HDassert(plugin_path);
@@ -841,7 +841,7 @@ H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *fo
struct dirent *dp = NULL; /* Directory entry */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args - Just assert on package functions */
HDassert(search_params);
@@ -922,7 +922,7 @@ H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *fo
char service[2048];
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args - Just assert on package functions */
HDassert(search_params);
diff --git a/src/H5PLplugin_cache.c b/src/H5PLplugin_cache.c
index 25e373f..9a579f9 100644
--- a/src/H5PLplugin_cache.c
+++ b/src/H5PLplugin_cache.c
@@ -175,7 +175,7 @@ H5PL__expand_cache(void)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Update the capacity */
H5PL_cache_capacity_g += H5PL_CACHE_CAPACITY_ADD;
diff --git a/src/H5Pdapl.c b/src/H5Pdapl.c
index d374b25..ad47f20 100644
--- a/src/H5Pdapl.c
+++ b/src/H5Pdapl.c
@@ -197,7 +197,7 @@ H5P__dacc_reg_prop(H5P_genclass_t *pclass)
hsize_t printf_gap = H5D_ACS_VDS_PRINTF_GAP_DEF; /* Default VDS printf gap */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Register the size of raw data chunk cache (elements) */
if (H5P__register_real(pclass, H5D_ACS_DATA_CACHE_NUM_SLOTS_NAME, H5D_ACS_DATA_CACHE_NUM_SLOTS_SIZE,
@@ -266,7 +266,7 @@ static herr_t
H5P__dapl_vds_file_pref_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name,
size_t H5_ATTR_UNUSED size, void *value)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(value);
@@ -290,7 +290,7 @@ static herr_t
H5P__dapl_vds_file_pref_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name,
size_t H5_ATTR_UNUSED size, void *value)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(value);
@@ -320,7 +320,7 @@ H5P__dapl_vds_file_pref_enc(const void *value, void **_pp, size_t *size)
uint64_t enc_value;
unsigned enc_size;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
@@ -371,7 +371,7 @@ H5P__dapl_vds_file_pref_dec(const void **_pp, void *_value)
unsigned enc_size; /* Size of encoded property */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(pp);
HDassert(*pp);
@@ -414,7 +414,7 @@ static herr_t
H5P__dapl_vds_file_pref_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name,
size_t H5_ATTR_UNUSED size, void *value)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(value);
@@ -434,7 +434,7 @@ H5P__dapl_vds_file_pref_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNU
static herr_t
H5P__dapl_vds_file_pref_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(value);
@@ -460,7 +460,7 @@ H5P__dapl_vds_file_pref_cmp(const void *value1, const void *value2, size_t H5_AT
const char *pref2 = *(const char *const *)value2;
int ret_value = 0;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
if (NULL == pref1 && NULL != pref2)
HGOTO_DONE(1);
@@ -484,7 +484,7 @@ done:
static herr_t
H5P__dapl_vds_file_pref_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(value);
@@ -506,7 +506,7 @@ static herr_t
H5P__dapl_efile_pref_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name,
size_t H5_ATTR_UNUSED size, void *value)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(value);
@@ -530,7 +530,7 @@ static herr_t
H5P__dapl_efile_pref_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name,
size_t H5_ATTR_UNUSED size, void *value)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(value);
@@ -560,7 +560,7 @@ H5P__dapl_efile_pref_enc(const void *value, void **_pp, size_t *size)
uint64_t enc_value;
unsigned enc_size;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
@@ -611,7 +611,7 @@ H5P__dapl_efile_pref_dec(const void **_pp, void *_value)
unsigned enc_size; /* Size of encoded property */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(pp);
HDassert(*pp);
@@ -654,7 +654,7 @@ static herr_t
H5P__dapl_efile_pref_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name,
size_t H5_ATTR_UNUSED size, void *value)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(value);
@@ -674,7 +674,7 @@ H5P__dapl_efile_pref_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
static herr_t
H5P__dapl_efile_pref_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(value);
@@ -700,7 +700,7 @@ H5P__dapl_efile_pref_cmp(const void *value1, const void *value2, size_t H5_ATTR_
const char *pref2 = *(const char *const *)value2;
int ret_value = 0;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
if (NULL == pref1 && NULL != pref2)
HGOTO_DONE(1);
@@ -724,7 +724,7 @@ done:
static herr_t
H5P__dapl_efile_pref_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(value);
@@ -870,7 +870,7 @@ H5P__encode_chunk_cache_nslots(const void *value, void **_pp, size_t *size)
uint8_t **pp = (uint8_t **)_pp;
unsigned enc_size; /* Size of encoded property */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
@@ -925,7 +925,7 @@ H5P__decode_chunk_cache_nslots(const void **_pp, void *_value)
uint64_t enc_value; /* Decoded property value */
unsigned enc_size; /* Size of encoded property */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
@@ -970,7 +970,7 @@ H5P__encode_chunk_cache_nbytes(const void *value, void **_pp, size_t *size)
uint8_t **pp = (uint8_t **)_pp;
unsigned enc_size; /* Size of encoded property */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
@@ -1025,7 +1025,7 @@ H5P__decode_chunk_cache_nbytes(const void **_pp, void *_value)
uint64_t enc_value; /* Decoded property value */
unsigned enc_size; /* Size of encoded property */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
@@ -1141,7 +1141,7 @@ H5P__dacc_vds_view_enc(const void *value, void **_pp, size_t *size)
const H5D_vds_view_t *view = (const H5D_vds_view_t *)value; /* Create local alias for values */
uint8_t ** pp = (uint8_t **)_pp;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(view);
@@ -1173,7 +1173,7 @@ H5P__dacc_vds_view_dec(const void **_pp, void *_value)
H5D_vds_view_t *view = (H5D_vds_view_t *)_value;
const uint8_t **pp = (const uint8_t **)_pp;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(pp);
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c
index d08d892..3c7bc09 100644
--- a/src/H5Pdcpl.c
+++ b/src/H5Pdcpl.c
@@ -349,7 +349,7 @@ H5P__dcrt_reg_prop(H5P_genclass_t *pclass)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Register the storage layout property */
if (H5P__register_real(pclass, H5D_CRT_LAYOUT_NAME, H5D_CRT_LAYOUT_SIZE, &H5D_def_layout_g, NULL,
@@ -410,7 +410,7 @@ H5P__dcrt_layout_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *na
H5O_layout_t new_layout;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
@@ -447,7 +447,7 @@ H5P__dcrt_layout_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *na
H5O_layout_t new_layout;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
@@ -488,7 +488,7 @@ H5P__dcrt_layout_enc(const void *value, void **_pp, size_t *size)
size_t u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(layout);
@@ -622,7 +622,7 @@ H5P__dcrt_layout_dec(const void **_pp, void *value)
const uint8_t ** pp = (const uint8_t **)_pp;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(pp);
@@ -816,7 +816,7 @@ H5P__dcrt_layout_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *na
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
@@ -849,7 +849,7 @@ H5P__dcrt_layout_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED siz
H5O_layout_t new_layout;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(layout);
@@ -887,7 +887,7 @@ H5P__dcrt_layout_cmp(const void *_layout1, const void *_layout2, size_t H5_ATTR_
*layout2 = (const H5O_layout_t *)_layout2;
herr_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(layout1);
@@ -1015,7 +1015,7 @@ H5P__dcrt_layout_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED si
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
@@ -1049,7 +1049,7 @@ H5P__dcrt_fill_value_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
H5O_fill_t new_fill;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
@@ -1086,7 +1086,7 @@ H5P__dcrt_fill_value_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
H5O_fill_t new_fill;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
@@ -1127,7 +1127,7 @@ H5P__dcrt_fill_value_enc(const void *value, void **_pp, size_t *size)
uint64_t enc_value;
unsigned enc_size = 0;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
@@ -1218,7 +1218,7 @@ H5P__dcrt_fill_value_dec(const void **_pp, void *_value)
const uint8_t **pp = (const uint8_t **)_pp;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
HDcompile_assert(sizeof(ssize_t) <= sizeof(int64_t));
@@ -1281,7 +1281,7 @@ H5P__dcrt_fill_value_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
@@ -1314,7 +1314,7 @@ H5P__dcrt_fill_value_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED
H5O_fill_t new_fill;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(fill);
@@ -1417,7 +1417,7 @@ H5P__dcrt_fill_value_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSE
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
@@ -1451,7 +1451,7 @@ H5P__dcrt_ext_file_list_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNU
H5O_efl_t new_efl;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
@@ -1488,7 +1488,7 @@ H5P__dcrt_ext_file_list_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNU
H5O_efl_t new_efl;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
@@ -1529,7 +1529,7 @@ H5P__dcrt_ext_file_list_enc(const void *value, void **_pp, size_t *size)
unsigned enc_size;
uint64_t enc_value;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(efl);
@@ -1614,7 +1614,7 @@ H5P__dcrt_ext_file_list_dec(const void **_pp, void *_value)
uint64_t enc_value;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(pp);
@@ -1695,7 +1695,7 @@ H5P__dcrt_ext_file_list_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNU
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
@@ -1728,7 +1728,7 @@ H5P__dcrt_ext_file_list_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNU
H5O_efl_t new_efl;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(efl);
@@ -1767,7 +1767,7 @@ H5P__dcrt_ext_file_list_cmp(const void *_efl1, const void *_efl2, size_t H5_ATTR
int cmp_value; /* Value from comparison */
herr_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(efl1);
@@ -1847,7 +1847,7 @@ H5P__dcrt_ext_file_list_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UN
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
@@ -1878,7 +1878,7 @@ H5P__set_layout(H5P_genplist_t *plist, const H5O_layout_t *layout)
unsigned alloc_time_state; /* State of allocation time property */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Get the allocation time state */
if (H5P_get(plist, H5D_CRT_ALLOC_TIME_STATE_NAME, &alloc_time_state) < 0)
@@ -1949,7 +1949,7 @@ H5P__init_def_layout(void)
const H5O_storage_chunk_t def_store_chunk = H5D_DEF_STORAGE_CHUNK_INIT;
const H5O_storage_virtual_t def_store_virtual = H5D_DEF_STORAGE_VIRTUAL_INIT;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Initialize the default layout info for non-contigous layouts */
H5D_def_layout_compact_g.storage.type = H5D_COMPACT;
diff --git a/src/H5Pdxpl.c b/src/H5Pdxpl.c
index c901931..8e640de 100644
--- a/src/H5Pdxpl.c
+++ b/src/H5Pdxpl.c
@@ -295,7 +295,7 @@ H5P__dxfr_reg_prop(H5P_genclass_t *pclass)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Register the max. temp buffer size property */
if (H5P__register_real(pclass, H5D_XFER_MAX_TEMP_BUF_NAME, H5D_XFER_MAX_TEMP_BUF_SIZE,
@@ -467,7 +467,7 @@ H5P__dxfr_bkgr_buf_type_enc(const void *value, void **_pp, size_t *size)
const H5T_bkg_t *bkgr_buf_type = (const H5T_bkg_t *)value; /* Create local alias for values */
uint8_t ** pp = (uint8_t **)_pp;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(bkgr_buf_type);
@@ -504,7 +504,7 @@ H5P__dxfr_bkgr_buf_type_dec(const void **_pp, void *_value)
H5T_bkg_t * bkgr_buf_type = (H5T_bkg_t *)_value; /* Background buffer type */
const uint8_t **pp = (const uint8_t **)_pp;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(pp);
@@ -538,7 +538,7 @@ H5P__dxfr_btree_split_ratio_enc(const void *value, void **_pp, size_t *size)
const double *btree_split_ratio = (const double *)value; /* Create local alias for values */
uint8_t ** pp = (uint8_t **)_pp;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(btree_split_ratio);
@@ -589,7 +589,7 @@ H5P__dxfr_btree_split_ratio_dec(const void **_pp, void *_value)
const uint8_t **pp = (const uint8_t **)_pp;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(pp);
@@ -629,7 +629,7 @@ H5P__dxfr_xform_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *nam
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
@@ -661,7 +661,7 @@ H5P__dxfr_xform_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *nam
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
@@ -699,7 +699,7 @@ H5P__dxfr_xform_enc(const void *value, void **_pp, size_t *size)
uint8_t ** pp = (uint8_t **)_pp;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
@@ -771,7 +771,7 @@ H5P__dxfr_xform_dec(const void **_pp, void *_value)
uint64_t enc_value;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(pp);
@@ -816,7 +816,7 @@ H5P__dxfr_xform_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *nam
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(value);
@@ -846,7 +846,7 @@ H5P__dxfr_xform_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
@@ -882,7 +882,7 @@ H5P__dxfr_xform_cmp(const void *_xform1, const void *_xform2, size_t H5_ATTR_UNU
const char *pexp1, *pexp2; /* Pointers to transform expressions */
herr_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(xform1);
@@ -936,7 +936,7 @@ H5P__dxfr_xform_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED siz
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(value);
@@ -1756,7 +1756,7 @@ H5P__dxfr_io_xfer_mode_enc(const void *value, void **_pp, size_t *size)
const H5FD_mpio_xfer_t *xfer_mode = (const H5FD_mpio_xfer_t *)value; /* Create local alias for values */
uint8_t ** pp = (uint8_t **)_pp;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(xfer_mode);
@@ -1793,7 +1793,7 @@ H5P__dxfr_io_xfer_mode_dec(const void **_pp, void *_value)
H5FD_mpio_xfer_t *xfer_mode = (H5FD_mpio_xfer_t *)_value; /* I/O transfer mode */
const uint8_t ** pp = (const uint8_t **)_pp;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(pp);
@@ -1828,7 +1828,7 @@ H5P__dxfr_mpio_collective_opt_enc(const void *value, void **_pp, size_t *size)
(const H5FD_mpio_collective_opt_t *)value; /* Create local alias for values */
uint8_t **pp = (uint8_t **)_pp;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(coll_opt);
@@ -1866,7 +1866,7 @@ H5P__dxfr_mpio_collective_opt_dec(const void **_pp, void *_value)
(H5FD_mpio_collective_opt_t *)_value; /* MPI-I/O collective optimization mode */
const uint8_t **pp = (const uint8_t **)_pp;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(pp);
@@ -1901,7 +1901,7 @@ H5P__dxfr_mpio_chunk_opt_hard_enc(const void *value, void **_pp, size_t *size)
(const H5FD_mpio_chunk_opt_t *)value; /* Create local alias for values */
uint8_t **pp = (uint8_t **)_pp;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(chunk_opt);
@@ -1938,7 +1938,7 @@ H5P__dxfr_mpio_chunk_opt_hard_dec(const void **_pp, void *_value)
H5FD_mpio_chunk_opt_t *chunk_opt = (H5FD_mpio_chunk_opt_t *)_value; /* MPI-I/O chunk optimization mode */
const uint8_t ** pp = (const uint8_t **)_pp;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(pp);
@@ -2082,7 +2082,7 @@ H5P__dxfr_edc_enc(const void *value, void **_pp, size_t *size)
const H5Z_EDC_t *check = (const H5Z_EDC_t *)value; /* Create local alias for values */
uint8_t ** pp = (uint8_t **)_pp;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(check);
@@ -2119,7 +2119,7 @@ H5P__dxfr_edc_dec(const void **_pp, void *_value)
H5Z_EDC_t * check = (H5Z_EDC_t *)_value; /* EDC property */
const uint8_t **pp = (const uint8_t **)_pp;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(pp);
@@ -2151,7 +2151,7 @@ H5P__dxfr_dset_io_hyp_sel_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_U
H5S_t *new_space = NULL; /* New dataspace for property */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* If there's a dataspace I/O selection set, copy it */
if (orig_space) {
@@ -2192,7 +2192,7 @@ H5P__dxfr_dset_io_hyp_sel_cmp(const void *_space1, const void *_space2, size_t H
const H5S_t *const *space2 = (const H5S_t *const *)_space2; /* Create local aliases for values */
herr_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(space1);
@@ -2249,7 +2249,7 @@ H5P__dxfr_dset_io_hyp_sel_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_
H5S_t *space = *(H5S_t **)_value; /* Dataspace for property */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Release any dataspace */
if (space && H5S_close(space) < 0)
diff --git a/src/H5Pencdec.c b/src/H5Pencdec.c
index 01573d1..b0a355f 100644
--- a/src/H5Pencdec.c
+++ b/src/H5Pencdec.c
@@ -319,7 +319,7 @@ 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 */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(prop);
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c
index a9f21d1..7d3cf57 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -571,7 +571,7 @@ H5P__facc_reg_prop(H5P_genclass_t *pclass)
H5F_ACS_VOL_CONN_DEF; /* Default VOL connector ID & info (initialized from a variable) */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Register the initial metadata cache resize configuration */
if (H5P__register_real(pclass, H5F_ACS_META_CACHE_INIT_CONFIG_NAME, H5F_ACS_META_CACHE_INIT_CONFIG_SIZE,
@@ -891,7 +891,7 @@ H5P__facc_set_def_driver(void)
hid_t driver_id = H5I_INVALID_HID; /* VFL driver ID */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if VFL driver environment variable is set */
driver_env_var = HDgetenv(HDF5_DRIVER);
@@ -986,7 +986,7 @@ H5P__facc_set_def_driver_check_predefined(const char *driver_name, hid_t *driver
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(driver_name);
HDassert(driver_id);
@@ -1714,7 +1714,7 @@ H5P__file_driver_copy(void *value)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if (value) {
H5FD_driver_prop_t *info = (H5FD_driver_prop_t *)value; /* Driver ID & info struct */
@@ -1784,7 +1784,7 @@ H5P__file_driver_free(void *value)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if (value) {
H5FD_driver_prop_t *info = (H5FD_driver_prop_t *)value; /* Driver ID & info struct */
@@ -1827,7 +1827,7 @@ H5P__facc_file_driver_create(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNU
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Make copy of file driver */
if (H5P__file_driver_copy(value) < 0)
@@ -1856,7 +1856,7 @@ H5P__facc_file_driver_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSE
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
@@ -1888,7 +1888,7 @@ H5P__facc_file_driver_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSE
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
@@ -1920,7 +1920,7 @@ H5P__facc_file_driver_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSE
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Free the file driver ID & info */
if (H5P__file_driver_free(value) < 0)
@@ -1948,7 +1948,7 @@ H5P__facc_file_driver_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSE
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Make copy of file driver */
if (H5P__file_driver_copy(value) < 0)
@@ -1983,7 +1983,7 @@ H5P__facc_file_driver_cmp(const void *_info1, const void *_info2, size_t H5_ATTR
int cmp_value; /* Value from comparison */
herr_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(info1);
@@ -2050,7 +2050,7 @@ H5P__facc_file_driver_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUS
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Free the file driver */
if (H5P__file_driver_free(value) < 0)
@@ -3462,7 +3462,7 @@ H5P__file_image_info_copy(void *value)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if (value) {
H5FD_file_image_info_t *info; /* Image info struct */
@@ -3536,7 +3536,7 @@ H5P__file_image_info_free(void *value)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if (value) {
H5FD_file_image_info_t *info; /* Image info struct */
@@ -3593,7 +3593,7 @@ H5P__facc_cache_image_config_cmp(const void *_config1, const void *_config2, siz
(const H5AC_cache_image_config_t *)_config2; /* Create local aliases for values */
int ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check for a property being set */
if (config1 == NULL && config2 != NULL)
@@ -3647,7 +3647,7 @@ H5P__facc_cache_image_config_enc(const void *value, void **_pp, size_t *size)
(const H5AC_cache_image_config_t *)value; /* Create local aliases for value */
uint8_t **pp = (uint8_t **)_pp;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(value);
@@ -3694,7 +3694,7 @@ H5P__facc_cache_image_config_dec(const void **_pp, void *_value)
unsigned enc_size;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(pp);
@@ -3741,7 +3741,7 @@ H5P__facc_file_image_info_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_U
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
@@ -3773,7 +3773,7 @@ H5P__facc_file_image_info_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_U
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
@@ -3807,7 +3807,7 @@ H5P__facc_file_image_info_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_U
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Free the file image info */
if (H5P__file_image_info_free(value) < 0)
@@ -3836,7 +3836,7 @@ H5P__facc_file_image_info_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_U
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Make copy of file image info */
if (H5P__file_image_info_copy(value) < 0)
@@ -3869,7 +3869,7 @@ H5P__facc_file_image_info_cmp(const void *_info1, const void *_info2, size_t H5_
*info2 = (const H5FD_file_image_info_t *)_info2;
herr_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(info1);
@@ -3935,7 +3935,7 @@ H5P__facc_file_image_info_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Free the file image info */
if (H5P__file_image_info_free(value) < 0)
@@ -3967,7 +3967,7 @@ H5P__facc_cache_config_cmp(const void *_config1, const void *_config2, size_t H5
(const H5AC_cache_config_t *)_config2; /* Create local aliases for values */
int ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check for a property being set */
if (config1 == NULL && config2 != NULL)
@@ -4138,7 +4138,7 @@ H5P__facc_cache_config_enc(const void *value, void **_pp, size_t *size)
unsigned enc_size; /* Size of encoded property */
uint64_t enc_value; /* Property to encode */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(value);
@@ -4283,7 +4283,7 @@ H5P__facc_cache_config_dec(const void **_pp, void *_value)
uint64_t enc_value;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(pp);
@@ -4415,7 +4415,7 @@ H5P__facc_fclose_degree_enc(const void *value, void **_pp, size_t *size)
(const H5F_close_degree_t *)value; /* Create local alias for values */
uint8_t **pp = (uint8_t **)_pp;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(fclose_degree);
@@ -4452,7 +4452,7 @@ H5P__facc_fclose_degree_dec(const void **_pp, void *_value)
H5F_close_degree_t *fclose_degree = (H5F_close_degree_t *)_value; /* File close degree */
const uint8_t ** pp = (const uint8_t **)_pp;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(pp);
@@ -4486,7 +4486,7 @@ H5P__facc_multi_type_enc(const void *value, void **_pp, size_t *size)
const H5FD_mem_t *type = (const H5FD_mem_t *)value; /* Create local alias for values */
uint8_t ** pp = (uint8_t **)_pp;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(type);
@@ -4523,7 +4523,7 @@ H5P__facc_multi_type_dec(const void **_pp, void *_value)
H5FD_mem_t * type = (H5FD_mem_t *)_value; /* File close degree */
const uint8_t **pp = (const uint8_t **)_pp;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(pp);
@@ -4556,7 +4556,7 @@ H5P__facc_libver_type_enc(const void *value, void **_pp, size_t *size)
const H5F_libver_t *type = (const H5F_libver_t *)value; /* Create local alias for values */
uint8_t ** pp = (uint8_t **)_pp;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(type);
@@ -4592,7 +4592,7 @@ H5P__facc_libver_type_dec(const void **_pp, void *_value)
H5F_libver_t * type = (H5F_libver_t *)_value;
const uint8_t **pp = (const uint8_t **)_pp;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(pp);
@@ -4625,7 +4625,7 @@ H5P__facc_vfd_swmr_config_enc(const void *value, void **_pp, size_t *size)
(const H5F_vfd_swmr_config_t *)value; /* Create local aliases for values */
uint8_t **pp = (uint8_t **)_pp;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(value);
@@ -4679,7 +4679,7 @@ H5P__facc_vfd_swmr_config_dec(const void **_pp, void *_value)
H5F_vfd_swmr_config_t *config = (H5F_vfd_swmr_config_t *)_value;
const uint8_t ** pp = (const uint8_t **)_pp;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(pp);
@@ -5001,7 +5001,7 @@ H5P__facc_mdc_log_location_enc(const void *value, void **_pp, size_t *size)
uint64_t enc_value;
unsigned enc_size;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
@@ -5054,7 +5054,7 @@ H5P__facc_mdc_log_location_dec(const void **_pp, void *_value)
unsigned enc_size; /* Size of encoded property */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(pp);
HDassert(*pp);
@@ -5098,7 +5098,7 @@ static herr_t
H5P__facc_mdc_log_location_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name,
size_t H5_ATTR_UNUSED size, void *value)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(value);
@@ -5119,7 +5119,7 @@ H5P__facc_mdc_log_location_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_
static herr_t
H5P__facc_mdc_log_location_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(value);
@@ -5146,7 +5146,7 @@ H5P__facc_mdc_log_location_cmp(const void *value1, const void *value2, size_t H5
const char *pref2 = *(const char *const *)value2;
int ret_value = 0;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
if (NULL == pref1 && NULL != pref2)
HGOTO_DONE(1);
@@ -5172,7 +5172,7 @@ done:
static herr_t
H5P__facc_mdc_log_location_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(value);
@@ -5419,7 +5419,7 @@ H5P__decode_coll_md_read_flag_t(const void **_pp, void *_value)
H5P_coll_md_read_flag_t *coll_md_read_flag = (H5P_coll_md_read_flag_t *)_value; /* File close degree */
const uint8_t ** pp = (const uint8_t **)_pp;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(pp);
@@ -5681,7 +5681,7 @@ H5P__facc_mpi_comm_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *
MPI_Comm comm_tmp = MPI_COMM_NULL;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Make a copy of the MPI communicator */
if (H5_mpi_comm_dup(*comm, &comm_tmp) < 0)
@@ -5715,7 +5715,7 @@ H5P__facc_mpi_comm_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *
MPI_Comm comm_tmp = MPI_COMM_NULL;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Make a copy of the MPI communicator */
if (H5_mpi_comm_dup(*comm, &comm_tmp) < 0)
@@ -5748,7 +5748,7 @@ H5P__facc_mpi_comm_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *
MPI_Comm *comm = (MPI_Comm *)value;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Free the MPI communicator */
if (H5_mpi_comm_free(comm) < 0)
@@ -5775,7 +5775,7 @@ H5P__facc_mpi_comm_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED s
MPI_Comm comm_tmp = MPI_COMM_NULL;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Make a copy of the MPI communicator */
if (H5_mpi_comm_dup(*comm, &comm_tmp) < 0)
@@ -5811,7 +5811,7 @@ H5P__facc_mpi_comm_cmp(const void *_comm1, const void *_comm2, size_t H5_ATTR_UN
const MPI_Comm *comm2 = (const MPI_Comm *)_comm2;
int ret_value = 0;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Compare the MPI communicators */
if (H5_mpi_comm_cmp(*comm1, *comm2, &ret_value) < 0)
@@ -5837,7 +5837,7 @@ H5P__facc_mpi_comm_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED
MPI_Comm *comm = (MPI_Comm *)value;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Free the MPI communicator */
if (H5_mpi_comm_free(comm) < 0)
@@ -5865,7 +5865,7 @@ H5P__facc_mpi_info_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *
MPI_Info info_tmp = MPI_INFO_NULL;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Make a copy of the MPI info object */
if (H5_mpi_info_dup(*info, &info_tmp) < 0)
@@ -5899,7 +5899,7 @@ H5P__facc_mpi_info_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *
MPI_Info info_tmp = MPI_INFO_NULL;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Make a copy of the MPI communicator */
if (H5_mpi_info_dup(*info, &info_tmp) < 0)
@@ -5932,7 +5932,7 @@ H5P__facc_mpi_info_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *
MPI_Info *info = (MPI_Info *)value;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Free the MPI info object */
if (H5_mpi_info_free(info) < 0)
@@ -5959,7 +5959,7 @@ H5P__facc_mpi_info_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED s
MPI_Info info_tmp = MPI_INFO_NULL;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Make a copy of the MPI info object */
if (H5_mpi_info_dup(*info, &info_tmp) < 0)
@@ -5995,7 +5995,7 @@ H5P__facc_mpi_info_cmp(const void *_info1, const void *_info2, size_t H5_ATTR_UN
const MPI_Info *info2 = (const MPI_Info *)_info2;
int ret_value = 0;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Compare the MPI info objects */
if (H5_mpi_info_cmp(*info1, *info2, &ret_value) < 0)
@@ -6021,7 +6021,7 @@ H5P__facc_mpi_info_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED
MPI_Info *info = (MPI_Info *)value;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Free the MPI info object */
if (H5_mpi_info_free(info) < 0)
@@ -6571,7 +6571,7 @@ H5P__facc_vol_create(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Make copy of the VOL connector */
if (H5VL_conn_copy((H5VL_connector_prop_t *)value) < 0)
@@ -6597,7 +6597,7 @@ H5P__facc_vol_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
@@ -6626,7 +6626,7 @@ H5P__facc_vol_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
@@ -6655,7 +6655,7 @@ H5P__facc_vol_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Free the VOL connector ID & info */
if (H5VL_conn_free((H5VL_connector_prop_t *)value) < 0)
@@ -6680,7 +6680,7 @@ H5P__facc_vol_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Make copy of VOL connector */
if (H5VL_conn_copy((H5VL_connector_prop_t *)value) < 0)
@@ -6714,7 +6714,7 @@ H5P__facc_vol_cmp(const void *_info1, const void *_info2, size_t H5_ATTR_UNUSED
herr_t H5_ATTR_NDEBUG_UNUSED status; /* Status from info comparison */
int ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(info1);
@@ -6764,7 +6764,7 @@ H5P__facc_vol_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Free the VOL connector */
if (H5VL_conn_free((H5VL_connector_prop_t *)value) < 0)
diff --git a/src/H5Pfcpl.c b/src/H5Pfcpl.c
index b33fda2..118cf19 100644
--- a/src/H5Pfcpl.c
+++ b/src/H5Pfcpl.c
@@ -212,7 +212,7 @@ H5P__fcrt_reg_prop(H5P_genclass_t *pclass)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Register the user block size */
if (H5P__register_real(pclass, H5F_CRT_USER_BLOCK_NAME, H5F_CRT_USER_BLOCK_SIZE,
@@ -698,7 +698,7 @@ H5P__fcrt_btree_rank_enc(const void *value, void **_pp, size_t *size)
const unsigned *btree_k = (const unsigned *)value; /* Create local alias for values */
uint8_t ** pp = (uint8_t **)_pp;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(btree_k);
@@ -747,7 +747,7 @@ H5P__fcrt_btree_rank_dec(const void **_pp, void *_value)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(pp);
@@ -985,7 +985,7 @@ H5P__fcrt_shmsg_index_types_enc(const void *value, void **_pp, size_t *size)
const unsigned *type_flags = (const unsigned *)value; /* Create local alias for values */
uint8_t ** pp = (uint8_t **)_pp;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(type_flags);
@@ -1035,7 +1035,7 @@ H5P__fcrt_shmsg_index_types_dec(const void **_pp, void *_value)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(pp);
@@ -1076,7 +1076,7 @@ H5P__fcrt_shmsg_index_minsize_enc(const void *value, void **_pp, size_t *size)
const unsigned *minsizes = (const unsigned *)value; /* Create local alias for values */
uint8_t ** pp = (uint8_t **)_pp;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(minsizes);
@@ -1126,7 +1126,7 @@ H5P__fcrt_shmsg_index_minsize_dec(const void **_pp, void *_value)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(pp);
@@ -1354,7 +1354,7 @@ H5P__fcrt_fspace_strategy_enc(const void *value, void **_pp, size_t *size)
(const H5F_fspace_strategy_t *)value; /* Create local alias for values */
uint8_t **pp = (uint8_t **)_pp;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(strategy);
@@ -1391,7 +1391,7 @@ H5P__fcrt_fspace_strategy_dec(const void **_pp, void *_value)
H5F_fspace_strategy_t *strategy = (H5F_fspace_strategy_t *)_value; /* Free-space strategy */
const uint8_t ** pp = (const uint8_t **)_pp;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(pp);
diff --git a/src/H5Pfmpl.c b/src/H5Pfmpl.c
index b8dab90..b39639d 100644
--- a/src/H5Pfmpl.c
+++ b/src/H5Pfmpl.c
@@ -111,7 +111,7 @@ H5P__fmnt_reg_prop(H5P_genclass_t *pclass)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Register property of whether symlinks is local to file */
if (H5P__register_real(pclass, H5F_MNT_SYM_LOCAL_NAME, H5F_MNT_SYM_LOCAL_SIZE, &H5F_def_local_g, NULL,
diff --git a/src/H5Pgcpl.c b/src/H5Pgcpl.c
index 7d671c6..d7b8161 100644
--- a/src/H5Pgcpl.c
+++ b/src/H5Pgcpl.c
@@ -120,7 +120,7 @@ H5P__gcrt_reg_prop(H5P_genclass_t *pclass)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Register group info property */
if (H5P__register_real(pclass, H5G_CRT_GROUP_INFO_NAME, H5G_CRT_GROUP_INFO_SIZE, &H5G_def_ginfo_g, NULL,
@@ -532,7 +532,7 @@ H5P__gcrt_group_info_enc(const void *value, void **_pp, size_t *size)
const H5O_ginfo_t *ginfo = (const H5O_ginfo_t *)value; /* Create local aliases for values */
uint8_t ** pp = (uint8_t **)_pp;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
if (NULL != *pp) {
UINT32ENCODE(*pp, ginfo->lheap_size_hint)
@@ -569,7 +569,7 @@ H5P__gcrt_group_info_dec(const void **_pp, void *_value)
const uint8_t **pp = (const uint8_t **)_pp;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Set property to default value */
HDmemset(ginfo, 0, sizeof(H5O_ginfo_t));
@@ -617,7 +617,7 @@ H5P__gcrt_link_info_enc(const void *value, void **_pp, size_t *size)
const H5O_linfo_t *linfo = (const H5O_linfo_t *)value; /* Create local aliases for values */
uint8_t ** pp = (uint8_t **)_pp;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
if (NULL != *pp) {
unsigned crt_order_flags = 0;
@@ -661,7 +661,7 @@ H5P__gcrt_link_info_dec(const void **_pp, void *_value)
unsigned enc_size;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
enc_size = *(*pp)++;
if (enc_size != sizeof(unsigned))
diff --git a/src/H5Pint.c b/src/H5Pint.c
index c0f5ee1..400795a 100644
--- a/src/H5Pint.c
+++ b/src/H5Pint.c
@@ -707,7 +707,7 @@ H5P__close_class_cb(void *_pclass, void H5_ATTR_UNUSED **request)
H5P_genclass_t *pclass = (H5P_genclass_t *)_pclass; /* Property list class to close */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(pclass);
@@ -738,7 +738,7 @@ H5P__close_list_cb(void *_plist, void H5_ATTR_UNUSED **request)
H5P_genplist_t *plist = (H5P_genplist_t *)_plist; /* Property list to close */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(plist);
@@ -780,7 +780,7 @@ H5P__do_prop_cb1(H5SL_t *slist, H5P_genprop_t *prop, H5P_prp_cb1_t cb)
H5P_genprop_t *pcopy = NULL; /* Copy of property to insert into skip list */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(slist);
@@ -1146,7 +1146,7 @@ H5P__dup_prop(H5P_genprop_t *oprop, H5P_prop_within_t type)
H5P_genprop_t *prop = NULL; /* Pointer to new property copied */
H5P_genprop_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(oprop);
HDassert(type != H5P_PROP_WITHIN_UNKNOWN);
@@ -1260,7 +1260,7 @@ H5P__create_prop(const char *name, size_t size, H5P_prop_within_t type, const vo
H5P_genprop_t *prop = NULL; /* Pointer to new property copied */
H5P_genprop_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(name);
HDassert((size > 0 && value != NULL) || (size == 0));
@@ -1437,7 +1437,7 @@ H5P__find_prop_pclass(H5P_genclass_t *pclass, const char *name)
{
H5P_genprop_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(pclass);
HDassert(name);
@@ -1471,7 +1471,7 @@ done:
static herr_t
H5P__free_prop(H5P_genprop_t *prop)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(prop);
@@ -1514,7 +1514,7 @@ H5P__free_prop_cb(void *item, void H5_ATTR_UNUSED *key, void *op_data)
H5P_genprop_t *tprop = (H5P_genprop_t *)item; /* Temporary pointer to property */
hbool_t make_cb = *(hbool_t *)op_data; /* Whether to make property 'close' callback */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(tprop);
@@ -1552,7 +1552,7 @@ H5P__free_del_name_cb(void *item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED
{
char *del_name = (char *)item; /* Temporary pointer to deleted name */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(del_name);
@@ -1682,7 +1682,7 @@ H5P__open_class_path_cb(void *_obj, hid_t H5_ATTR_UNUSED id, void *_key)
H5P_check_class_t *key = (H5P_check_class_t *)_key; /* Pointer to key information for comparison */
int ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(obj);
HDassert(H5I_GENPROP_CLS == H5I_get_type(id));
@@ -1837,7 +1837,7 @@ H5P__create(H5P_genclass_t *pclass)
H5SL_t * seen = NULL; /* Skip list to hold names of properties already seen */
H5P_genplist_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(pclass);
@@ -2778,7 +2778,7 @@ H5P__do_prop(H5P_genplist_t *plist, const char *name, H5P_do_plist_op_t plist_op
H5P_genprop_t * prop; /* Temporary property pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(plist);
@@ -2858,7 +2858,7 @@ H5P__poke_plist_cb(H5P_genplist_t H5_ATTR_NDEBUG_UNUSED *plist, const char H5_AT
H5P_prop_set_ud_t *udata = (H5P_prop_set_ud_t *)_udata; /* User data for callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(plist);
@@ -2905,7 +2905,7 @@ H5P__poke_pclass_cb(H5P_genplist_t *plist, const char H5_ATTR_NDEBUG_UNUSED *nam
H5P_genprop_t * pcopy = NULL; /* Copy of property to insert into skip list */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(plist);
@@ -3011,7 +3011,7 @@ H5P__set_plist_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop,
const void * prp_value = NULL; /* Property value */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(plist);
@@ -3088,7 +3088,7 @@ H5P__set_pclass_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop,
const void * prp_value = NULL; /* Property value */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(plist);
@@ -3611,7 +3611,7 @@ H5P__cmp_prop(const H5P_genprop_t *prop1, const H5P_genprop_t *prop2)
int cmp_value; /* Value from comparison */
int ret_value = 0; /* return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(prop1);
HDassert(prop2);
@@ -3872,7 +3872,7 @@ H5P__cmp_plist_cb(H5P_genprop_t *prop, void *_udata)
htri_t prop2_exist; /* Whether the property exists in the second property list */
int ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(prop);
@@ -4154,7 +4154,7 @@ H5P__iterate_plist_cb(void *_item, void *_key, void *_udata)
H5P_iter_plist_ud_t *udata = (H5P_iter_plist_ud_t *)_udata; /* Pointer to user data */
int ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(item);
@@ -4207,7 +4207,7 @@ H5P__iterate_plist_pclass_cb(void *_item, void *_key, void *_udata)
H5P_iter_plist_ud_t *udata = (H5P_iter_plist_ud_t *)_udata; /* Pointer to user data */
int ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(item);
@@ -4365,7 +4365,7 @@ H5P__iterate_pclass_cb(void *_item, void H5_ATTR_NDEBUG_UNUSED *_key, void *_uda
H5P_iter_pclass_ud_t *udata = (H5P_iter_pclass_ud_t *)_udata; /* Pointer to user data */
int ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(item);
@@ -4498,7 +4498,7 @@ H5P__peek_cb(H5P_genplist_t H5_ATTR_NDEBUG_UNUSED *plist, const char H5_ATTR_NDE
H5P_prop_get_ud_t *udata = (H5P_prop_get_ud_t *)_udata; /* User data for callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(plist);
@@ -4591,7 +4591,7 @@ H5P__get_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop, void *
void * tmp_value = NULL; /* Temporary value for property */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(plist);
@@ -4705,7 +4705,7 @@ H5P__del_plist_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop,
char * del_name = NULL; /* Pointer to deleted name */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(plist);
@@ -4774,7 +4774,7 @@ H5P__del_pclass_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop,
void * tmp_value = NULL; /* Temporary value for property */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(plist);
diff --git a/src/H5Plapl.c b/src/H5Plapl.c
index d00efaf..88c28bf 100644
--- a/src/H5Plapl.c
+++ b/src/H5Plapl.c
@@ -189,7 +189,7 @@ H5P__lacc_reg_prop(H5P_genclass_t *pclass)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Register property for number of links traversed */
if (H5P__register_real(pclass, H5L_ACS_NLINKS_NAME, H5L_ACS_NLINKS_SIZE, &H5L_def_nlinks_g, NULL, NULL,
@@ -255,7 +255,7 @@ H5P__lacc_elink_fapl_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
hid_t l_fapl_id;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
@@ -297,7 +297,7 @@ H5P__lacc_elink_fapl_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
hid_t l_fapl_id;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
@@ -344,7 +344,7 @@ H5P__lacc_elink_fapl_enc(const void *value, void **_pp, size_t *size)
size_t fapl_size = 0; /* FAPL's encoded size */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check for non-default FAPL */
if (*elink_fapl != H5P_DEFAULT) {
@@ -413,7 +413,7 @@ H5P__lacc_elink_fapl_dec(const void **_pp, void *_value)
hbool_t non_default_fapl; /* Whether the FAPL is non-default */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(pp);
@@ -468,7 +468,7 @@ H5P__lacc_elink_fapl_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
hid_t l_fapl_id;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
@@ -503,7 +503,7 @@ H5P__lacc_elink_fapl_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED
hid_t l_fapl_id;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
@@ -547,7 +547,7 @@ H5P__lacc_elink_fapl_cmp(const void *value1, const void *value2, size_t H5_ATTR_
H5P_genplist_t *obj1, *obj2; /* Property lists to compare */
int ret_value = 0;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check for comparison with default value */
if (*fapl1 == 0 && *fapl2 > 0)
@@ -594,7 +594,7 @@ H5P__lacc_elink_fapl_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSE
hid_t l_fapl_id;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
@@ -627,7 +627,7 @@ static herr_t
H5P__lacc_elink_pref_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name,
size_t H5_ATTR_UNUSED size, void *value)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(value);
@@ -655,7 +655,7 @@ static herr_t
H5P__lacc_elink_pref_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name,
size_t H5_ATTR_UNUSED size, void *value)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(value);
@@ -690,7 +690,7 @@ H5P__lacc_elink_pref_enc(const void *value, void **_pp, size_t *size)
uint64_t enc_value;
unsigned enc_size;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
@@ -746,7 +746,7 @@ H5P__lacc_elink_pref_dec(const void **_pp, void *_value)
unsigned enc_size; /* Size of encoded property */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(pp);
HDassert(*pp);
@@ -793,7 +793,7 @@ static herr_t
H5P__lacc_elink_pref_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name,
size_t H5_ATTR_UNUSED size, void *value)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(value);
@@ -817,7 +817,7 @@ H5P__lacc_elink_pref_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
static herr_t
H5P__lacc_elink_pref_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(value);
@@ -847,7 +847,7 @@ H5P__lacc_elink_pref_cmp(const void *value1, const void *value2, size_t H5_ATTR_
const char *pref2 = *(const char *const *)value2;
int ret_value = 0;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
if (NULL == pref1 && NULL != pref2)
HGOTO_DONE(1);
@@ -875,7 +875,7 @@ done:
static herr_t
H5P__lacc_elink_pref_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(value);
diff --git a/src/H5Plcpl.c b/src/H5Plcpl.c
index 92077d1..431b7af 100644
--- a/src/H5Plcpl.c
+++ b/src/H5Plcpl.c
@@ -112,7 +112,7 @@ H5P__lcrt_reg_prop(H5P_genclass_t *pclass)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Register create intermediate groups property */
if (H5P__register_real(pclass, H5L_CRT_INTERMEDIATE_GROUP_NAME, H5L_CRT_INTERMEDIATE_GROUP_SIZE,
diff --git a/src/H5Pmapl.c b/src/H5Pmapl.c
index 2ce1ec0..9d34695 100644
--- a/src/H5Pmapl.c
+++ b/src/H5Pmapl.c
@@ -112,7 +112,7 @@ H5P__macc_reg_prop(H5P_genclass_t *pclass)
H5M_ACS_KEY_ALLOC_SIZE_DEF; /* Default key prefetch allocation size for iteration */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Register the key prefetch size for iteration */
if (H5P__register_real(pclass, H5M_ACS_KEY_PREFETCH_SIZE_NAME, H5M_ACS_KEY_PREFETCH_SIZE_SIZE,
diff --git a/src/H5Pmcpl.c b/src/H5Pmcpl.c
index c88d0bb..5ad564a 100644
--- a/src/H5Pmcpl.c
+++ b/src/H5Pmcpl.c
@@ -98,7 +98,7 @@ H5P__mcrt_reg_prop(H5P_genclass_t H5_ATTR_UNUSED *pclass)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5P__mcrt_reg_prop() */
diff --git a/src/H5Pmodule.h b/src/H5Pmodule.h
index 66a9574..d771e6e 100644
--- a/src/H5Pmodule.h
+++ b/src/H5Pmodule.h
@@ -25,9 +25,8 @@
* reporting macros.
*/
#define H5P_MODULE
-#define H5_MY_PKG H5P
-#define H5_MY_PKG_ERR H5E_PLIST
-#define H5_MY_PKG_INIT YES
+#define H5_MY_PKG H5P
+#define H5_MY_PKG_ERR H5E_PLIST
/**\defgroup H5P H5P
*
diff --git a/src/H5Pocpl.c b/src/H5Pocpl.c
index 06d9f85..1066790 100644
--- a/src/H5Pocpl.c
+++ b/src/H5Pocpl.c
@@ -154,7 +154,7 @@ H5P__ocrt_reg_prop(H5P_genclass_t *pclass)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Register max. compact attribute storage property */
if (H5P__register_real(pclass, H5O_CRT_ATTR_MAX_COMPACT_NAME, H5O_CRT_ATTR_MAX_COMPACT_SIZE,
@@ -705,7 +705,7 @@ H5P__set_filter(H5P_genplist_t *plist, H5Z_filter_t filter, unsigned int flags,
htri_t filter_avail; /* Filter availability */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if filter is already available */
if ((filter_avail = H5Z_filter_avail(filter)) < 0)
@@ -1286,7 +1286,7 @@ H5P__ocrt_pipeline_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *
H5O_pline_t new_pline;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
@@ -1323,7 +1323,7 @@ H5P__ocrt_pipeline_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *
H5O_pline_t new_pline;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
@@ -1361,7 +1361,7 @@ H5P__ocrt_pipeline_enc(const void *value, void **_pp, size_t *size)
uint8_t ** pp = (uint8_t **)_pp;
size_t u; /* Local index variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(pline);
HDassert(size);
@@ -1457,7 +1457,7 @@ H5P__ocrt_pipeline_dec(const void **_pp, void *_value)
size_t u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
@@ -1545,7 +1545,7 @@ H5P__ocrt_pipeline_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
@@ -1578,7 +1578,7 @@ H5P__ocrt_pipeline_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED s
H5O_pline_t new_pline;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(pline);
@@ -1617,7 +1617,7 @@ H5P__ocrt_pipeline_cmp(const void *_pline1, const void *_pline2, size_t H5_ATTR_
int cmp_value; /* Value from comparison */
herr_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(pline1);
@@ -1709,7 +1709,7 @@ H5P__ocrt_pipeline_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
diff --git a/src/H5Pocpypl.c b/src/H5Pocpypl.c
index d77e69d..15e89be 100644
--- a/src/H5Pocpypl.c
+++ b/src/H5Pocpypl.c
@@ -155,7 +155,7 @@ H5P__ocpy_reg_prop(H5P_genclass_t *pclass)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Register copy options property */
if (H5P__register_real(pclass, H5O_CPY_OPTION_NAME, H5O_CPY_OPTION_SIZE, &H5O_def_ocpy_option_g, NULL,
@@ -197,7 +197,7 @@ done:
static H5O_copy_dtype_merge_list_t *
H5P__free_merge_comm_dtype_list(H5O_copy_dtype_merge_list_t *dt_list)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Free the list */
while (dt_list) {
@@ -236,7 +236,7 @@ H5P__copy_merge_comm_dt_list(H5O_copy_dtype_merge_list_t **value)
*tmp_dt_list = NULL; /* temporary merge named datatype lists */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
@@ -299,7 +299,7 @@ H5P__ocpy_merge_comm_dt_list_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATT
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
@@ -331,7 +331,7 @@ H5P__ocpy_merge_comm_dt_list_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATT
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
@@ -367,7 +367,7 @@ H5P__ocpy_merge_comm_dt_list_enc(const void *value, void **_pp, size_t *size)
const H5O_copy_dtype_merge_list_t * dt_list; /* Pointer to merge named datatype list */
size_t len; /* Length of path component */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(dt_list_ptr);
HDassert(size);
@@ -427,7 +427,7 @@ H5P__ocpy_merge_comm_dt_list_dec(const void **_pp, void *_value)
size_t len; /* Length of path component */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(pp);
@@ -495,7 +495,7 @@ static herr_t
H5P__ocpy_merge_comm_dt_list_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name,
size_t H5_ATTR_UNUSED size, void *value)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(value);
@@ -524,7 +524,7 @@ H5P__ocpy_merge_comm_dt_list_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATT
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(value);
@@ -561,7 +561,7 @@ H5P__ocpy_merge_comm_dt_list_cmp(const void *_dt_list1, const void *_dt_list2, s
*dt_list2 = *(H5O_copy_dtype_merge_list_t *const *)_dt_list2;
herr_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(_dt_list1);
@@ -610,7 +610,7 @@ done:
static herr_t
H5P__ocpy_merge_comm_dt_list_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(value);
diff --git a/src/H5Pstrcpl.c b/src/H5Pstrcpl.c
index d121d08..c073235 100644
--- a/src/H5Pstrcpl.c
+++ b/src/H5Pstrcpl.c
@@ -118,7 +118,7 @@ H5P__strcrt_reg_prop(H5P_genclass_t *pclass)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Register character encoding */
if (H5P__register_real(pclass, H5P_STRCRT_CHAR_ENCODING_NAME, H5P_STRCRT_CHAR_ENCODING_SIZE,
@@ -220,7 +220,7 @@ H5P__strcrt_char_encoding_enc(const void *value, void **_pp, size_t *size)
const H5T_cset_t *encoding = (const H5T_cset_t *)value; /* Create local alias for values */
uint8_t ** pp = (uint8_t **)_pp;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(encoding);
@@ -257,7 +257,7 @@ H5P__strcrt_char_encoding_dec(const void **_pp, void *_value)
H5T_cset_t * encoding = (H5T_cset_t *)_value; /* Character set encoding */
const uint8_t **pp = (const uint8_t **)_pp;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(pp);
diff --git a/src/H5R.c b/src/H5R.c
index 102af7f..5b13a07 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -506,7 +506,7 @@ H5R__open_object_api_common(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id, vo
void * opened_obj = NULL; /* Opened object */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
if (ref_ptr == NULL)
@@ -648,7 +648,7 @@ H5R__open_region_api_common(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id, vo
hid_t space_id = H5I_INVALID_HID; /* Dataspace ID */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
if (ref_ptr == NULL)
@@ -813,7 +813,7 @@ H5R__open_attr_api_common(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t aapl_id, void
void * opened_attr = NULL; /* Opened attribute */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
if (ref_ptr == NULL)
diff --git a/src/H5RS.c b/src/H5RS.c
index 16c2356..b1bdf67 100644
--- a/src/H5RS.c
+++ b/src/H5RS.c
@@ -108,7 +108,7 @@ H5RS__xstrdup(H5RS_str_t *rs, const char *s)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(rs);
@@ -172,7 +172,7 @@ H5RS__prepare_for_append(H5RS_str_t *rs)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(rs);
@@ -224,7 +224,7 @@ H5RS__resize_for_append(H5RS_str_t *rs, size_t len)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(rs);
diff --git a/src/H5RSmodule.h b/src/H5RSmodule.h
index 17977c7..8cd0333 100644
--- a/src/H5RSmodule.h
+++ b/src/H5RSmodule.h
@@ -25,8 +25,7 @@
* reporting macros.
*/
#define H5RS_MODULE
-#define H5_MY_PKG H5RS
-#define H5_MY_PKG_ERR H5E_RS
-#define H5_MY_PKG_INIT NO
+#define H5_MY_PKG H5RS
+#define H5_MY_PKG_ERR H5E_RS
#endif /* H5RSmodule_H */
diff --git a/src/H5Rdeprec.c b/src/H5Rdeprec.c
index 3f1d70f..78434c7 100644
--- a/src/H5Rdeprec.c
+++ b/src/H5Rdeprec.c
@@ -97,7 +97,7 @@ H5R__decode_token_compat(H5VL_object_t *vol_obj, H5I_type_t type, H5R_type_t ref
H5VL_file_get_args_t vol_cb_args; /* Arguments to VOL callback */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#ifndef NDEBUG
{
@@ -172,7 +172,7 @@ H5R__encode_token_region_compat(H5F_t *f, const H5O_token_t *obj_token, size_t t
unsigned char *data = NULL;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(f);
HDassert(obj_token);
diff --git a/src/H5Rint.c b/src/H5Rint.c
index 65bd485..6493874 100644
--- a/src/H5Rint.c
+++ b/src/H5Rint.c
@@ -1054,7 +1054,7 @@ H5R__encode_obj_token(const H5O_token_t *obj_token, size_t token_size, unsigned
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(nalloc);
@@ -1088,7 +1088,7 @@ H5R__decode_obj_token(const unsigned char *buf, size_t *nbytes, H5O_token_t *obj
const uint8_t *p = (const uint8_t *)buf;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(buf);
HDassert(nbytes);
@@ -1132,7 +1132,7 @@ H5R__encode_region(H5S_t *space, unsigned char *buf, size_t *nalloc)
hssize_t buf_size = 0;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(space);
HDassert(nalloc);
@@ -1183,7 +1183,7 @@ H5R__decode_region(const unsigned char *buf, size_t *nbytes, H5S_t **space_ptr)
H5S_t * space;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(buf);
HDassert(nbytes);
@@ -1235,7 +1235,7 @@ H5R__encode_string(const char *string, unsigned char *buf, size_t *nalloc)
size_t string_len, buf_size;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(string);
HDassert(nalloc);
@@ -1278,7 +1278,7 @@ H5R__decode_string(const unsigned char *buf, size_t *nbytes, char **string_ptr)
char * string = NULL;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(buf);
HDassert(nbytes);
diff --git a/src/H5Rmodule.h b/src/H5Rmodule.h
index fe28bb2..d9ab968 100644
--- a/src/H5Rmodule.h
+++ b/src/H5Rmodule.h
@@ -21,9 +21,8 @@
* reporting macros.
*/
#define H5R_MODULE
-#define H5_MY_PKG H5R
-#define H5_MY_PKG_ERR H5E_REFERENCE
-#define H5_MY_PKG_INIT YES
+#define H5_MY_PKG H5R
+#define H5_MY_PKG_ERR H5E_REFERENCE
/**
* \defgroup H5R H5R
diff --git a/src/H5S.c b/src/H5S.c
index 75d3399..9304367 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -217,7 +217,7 @@ H5S__close_cb(void *_space, void H5_ATTR_UNUSED **request)
H5S_t *space = (H5S_t *)_space; /* The dataspace to close */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(space);
@@ -1151,7 +1151,7 @@ H5S__is_simple(const H5S_t *sdim)
{
htri_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args and all the boring stuff. */
HDassert(sdim);
diff --git a/src/H5SL.c b/src/H5SL.c
index e12e21a..0ea61ce 100644
--- a/src/H5SL.c
+++ b/src/H5SL.c
@@ -628,7 +628,7 @@ H5SL__new_node(void *item, const void *key, uint32_t hashval)
{
H5SL_node_t *ret_value = NULL; /* New skip list node */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Allocate the node */
if (NULL == (ret_value = (H5SL_node_t *)H5FL_MALLOC(H5SL_node_t)))
@@ -678,7 +678,7 @@ H5SL__insert_common(H5SL_t *slist, void *item, const void *key)
uint32_t hashval = 0; /* Hash value for key */
H5SL_node_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(slist);
@@ -794,7 +794,7 @@ H5SL__release_common(H5SL_t *slist, H5SL_operator_t op, void *op_data)
H5SL_node_t *node, *next_node; /* Pointers to skip list nodes */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(slist);
@@ -872,7 +872,7 @@ H5SL__close_common(H5SL_t *slist, H5SL_operator_t op, void *op_data)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(slist);
diff --git a/src/H5SLmodule.h b/src/H5SLmodule.h
index 2614f92..606fa90 100644
--- a/src/H5SLmodule.h
+++ b/src/H5SLmodule.h
@@ -25,8 +25,7 @@
* reporting macros.
*/
#define H5SL_MODULE
-#define H5_MY_PKG H5SL
-#define H5_MY_PKG_ERR H5E_SLIST
-#define H5_MY_PKG_INIT YES
+#define H5_MY_PKG H5SL
+#define H5_MY_PKG_ERR H5E_SLIST
#endif /* H5SLmodule_H */
diff --git a/src/H5SM.c b/src/H5SM.c
index d7ae84b..bd061dc8a 100644
--- a/src/H5SM.c
+++ b/src/H5SM.c
@@ -257,7 +257,7 @@ H5SM__type_to_flag(unsigned type_id, unsigned *type_flag)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Translate the H5O type_id into an H5SM type flag */
switch (type_id) {
@@ -451,7 +451,7 @@ H5SM__create_index(H5F_t *f, H5SM_index_header_t *header)
H5B2_t * bt2 = NULL; /* v2 B-tree handle for index */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(header);
@@ -554,7 +554,7 @@ H5SM__delete_index(H5F_t *f, H5SM_index_header_t *header, hbool_t delete_heap)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Determine whether index is a list or a B-tree. */
if (header->index_type == H5SM_LIST) {
@@ -626,7 +626,7 @@ H5SM__create_list(H5F_t *f, H5SM_index_header_t *header)
haddr_t addr = HADDR_UNDEF; /* Address of the list on disk */
haddr_t ret_value = HADDR_UNDEF; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(f);
HDassert(header);
@@ -706,7 +706,7 @@ H5SM__convert_list_to_btree(H5F_t *f, H5SM_index_header_t *header, H5SM_list_t *
void * encoding_buf = NULL;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(_list && *_list);
HDassert(header);
@@ -808,7 +808,7 @@ H5SM__bt2_convert_to_list_op(const void *record, void *op_data)
const H5SM_list_t *list = (const H5SM_list_t *)op_data;
size_t mesg_idx; /* Index of message to modify */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(record);
@@ -848,7 +848,7 @@ H5SM__convert_btree_to_list(H5F_t *f, H5SM_index_header_t *header)
haddr_t btree_addr;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Remember the address of the old B-tree, but change the header over to be
* a list..
@@ -908,7 +908,7 @@ H5SM__can_share_common(const H5F_t *f, unsigned type_id, const void *mesg)
{
htri_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check whether this message ought to be shared or not */
/* If sharing is disabled in this file, don't share the message */
@@ -1186,7 +1186,7 @@ H5SM__incr_ref(void *record, void *_op_data, hbool_t *changed)
H5SM_incr_ref_opdata *op_data = (H5SM_incr_ref_opdata *)_op_data;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(record);
HDassert(op_data);
@@ -1271,7 +1271,7 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t
size_t empty_pos = SIZE_MAX; /* Empty entry in list */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(header);
@@ -1664,7 +1664,7 @@ H5SM__find_in_list(const H5SM_list_t *list, const H5SM_mesg_key_t *key, size_t *
size_t x;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(list);
/* Both key and empty_pos can be NULL, but not both! */
@@ -1729,7 +1729,7 @@ H5SM__decr_ref(void *record, void *op_data, hbool_t *changed)
{
H5SM_sohm_t *message = (H5SM_sohm_t *)record;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(record);
HDassert(op_data);
@@ -1782,7 +1782,7 @@ H5SM__delete_from_index(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, c
unsigned type_id; /* Message type to operate on */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(f);
@@ -2124,7 +2124,7 @@ H5SM__get_refcount_bt2_cb(const void *_record, void *_op_data)
const H5SM_sohm_t *record = (const H5SM_sohm_t *)_record; /* v2 B-tree record for message */
H5SM_sohm_t * op_data = (H5SM_sohm_t *)_op_data; /* "op data" from v2 B-tree find */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/*
* Check arguments.
@@ -2292,7 +2292,7 @@ H5SM__read_iter_op(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence,
H5SM_read_udata_t *udata = (H5SM_read_udata_t *)_udata;
herr_t ret_value = H5_ITER_CONT;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -2348,7 +2348,7 @@ H5SM__read_mesg_fh_cb(const void *obj, size_t obj_len, void *_udata)
H5SM_read_udata_t *udata = (H5SM_read_udata_t *)_udata;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Allocate a buffer to hold the message */
if (NULL == (udata->encoding_buf = H5MM_malloc(obj_len)))
@@ -2384,7 +2384,7 @@ H5SM__read_mesg(H5F_t *f, const H5SM_sohm_t *mesg, H5HF_t *fheap, H5O_t *open_oh
H5O_t * oh = NULL; /* Object header for message in object header */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(f);
HDassert(mesg);
diff --git a/src/H5SMbtree2.c b/src/H5SMbtree2.c
index 2dca9fd..30b5285 100644
--- a/src/H5SMbtree2.c
+++ b/src/H5SMbtree2.c
@@ -90,7 +90,7 @@ H5SM__bt2_crt_context(void *_f)
H5SM_bt2_ctx_t *ctx; /* Callback context structure */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(f);
@@ -127,7 +127,7 @@ H5SM__bt2_dst_context(void *_ctx)
{
H5SM_bt2_ctx_t *ctx = (H5SM_bt2_ctx_t *)_ctx; /* Callback context structure */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(ctx);
@@ -158,7 +158,7 @@ H5SM__bt2_store(void *native, const void *udata)
{
const H5SM_mesg_key_t *key = (const H5SM_mesg_key_t *)udata;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Copy the source message to the B-tree */
*(H5SM_sohm_t *)native = key->message;
@@ -184,7 +184,7 @@ H5SM__bt2_debug(FILE *stream, int indent, int fwidth, const void *record, const
{
const H5SM_sohm_t *sohm = (const H5SM_sohm_t *)record;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
if (sohm->location == H5SM_IN_HEAP)
HDfprintf(stream, "%*s%-*s {%" PRIu64 ", %" PRIo32 ", %" PRIxHSIZE "}\n", indent, "", fwidth,
diff --git a/src/H5SMcache.c b/src/H5SMcache.c
index 6884665..20dfab5 100644
--- a/src/H5SMcache.c
+++ b/src/H5SMcache.c
@@ -134,7 +134,7 @@ H5SM__cache_table_get_initial_load_size(void *_udata, size_t *image_len)
{
const H5SM_table_cache_ud_t *udata = (const H5SM_table_cache_ud_t *)_udata; /* User data for callback */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(udata);
@@ -168,7 +168,7 @@ H5SM__cache_table_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNU
uint32_t computed_chksum; /* Computed metadata checksum value */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(image);
@@ -210,7 +210,7 @@ H5SM__cache_table_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l
size_t u; /* Counter variable for index headers */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(image);
@@ -323,7 +323,7 @@ H5SM__cache_table_image_len(const void *_thing, size_t *image_len)
const H5SM_master_table_t *table =
(const H5SM_master_table_t *)_thing; /* Shared message table to query */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(table);
@@ -358,7 +358,7 @@ H5SM__cache_table_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_
uint32_t computed_chksum; /* Computed metadata checksum value */
size_t u; /* Counter variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(f);
@@ -444,7 +444,7 @@ H5SM__cache_table_free_icr(void *_thing)
H5SM_master_table_t *table = (H5SM_master_table_t *)_thing; /* Shared message table to release */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(table);
@@ -479,7 +479,7 @@ H5SM__cache_list_get_initial_load_size(void *_udata, size_t *image_len)
{
const H5SM_list_cache_ud_t *udata = (const H5SM_list_cache_ud_t *)_udata; /* User data for callback */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(udata);
@@ -516,7 +516,7 @@ H5SM__cache_list_verify_chksum(const void *_image, size_t H5_ATTR_UNUSED len, vo
uint32_t computed_chksum; /* Computed metadata checksum value */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(image);
@@ -561,7 +561,7 @@ H5SM__cache_list_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED le
size_t u; /* Counter variable for messages in list */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(image);
@@ -638,7 +638,7 @@ H5SM__cache_list_image_len(const void *_thing, size_t *image_len)
{
const H5SM_list_t *list = (const H5SM_list_t *)_thing; /* Shared message list to query */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(list);
@@ -677,7 +677,7 @@ H5SM__cache_list_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_U
size_t u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(f);
@@ -748,7 +748,7 @@ H5SM__cache_list_free_icr(void *_thing)
H5SM_list_t *list = (H5SM_list_t *)_thing; /* Shared message list to release */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(list);
diff --git a/src/H5SMmessage.c b/src/H5SMmessage.c
index 4499b0c..87fdc9b 100644
--- a/src/H5SMmessage.c
+++ b/src/H5SMmessage.c
@@ -82,7 +82,7 @@ H5SM__compare_cb(const void *obj, size_t obj_len, void *_udata)
{
H5SM_compare_udata_t *udata = (H5SM_compare_udata_t *)_udata;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* If the encoding sizes are different, it's not the same object */
if (udata->key->encoding_size > obj_len)
@@ -119,7 +119,7 @@ H5SM__compare_iter_op(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence,
H5SM_compare_udata_t *udata = (H5SM_compare_udata_t *)_udata;
herr_t ret_value = H5_ITER_CONT;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
diff --git a/src/H5SMmodule.h b/src/H5SMmodule.h
index 6d2abf1..6308e14 100644
--- a/src/H5SMmodule.h
+++ b/src/H5SMmodule.h
@@ -25,8 +25,7 @@
* reporting macros.
*/
#define H5SM_MODULE
-#define H5_MY_PKG H5SM
-#define H5_MY_PKG_ERR H5E_SOHM
-#define H5_MY_PKG_INIT NO
+#define H5_MY_PKG H5SM
+#define H5_MY_PKG_ERR H5E_SOHM
#endif /* H5SMmodule_H */
diff --git a/src/H5Sall.c b/src/H5Sall.c
index 4dcc83a..45e2b5d 100644
--- a/src/H5Sall.c
+++ b/src/H5Sall.c
@@ -146,7 +146,7 @@ static const H5S_sel_iter_class_t H5S_sel_iter_all[1] = {{
static herr_t
H5S__all_iter_init(H5S_t H5_ATTR_UNUSED *space, H5S_sel_iter_t *iter)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(space && H5S_SEL_ALL == H5S_GET_SELECT_TYPE(space));
@@ -180,7 +180,7 @@ H5S__all_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(iter);
@@ -212,7 +212,7 @@ H5S__all_iter_block(const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end)
{
unsigned u; /* Local index variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -247,7 +247,7 @@ H5S__all_iter_block(const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end)
static hsize_t
H5S__all_iter_nelmts(const H5S_sel_iter_t *iter)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -275,7 +275,7 @@ H5S__all_iter_nelmts(const H5S_sel_iter_t *iter)
static htri_t
H5S__all_iter_has_next_block(const H5S_sel_iter_t H5_ATTR_UNUSED *iter)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -304,7 +304,7 @@ H5S__all_iter_has_next_block(const H5S_sel_iter_t H5_ATTR_UNUSED *iter)
static herr_t
H5S__all_iter_next(H5S_sel_iter_t *iter, size_t nelem)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -337,7 +337,7 @@ H5S__all_iter_next(H5S_sel_iter_t *iter, size_t nelem)
static herr_t
H5S__all_iter_next_block(H5S_sel_iter_t H5_ATTR_UNUSED *iter)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -380,7 +380,7 @@ H5S__all_iter_get_seq_list(H5S_sel_iter_t *iter, size_t H5_ATTR_UNUSED maxseq, s
{
size_t elem_used; /* The number of elements used */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -434,7 +434,7 @@ H5S__all_iter_get_seq_list(H5S_sel_iter_t *iter, size_t H5_ATTR_UNUSED maxseq, s
static herr_t
H5S__all_iter_release(H5S_sel_iter_t H5_ATTR_UNUSED *iter)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -462,7 +462,7 @@ H5S__all_iter_release(H5S_sel_iter_t H5_ATTR_UNUSED *iter)
static herr_t
H5S__all_release(H5S_t *space)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(space);
@@ -496,7 +496,7 @@ H5S__all_release(H5S_t *space)
static herr_t
H5S__all_copy(H5S_t *dst, const H5S_t H5_ATTR_UNUSED *src, hbool_t H5_ATTR_UNUSED share_selection)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(src);
HDassert(dst);
@@ -530,7 +530,7 @@ H5S__all_copy(H5S_t *dst, const H5S_t H5_ATTR_UNUSED *src, hbool_t H5_ATTR_UNUSE
static htri_t
H5S__all_is_valid(const H5S_t H5_ATTR_UNUSED *space)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(space);
@@ -559,7 +559,7 @@ H5S__all_is_valid(const H5S_t H5_ATTR_UNUSED *space)
static hssize_t
H5S__all_serial_size(H5S_t H5_ATTR_UNUSED *space)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(space);
@@ -596,7 +596,7 @@ H5S__all_serialize(H5S_t *space, uint8_t **p)
{
uint8_t *pp = (*p); /* Local pointer for decoding */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(space);
@@ -645,7 +645,7 @@ H5S__all_deserialize(H5S_t **space, const uint8_t **p)
either *space or a newly allocated one */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(p);
HDassert(*p);
@@ -720,7 +720,7 @@ H5S__all_bounds(const H5S_t *space, hsize_t *start, hsize_t *end)
unsigned rank; /* Dataspace rank */
unsigned i; /* index variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(space);
HDassert(start);
@@ -761,7 +761,7 @@ H5S__all_bounds(const H5S_t *space, hsize_t *start, hsize_t *end)
static herr_t
H5S__all_offset(const H5S_t H5_ATTR_UNUSED *space, hsize_t *offset)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(space);
HDassert(offset);
@@ -796,7 +796,7 @@ H5S__all_offset(const H5S_t H5_ATTR_UNUSED *space, hsize_t *offset)
static int
H5S__all_unlim_dim(const H5S_t H5_ATTR_UNUSED *space)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
FUNC_LEAVE_NOAPI(-1)
} /* end H5S__all_unlim_dim() */
@@ -822,7 +822,7 @@ H5S__all_unlim_dim(const H5S_t H5_ATTR_UNUSED *space)
static htri_t
H5S__all_is_contiguous(const H5S_t H5_ATTR_UNUSED *space)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(space);
@@ -850,7 +850,7 @@ H5S__all_is_contiguous(const H5S_t H5_ATTR_UNUSED *space)
static htri_t
H5S__all_is_single(const H5S_t H5_ATTR_UNUSED *space)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(space);
@@ -879,7 +879,7 @@ H5S__all_is_single(const H5S_t H5_ATTR_UNUSED *space)
static htri_t
H5S__all_is_regular(H5S_t H5_ATTR_UNUSED *space)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(space);
@@ -913,7 +913,7 @@ H5S__all_shape_same(H5S_t *space1, H5S_t *space2)
int space2_dim; /* Current dimension in second dataspace */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(space1);
@@ -973,7 +973,7 @@ htri_t
H5S__all_intersect_block(H5S_t H5_ATTR_UNUSED *space, const hsize_t H5_ATTR_UNUSED *start,
const hsize_t H5_ATTR_UNUSED *end)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(space);
@@ -1005,7 +1005,7 @@ H5S__all_intersect_block(H5S_t H5_ATTR_UNUSED *space, const hsize_t H5_ATTR_UNUS
static herr_t
H5S__all_adjust_u(H5S_t H5_ATTR_UNUSED *space, const hsize_t H5_ATTR_UNUSED *offset)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(space);
@@ -1035,7 +1035,7 @@ H5S__all_adjust_u(H5S_t H5_ATTR_UNUSED *space, const hsize_t H5_ATTR_UNUSED *off
static herr_t
H5S__all_adjust_s(H5S_t H5_ATTR_UNUSED *space, const hssize_t H5_ATTR_UNUSED *offset)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(space);
@@ -1060,7 +1060,7 @@ H5S__all_adjust_s(H5S_t H5_ATTR_UNUSED *space, const hssize_t H5_ATTR_UNUSED *of
static herr_t
H5S__all_project_scalar(const H5S_t H5_ATTR_UNUSED *space, hsize_t *offset)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(space && H5S_SEL_ALL == H5S_GET_SELECT_TYPE(space));
@@ -1091,7 +1091,7 @@ H5S__all_project_simple(const H5S_t H5_ATTR_UNUSED *base_space, H5S_t *new_space
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(base_space && H5S_SEL_ALL == H5S_GET_SELECT_TYPE(base_space));
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index 7284846..7b87d7b 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -293,7 +293,7 @@ static uint64_t H5S_hyper_op_gen_g = 1;
static herr_t
H5S__hyper_print_spans_helper(FILE *f, const H5S_hyper_span_t *span, unsigned depth)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
while (span) {
HDfprintf(f, "%s: %*sdepth=%u, span=%p, (%" PRIuHSIZE ", %" PRIuHSIZE "), next=%p\n", __func__,
@@ -313,7 +313,7 @@ H5S__hyper_print_spans_helper(FILE *f, const H5S_hyper_span_t *span, unsigned de
static herr_t
H5S__hyper_print_spans(FILE *f, const H5S_hyper_span_info_t *span_lst)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
if (span_lst != NULL) {
HDfprintf(f, "%s: spans=%p, count=%u, bounds[0]={%" PRIuHSIZE ", %" PRIuHSIZE "}, head=%p\n",
@@ -328,7 +328,7 @@ H5S__hyper_print_spans(FILE *f, const H5S_hyper_span_info_t *span_lst)
static herr_t
H5S__space_print_spans(FILE *f, const H5S_t *space)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
H5S__hyper_print_spans(f, space->select.sel_info.hslab->span_lst);
@@ -340,7 +340,7 @@ H5S__hyper_print_diminfo_helper(FILE *f, const char *field, unsigned ndims, cons
{
unsigned u; /* Local index variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
if (dinfo != NULL) {
HDfprintf(f, "%s: %s: start=[", __func__, field);
@@ -365,7 +365,7 @@ H5S__hyper_print_diminfo_helper(FILE *f, const char *field, unsigned ndims, cons
static herr_t
H5S__hyper_print_diminfo(FILE *f, const H5S_t *space)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
H5S__hyper_print_diminfo_helper(f, "diminfo.opt", space->extent.rank,
space->select.sel_info.hslab->diminfo.opt);
@@ -400,7 +400,7 @@ H5S__hyper_print_spans_dfs(FILE *f, const H5S_hyper_span_info_t *span_lst, unsig
unsigned num_elems = 0;
unsigned u, elem_idx;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* get the actual tail from head */
cur_elem = span_lst->head;
@@ -469,7 +469,7 @@ H5S__hyper_print_space_dfs(FILE *f, const H5S_t *space)
const unsigned dims = space->extent.rank;
unsigned u;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(hslab);
@@ -570,7 +570,7 @@ H5S__hyper_iter_init(H5S_t *space, H5S_sel_iter_t *iter)
int i; /* Index variable */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(space));
@@ -799,7 +799,7 @@ done:
static herr_t
H5S__hyper_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -889,7 +889,7 @@ H5S__hyper_iter_block(const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end)
{
unsigned u; /* Local index variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -932,7 +932,7 @@ H5S__hyper_iter_block(const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end)
static hsize_t
H5S__hyper_iter_nelmts(const H5S_sel_iter_t *iter)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -963,7 +963,7 @@ H5S__hyper_iter_has_next_block(const H5S_sel_iter_t *iter)
unsigned u; /* Local index variable */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -1016,7 +1016,7 @@ H5S__hyper_iter_next(H5S_sel_iter_t *iter, size_t nelem)
int fast_dim; /* Rank of the fastest changing dimension for the dataspace */
unsigned u; /* Counters */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check for the special case of just one H5Sselect_hyperslab call made */
/* (i.e. a regular hyperslab selection */
@@ -1225,7 +1225,7 @@ H5S__hyper_iter_next_block(H5S_sel_iter_t *iter)
int fast_dim; /* Rank of the fastest changing dimension for the dataspace */
unsigned u; /* Counters */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check for the special case of just one H5Sselect_hyperslab call made */
/* (i.e. a regular hyperslab selection) */
@@ -1433,7 +1433,7 @@ H5S__hyper_iter_get_seq_list_gen(H5S_sel_iter_t *iter, size_t maxseq, size_t max
int curr_dim; /* Current dimension being operated on */
unsigned u; /* Index variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -1904,7 +1904,7 @@ H5S__hyper_iter_get_seq_list_opt(H5S_sel_iter_t *iter, size_t maxseq, size_t max
size_t elem_size; /* Size of each element iterating over */
unsigned u; /* Local index variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -2343,7 +2343,7 @@ H5S__hyper_iter_get_seq_list_single(H5S_sel_iter_t *iter, size_t maxseq, size_t
unsigned skip_dim; /* Rank of the dimension to skip along */
unsigned u; /* Local index variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -2606,7 +2606,7 @@ H5S__hyper_iter_get_seq_list(H5S_sel_iter_t *iter, size_t maxseq, size_t maxelem
{
herr_t ret_value = FAIL; /* return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -2757,7 +2757,7 @@ H5S__hyper_iter_get_seq_list(H5S_sel_iter_t *iter, size_t maxseq, size_t maxelem
static herr_t
H5S__hyper_iter_release(H5S_sel_iter_t *iter)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -2795,7 +2795,7 @@ H5S__hyper_new_span(hsize_t low, hsize_t high, H5S_hyper_span_info_t *down, H5S_
{
H5S_hyper_span_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Allocate a new span node */
if (NULL == (ret_value = H5FL_MALLOC(H5S_hyper_span_t)))
@@ -2839,7 +2839,7 @@ H5S__hyper_new_span_info(unsigned rank)
{
H5S_hyper_span_info_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(rank > 0);
@@ -2886,7 +2886,7 @@ H5S__hyper_copy_span_helper(H5S_hyper_span_info_t *spans, unsigned rank, unsigne
H5S_hyper_span_info_t *new_down; /* New down span tree */
H5S_hyper_span_info_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(spans);
@@ -2977,7 +2977,7 @@ H5S__hyper_copy_span(H5S_hyper_span_info_t *spans, unsigned rank)
uint64_t op_gen; /* Operation generation value */
H5S_hyper_span_info_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(spans);
@@ -3019,7 +3019,7 @@ H5S__hyper_cmp_spans(const H5S_hyper_span_info_t *span_info1, const H5S_hyper_sp
{
hbool_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check for redundant comparison (or both spans being NULL) */
if (span_info1 != span_info2) {
@@ -3111,7 +3111,7 @@ done:
static void
H5S__hyper_free_span_info(H5S_hyper_span_info_t *span_info)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(span_info);
@@ -3167,7 +3167,7 @@ H5S__hyper_free_span_info(H5S_hyper_span_info_t *span_info)
static void
H5S__hyper_free_span(H5S_hyper_span_t *span)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(span);
@@ -3214,7 +3214,7 @@ H5S__hyper_copy(H5S_t *dst, const H5S_t *src, hbool_t share_selection)
const H5S_hyper_sel_t *src_hslab; /* Pointer to source hyperslab info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(src);
@@ -3284,7 +3284,7 @@ H5S__hyper_is_valid(const H5S_t *space)
unsigned u; /* Counter */
htri_t ret_value = TRUE; /* return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(space);
@@ -3339,7 +3339,7 @@ H5S__hyper_span_nblocks_helper(H5S_hyper_span_info_t *spans, unsigned op_info_i,
{
hsize_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(spans);
@@ -3403,7 +3403,7 @@ H5S__hyper_span_nblocks(H5S_hyper_span_info_t *spans)
{
hsize_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Count the number of elements in the span tree */
if (spans != NULL) {
@@ -3444,7 +3444,7 @@ H5S__get_select_hyper_nblocks(const H5S_t *space, hbool_t app_ref)
{
hsize_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(space);
HDassert(space->select.sel_info.hslab->unlim_dim < 0);
@@ -3529,7 +3529,7 @@ H5S__hyper_get_enc_size_real(hsize_t max_size)
{
uint8_t ret_value = H5S_SELECT_INFO_ENC_SIZE_2;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
if (max_size > H5S_UINT32_MAX)
ret_value = H5S_SELECT_INFO_ENC_SIZE_8;
@@ -3589,7 +3589,7 @@ H5S__hyper_get_version_enc_size(H5S_t *space, hsize_t block_count, uint32_t *ver
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Get bounding box for the selection */
HDmemset(bounds_end, 0, sizeof(bounds_end));
@@ -3736,7 +3736,7 @@ H5S__hyper_serial_size(H5S_t *space)
uint8_t enc_size; /* Encoded size of hyperslab selection info */
hssize_t ret_value = -1; /* return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(space);
@@ -3832,7 +3832,7 @@ H5S__hyper_serialize_helper(const H5S_hyper_span_info_t *spans, hsize_t *start,
H5S_hyper_span_t *curr; /* Pointer to current hyperslab span */
uint8_t * pp = (*p); /* Local pointer for decoding */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(spans);
@@ -3965,7 +3965,7 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p)
uint8_t enc_size; /* Encoded size */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(space);
@@ -4237,7 +4237,7 @@ H5S__hyper_deserialize(H5S_t **space, const uint8_t **p)
unsigned u; /* Local counting variable */
herr_t ret_value = FAIL; /* return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(p);
@@ -4498,7 +4498,7 @@ H5S__hyper_span_blocklist(const H5S_hyper_span_info_t *spans, hsize_t start[], h
const H5S_hyper_span_t *curr; /* Pointer to current hyperslab span */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(spans);
@@ -4596,7 +4596,7 @@ H5S__get_select_hyper_blocklist(H5S_t *space, hsize_t startblock, hsize_t numblo
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(space);
HDassert(buf);
@@ -4834,7 +4834,7 @@ H5S__hyper_bounds(const H5S_t *space, hsize_t *start, hsize_t *end)
const hsize_t *low_bounds, *high_bounds; /* Pointers to the correct pair of low & high bounds */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(space);
@@ -4912,7 +4912,7 @@ H5S__hyper_offset(const H5S_t *space, hsize_t *offset)
int i; /* index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(space && space->extent.rank > 0);
HDassert(offset);
@@ -5014,7 +5014,7 @@ done:
static int
H5S__hyper_unlim_dim(const H5S_t *space)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
FUNC_LEAVE_NOAPI(space->select.sel_info.hslab->unlim_dim);
} /* end H5S__hyper_unlim_dim() */
@@ -5044,7 +5044,7 @@ H5S__hyper_num_elem_non_unlim(const H5S_t *space, hsize_t *num_elem_non_unlim)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(space);
@@ -5086,7 +5086,7 @@ H5S__hyper_is_contiguous(const H5S_t *space)
unsigned u; /* index variable */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(space);
@@ -5271,7 +5271,7 @@ H5S__hyper_is_single(const H5S_t *space)
{
htri_t ret_value = TRUE; /* return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(space);
@@ -5344,7 +5344,7 @@ H5S__hyper_is_regular(H5S_t *space)
{
htri_t ret_value = FAIL; /* return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(space);
@@ -5396,7 +5396,7 @@ H5S__hyper_spans_shape_same_helper(const H5S_hyper_span_info_t *span_info1,
{
hbool_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(span_info1);
@@ -5506,7 +5506,7 @@ H5S__hyper_spans_shape_same(const H5S_hyper_span_info_t *span_info1, const H5S_h
unsigned u; /* Local index variable */
hbool_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(span_info1);
@@ -5601,7 +5601,7 @@ H5S__hyper_shape_same(H5S_t *space1, H5S_t *space2)
unsigned space2_rank; /* Number of dimensions of second dataspace */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(space1);
@@ -5737,7 +5737,7 @@ done:
static herr_t
H5S__hyper_release(H5S_t *space)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(space));
@@ -5782,7 +5782,7 @@ H5S__hyper_coord_to_span(unsigned rank, const hsize_t *coords)
H5S_hyper_span_info_t *down = NULL; /* Pointer to new span tree for next level down */
H5S_hyper_span_t * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(rank > 0);
HDassert(coords);
@@ -5847,7 +5847,7 @@ H5S__hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ra
H5S_hyper_span_t *tail_span; /* Pointer to the tail span of one dimension */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(span_tree);
@@ -6188,7 +6188,7 @@ H5S__hyper_intersect_block_helper(H5S_hyper_span_info_t *spans, unsigned rank, c
{
hbool_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(spans);
@@ -6275,7 +6275,7 @@ H5S__hyper_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *en
{
htri_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(space);
@@ -6406,7 +6406,7 @@ static void
H5S__hyper_adjust_u_helper(H5S_hyper_span_info_t *spans, unsigned rank, const hsize_t *offset,
unsigned op_info_i, uint64_t op_gen)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(spans);
@@ -6471,7 +6471,7 @@ H5S__hyper_adjust_u(H5S_t *space, const hsize_t *offset)
hbool_t non_zero_offset = FALSE; /* Whether any offset is non-zero */
unsigned u; /* Local index variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(space);
@@ -6536,7 +6536,7 @@ H5S__hyper_project_scalar(const H5S_t *space, hsize_t *offset)
{
hsize_t block[H5S_MAX_RANK]; /* Block selected in base dataspace */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(space));
@@ -6613,7 +6613,7 @@ H5S__hyper_project_simple_lower(const H5S_t *base_space, H5S_t *new_space)
H5S_hyper_span_info_t *down; /* Pointer to list of spans */
unsigned curr_dim; /* Current dimension being operated on */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(base_space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(base_space));
@@ -6662,7 +6662,7 @@ H5S__hyper_project_simple_higher(const H5S_t *base_space, H5S_t *new_space)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(base_space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(base_space));
@@ -6760,7 +6760,7 @@ H5S__hyper_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(base_space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(base_space));
@@ -6948,7 +6948,7 @@ static void
H5S__hyper_adjust_s_helper(H5S_hyper_span_info_t *spans, unsigned rank, const hssize_t *offset,
unsigned op_info_i, uint64_t op_gen)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(spans);
@@ -7013,7 +7013,7 @@ H5S__hyper_adjust_s(H5S_t *space, const hssize_t *offset)
hbool_t non_zero_offset = FALSE; /* Whether any offset is non-zero */
unsigned u; /* Local index variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(space);
@@ -7191,7 +7191,7 @@ H5S__hyper_append_span(H5S_hyper_span_info_t **span_tree, unsigned ndims, hsize_
H5S_hyper_span_t *new_span = NULL;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(span_tree);
@@ -7350,7 +7350,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
hbool_t need_b_not_a; /* Whether to generate b_not_a list */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(a_spans);
@@ -7982,7 +7982,7 @@ H5S__hyper_merge_spans_helper(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
H5S_hyper_span_info_t *merged_spans = NULL; /* Pointer to the merged span tree */
H5S_hyper_span_info_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Make certain both 'a' & 'b' spans have down span trees or neither does */
HDassert((a_spans != NULL && b_spans != NULL) || (a_spans == NULL && b_spans == NULL));
@@ -8310,7 +8310,7 @@ H5S__hyper_merge_spans(H5S_t *space, H5S_hyper_span_info_t *new_spans)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(space);
@@ -8364,7 +8364,7 @@ H5S__hyper_spans_nelem_helper(H5S_hyper_span_info_t *spans, unsigned op_info_i,
{
hsize_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(spans);
@@ -8434,7 +8434,7 @@ H5S__hyper_spans_nelem(H5S_hyper_span_info_t *spans)
uint64_t op_gen; /* Operation generation value */
hsize_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(spans);
@@ -8478,7 +8478,7 @@ H5S__hyper_add_disjoint_spans(H5S_t *space, H5S_hyper_span_info_t *new_spans)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(space);
@@ -8533,7 +8533,7 @@ H5S__hyper_make_spans(unsigned rank, const hsize_t *start, const hsize_t *stride
int i; /* Counters */
H5S_hyper_span_info_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(rank > 0);
@@ -8681,7 +8681,7 @@ H5S__hyper_update_diminfo(H5S_t *space, H5S_seloper_t op, const H5S_hyper_dim_t
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(space);
@@ -8898,7 +8898,7 @@ H5S__hyper_rebuild_helper(const H5S_hyper_span_info_t *spans, H5S_hyper_dim_t sp
size_t spancount; /* Number of spans encountered in this dimension */
hbool_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(spans);
@@ -9051,7 +9051,7 @@ H5S__hyper_generate_spans(H5S_t *space)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(space);
HDassert(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS);
@@ -9104,7 +9104,7 @@ H5S__check_spans_overlap(const H5S_hyper_span_info_t *spans1, const H5S_hyper_sp
{
hbool_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(spans1);
@@ -9202,7 +9202,7 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s
hbool_t is_result_new = FALSE;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(space1);
HDassert(space2_span_lst);
@@ -9481,7 +9481,7 @@ H5S__generate_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], c
H5S_hyper_span_info_t *new_spans = NULL; /* Span tree for new hyperslab */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(space);
@@ -9571,7 +9571,7 @@ H5S__set_regular_hyperslab(H5S_t *space, const hsize_t start[], const hsize_t *a
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(space);
@@ -9672,7 +9672,7 @@ H5S__hyper_regular_and_single_block(H5S_t *space, const hsize_t start[], const h
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(space);
@@ -10494,7 +10494,7 @@ H5S__fill_in_select(H5S_t *space1, H5S_seloper_t op, H5S_t *space2, H5S_t **resu
hbool_t updated_spans;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(space1);
@@ -10608,7 +10608,7 @@ H5S__combine_select(H5S_t *space1, H5S_seloper_t op, H5S_t *space2)
H5S_t *new_space = NULL; /* New dataspace generated */
H5S_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(space1);
@@ -10900,7 +10900,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata)
H5S_hyper_span_info_t *copied_span_info = NULL; /* Temporary span info pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(udata->nelem > 0);
@@ -11348,7 +11348,7 @@ H5S__hyper_proj_int_iterate(const H5S_hyper_span_info_t *ss_span_info,
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check for non-overlapping bounds */
check_intersect = TRUE;
@@ -11783,7 +11783,7 @@ done:
static void
H5S__hyper_get_clip_diminfo(hsize_t start, hsize_t stride, hsize_t *count, hsize_t *block, hsize_t clip_size)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check for selection outside clip size */
if (start >= clip_size) {
@@ -11970,7 +11970,7 @@ H5S__hyper_get_clip_extent_real(const H5S_t *clip_space, hsize_t num_slices, hbo
hsize_t rem_slices;
hsize_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check parameters */
HDassert(clip_space);
diff --git a/src/H5Smodule.h b/src/H5Smodule.h
index 010f4a6..72d722a 100644
--- a/src/H5Smodule.h
+++ b/src/H5Smodule.h
@@ -25,9 +25,8 @@
* reporting macros.
*/
#define H5S_MODULE
-#define H5_MY_PKG H5S
-#define H5_MY_PKG_ERR H5E_DATASPACE
-#define H5_MY_PKG_INIT YES
+#define H5_MY_PKG H5S
+#define H5_MY_PKG_ERR H5E_DATASPACE
/**\defgroup H5S H5S
*
diff --git a/src/H5Smpio.c b/src/H5Smpio.c
index aec5560..11041d4 100644
--- a/src/H5Smpio.c
+++ b/src/H5Smpio.c
@@ -121,7 +121,7 @@ H5S__mpio_all_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
hsize_t bigio_count; /* Transition point to create derived type */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(space);
@@ -173,7 +173,7 @@ done:
static herr_t
H5S__mpio_none_type(MPI_Datatype *new_type, int *count, hbool_t *is_derived_type)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* fill in the return values */
*new_type = MPI_BYTE;
@@ -212,7 +212,7 @@ H5S__mpio_create_point_datatype(size_t elmt_size, hsize_t num_points, MPI_Aint *
int mpi_code; /* MPI error code */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Create an MPI datatype for an element */
if (MPI_SUCCESS != (mpi_code = MPI_Type_contiguous((int)elmt_size, MPI_BYTE, &elmt_type)))
@@ -375,7 +375,7 @@ H5S__mpio_point_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new_typ
hsize_t u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(space);
@@ -513,7 +513,7 @@ H5S__mpio_permute_type(const H5S_t *space, size_t elmt_size, hsize_t **permute,
hsize_t u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(space);
@@ -661,7 +661,7 @@ H5S__mpio_reg_hyper_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new
int mpi_code; /* MPI return code */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(space);
@@ -994,7 +994,7 @@ H5S__mpio_span_hyper_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *ne
int mpi_code; /* MPI return code */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(space);
@@ -1065,7 +1065,7 @@ H5S__release_datatype(H5S_mpio_mpitype_list_t *type_list)
H5S_mpio_mpitype_node_t *curr; /* Pointer to head of list */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(type_list);
@@ -1124,7 +1124,7 @@ H5S__obtain_datatype(H5S_hyper_span_info_t *spans, const hsize_t *down, size_t e
int mpi_code; /* MPI return status code */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(spans);
diff --git a/src/H5Snone.c b/src/H5Snone.c
index 9292cd4..7ffd643 100644
--- a/src/H5Snone.c
+++ b/src/H5Snone.c
@@ -146,7 +146,7 @@ static const H5S_sel_iter_class_t H5S_sel_iter_none[1] = {{
static herr_t
H5S__none_iter_init(H5S_t H5_ATTR_UNUSED *space, H5S_sel_iter_t *iter)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(space && H5S_SEL_NONE == H5S_GET_SELECT_TYPE(space));
@@ -174,7 +174,7 @@ H5S__none_iter_init(H5S_t H5_ATTR_UNUSED *space, H5S_sel_iter_t *iter)
static herr_t
H5S__none_iter_coords(const H5S_sel_iter_t H5_ATTR_UNUSED *iter, hsize_t H5_ATTR_UNUSED *coords)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -200,7 +200,7 @@ static herr_t
H5S__none_iter_block(const H5S_sel_iter_t H5_ATTR_UNUSED *iter, hsize_t H5_ATTR_UNUSED *start,
hsize_t H5_ATTR_UNUSED *end)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -225,7 +225,7 @@ H5S__none_iter_block(const H5S_sel_iter_t H5_ATTR_UNUSED *iter, hsize_t H5_ATTR_
static hsize_t
H5S__none_iter_nelmts(const H5S_sel_iter_t H5_ATTR_UNUSED *iter)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -253,7 +253,7 @@ H5S__none_iter_nelmts(const H5S_sel_iter_t H5_ATTR_UNUSED *iter)
static htri_t
H5S__none_iter_has_next_block(const H5S_sel_iter_t H5_ATTR_UNUSED *iter)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -282,7 +282,7 @@ H5S__none_iter_has_next_block(const H5S_sel_iter_t H5_ATTR_UNUSED *iter)
static herr_t
H5S__none_iter_next(H5S_sel_iter_t H5_ATTR_UNUSED *iter, size_t H5_ATTR_UNUSED nelem)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -311,7 +311,7 @@ H5S__none_iter_next(H5S_sel_iter_t H5_ATTR_UNUSED *iter, size_t H5_ATTR_UNUSED n
static herr_t
H5S__none_iter_next_block(H5S_sel_iter_t H5_ATTR_UNUSED *iter)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -353,7 +353,7 @@ H5S__none_iter_get_seq_list(H5S_sel_iter_t H5_ATTR_UNUSED *iter, size_t H5_ATTR_
size_t H5_ATTR_UNUSED maxelem, size_t *nseq, size_t *nelem,
hsize_t H5_ATTR_UNUSED *off, size_t H5_ATTR_UNUSED *len)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -393,7 +393,7 @@ H5S__none_iter_get_seq_list(H5S_sel_iter_t H5_ATTR_UNUSED *iter, size_t H5_ATTR_
static herr_t
H5S__none_iter_release(H5S_sel_iter_t H5_ATTR_UNUSED *iter)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -421,7 +421,7 @@ H5S__none_iter_release(H5S_sel_iter_t H5_ATTR_UNUSED *iter)
static herr_t
H5S__none_release(H5S_t H5_ATTR_UNUSED *space)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(space);
@@ -452,7 +452,7 @@ H5S__none_release(H5S_t H5_ATTR_UNUSED *space)
static herr_t
H5S__none_copy(H5S_t *dst, const H5S_t H5_ATTR_UNUSED *src, hbool_t H5_ATTR_UNUSED share_selection)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(src);
HDassert(dst);
@@ -486,7 +486,7 @@ H5S__none_copy(H5S_t *dst, const H5S_t H5_ATTR_UNUSED *src, hbool_t H5_ATTR_UNUS
static htri_t
H5S__none_is_valid(const H5S_t H5_ATTR_UNUSED *space)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(space);
@@ -515,7 +515,7 @@ H5S__none_is_valid(const H5S_t H5_ATTR_UNUSED *space)
static hssize_t
H5S__none_serial_size(H5S_t H5_ATTR_UNUSED *space)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(space);
@@ -552,7 +552,7 @@ H5S__none_serialize(H5S_t *space, uint8_t **p)
{
uint8_t *pp = (*p); /* Local pointer for decoding */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(space);
@@ -601,7 +601,7 @@ H5S__none_deserialize(H5S_t **space, const uint8_t **p)
uint32_t version; /* Version number */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(p);
HDassert(*p);
@@ -673,7 +673,7 @@ static herr_t
H5S__none_bounds(const H5S_t H5_ATTR_UNUSED *space, hsize_t H5_ATTR_UNUSED *start,
hsize_t H5_ATTR_UNUSED *end)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(space);
HDassert(start);
@@ -705,7 +705,7 @@ H5S__none_bounds(const H5S_t H5_ATTR_UNUSED *space, hsize_t H5_ATTR_UNUSED *star
static herr_t
H5S__none_offset(const H5S_t H5_ATTR_UNUSED *space, hsize_t H5_ATTR_UNUSED *offset)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(space);
HDassert(offset);
@@ -735,7 +735,7 @@ H5S__none_offset(const H5S_t H5_ATTR_UNUSED *space, hsize_t H5_ATTR_UNUSED *offs
static int
H5S__none_unlim_dim(const H5S_t H5_ATTR_UNUSED *space)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
FUNC_LEAVE_NOAPI(-1)
} /* end H5S__none_unlim_dim() */
@@ -761,7 +761,7 @@ H5S__none_unlim_dim(const H5S_t H5_ATTR_UNUSED *space)
static htri_t
H5S__none_is_contiguous(const H5S_t H5_ATTR_UNUSED *space)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(space);
@@ -789,7 +789,7 @@ H5S__none_is_contiguous(const H5S_t H5_ATTR_UNUSED *space)
static htri_t
H5S__none_is_single(const H5S_t H5_ATTR_UNUSED *space)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(space);
@@ -818,7 +818,7 @@ H5S__none_is_single(const H5S_t H5_ATTR_UNUSED *space)
static htri_t
H5S__none_is_regular(H5S_t H5_ATTR_UNUSED *space)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(space);
@@ -848,7 +848,7 @@ H5S__none_is_regular(H5S_t H5_ATTR_UNUSED *space)
static htri_t
H5S__none_shape_same(H5S_t H5_ATTR_UNUSED *space1, H5S_t H5_ATTR_UNUSED *space2)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(space1);
@@ -880,7 +880,7 @@ htri_t
H5S__none_intersect_block(H5S_t H5_ATTR_UNUSED *space, const hsize_t H5_ATTR_UNUSED *start,
const hsize_t H5_ATTR_UNUSED *end)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(space);
@@ -912,7 +912,7 @@ H5S__none_intersect_block(H5S_t H5_ATTR_UNUSED *space, const hsize_t H5_ATTR_UNU
static herr_t
H5S__none_adjust_u(H5S_t H5_ATTR_UNUSED *space, const hsize_t H5_ATTR_UNUSED *offset)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(space);
@@ -942,7 +942,7 @@ H5S__none_adjust_u(H5S_t H5_ATTR_UNUSED *space, const hsize_t H5_ATTR_UNUSED *of
static herr_t
H5S__none_adjust_s(H5S_t H5_ATTR_UNUSED *space, const hssize_t H5_ATTR_UNUSED *offset)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(space);
@@ -966,7 +966,7 @@ H5S__none_adjust_s(H5S_t H5_ATTR_UNUSED *space, const hssize_t H5_ATTR_UNUSED *o
static herr_t
H5S__none_project_scalar(const H5S_t H5_ATTR_UNUSED *space, hsize_t H5_ATTR_UNUSED *offset)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(space && H5S_SEL_NONE == H5S_GET_SELECT_TYPE(space));
@@ -994,7 +994,7 @@ H5S__none_project_simple(const H5S_t H5_ATTR_UNUSED *base_space, H5S_t *new_spac
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(base_space && H5S_SEL_NONE == H5S_GET_SELECT_TYPE(base_space));
diff --git a/src/H5Spoint.c b/src/H5Spoint.c
index 240b722..a12b94f 100644
--- a/src/H5Spoint.c
+++ b/src/H5Spoint.c
@@ -174,7 +174,7 @@ H5S__point_iter_init(H5S_t *space, H5S_sel_iter_t *iter)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(space && H5S_SEL_POINTS == H5S_GET_SELECT_TYPE(space));
@@ -225,7 +225,7 @@ done:
static herr_t
H5S__point_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -253,7 +253,7 @@ H5S__point_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords)
static herr_t
H5S__point_iter_block(const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -282,7 +282,7 @@ H5S__point_iter_block(const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end)
static hsize_t
H5S__point_iter_nelmts(const H5S_sel_iter_t *iter)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -312,7 +312,7 @@ H5S__point_iter_has_next_block(const H5S_sel_iter_t *iter)
{
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -346,7 +346,7 @@ done:
static herr_t
H5S__point_iter_next(H5S_sel_iter_t *iter, size_t nelem)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -381,7 +381,7 @@ H5S__point_iter_next(H5S_sel_iter_t *iter, size_t nelem)
static herr_t
H5S__point_iter_next_block(H5S_sel_iter_t *iter)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -435,7 +435,7 @@ H5S__point_iter_get_seq_list(H5S_sel_iter_t *iter, size_t maxseq, size_t maxelem
int i; /* Local index variable */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -542,7 +542,7 @@ H5S__point_iter_get_seq_list(H5S_sel_iter_t *iter, size_t maxseq, size_t maxelem
static herr_t
H5S__point_iter_release(H5S_sel_iter_t *iter)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -580,7 +580,7 @@ H5S__point_add(H5S_t *space, H5S_seloper_t op, size_t num_elem, const hsize_t *c
unsigned u; /* Counter */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(space);
@@ -692,7 +692,7 @@ done:
static herr_t
H5S__point_release(H5S_t *space)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(space);
@@ -804,7 +804,7 @@ H5S__copy_pnt_list(const H5S_pnt_list_t *src, unsigned rank)
H5S_pnt_node_t *curr, *new_tail; /* Point information nodes */
H5S_pnt_list_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(src);
@@ -879,7 +879,7 @@ H5S__free_pnt_list(H5S_pnt_list_t *pnt_lst)
{
H5S_pnt_node_t *curr; /* Point information nodes */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(pnt_lst);
@@ -923,7 +923,7 @@ H5S__point_copy(H5S_t *dst, const H5S_t *src, hbool_t H5_ATTR_UNUSED share_selec
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(src);
@@ -964,7 +964,7 @@ H5S__point_is_valid(const H5S_t *space)
unsigned u; /* Counter */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(space);
@@ -1063,7 +1063,7 @@ H5S__point_get_version_enc_size(const H5S_t *space, uint32_t *version, uint8_t *
unsigned u; /* Local index veriable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Get bounding box for the selection */
HDmemset(bounds_end, 0, sizeof(bounds_end));
@@ -1165,7 +1165,7 @@ H5S__point_serial_size(H5S_t *space)
uint8_t enc_size; /* Encoded size of point selection info */
hssize_t ret_value = -1; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(space);
@@ -1230,7 +1230,7 @@ H5S__point_serialize(H5S_t *space, uint8_t **p)
uint8_t enc_size; /* Encoded size of point selection info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(space);
@@ -1366,7 +1366,7 @@ H5S__point_deserialize(H5S_t **space, const uint8_t **p)
unsigned i, j; /* local counting variables */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(p);
@@ -1519,7 +1519,7 @@ H5S__get_select_elem_pointlist(const H5S_t *space, hsize_t startpoint, hsize_t n
H5S_pnt_node_t *node; /* Point node */
unsigned rank; /* Dataspace rank */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(space);
HDassert(buf);
@@ -1642,7 +1642,7 @@ H5S__point_bounds(const H5S_t *space, hsize_t *start, hsize_t *end)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(space);
@@ -1700,7 +1700,7 @@ H5S__point_offset(const H5S_t *space, hsize_t *offset)
int i; /* index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(space);
HDassert(offset);
@@ -1756,7 +1756,7 @@ done:
static int
H5S__point_unlim_dim(const H5S_t H5_ATTR_UNUSED *space)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
FUNC_LEAVE_NOAPI(-1)
} /* end H5S__point_unlim_dim() */
@@ -1787,7 +1787,7 @@ H5S__point_is_contiguous(const H5S_t *space)
{
htri_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(space);
@@ -1824,7 +1824,7 @@ H5S__point_is_single(const H5S_t *space)
{
htri_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(space);
@@ -1863,7 +1863,7 @@ H5S__point_is_regular(H5S_t *space)
{
htri_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(space);
@@ -1907,7 +1907,7 @@ H5S__point_shape_same(H5S_t *space1, H5S_t *space2)
int space2_dim; /* Current dimension in second dataspace */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(space1);
@@ -2008,7 +2008,7 @@ H5S__point_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *en
H5S_pnt_node_t *pnt; /* Point information node */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(space);
@@ -2064,7 +2064,7 @@ H5S__point_adjust_u(H5S_t *space, const hsize_t *offset)
unsigned rank; /* Dataspace rank */
unsigned u; /* Local index variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(space);
HDassert(offset);
@@ -2131,7 +2131,7 @@ H5S__point_adjust_s(H5S_t *space, const hssize_t *offset)
unsigned rank; /* Dataspace rank */
unsigned u; /* Local index variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(space);
HDassert(offset);
@@ -2194,7 +2194,7 @@ H5S__point_project_scalar(const H5S_t *space, hsize_t *offset)
const H5S_pnt_node_t *node; /* Point node */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(space && H5S_SEL_POINTS == H5S_GET_SELECT_TYPE(space));
@@ -2238,7 +2238,7 @@ H5S__point_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(base_space && H5S_SEL_POINTS == H5S_GET_SELECT_TYPE(base_space));
diff --git a/src/H5Sselect.c b/src/H5Sselect.c
index bcf12a0..c931304 100644
--- a/src/H5Sselect.c
+++ b/src/H5Sselect.c
@@ -1222,7 +1222,7 @@ H5S__select_iter_block(const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end)
{
herr_t ret_value; /* return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -1300,7 +1300,7 @@ H5S__select_iter_has_next_block(const H5S_sel_iter_t *iter)
{
herr_t ret_value; /* return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
@@ -1384,7 +1384,7 @@ H5S__select_iter_next_block(H5S_sel_iter_t *iter)
{
herr_t ret_value; /* return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(iter);
diff --git a/src/H5Stest.c b/src/H5Stest.c
index 6a31f3c..791d652 100644
--- a/src/H5Stest.c
+++ b/src/H5Stest.c
@@ -173,7 +173,7 @@ H5S__check_spans_tail_ptr(const H5S_hyper_span_info_t *span_lst)
H5S_hyper_span_t *actual_tail = NULL;
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(span_lst);
@@ -222,7 +222,7 @@ H5S__check_points_tail_ptr(const H5S_pnt_list_t *pnt_lst)
H5S_pnt_node_t *actual_tail = NULL;
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(pnt_lst);
@@ -266,7 +266,7 @@ H5S__check_internal_consistency(const H5S_t *space)
unsigned u;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(space);
diff --git a/src/H5T.c b/src/H5T.c
index bbe6ce7..27de0e4 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -621,7 +621,7 @@ H5T__init_inf(void)
size_t u; /* Local index value */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Get the float datatype */
if (NULL == (dst_p = (H5T_t *)H5I_object(H5T_NATIVE_FLOAT_g)))
@@ -1462,7 +1462,7 @@ H5T__unlock_cb(void *_dt, hid_t H5_ATTR_UNUSED id, void *_udata)
H5T_t *dt = (H5T_t *)_dt;
int * n = (int *)_udata;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(dt);
HDassert(dt->shared);
@@ -1720,7 +1720,7 @@ H5T__close_cb(H5T_t *dt, void **request)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(dt);
@@ -2484,7 +2484,7 @@ H5T__register_int(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T
H5T_conv_func_t conv_func; /* Conversion function wrapper */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(H5T_PERS_HARD == pers || H5T_PERS_SOFT == pers);
@@ -2535,7 +2535,7 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con
int i; /*counter */
herr_t ret_value = SUCCEED; /*return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(src);
@@ -2769,7 +2769,7 @@ H5T__unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_c
int nprint = 0; /*number of paths shut down */
int i; /*counter */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Remove matching entries from the soft list */
if (H5T_PERS_DONTCARE == pers || H5T_PERS_SOFT == pers) {
@@ -3424,7 +3424,7 @@ H5T__initiate_copy(const H5T_t *old_dt)
H5T_t *new_dt = NULL; /* Copy of datatype */
H5T_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Allocate space */
if (NULL == (new_dt = H5FL_MALLOC(H5T_t)))
@@ -3477,7 +3477,7 @@ H5T__copy_transient(H5T_t *old_dt)
{
H5T_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Copy datatype, with correct method */
if (NULL == (ret_value = H5T_copy(old_dt, H5T_COPY_TRANSIENT)))
@@ -3505,7 +3505,7 @@ H5T__copy_all(H5T_t *old_dt)
{
H5T_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Copy datatype, with correct method */
if (NULL == (ret_value = H5T_copy(old_dt, H5T_COPY_ALL)))
@@ -3540,7 +3540,7 @@ H5T__complete_copy(H5T_t *new_dt, const H5T_t *old_dt, H5T_shared_t *reopened_fo
unsigned i; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Update fields in the new struct, if we aren't sharing an already opened
* committed datatype */
@@ -4239,7 +4239,7 @@ H5T__set_size(H5T_t *dt, size_t size)
size_t prec, offset;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(dt);
@@ -5021,7 +5021,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
int nprint = 0; /* lines of output printed */
H5T_path_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(src);
@@ -5405,7 +5405,7 @@ H5T__compiler_conv(H5T_t *src, H5T_t *dst)
H5T_path_t *path;
htri_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Find it */
if (NULL == (path = H5T_path_find(src, dst)))
@@ -5977,7 +5977,7 @@ H5T__detect_vlen_ref(const H5T_t *dt)
unsigned u; /* Local index variable */
hbool_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
HDassert(dt);
@@ -6080,7 +6080,7 @@ H5T_is_vl_storage(const H5T_t *dt)
static herr_t
H5T__upgrade_version_cb(H5T_t *dt, void *op_value)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(dt);
diff --git a/src/H5TS.c b/src/H5TS.c
index 37fd66a..27823db 100644
--- a/src/H5TS.c
+++ b/src/H5TS.c
@@ -158,7 +158,7 @@ static H5TS_key_t H5TS_tid_key;
static void
H5TS__key_destructor(void *key_val)
{
- FUNC_ENTER_STATIC_NAMECHECK_ONLY
+ FUNC_ENTER_PACKAGE_NAMECHECK_ONLY
/* Use HDfree here instead of H5MM_xfree(), to avoid calling the H5CS routines */
if (key_val != NULL)
@@ -373,7 +373,7 @@ H5TS__mutex_acquire(H5TS_mutex_t *mutex, unsigned int lock_count, hbool_t *acqui
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC_NAMECHECK_ONLY
+ FUNC_ENTER_PACKAGE_NAMECHECK_ONLY
#ifdef H5_HAVE_WIN_THREADS
EnterCriticalSection(&mutex->CriticalSection);
diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c
index a3a1aa0..3a284e3 100644
--- a/src/H5Tcommit.c
+++ b/src/H5Tcommit.c
@@ -106,7 +106,7 @@ H5T__commit_api_common(hid_t loc_id, const char *name, hid_t type_id, hid_t lcpl
H5VL_loc_params_t loc_params; /* Location parameters */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if (!name)
@@ -629,7 +629,7 @@ H5T__open_api_common(hid_t loc_id, const char *name, hid_t tapl_id, void **token
H5VL_loc_params_t loc_params;
hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
if (!name)
@@ -1166,7 +1166,7 @@ H5T__open_oid(const H5G_loc_t *loc)
H5T_t *dt = NULL; /* Datatype from the file */
H5T_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC_TAG(loc->oloc->addr)
+ FUNC_ENTER_PACKAGE_TAG(loc->oloc->addr)
HDassert(loc);
diff --git a/src/H5Tcompound.c b/src/H5Tcompound.c
index 8dc0582..a2d21e1 100644
--- a/src/H5Tcompound.c
+++ b/src/H5Tcompound.c
@@ -282,7 +282,7 @@ H5T__reopen_member_type(const H5T_t *dt, unsigned membno)
{
H5T_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(dt);
@@ -521,7 +521,7 @@ H5T__pack(const H5T_t *dt)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(dt);
@@ -596,7 +596,7 @@ H5T__is_packed(const H5T_t *dt)
{
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(dt);
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 5efff10..26ecff5 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -1912,7 +1912,7 @@ H5T__conv_struct_free(H5T_conv_struct_t *priv)
hid_t * src_memb_id = priv->src_memb_id, *dst_memb_id = priv->dst_memb_id;
unsigned i;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
for (i = 0; i < priv->src_nmembs; i++)
if (src2dst[i] >= 0) {
@@ -1987,7 +1987,7 @@ H5T__conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
unsigned i, j;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
src_nmembs = src->shared->u.compnd.nmembs;
dst_nmembs = dst->shared->u.compnd.nmembs;
@@ -2680,7 +2680,7 @@ H5T__conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
unsigned i, j; /*counters */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
cdata->need_bkg = H5T_BKG_NO;
if (NULL == (priv = (H5T_enum_struct_t *)(cdata->priv = H5MM_calloc(sizeof(*priv)))))
@@ -9437,7 +9437,7 @@ H5T__reverse_order(uint8_t *rev, uint8_t *s, size_t size, H5T_order_t order)
{
size_t i;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(s);
HDassert(size);
diff --git a/src/H5Tenum.c b/src/H5Tenum.c
index 72705f2..fb0057a 100644
--- a/src/H5Tenum.c
+++ b/src/H5Tenum.c
@@ -363,7 +363,7 @@ H5T__enum_nameof(const H5T_t *dt, const void *value, char *name /*out*/, size_t
hbool_t alloc_name = FALSE; /* Whether name has been allocated */
char * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(dt && H5T_ENUM == dt->shared->type);
@@ -493,7 +493,7 @@ H5T__enum_valueof(const H5T_t *dt, const char *name, void *value /*out*/)
H5T_t * copied_dt = NULL; /*do sorting in copied datatype */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(dt && H5T_ENUM == dt->shared->type);
diff --git a/src/H5Tmodule.h b/src/H5Tmodule.h
index 73424fb..dc07e03 100644
--- a/src/H5Tmodule.h
+++ b/src/H5Tmodule.h
@@ -25,9 +25,8 @@
* reporting macros.
*/
#define H5T_MODULE
-#define H5_MY_PKG H5T
-#define H5_MY_PKG_ERR H5E_DATATYPE
-#define H5_MY_PKG_INIT YES
+#define H5_MY_PKG H5T
+#define H5_MY_PKG_ERR H5E_DATATYPE
/**\defgroup H5T H5T
*
diff --git a/src/H5Tnative.c b/src/H5Tnative.c
index e6fab51..e75d1df 100644
--- a/src/H5Tnative.c
+++ b/src/H5Tnative.c
@@ -140,7 +140,7 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali
unsigned u; /* Local index variable */
H5T_t * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(dtype);
@@ -566,7 +566,7 @@ H5T__get_native_integer(size_t prec, H5T_sign_t sign, H5T_direction_t direction,
} match = H5T_NATIVE_INT_MATCH_UNKNOWN;
H5T_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if (direction == H5T_DIR_DEFAULT || direction == H5T_DIR_ASCEND) {
if (prec <= H5T_get_precision((H5T_t *)H5I_object(H5T_NATIVE_SCHAR_g))) {
@@ -723,7 +723,7 @@ H5T__get_native_float(size_t size, H5T_direction_t direction, size_t *struct_ali
} match = H5T_NATIVE_FLOAT_MATCH_UNKNOWN;
H5T_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(size > 0);
@@ -831,7 +831,7 @@ H5T__get_native_bitfield(size_t prec, H5T_direction_t direction, size_t *struct_
size_t native_size = 0; /* Datatype size of the native type */
H5T_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if (direction == H5T_DIR_DEFAULT || direction == H5T_DIR_ASCEND) {
if (prec <= H5T_get_precision((H5T_t *)H5I_object(H5T_NATIVE_B8_g))) {
@@ -920,7 +920,7 @@ static herr_t
H5T__cmp_offset(size_t *comp_size, size_t *offset, size_t elem_size, size_t nelems, size_t align,
size_t *struct_align)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
if (offset && comp_size) {
if (align > 1 && *comp_size % align) {
diff --git a/src/H5Toffset.c b/src/H5Toffset.c
index b206dca..ec00f1f 100644
--- a/src/H5Toffset.c
+++ b/src/H5Toffset.c
@@ -230,7 +230,7 @@ H5T__set_offset(const H5T_t *dt, size_t offset)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(dt);
diff --git a/src/H5Toh.c b/src/H5Toh.c
index 8d1ac63..e8bf02f 100644
--- a/src/H5Toh.c
+++ b/src/H5Toh.c
@@ -92,7 +92,7 @@ H5O__dtype_isa(const H5O_t *oh)
{
htri_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(oh);
@@ -122,7 +122,7 @@ H5O__dtype_open(const H5G_loc_t *obj_loc, H5I_type_t *opened_type)
H5T_t *type = NULL; /* Datatype opened */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(obj_loc);
@@ -161,7 +161,7 @@ H5O__dtype_create(H5F_t *f, void *_crt_info, H5G_loc_t *obj_loc)
H5T_obj_create_t *crt_info = (H5T_obj_create_t *)_crt_info; /* Named datatype creation parameters */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(f);
@@ -205,7 +205,7 @@ H5O__dtype_get_oloc(hid_t obj_id)
H5T_t * dt = NULL;
H5O_loc_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Get the datatype */
if (NULL == (dt = (H5T_t *)H5I_object(obj_id)))
diff --git a/src/H5Torder.c b/src/H5Torder.c
index e0b48b3..21b72a4 100644
--- a/src/H5Torder.c
+++ b/src/H5Torder.c
@@ -228,7 +228,7 @@ H5T__set_order(H5T_t *dtype, H5T_order_t order)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if (H5T_ENUM == dtype->shared->type && dtype->shared->u.enumer.nmembs > 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "operation not allowed after enum members are defined")
diff --git a/src/H5Tprecis.c b/src/H5Tprecis.c
index 1dc0073..d65bbe8 100644
--- a/src/H5Tprecis.c
+++ b/src/H5Tprecis.c
@@ -191,7 +191,7 @@ H5T__set_precision(const H5T_t *dt, size_t prec)
size_t offset, size;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(dt);
diff --git a/src/H5Tref.c b/src/H5Tref.c
index 511c531..967f48d 100644
--- a/src/H5Tref.c
+++ b/src/H5Tref.c
@@ -362,7 +362,7 @@ H5T__ref_mem_isnull(const H5VL_object_t H5_ATTR_UNUSED *src_file, const void *sr
const unsigned char zeros[H5T_REF_MEM_SIZE] = {0};
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
H5T_REF_LOG_DEBUG("");
/* Check parameters */
@@ -388,7 +388,7 @@ H5T__ref_mem_setnull(H5VL_object_t H5_ATTR_UNUSED *dst_file, void *dst_buf, H5_A
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
H5T_REF_LOG_DEBUG("");
HDmemset(dst_buf, 0, H5T_REF_MEM_SIZE);
@@ -416,7 +416,7 @@ H5T__ref_mem_getsize(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf
unsigned flags = 0; /* References flags */
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5T_REF_LOG_DEBUG("");
/* Sanity check */
@@ -536,7 +536,7 @@ H5T__ref_mem_read(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf, s
unsigned flags = 0; /* References flags */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5T_REF_LOG_DEBUG("");
/* Sanity check */
@@ -647,7 +647,7 @@ H5T__ref_mem_write(H5VL_object_t *src_file, const void *src_buf, size_t src_size
H5R_ref_priv_t tmp_ref; /* Temporary reference to decode into */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5T_REF_LOG_DEBUG("");
/* Sanity check */
@@ -760,7 +760,7 @@ H5T__ref_disk_isnull(const H5VL_object_t *src_file, const void *src_buf, hbool_t
H5R_type_t ref_type;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5T_REF_LOG_DEBUG("");
/* Check parameters */
@@ -810,7 +810,7 @@ H5T__ref_disk_setnull(H5VL_object_t *dst_file, void *dst_buf, void *bg_buf)
uint8_t * p_bg = (uint8_t *)bg_buf;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5T_REF_LOG_DEBUG("");
HDassert(dst_file);
@@ -865,7 +865,7 @@ H5T__ref_disk_getsize(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_bu
H5R_type_t ref_type;
size_t ret_value = 0;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5T_REF_LOG_DEBUG("");
HDassert(src_buf);
@@ -914,7 +914,7 @@ H5T__ref_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t H5_ATTR_
size_t blob_size = dst_size;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5T_REF_LOG_DEBUG("");
HDassert(src_file);
@@ -960,7 +960,7 @@ H5T__ref_disk_write(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf,
uint8_t * p_bg = (uint8_t *)bg_buf;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5T_REF_LOG_DEBUG("");
HDassert(src_buf);
@@ -1023,7 +1023,7 @@ H5T__ref_obj_disk_isnull(const H5VL_object_t *src_file, const void *src_buf, hbo
haddr_t addr;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5T_REF_LOG_DEBUG("");
/* Check parameters */
@@ -1075,7 +1075,7 @@ H5T__ref_obj_disk_getsize(H5VL_object_t *src_file, const void H5_ATTR_UNUSED *sr
H5F_t *src_f;
size_t ret_value = 0;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5T_REF_LOG_DEBUG("");
HDassert(src_file);
@@ -1122,7 +1122,7 @@ H5T__ref_obj_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t src_
H5F_t *src_f;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5T_REF_LOG_DEBUG("");
HDassert(src_file);
@@ -1175,7 +1175,7 @@ H5T__ref_dsetreg_disk_isnull(const H5VL_object_t *src_file, const void *src_buf,
haddr_t addr;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5T_REF_LOG_DEBUG("");
/* Check parameters */
@@ -1227,9 +1227,9 @@ H5T__ref_dsetreg_disk_getsize(H5VL_object_t H5_ATTR_UNUSED *src_file, const void
size_t ret_value = sizeof(struct H5Tref_dsetreg);
#ifndef NDEBUG
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
#else
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
#endif
H5T_REF_LOG_DEBUG("");
@@ -1279,7 +1279,7 @@ H5T__ref_dsetreg_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t
struct H5Tref_dsetreg *dst_reg = (struct H5Tref_dsetreg *)dst_buf;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
H5T_REF_LOG_DEBUG("");
HDassert(src_file);
diff --git a/src/H5Tvlen.c b/src/H5Tvlen.c
index 080d725..39d33d4 100644
--- a/src/H5Tvlen.c
+++ b/src/H5Tvlen.c
@@ -369,25 +369,20 @@ done:
static herr_t
H5T__vlen_mem_seq_getlen(H5VL_object_t H5_ATTR_UNUSED *file, const void *_vl, size_t *len)
{
-#ifdef H5_NO_ALIGNMENT_RESTRICTIONS
- const hvl_t *vl = (const hvl_t *)_vl; /* Pointer to the user's hvl_t information */
-#else
hvl_t vl; /* User's hvl_t information */
-#endif
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check parameter */
HDassert(_vl);
HDassert(len);
-#ifdef H5_NO_ALIGNMENT_RESTRICTIONS
- *len = vl->len;
-#else
- H5MM_memcpy(&vl, _vl, sizeof(hvl_t));
+ /* Copy to ensure correct alignment. memcpy is best here because
+ * it optimizes to fast code.
+ */
+ HDmemcpy(&vl, _vl, sizeof(hvl_t));
*len = vl.len;
-#endif
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5T__vlen_mem_seq_getlen() */
@@ -407,25 +402,16 @@ H5T__vlen_mem_seq_getlen(H5VL_object_t H5_ATTR_UNUSED *file, const void *_vl, si
static void *
H5T__vlen_mem_seq_getptr(void *_vl)
{
-#ifdef H5_NO_ALIGNMENT_RESTRICTIONS
- const hvl_t *vl = (const hvl_t *)_vl; /* Pointer to the user's hvl_t information */
-#else
hvl_t vl; /* User's hvl_t information */
-#endif
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check parameters, return result */
-#ifdef H5_NO_ALIGNMENT_RESTRICTIONS
- HDassert(vl);
-
- FUNC_LEAVE_NOAPI(vl->p)
-#else
HDassert(_vl);
- H5MM_memcpy(&vl, _vl, sizeof(hvl_t));
+ /* Copy to ensure correct alignment. */
+ HDmemcpy(&vl, _vl, sizeof(hvl_t));
FUNC_LEAVE_NOAPI(vl.p)
-#endif
} /* end H5T__vlen_mem_seq_getptr() */
/*-------------------------------------------------------------------------
@@ -443,24 +429,17 @@ H5T__vlen_mem_seq_getptr(void *_vl)
static herr_t
H5T__vlen_mem_seq_isnull(const H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, hbool_t *isnull)
{
-#ifdef H5_NO_ALIGNMENT_RESTRICTIONS
- const hvl_t *vl = (const hvl_t *)_vl; /* Pointer to the user's hvl_t information */
-#else
hvl_t vl; /* User's hvl_t information */
-#endif
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check parameters */
HDassert(_vl);
-#ifdef H5_NO_ALIGNMENT_RESTRICTIONS
- *isnull = ((vl->len == 0 || vl->p == NULL) ? TRUE : FALSE);
-#else
- H5MM_memcpy(&vl, _vl, sizeof(hvl_t));
+ /* Copy to ensure correct alignment. */
+ HDmemcpy(&vl, _vl, sizeof(hvl_t));
*isnull = ((vl.len == 0 || vl.p == NULL) ? TRUE : FALSE);
-#endif
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5T__vlen_mem_seq_isnull() */
@@ -482,7 +461,7 @@ H5T__vlen_mem_seq_setnull(H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, void H5
{
hvl_t vl; /* Temporary hvl_t to use during operation */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check parameters */
HDassert(_vl);
@@ -512,27 +491,18 @@ H5T__vlen_mem_seq_setnull(H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, void H5
static herr_t
H5T__vlen_mem_seq_read(H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, void *buf, size_t len)
{
-#ifdef H5_NO_ALIGNMENT_RESTRICTIONS
- const hvl_t *vl = (const hvl_t *)_vl; /* Pointer to the user's hvl_t information */
-#else
hvl_t vl; /* User's hvl_t information */
-#endif
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check parameters, copy data */
HDassert(buf);
-#ifdef H5_NO_ALIGNMENT_RESTRICTIONS
- HDassert(vl && vl->p);
-
- H5MM_memcpy(buf, vl->p, len);
-#else
HDassert(_vl);
- H5MM_memcpy(&vl, _vl, sizeof(hvl_t));
+ /* Copy to ensure correct alignment. */
+ HDmemcpy(&vl, _vl, sizeof(hvl_t));
HDassert(vl.p);
H5MM_memcpy(buf, vl.p, len);
-#endif
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5T__vlen_mem_seq_read() */
@@ -556,7 +526,7 @@ H5T__vlen_mem_seq_write(H5VL_object_t H5_ATTR_UNUSED *file, const H5T_vlen_alloc
hvl_t vl; /* Temporary hvl_t to use during operation */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check parameters */
HDassert(_vl);
@@ -606,20 +576,15 @@ done:
static herr_t
H5T__vlen_mem_str_getlen(H5VL_object_t H5_ATTR_UNUSED *file, const void *_vl, size_t *len)
{
-#ifdef H5_NO_ALIGNMENT_RESTRICTIONS
- const char *s = *(const char *const *)_vl; /* Pointer to the user's string information */
-#else
const char *s = NULL; /* Pointer to the user's string information */
-#endif
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check parameters */
HDassert(_vl);
-#ifndef H5_NO_ALIGNMENT_RESTRICTIONS
- H5MM_memcpy(&s, _vl, sizeof(char *));
-#endif
+ /* Copy to ensure correct alignment. */
+ HDmemcpy(&s, _vl, sizeof(char *));
*len = HDstrlen(s);
@@ -641,21 +606,14 @@ H5T__vlen_mem_str_getlen(H5VL_object_t H5_ATTR_UNUSED *file, const void *_vl, si
static void *
H5T__vlen_mem_str_getptr(void *_vl)
{
-#ifdef H5_NO_ALIGNMENT_RESTRICTIONS
- char *s = *(char **)_vl; /* Pointer to the user's string information */
-#else
- char * s = NULL; /* Pointer to the user's string information */
-#endif
+ char *s = NULL; /* Pointer to the user's string information */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check parameters */
-#ifdef H5_NO_ALIGNMENT_RESTRICTIONS
- HDassert(s);
-#else
HDassert(_vl);
- H5MM_memcpy(&s, _vl, sizeof(char *));
-#endif
+ /* Copy to ensure correct alignment. */
+ HDmemcpy(&s, _vl, sizeof(char *));
FUNC_LEAVE_NOAPI(s)
} /* end H5T__vlen_mem_str_getptr() */
@@ -675,17 +633,12 @@ H5T__vlen_mem_str_getptr(void *_vl)
static herr_t
H5T__vlen_mem_str_isnull(const H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, hbool_t *isnull)
{
-#ifdef H5_NO_ALIGNMENT_RESTRICTIONS
- char *s = *(char **)_vl; /* Pointer to the user's string information */
-#else
char *s = NULL; /* Pointer to the user's string information */
-#endif
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
-#ifndef H5_NO_ALIGNMENT_RESTRICTIONS
- H5MM_memcpy(&s, _vl, sizeof(char *));
-#endif
+ /* Copy to ensure correct alignment. */
+ HDmemcpy(&s, _vl, sizeof(char *));
*isnull = (s == NULL ? TRUE : FALSE);
@@ -709,7 +662,7 @@ H5T__vlen_mem_str_setnull(H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, void H5
{
char *t = NULL; /* Pointer to temporary buffer allocated */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Set pointer in user's buffer with memcpy, to avoid alignment issues */
H5MM_memcpy(_vl, &t, sizeof(char *));
@@ -732,23 +685,16 @@ H5T__vlen_mem_str_setnull(H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, void H5
static herr_t
H5T__vlen_mem_str_read(H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, void *buf, size_t len)
{
-#ifdef H5_NO_ALIGNMENT_RESTRICTIONS
- char *s = *(char **)_vl; /* Pointer to the user's string information */
-#else
- char *s; /* Pointer to the user's string information */
-#endif
+ char *s; /* Pointer to the user's string information */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
if (len > 0) {
/* check parameters */
HDassert(buf);
-#ifdef H5_NO_ALIGNMENT_RESTRICTIONS
- HDassert(s);
-#else
HDassert(_vl);
- H5MM_memcpy(&s, _vl, sizeof(char *));
-#endif
+ /* Copy to ensure correct alignment. */
+ HDmemcpy(&s, _vl, sizeof(char *));
H5MM_memcpy(buf, s, len);
} /* end if */
@@ -776,7 +722,7 @@ H5T__vlen_mem_str_write(H5VL_object_t H5_ATTR_UNUSED *file, const H5T_vlen_alloc
size_t len; /* Maximum length of the string to copy */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check parameters */
HDassert(buf);
@@ -821,7 +767,7 @@ H5T__vlen_disk_getlen(H5VL_object_t H5_ATTR_UNUSED *file, const void *_vl, size_
{
const uint8_t *vl = (const uint8_t *)_vl; /* Pointer to the user's hvl_t information */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check parameters */
HDassert(vl);
@@ -852,7 +798,7 @@ H5T__vlen_disk_isnull(const H5VL_object_t *file, void *_vl, hbool_t *isnull)
uint8_t * vl = (uint8_t *)_vl; /* Pointer to the user's hvl_t information */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check parameters */
HDassert(file);
@@ -893,7 +839,7 @@ H5T__vlen_disk_setnull(H5VL_object_t *file, void *_vl, void *bg)
uint8_t * vl = (uint8_t *)_vl; /* Pointer to the user's hvl_t information */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check parameters */
HDassert(file);
@@ -937,7 +883,7 @@ H5T__vlen_disk_read(H5VL_object_t *file, void *_vl, void *buf, size_t len)
const uint8_t *vl = (const uint8_t *)_vl; /* Pointer to the user's hvl_t information */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check parameters */
HDassert(file);
@@ -975,7 +921,7 @@ H5T__vlen_disk_write(H5VL_object_t *file, const H5T_vlen_alloc_info_t H5_ATTR_UN
const uint8_t *bg = (const uint8_t *)_bg; /* Pointer to the old data hvl_t */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check parameters */
HDassert(vl);
@@ -1016,7 +962,7 @@ H5T__vlen_disk_delete(H5VL_object_t *file, const void *_vl)
const uint8_t *vl = (const uint8_t *)_vl; /* Pointer to the user's hvl_t information */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check parameters */
HDassert(file);
diff --git a/src/H5VLcallback.c b/src/H5VLcallback.c
index 0c5c73d..b9e9911 100644
--- a/src/H5VLcallback.c
+++ b/src/H5VLcallback.c
@@ -346,7 +346,7 @@ H5VL__common_optional_op(hid_t id, H5I_type_t id_type, H5VL_reg_opt_oper_t reg_o
hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check ID type & get VOL object */
if (NULL == (*vol_obj_ptr = (H5VL_object_t *)H5I_object_verify(id, id_type)))
@@ -987,7 +987,7 @@ H5VL__attr_create(void *obj, const H5VL_loc_params_t *loc_params, const H5VL_cla
{
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->attr_cls.create)
@@ -1092,7 +1092,7 @@ H5VL__attr_open(void *obj, const H5VL_loc_params_t *loc_params, const H5VL_class
{
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->attr_cls.open)
@@ -1192,7 +1192,7 @@ H5VL__attr_read(void *obj, const H5VL_class_t *cls, hid_t mem_type_id, void *buf
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->attr_cls.read)
@@ -1290,7 +1290,7 @@ H5VL__attr_write(void *obj, const H5VL_class_t *cls, hid_t mem_type_id, const vo
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->attr_cls.write)
@@ -1388,7 +1388,7 @@ H5VL__attr_get(void *obj, const H5VL_class_t *cls, H5VL_attr_get_args_t *args, h
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->attr_cls.get)
@@ -1488,7 +1488,7 @@ H5VL__attr_specific(void *obj, const H5VL_loc_params_t *loc_params, const H5VL_c
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->attr_cls.specific)
@@ -1591,7 +1591,7 @@ H5VL__attr_optional(void *obj, const H5VL_class_t *cls, H5VL_optional_args_t *ar
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->attr_cls.optional)
@@ -1735,7 +1735,7 @@ H5VL__attr_close(void *obj, const H5VL_class_t *cls, hid_t dxpl_id, void **req)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->attr_cls.close)
@@ -1827,7 +1827,7 @@ H5VL__dataset_create(void *obj, const H5VL_loc_params_t *loc_params, const H5VL_
{
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->dataset_cls.create)
@@ -1934,7 +1934,7 @@ H5VL__dataset_open(void *obj, const H5VL_loc_params_t *loc_params, const H5VL_cl
{
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->dataset_cls.open)
@@ -2035,7 +2035,7 @@ H5VL__dataset_read(void *obj, const H5VL_class_t *cls, hid_t mem_type_id, hid_t
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->dataset_cls.read)
@@ -2137,7 +2137,7 @@ H5VL__dataset_write(void *obj, const H5VL_class_t *cls, hid_t mem_type_id, hid_t
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->dataset_cls.write)
@@ -2239,7 +2239,7 @@ H5VL__dataset_get(void *obj, const H5VL_class_t *cls, H5VL_dataset_get_args_t *a
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->dataset_cls.get)
@@ -2338,7 +2338,7 @@ H5VL__dataset_specific(void *obj, const H5VL_class_t *cls, H5VL_dataset_specific
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->dataset_cls.specific)
@@ -2438,7 +2438,7 @@ H5VL__dataset_optional(void *obj, const H5VL_class_t *cls, H5VL_optional_args_t
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->dataset_cls.optional)
@@ -2579,7 +2579,7 @@ H5VL__dataset_close(void *obj, const H5VL_class_t *cls, hid_t dxpl_id, void **re
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(obj);
@@ -2688,7 +2688,7 @@ H5VL__datatype_commit(void *obj, const H5VL_loc_params_t *loc_params, const H5VL
{
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->datatype_cls.commit)
@@ -2793,7 +2793,7 @@ H5VL__datatype_open(void *obj, const H5VL_loc_params_t *loc_params, const H5VL_c
{
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->datatype_cls.open)
@@ -2894,7 +2894,7 @@ H5VL__datatype_get(void *obj, const H5VL_class_t *cls, H5VL_datatype_get_args_t
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->datatype_cls.get)
@@ -2993,7 +2993,7 @@ H5VL__datatype_specific(void *obj, const H5VL_class_t *cls, H5VL_datatype_specif
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->datatype_cls.specific)
@@ -3093,7 +3093,7 @@ H5VL__datatype_optional(void *obj, const H5VL_class_t *cls, H5VL_optional_args_t
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->datatype_cls.optional)
@@ -3282,7 +3282,7 @@ H5VL__datatype_close(void *obj, const H5VL_class_t *cls, hid_t dxpl_id, void **r
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->datatype_cls.close)
@@ -3383,7 +3383,7 @@ H5VL__file_create(const H5VL_class_t *cls, const char *name, unsigned flags, hid
{
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->file_cls.create)
@@ -3487,7 +3487,7 @@ H5VL__file_open(const H5VL_class_t *cls, const char *name, unsigned flags, hid_t
{
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->file_cls.open)
@@ -3533,7 +3533,7 @@ H5VL__file_open_find_connector_cb(H5PL_type_t plugin_type, const void *plugin_in
hid_t fapl_id = H5I_INVALID_HID;
herr_t ret_value = H5_ITER_CONT;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(udata);
HDassert(udata->filename);
@@ -3747,7 +3747,7 @@ H5VL__file_get(void *obj, const H5VL_class_t *cls, H5VL_file_get_args_t *args, h
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->file_cls.get)
@@ -3845,7 +3845,7 @@ H5VL__file_specific(void *obj, const H5VL_class_t *cls, H5VL_file_specific_args_
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->file_cls.specific)
@@ -3977,7 +3977,7 @@ H5VL__file_optional(void *obj, const H5VL_class_t *cls, H5VL_optional_args_t *ar
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->file_cls.optional)
@@ -4118,7 +4118,7 @@ H5VL__file_close(void *obj, const H5VL_class_t *cls, hid_t dxpl_id, void **req)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(obj);
@@ -4220,7 +4220,7 @@ H5VL__group_create(void *obj, const H5VL_loc_params_t *loc_params, const H5VL_cl
{
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->group_cls.create)
@@ -4324,7 +4324,7 @@ H5VL__group_open(void *obj, const H5VL_loc_params_t *loc_params, const H5VL_clas
{
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->group_cls.open)
@@ -4424,7 +4424,7 @@ H5VL__group_get(void *obj, const H5VL_class_t *cls, H5VL_group_get_args_t *args,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->group_cls.get)
@@ -4522,7 +4522,7 @@ H5VL__group_specific(void *obj, const H5VL_class_t *cls, H5VL_group_specific_arg
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->group_cls.specific)
@@ -4621,7 +4621,7 @@ H5VL__group_optional(void *obj, const H5VL_class_t *cls, H5VL_optional_args_t *a
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->group_cls.optional)
@@ -4769,7 +4769,7 @@ H5VL__group_close(void *obj, const H5VL_class_t *cls, hid_t dxpl_id, void **req)
HDassert(obj);
HDassert(cls);
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->group_cls.close)
@@ -4869,7 +4869,7 @@ H5VL__link_create(H5VL_link_create_args_t *args, void *obj, const H5VL_loc_param
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->link_cls.create)
@@ -4981,7 +4981,7 @@ H5VL__link_copy(void *src_obj, const H5VL_loc_params_t *loc_params1, void *dst_o
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->link_cls.copy)
@@ -5088,7 +5088,7 @@ H5VL__link_move(void *src_obj, const H5VL_loc_params_t *loc_params1, void *dst_o
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->link_cls.move)
@@ -5194,7 +5194,7 @@ H5VL__link_get(void *obj, const H5VL_loc_params_t *loc_params, const H5VL_class_
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->link_cls.get)
@@ -5294,7 +5294,7 @@ H5VL__link_specific(void *obj, const H5VL_loc_params_t *loc_params, const H5VL_c
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->link_cls.specific)
@@ -5398,7 +5398,7 @@ H5VL__link_optional(void *obj, const H5VL_loc_params_t *loc_params, const H5VL_c
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->link_cls.optional)
@@ -5559,7 +5559,7 @@ H5VL__object_open(void *obj, const H5VL_loc_params_t *params, const H5VL_class_t
{
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->object_cls.open)
@@ -5661,7 +5661,7 @@ H5VL__object_copy(void *src_obj, const H5VL_loc_params_t *src_loc_params, const
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->object_cls.copy)
@@ -5772,7 +5772,7 @@ H5VL__object_get(void *obj, const H5VL_loc_params_t *loc_params, const H5VL_clas
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->object_cls.get)
@@ -5872,7 +5872,7 @@ H5VL__object_specific(void *obj, const H5VL_loc_params_t *loc_params, const H5VL
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->object_cls.specific)
@@ -5976,7 +5976,7 @@ H5VL__object_optional(void *obj, const H5VL_loc_params_t *loc_params, const H5VL
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->object_cls.optional)
@@ -6139,7 +6139,7 @@ H5VL__introspect_get_conn_cls(void *obj, const H5VL_class_t *cls, H5VL_get_conn_
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(obj);
@@ -6322,7 +6322,7 @@ H5VL__introspect_opt_query(void *obj, const H5VL_class_t *cls, H5VL_subclass_t s
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->introspect_cls.opt_query)
@@ -6420,7 +6420,7 @@ H5VL__request_wait(void *req, const H5VL_class_t *cls, uint64_t timeout, H5VL_re
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(req);
@@ -6524,7 +6524,7 @@ H5VL__request_notify(void *req, const H5VL_class_t *cls, H5VL_request_notify_t c
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(req);
@@ -6628,7 +6628,7 @@ H5VL__request_cancel(void *req, const H5VL_class_t *cls, H5VL_request_status_t *
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(req);
@@ -6730,7 +6730,7 @@ H5VL__request_specific(void *req, const H5VL_class_t *cls, H5VL_request_specific
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(req);
@@ -6835,7 +6835,7 @@ H5VL__request_optional(void *req, const H5VL_class_t *cls, H5VL_optional_args_t
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(req);
@@ -6977,7 +6977,7 @@ H5VL__request_free(void *req, const H5VL_class_t *cls)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(req);
@@ -7078,7 +7078,7 @@ H5VL__blob_put(void *obj, const H5VL_class_t *cls, const void *buf, size_t size,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(obj);
@@ -7176,7 +7176,7 @@ H5VL__blob_get(void *obj, const H5VL_class_t *cls, const void *blob_id, void *bu
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(obj);
@@ -7274,7 +7274,7 @@ H5VL__blob_specific(void *obj, const H5VL_class_t *cls, void *blob_id, H5VL_blob
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(obj);
@@ -7371,7 +7371,7 @@ H5VL__blob_optional(void *obj, const H5VL_class_t *cls, void *blob_id, H5VL_opti
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(obj);
@@ -7470,7 +7470,7 @@ H5VL__token_cmp(void *obj, const H5VL_class_t *cls, const H5O_token_t *token1, c
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(obj);
@@ -7591,7 +7591,7 @@ H5VL__token_to_str(void *obj, H5I_type_t obj_type, const H5VL_class_t *cls, cons
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(obj);
@@ -7698,7 +7698,7 @@ H5VL__token_from_str(void *obj, H5I_type_t obj_type, const H5VL_class_t *cls, co
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(obj);
@@ -7804,7 +7804,7 @@ H5VL__optional(void *obj, const H5VL_class_t *cls, H5VL_optional_args_t *args, h
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check if the corresponding VOL callback exists */
if (NULL == cls->optional)
diff --git a/src/H5VLdyn_ops.c b/src/H5VLdyn_ops.c
index 0992452..e175246 100644
--- a/src/H5VLdyn_ops.c
+++ b/src/H5VLdyn_ops.c
@@ -116,7 +116,7 @@ H5FL_DEFINE_STATIC(H5VL_dyn_op_t);
static void
H5VL__release_dyn_op(H5VL_dyn_op_t *dyn_op)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
H5MM_xfree(dyn_op->op_name);
H5FL_FREE(H5VL_dyn_op_t, dyn_op);
@@ -139,7 +139,7 @@ H5VL__term_opt_operation_cb(void *_item, void H5_ATTR_UNUSED *key, void H5_ATTR_
{
H5VL_dyn_op_t *item = (H5VL_dyn_op_t *)_item; /* Item to release */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Release the dynamically registered operation info */
H5VL__release_dyn_op(item);
diff --git a/src/H5VLint.c b/src/H5VLint.c
index 391bd91..2bd5b36 100644
--- a/src/H5VLint.c
+++ b/src/H5VLint.c
@@ -280,7 +280,7 @@ H5VL__free_cls(H5VL_class_t *cls, void H5_ATTR_UNUSED **request)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(cls);
@@ -318,7 +318,7 @@ H5VL__get_connector_cb(void *obj, hid_t id, void *_op_data)
H5VL_class_t * cls = (H5VL_class_t *)obj;
int ret_value = H5_ITER_CONT; /* Callback return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
if (H5VL_GET_CONNECTOR_BY_NAME == op_data->key.kind) {
if (0 == HDstrcmp(cls->name, op_data->key.u.name)) {
@@ -498,7 +498,7 @@ H5VL__wrap_obj(void *obj, H5I_type_t obj_type)
H5VL_wrap_ctx_t *vol_wrap_ctx = NULL; /* Object wrapping context */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(obj);
@@ -541,7 +541,7 @@ H5VL__new_vol_obj(H5I_type_t type, void *object, H5VL_t *vol_connector, hbool_t
hbool_t conn_rc_incr = FALSE; /* Whether the VOL connector refcount has been incremented */
H5VL_object_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(object);
@@ -1861,7 +1861,7 @@ H5VL__object(hid_t id, H5I_type_t obj_type)
H5VL_object_t *vol_obj = NULL;
void * ret_value = NULL;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Get the underlying object */
switch (obj_type) {
@@ -2229,7 +2229,7 @@ H5VL__free_vol_wrapper(H5VL_wrap_ctx_t *vol_wrap_ctx)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(vol_wrap_ctx);
diff --git a/src/H5VLmodule.h b/src/H5VLmodule.h
index 8fcb961..4ea4992 100644
--- a/src/H5VLmodule.h
+++ b/src/H5VLmodule.h
@@ -23,9 +23,8 @@
* reporting macros.
*/
#define H5VL_MODULE
-#define H5_MY_PKG H5VL
-#define H5_MY_PKG_ERR H5E_VOL
-#define H5_MY_PKG_INIT YES
+#define H5_MY_PKG H5VL
+#define H5_MY_PKG_ERR H5E_VOL
/**\defgroup H5VL H5VL
*
diff --git a/src/H5VLnative.c b/src/H5VLnative.c
index 2a86c26..75d2276 100644
--- a/src/H5VLnative.c
+++ b/src/H5VLnative.c
@@ -210,7 +210,7 @@ done:
static herr_t
H5VL__native_term(void)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Reset VOL ID */
H5VL_NATIVE_ID_g = H5I_INVALID_HID;
diff --git a/src/H5VLnative_dataset.c b/src/H5VLnative_dataset.c
index 1375344..4eefd14 100644
--- a/src/H5VLnative_dataset.c
+++ b/src/H5VLnative_dataset.c
@@ -80,7 +80,7 @@ H5VL__native_dataset_io_setup(H5D_t *dset, hid_t dxpl_id, hid_t file_space_id, h
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(dset);
diff --git a/src/H5VM.c b/src/H5VM.c
index 209ac25..6f01392 100644
--- a/src/H5VM.c
+++ b/src/H5VM.c
@@ -64,7 +64,7 @@ static void
H5VM__stride_optimize1(unsigned *np /*in,out*/, hsize_t *elmt_size /*in,out*/, const hsize_t *size,
hsize_t *stride1)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* This has to be true because if we optimize the dimensionality down to
* zero we still must make one reference.
@@ -103,7 +103,7 @@ static void
H5VM__stride_optimize2(unsigned *np /*in,out*/, hsize_t *elmt_size /*in,out*/, const hsize_t *size,
hsize_t *stride1, hsize_t *stride2)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* This has to be true because if we optimize the dimensionality down to
* zero we still must make one reference.
@@ -792,7 +792,7 @@ H5VM__stride_copy2(hsize_t nelmts, hsize_t elmt_size, unsigned dst_n, const hsiz
int j; /* Local index variable */
hbool_t carry;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(elmt_size < SIZET_MAX);
HDassert(dst_n > 0);
diff --git a/src/H5Z.c b/src/H5Z.c
index 763eac2..d7ccbb4 100644
--- a/src/H5Z.c
+++ b/src/H5Z.c
@@ -452,7 +452,7 @@ H5Z__check_unregister(hid_t ocpl_id, H5Z_filter_t filter_id)
H5P_genplist_t *plist; /* Property list */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Get the plist structure of object creation */
if (NULL == (plist = H5P_object_verify(ocpl_id, H5P_OBJECT_CREATE)))
@@ -488,7 +488,7 @@ H5Z__check_unregister_group_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void
htri_t filter_in_pline = FALSE;
int ret_value = FALSE; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(obj_ptr);
@@ -538,7 +538,7 @@ H5Z__check_unregister_dset_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void *
htri_t filter_in_pline = FALSE;
int ret_value = FALSE; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(obj_ptr);
@@ -585,7 +585,7 @@ H5Z__flush_file_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void H5_ATTR_PARA
#endif /* H5_HAVE_PARALLEL */
int ret_value = FALSE; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(obj_ptr);
@@ -710,7 +710,7 @@ H5Z__prelude_callback(const H5O_pline_t *pline, hid_t dcpl_id, hid_t type_id, hi
size_t u; /* Local index variable */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(pline->nused > 0);
@@ -790,7 +790,7 @@ H5Z__prepare_prelude_callback_dcpl(hid_t dcpl_id, hid_t type_id, H5Z_prelude_typ
H5O_layout_t *dcpl_layout = NULL; /* Dataset's layout information */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(H5I_GENPROP_LST == H5I_get_type(dcpl_id));
HDassert(H5I_DATATYPE == H5I_get_type(type_id));
@@ -1216,7 +1216,7 @@ H5Z__find_idx(H5Z_filter_t id)
size_t i; /* Local index variable */
int ret_value = FAIL; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
for (i = 0; i < H5Z_table_used_g; i++)
if (H5Z_table_g[i].id == id)
diff --git a/src/H5Zdeflate.c b/src/H5Zdeflate.c
index d29d8e5..1b7bbea 100644
--- a/src/H5Zdeflate.c
+++ b/src/H5Zdeflate.c
@@ -72,7 +72,7 @@ H5Z__filter_deflate(unsigned flags, size_t cd_nelmts, const unsigned cd_values[]
int status; /* Status from zlib operation */
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(*buf_size > 0);
diff --git a/src/H5Zfletcher32.c b/src/H5Zfletcher32.c
index 4b0801c..03c014e 100644
--- a/src/H5Zfletcher32.c
+++ b/src/H5Zfletcher32.c
@@ -67,7 +67,7 @@ H5Z__filter_fletcher32(unsigned flags, size_t H5_ATTR_UNUSED cd_nelmts,
uint8_t tmp;
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(sizeof(uint32_t) >= 4);
diff --git a/src/H5Zmodule.h b/src/H5Zmodule.h
index 9312b72..338242e 100644
--- a/src/H5Zmodule.h
+++ b/src/H5Zmodule.h
@@ -25,9 +25,8 @@
* reporting macros.
*/
#define H5Z_MODULE
-#define H5_MY_PKG H5Z
-#define H5_MY_PKG_ERR H5E_PLINE
-#define H5_MY_PKG_INIT YES
+#define H5_MY_PKG H5Z
+#define H5_MY_PKG_ERR H5E_PLINE
/**\defgroup H5Z H5Z
*
diff --git a/src/H5Znbit.c b/src/H5Znbit.c
index 905d417..f14aa46 100644
--- a/src/H5Znbit.c
+++ b/src/H5Znbit.c
@@ -127,7 +127,7 @@ H5Z__can_apply_nbit(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ATTR_U
const H5T_t *type; /* Datatype */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Get datatype */
if (NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
@@ -220,7 +220,7 @@ H5Z__calc_parms_array(const H5T_t *type, size_t *cd_values_actual_nparms)
H5T_class_t dtype_base_class; /* Array datatype's base datatype's class */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Store datatype class code */
*cd_values_actual_nparms += 1;
@@ -303,7 +303,7 @@ H5Z__calc_parms_compound(const H5T_t *type, size_t *cd_values_actual_nparms)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Store compound datatype class code */
*cd_values_actual_nparms += 1;
@@ -405,7 +405,7 @@ H5Z__set_parms_nooptype(const H5T_t *type, unsigned *cd_values_index, unsigned c
size_t dtype_size; /* No-op datatype's size (in bytes) */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Set datatype class code */
cd_values[(*cd_values_index)++] = H5Z_NBIT_NOOPTYPE;
@@ -447,7 +447,7 @@ H5Z__set_parms_atomic(const H5T_t *type, unsigned *cd_values_index, unsigned cd_
unsigned dtype_offset; /* Atomic datatype's offset (in bits) */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Set datatype class code */
cd_values[(*cd_values_index)++] = H5Z_NBIT_ATOMIC;
@@ -537,7 +537,7 @@ H5Z__set_parms_array(const H5T_t *type, unsigned *cd_values_index, unsigned cd_v
htri_t is_vlstring; /* flag indicating if datatype is variable-length string */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Set datatype class code */
cd_values[(*cd_values_index)++] = H5Z_NBIT_ARRAY;
@@ -645,7 +645,7 @@ H5Z__set_parms_compound(const H5T_t *type, unsigned *cd_values_index, unsigned c
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Set "local" parameter for compound datatype class code */
cd_values[(*cd_values_index)++] = H5Z_NBIT_COMPOUND;
@@ -792,7 +792,7 @@ H5Z__set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id)
hbool_t need_not_compress; /* Flag if TRUE indicating no need to do nbit compression */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Get datatype */
if (NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
@@ -956,7 +956,7 @@ H5Z__filter_nbit(unsigned flags, size_t cd_nelmts, const unsigned cd_values[], s
unsigned d_nelmts = 0; /* number of elements in the chunk */
size_t ret_value = 0; /* return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check arguments
* cd_values[0] stores actual number of parameters in cd_values[]
@@ -1152,7 +1152,7 @@ H5Z__nbit_decompress_one_array(unsigned char *data, size_t data_offset, unsigned
parms_atomic p;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
total_size = parms[(*parms_index)++];
base_class = parms[(*parms_index)++];
@@ -1219,7 +1219,7 @@ H5Z__nbit_decompress_one_compound(unsigned char *data, size_t data_offset, unsig
parms_atomic p;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
size = parms[(*parms_index)++];
nmembers = parms[(*parms_index)++];
@@ -1289,7 +1289,7 @@ H5Z__nbit_decompress(unsigned char *data, unsigned d_nelmts, unsigned char *buff
unsigned parms_index; /* index in array parms used by compression/decompression functions */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* may not have to initialize to zeros */
HDmemset(data, 0, d_nelmts * (size_t)parms[4]);
diff --git a/src/H5Zscaleoffset.c b/src/H5Zscaleoffset.c
index 46c1a10..4865cc6 100644
--- a/src/H5Zscaleoffset.c
+++ b/src/H5Zscaleoffset.c
@@ -758,7 +758,7 @@ H5Z__can_apply_scaleoffset(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5
H5T_order_t dtype_order; /* Datatype's endianness order */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Get datatype */
if (NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
@@ -808,7 +808,7 @@ H5Z__scaleoffset_get_type(unsigned dtype_class, unsigned dtype_size, unsigned dt
enum H5Z_scaleoffset_t type = t_bad; /* integer type */
enum H5Z_scaleoffset_t ret_value = t_bad; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if (dtype_class == H5Z_SCALEOFFSET_CLS_INTEGER) {
if (dtype_sign == H5Z_SCALEOFFSET_SGN_NONE) { /* unsigned integer */
@@ -881,7 +881,7 @@ H5Z__scaleoffset_set_parms_fillval(H5P_genplist_t *dcpl_plist, H5T_t *type, enum
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if (scale_type == t_uchar)
H5Z_scaleoffset_set_filval_3(unsigned char, dcpl_plist, type, cd_values, need_convert);
@@ -944,7 +944,7 @@ H5Z__set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id)
H5D_fill_value_t status; /* Status of fill value in property list */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Get the plist structure */
if (NULL == (dcpl_plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE)))
@@ -1126,7 +1126,7 @@ H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_valu
unsigned i; /* index */
parms_atomic p; /* parameters needed for compress/decompress functions */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check arguments */
if (cd_nelmts != H5Z_SCALEOFFSET_TOTAL_NPARMS)
@@ -1563,7 +1563,7 @@ H5Z__scaleoffset_precompress_fd(void *data, unsigned d_nelmts, enum H5Z_scaleoff
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if (type == t_float)
H5Z_scaleoffset_precompress_3(float, HDpowf, HDfabsf, HDroundf, HDlroundf, HDllroundf, data, d_nelmts,
@@ -1586,7 +1586,7 @@ H5Z__scaleoffset_postdecompress_fd(void *data, unsigned d_nelmts, enum H5Z_scale
long long sminval = (long long)minval; /* for signed integer types */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if (type == t_float)
H5Z_scaleoffset_postdecompress_3(float, HDpowf, data, d_nelmts, filavail, cd_values, minbits, sminval,
diff --git a/src/H5Zshuffle.c b/src/H5Zshuffle.c
index df164b3..e35a63a 100644
--- a/src/H5Zshuffle.c
+++ b/src/H5Zshuffle.c
@@ -65,7 +65,7 @@ H5Z__set_local_shuffle(hid_t dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSED space_
unsigned cd_values[H5Z_SHUFFLE_TOTAL_NPARMS]; /* Filter parameters */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Get the plist structure */
if (NULL == (dcpl_plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE)))
@@ -127,7 +127,7 @@ H5Z__filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[]
size_t leftover; /* Extra bytes at end of buffer */
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if (cd_nelmts != H5Z_SHUFFLE_TOTAL_NPARMS || cd_values[H5Z_SHUFFLE_PARM_SIZE] == 0)
diff --git a/src/H5Zszip.c b/src/H5Zszip.c
index a5b544a..c8f5014 100644
--- a/src/H5Zszip.c
+++ b/src/H5Zszip.c
@@ -77,7 +77,7 @@ H5Z__can_apply_szip(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ATTR_U
H5T_order_t dtype_order; /* Datatype's endianness order */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Get datatype */
if (NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
@@ -135,7 +135,7 @@ H5Z__set_local_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id)
hsize_t scanline; /* Size of dataspace's fastest changing dimension */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Get the plist structure */
if (NULL == (dcpl_plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE)))
@@ -268,7 +268,7 @@ H5Z__filter_szip(unsigned flags, size_t cd_nelmts, const unsigned cd_values[], s
unsigned char *newbuf = NULL; /* Pointer to input buffer */
SZ_com_t sz_param; /* szip parameter block */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* Sanity check to make certain that we haven't drifted out of date with
* the mask options from the szlib.h header */
diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c
index 092b289..ecca109 100644
--- a/src/H5Ztrans.c
+++ b/src/H5Ztrans.c
@@ -343,7 +343,7 @@ static void H5Z__xform_reduce_tree(H5Z_node *tree);
static void
H5Z__unget_token(H5Z_token *current)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(current);
@@ -378,7 +378,7 @@ H5Z__get_token(H5Z_token *current)
{
H5Z_token *ret_value = current;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(current);
@@ -516,7 +516,7 @@ done:
static void
H5Z__xform_destroy_parse_tree(H5Z_node *tree)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
if (tree) {
H5Z__xform_destroy_parse_tree(tree->lchild);
@@ -547,7 +547,7 @@ H5Z__xform_parse(const char *expression, H5Z_datval_ptrs *dat_val_pointers)
H5Z_token tok;
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if (!expression)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "No expression provided?")
@@ -584,7 +584,7 @@ H5Z__parse_expression(H5Z_token *current, H5Z_datval_ptrs *dat_val_pointers)
H5Z_node *expr;
H5Z_node *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
expr = H5Z__parse_term(current, dat_val_pointers);
@@ -676,7 +676,7 @@ H5Z__parse_term(H5Z_token *current, H5Z_datval_ptrs *dat_val_pointers)
H5Z_node *term = NULL;
H5Z_node *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
term = H5Z__parse_factor(current, dat_val_pointers);
@@ -776,7 +776,7 @@ H5Z__parse_factor(H5Z_token *current, H5Z_datval_ptrs *dat_val_pointers)
H5Z_node *new_node;
H5Z_node *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
current = H5Z__get_token(current);
@@ -919,7 +919,7 @@ H5Z__new_node(H5Z_token_type type)
{
H5Z_node *ret_value = NULL; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
if (NULL == (ret_value = (H5Z_node *)H5MM_calloc(sizeof(H5Z_node))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
@@ -1068,7 +1068,7 @@ H5Z__xform_eval_full(H5Z_node *tree, const size_t array_size, const hid_t array_
H5Z_result resl, resr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(tree);
@@ -1162,7 +1162,7 @@ H5Z__xform_find_type(const H5T_t *type)
H5T_t *tmp; /* Temporary datatype */
hid_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(type);
@@ -1233,7 +1233,7 @@ H5Z__xform_copy_tree(H5Z_node *tree, H5Z_datval_ptrs *dat_val_pointers, H5Z_datv
{
H5Z_node *ret_value = NULL;
- FUNC_ENTER_STATIC
+ FUNC_ENTER_PACKAGE
HDassert(tree);
@@ -1302,7 +1302,7 @@ H5Z__op_is_numbs(H5Z_node *_tree)
{
hbool_t ret_value = FALSE;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(_tree);
@@ -1333,7 +1333,7 @@ H5Z__op_is_numbs2(H5Z_node *_tree)
{
hbool_t ret_value = FALSE;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(_tree);
@@ -1364,7 +1364,7 @@ H5Z__op_is_numbs2(H5Z_node *_tree)
static void
H5Z__xform_reduce_tree(H5Z_node *tree)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
if (tree) {
if ((tree->type == H5Z_XFORM_DIVIDE) || (tree->type == H5Z_XFORM_MULT)) {
@@ -1419,7 +1419,7 @@ H5Z__xform_reduce_tree(H5Z_node *tree)
static void
H5Z__do_op(H5Z_node *tree)
{
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
if (tree->type == H5Z_XFORM_DIVIDE)
H5Z_XFORM_DO_OP3(/)
diff --git a/src/H5checksum.c b/src/H5checksum.c
index 0cd7745..afe7317 100644
--- a/src/H5checksum.c
+++ b/src/H5checksum.c
@@ -159,7 +159,7 @@ H5__checksum_crc_make_table(void)
uint32_t c; /* Checksum for each byte value */
unsigned n, k; /* Local index variables */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Compute the checksum for each possible byte value */
for (n = 0; n < 256; n++) {
@@ -196,7 +196,7 @@ H5__checksum_crc_update(uint32_t crc, const uint8_t *buf, size_t len)
{
size_t n; /* Local index variable */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Initialize the CRC table if necessary */
if (!H5_crc_table_computed)
diff --git a/src/H5module.h b/src/H5module.h
index f7d3cd6..642683f 100644
--- a/src/H5module.h
+++ b/src/H5module.h
@@ -22,9 +22,8 @@
* reporting macros.
*/
#define H5_MODULE
-#define H5_MY_PKG H5
-#define H5_MY_PKG_ERR H5E_LIB
-#define H5_MY_PKG_INIT YES
+#define H5_MY_PKG H5
+#define H5_MY_PKG_ERR H5E_LIB
/**\defgroup H5 H5
*
diff --git a/src/H5private.h b/src/H5private.h
index b9bbe3b..9e74e90 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -2369,23 +2369,9 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props);
H5_PUSH_FUNC \
{
-/* Use this macro for all "normal" staticly-scoped functions */
-#define FUNC_ENTER_STATIC \
- { \
- FUNC_ENTER_COMMON(H5_IS_PKG(__func__)); \
- H5_PUSH_FUNC \
- {
-
-/* Use this macro for staticly-scoped functions which propgate errors, but don't issue them */
-#define FUNC_ENTER_STATIC_NOERR \
- { \
- FUNC_ENTER_COMMON_NOERR(H5_IS_PKG(__func__)); \
- H5_PUSH_FUNC \
- {
-
/* Use this macro for staticly-scoped functions which propgate errors, but don't issue them */
/* And that shouldn't push their name on the function stack */
-#define FUNC_ENTER_STATIC_NOERR_NOFS \
+#define FUNC_ENTER_PACKAGE_NOERR_NOFS \
{ \
FUNC_ENTER_COMMON_NOERR(H5_IS_PKG(__func__)); \
{
@@ -2397,21 +2383,10 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props);
* API name itself. Examples are static routines in the H5TS package.
*
*/
-#define FUNC_ENTER_STATIC_NAMECHECK_ONLY \
+#define FUNC_ENTER_PACKAGE_NAMECHECK_ONLY \
{ \
FUNC_ENTER_COMMON_NOERR(H5_IS_PKG(__func__));
-/* Use the following macro as replacement for the FUNC_ENTER_STATIC
- * macro when the function needs to set up a metadata tag. */
-#define FUNC_ENTER_STATIC_TAG(tag) \
- { \
- haddr_t prev_tag = HADDR_UNDEF; \
- \
- FUNC_ENTER_COMMON(H5_IS_PKG(__func__)); \
- H5AC_tag(tag, &prev_tag); \
- H5_PUSH_FUNC \
- {
-
/*-------------------------------------------------------------------------
* Purpose: Register function exit for code profiling. This should be
* the last statement executed by a function.
diff --git a/src/H5system.c b/src/H5system.c
index 1104f3b..100f097 100644
--- a/src/H5system.c
+++ b/src/H5system.c
@@ -976,7 +976,7 @@ H5__find_last_file_separator(const char *path, size_t len, hbool_t *no_separator
{
size_t i = len;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
*no_separator = TRUE;
diff --git a/test/test_swmr.sh.in b/test/test_swmr.sh.in
index 771fe4a..cdf9d0b 100644
--- a/test/test_swmr.sh.in
+++ b/test/test_swmr.sh.in
@@ -1,4 +1,4 @@
-#! /bin/bash
+#!/usr/bin/env bash
#
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
@@ -11,12 +11,10 @@
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
-# Tests for the swmr feature.
+# Acceptance tests for the SWMR feature
#
-# Created:
-# Albert Cheng, 2009/07/22
+###############################################################################
-srcdir=@srcdir@
utils_testdir=@abs_top_builddir@/@H5_UTILS_TEST_BUILDDIR@
testdir=@abs_top_builddir@/@H5_TEST_BUILDDIR@
@@ -43,7 +41,7 @@ MESSAGE_TIMEOUT=300 # Message timeout length in secs
# This should be the same as the define in "test/h5test.h"
###############################################################################
-## short hands and function definitions
+## Aliases and function definitions
###############################################################################
DPRINT=: # Set to "echo Debug:" for debugging printing,
# else ":" for noop.
@@ -170,18 +168,18 @@ do
echo "###############################################################################"
# Launch the Generator without SWMR_WRITE
echo launch the swmr_generator
- $testdir/swmr_generator $compress $index_type
+ $testdir/swmr_generator -q $compress $index_type
if test $? -ne 0; then
echo generator had error
- nerrors=`expr $nerrors + 1`
+ nerrors=$((nerrors + 1))
fi
# Launch the Generator with SWMR_WRITE
echo launch the swmr_generator with SWMR_WRITE
- $testdir/swmr_generator -s $compress $index_type
+ $testdir/swmr_generator -q -s $compress $index_type
if test $? -ne 0; then
echo generator had error
- nerrors=`expr $nerrors + 1`
+ nerrors=$((nerrors + 1))
fi
# Check for error and exit if one occurred
@@ -202,14 +200,13 @@ do
# Launch the Writer
echo launch the swmr_start_writer
seed="" # Put -r <random seed> command here
- $testdir/swmr_start_write $compress $index_type $Nrecords $seed 2>&1 |tee swmr_writer.out &
+ $testdir/swmr_start_write -q $compress $index_type $Nrecords $seed 2>&1 |tee swmr_writer.out &
pid_writer=$!
$DPRINT pid_writer=$pid_writer
# Wait for message from writer process before starting reader(s)
WAIT_MESSAGE $WRITER_MESSAGE
- #
# Launch the Readers
#declare -a seeds=(<seed1> <seed2> <seed3> ... )
echo launch $Nreaders swmr_readers
@@ -218,21 +215,21 @@ do
while [ $n -lt $Nreaders ]; do
#seed="-r ${seeds[$n]}"
seed=""
- $testdir/swmr_reader $Nsecs_add $seed 2>&1 |tee swmr_reader.out.$n &
+ $testdir/swmr_reader -q $Nsecs_add $seed 2>&1 |tee swmr_reader.out.$n &
pid_readers="$pid_readers $!"
- n=`expr $n + 1`
+ n=$((n + 1))
done
$DPRINT pid_readers=$pid_readers
$IFDEBUG ps
- # Collect exit code of the readers first because they usually finish
+ # Collect exit codes of the readers first because they usually finish
# before the writer.
for xpid in $pid_readers; do
$DPRINT checked reader $xpid
wait $xpid
if test $? -ne 0; then
echo reader had error
- nerrors=`expr $nerrors + 1`
+ nerrors=$((nerrors + 1))
fi
done
@@ -241,7 +238,7 @@ do
wait $pid_writer
if test $? -ne 0; then
echo writer had error
- nerrors=`expr $nerrors + 1`
+ nerrors=$((nerrors + 1))
fi
# Check for error and exit if one occurred
@@ -263,10 +260,10 @@ do
# Launch the Generator
echo launch the swmr_generator
- $testdir/swmr_generator -s $compress $index_type
+ $testdir/swmr_generator -q -s $compress $index_type
if test $? -ne 0; then
echo generator had error
- nerrors=`expr $nerrors + 1`
+ nerrors=$((nerrors + 1))
fi
# Remove any possible writer message file before launching writer
@@ -275,13 +272,13 @@ do
# Launch the Writer
echo launch the swmr_writer
seed="" # Put -r <random seed> command here
- $testdir/swmr_writer -o $Nrecords $seed 2>&1 |tee swmr_writer.out &
+ $testdir/swmr_writer -q -o $Nrecords $seed 2>&1 |tee swmr_writer.out &
pid_writer=$!
$DPRINT pid_writer=$pid_writer
# Wait for message from writer process before starting reader(s)
WAIT_MESSAGE $WRITER_MESSAGE
- #
+
# Launch the Readers
#declare -a seeds=(<seed1> <seed2> <seed3> ... )
echo launch $Nreaders swmr_readers
@@ -290,9 +287,9 @@ do
while [ $n -lt $Nreaders ]; do
#seed="-r ${seeds[$n]}"
seed=""
- $testdir/swmr_reader $Nsecs_add $seed 2>&1 |tee swmr_reader.out.$n &
+ $testdir/swmr_reader -q $Nsecs_add $seed 2>&1 |tee swmr_reader.out.$n &
pid_readers="$pid_readers $!"
- n=`expr $n + 1`
+ n=$((n + 1))
done
$DPRINT pid_readers=$pid_readers
$IFDEBUG ps
@@ -304,7 +301,7 @@ do
wait $xpid
if test $? -ne 0; then
echo reader had error
- nerrors=`expr $nerrors + 1`
+ nerrors=$((nerrors + 1))
fi
done
@@ -313,7 +310,7 @@ do
wait $pid_writer
if test $? -ne 0; then
echo writer had error
- nerrors=`expr $nerrors + 1`
+ nerrors=$((nerrors + 1))
fi
# Check for error and exit if one occurred
@@ -338,13 +335,13 @@ do
# Launch the Remove Writer
echo launch the swmr_remove_writer
seed="" # Put -r <random seed> command here
- $testdir/swmr_remove_writer -o $Nrecs_rem $seed 2>&1 |tee swmr_writer.out &
+ $testdir/swmr_remove_writer -q -o $Nrecs_rem $seed 2>&1 |tee swmr_writer.out &
pid_writer=$!
$DPRINT pid_writer=$pid_writer
# Wait for message from writer process before starting reader(s)
WAIT_MESSAGE $WRITER_MESSAGE
- #
+
# Launch the Remove Readers
#declare -a seeds=(<seed1> <seed2> <seed3> ... )
n=0
@@ -353,9 +350,9 @@ do
while [ $n -lt $Nreaders ]; do
#seed="-r ${seeds[$n]}"
seed=""
- $testdir/swmr_remove_reader $Nsecs_rem $seed 2>&1 |tee swmr_reader.out.$n &
+ $testdir/swmr_remove_reader -q $Nsecs_rem $seed 2>&1 |tee swmr_reader.out.$n &
pid_readers="$pid_readers $!"
- n=`expr $n + 1`
+ n=$((n + 1))
done
$DPRINT pid_readers=$pid_readers
$IFDEBUG ps
@@ -367,7 +364,7 @@ do
wait $xpid
if test $? -ne 0; then
echo reader had error
- nerrors=`expr $nerrors + 1`
+ nerrors=$((nerrors + 1))
fi
done
@@ -376,7 +373,7 @@ do
wait $pid_writer
if test $? -ne 0; then
echo writer had error
- nerrors=`expr $nerrors + 1`
+ nerrors=$((nerrors + 1))
fi
# Check for error and exit if one occurred
@@ -398,19 +395,19 @@ do
# Launch the Generator
echo launch the swmr_generator
- $testdir/swmr_generator $compress $index_type
+ $testdir/swmr_generator -q $compress $index_type
if test $? -ne 0; then
echo generator had error
- nerrors=`expr $nerrors + 1`
+ nerrors=$((nerrors + 1))
fi
# Launch the Writer (not in parallel - just to rebuild the datasets)
echo launch the swmr_writer
seed="" # Put -r <random seed> command here
- $testdir/swmr_writer $Nrecords $seed
+ $testdir/swmr_writer -q $Nrecords $seed
if test $? -ne 0; then
echo writer had error
- nerrors=`expr $nerrors + 1`
+ nerrors=$((nerrors + 1))
fi
# Remove any possible writer message file before launching writer
@@ -419,7 +416,7 @@ do
# Launch the Add/Remove Writer
echo launch the swmr_addrem_writer
seed="" # Put -r <random seed> command here
- $testdir/swmr_addrem_writer $Nrecords $seed 2>&1 |tee swmr_writer.out &
+ $testdir/swmr_addrem_writer -q $Nrecords $seed 2>&1 |tee swmr_writer.out &
pid_writer=$!
$DPRINT pid_writer=$pid_writer
@@ -434,9 +431,9 @@ do
while [ $n -lt $Nreaders ]; do
#seed="-r ${seeds[$n]}"
seed=""
- $testdir/swmr_remove_reader $Nsecs_addrem $seed 2>&1 |tee swmr_reader.out.$n &
+ $testdir/swmr_remove_reader -q $Nsecs_addrem $seed 2>&1 |tee swmr_reader.out.$n &
pid_readers="$pid_readers $!"
- n=`expr $n + 1`
+ n=$((n + 1))
done
$DPRINT pid_readers=$pid_readers
$IFDEBUG ps
@@ -448,7 +445,7 @@ do
wait $xpid
if test $? -ne 0; then
echo reader had error
- nerrors=`expr $nerrors + 1`
+ nerrors=$((nerrors + 1))
fi
done
@@ -457,7 +454,7 @@ do
wait $pid_writer
if test $? -ne 0; then
echo writer had error
- nerrors=`expr $nerrors + 1`
+ nerrors=$((nerrors + 1))
fi
# Check for error and exit if one occurred
@@ -482,17 +479,17 @@ do
# created by the generator.
echo launch the swmr_generator
seed="" # Put -r <random seed> command here
- $testdir/swmr_generator $compress $index_type $seed
+ $testdir/swmr_generator -q $compress $index_type $seed
if test $? -ne 0; then
echo generator had error
- nerrors=`expr $nerrors + 1`
+ nerrors=$((nerrors + 1))
fi
# Remove any possible writer message file before launching writer
rm -f $WRITER_MESSAGE
# Launch the Sparse writer
echo launch the swmr_sparse_writer
- nice -n 20 $testdir/swmr_sparse_writer $Nrecs_spa 2>&1 |tee swmr_writer.out &
+ nice -n 20 $testdir/swmr_sparse_writer -q $Nrecs_spa 2>&1 |tee swmr_writer.out &
pid_writer=$!
$DPRINT pid_writer=$pid_writer
@@ -507,7 +504,7 @@ do
# The sparse reader spits out a LOT of data so it's set to 'quiet'
$testdir/swmr_sparse_reader -q $Nrecs_spa 2>&1 |tee swmr_reader.out.$n &
pid_readers="$pid_readers $!"
- n=`expr $n + 1`
+ n=$((n + 1))
done
$DPRINT pid_readers=$pid_readers
$IFDEBUG ps
@@ -517,7 +514,7 @@ do
wait $pid_writer
if test $? -ne 0; then
echo writer had error
- nerrors=`expr $nerrors + 1`
+ nerrors=$((nerrors + 1))
fi
# Collect exit code of the readers
@@ -526,7 +523,7 @@ do
wait $xpid
if test $? -ne 0; then
echo reader had error
- nerrors=`expr $nerrors + 1`
+ nerrors=$((nerrors + 1))
fi
done
diff --git a/test/test_vfd_swmr.sh.in b/test/test_vfd_swmr.sh.in
index 4ae4085..08d2706 100644
--- a/test/test_vfd_swmr.sh.in
+++ b/test/test_vfd_swmr.sh.in
@@ -1,4 +1,4 @@
-#!/us/bin/env bash
+#!/usr/bin/env bash
#
# Copyright by Akadio, Inc.
#
@@ -9,25 +9,22 @@
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
-# Tests for the vfd swmr feature.
-
-###############################################################################
-# VFD SWMR concurrent tests which are modified from existing swmr concurrent tests.
-# This is copied and modified from testswmr.sh.in
+# Acceptance tests for the VFD SWMR feature
+#
+# (Copied and modified from test_swmr.sh.in)
#
###############################################################################
-srcdir=@srcdir@
-
utils_testdir=@abs_top_builddir@/@H5_UTILS_TEST_BUILDDIR@
+testdir=@abs_top_builddir@/@H5_TEST_BUILDDIR@
###############################################################################
## test parameters
###############################################################################
nerrors=0
-nsofterrors=0 # soft errors are expected to occur some of the time
- # on a couple of nondeterministic tests.
+nsofterrors=0 # soft errors are expected to occur some of the time
+ # on a couple of non-deterministic tests.
###############################################################################
## test parameters for vfd_swmr_bigset_writer.c and vfd_swmr_group_writer.c
@@ -43,13 +40,12 @@ fi
###############################################################################
## For legacy tests:
-## definitions for message file to coordinate test runs
+## definitions for message file to coordinate test runs
###############################################################################
-#
WRITER_MESSAGE=VFD_SWMR_WRITER_MESSAGE # The message file created by writer that the open is complete
- # This should be the same as the define in "./swmr_common.h"
+ # This should be the same as the define in "test/swmr_common.h"
MESSAGE_TIMEOUT=300 # Message timeout length in secs
- # This should be the same as the define in "./h5test.h"
+ # This should be the same as the define in "test/h5test.h"
###############################################################################
## For attrdset test: definitions for fifo files to coordinate test runs
@@ -86,12 +82,11 @@ GFAIL_FIFO_READER_TO_WRITER=fifo_group_reader_to_writer
USING_AUX_PROCESS=@AUX_PROCESS@
###############################################################################
-## short hands and function definitions
+## Aliases and function definitions
###############################################################################
-#
-DPRINT=: # Set to "echo Debug:" for debugging printing,
+DPRINT=: # Set to "echo Debug:" for debugging printing,
# else ":" for noop.
-IFDEBUG=: # Set to null to turn on debugging, else ":" for noop.
+IFDEBUG=: # Set to null to turn on debugging, else ":" for noop.
# For legacy tests:
# To wait for the writer message file or till the maximum # of seconds is reached
@@ -154,10 +149,6 @@ catch_out_err_and_rc()
## to proceed as expected.
##
###############################################################################
-# The build (current) directory might be different than the source directory.
-if test -z "$srcdir"; then
- srcdir=.
-fi
# Check to see if the VFD specified by the HDF5_DRIVER environment variable
# supports SWMR.
@@ -254,333 +245,339 @@ if [[ "$HDF5TestExpress" -eq 0 ]] ; then
Nrecords=400000 # Increase the number of records to write
compress_list=("" "-c 5") # Enable filter
fi
-#
-#
+
+
# Loop over index types
-for index_type in "-i ea" "-i b2"
+for index_type in "-i ea" "-i b2"
do
# Try without compression, only; uncomment "-c 5" to try with compression.
for compress in "${compress_list[@]}";
do
echo
+ echo "*******************************************************************************"
echo "** Loop testing parameters: $index_type $compress"
+ echo "*******************************************************************************"
echo
- if [ ${do_generator:-no} = yes ]; then
- echo
- echo "## Generator test"
- # Launch the Generator without VFD SWMR write
- echo launch the vfd_swmr_generator
- ../vfd_swmr_generator $compress $index_type
- if test $? -ne 0; then
- echo generator had error
- nerrors=`expr $nerrors + 1`
- fi
-
- # Launch the Generator with VFD SWMR write
- echo launch the vfd_swmr_generator with VFD SWMR write
- ../vfd_swmr_generator -s $compress $index_type
- if test $? -ne 0; then
- echo generator had error
- nerrors=`expr $nerrors + 1`
- fi
- fi
+ if [ ${do_generator:-no} = yes ]; then
+ echo
+ echo "###############################################################################"
+ echo "## Generator test"
+ echo "###############################################################################"
+ # Launch the Generator without VFD SWMR write
+ echo launch the vfd_swmr_generator
+ $testdir/vfd_swmr_generator $compress $index_type
+ if test $? -ne 0; then
+ echo generator had error
+ nerrors=$((nerrors + 1))
+ fi
- if [ ${do_expand:-no} = yes ]; then
- echo
- echo "## Writer test - test expanding the dataset"
-
- # Launch the Generator
- echo launch the vfd_swmr_generator with VFD SWMR write
- ../vfd_swmr_generator -s $compress $index_type
- if test $? -ne 0; then
- echo generator had error
- nerrors=`expr $nerrors + 1`
- fi
-
- # Remove any possible writer message file before launching writer
- rm -f $WRITER_MESSAGE
- #
- # Launch the Writer
- echo launch the vfd_swmr_writer
- seed="" # Put -r <random seed> command here
- catch_out_err_and_rc vfd_swmr_writer \
- ../vfd_swmr_writer -q -o $Nrecords $seed &
- pid_writer=$!
- $DPRINT pid_writer=$pid_writer
-
- # Wait for message from writer process before starting reader(s)
- WAIT_MESSAGE $WRITER_MESSAGE
- #
- # Launch the Readers
- #declare -a seeds=(<seed1> <seed2> <seed3> ... )
- echo launch $Nreaders vfd_swmr_readers ......may take some time......
- pid_readers=""
- n=0
- while [ $n -lt $Nreaders ]; do
- #seed="-r ${seeds[$n]}"
- seed=""
- catch_out_err_and_rc vfd_swmr_reader.$n \
- ../vfd_swmr_reader -q $Nsecs_add $seed &
- pid_readers="$pid_readers $!"
- n=`expr $n + 1`
- done
- $DPRINT pid_readers=$pid_readers
- $IFDEBUG ps
-
- # Wait for the readers to finish before signalling the
- # writer to quit: the writer holds the file open so that the
- # readers will find the shadow file when they reopen
- # the .h5 file.
- wait $pid_readers
- kill -USR1 $(cat vfd_swmr_writer.pid)
- wait $pid_writer
-
- # Collect exit codes of the readers
- n=0
- while [ $n -lt $Nreaders ]; do
- if [ $(cat vfd_swmr_reader.$n.rc) -ne 0 ]; then
- echo reader had error
- nerrors=$((nerrors + 1))
- fi
- n=$((n + 1))
- done
-
- # Collect exit code of the writer
- $DPRINT checked writer $pid_writer
- if [ $(cat vfd_swmr_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
-
- # Clean up output files
- rm -f vfd_swmr_writer.{out,rc}
- rm -f vfd_swmr_reader.*.{out,rc}
- fi
+ # Launch the Generator with VFD SWMR write
+ echo launch the vfd_swmr_generator with VFD SWMR write
+ $testdir/vfd_swmr_generator -s $compress $index_type
+ if test $? -ne 0; then
+ echo generator had error
+ nerrors=$((nerrors + 1))
+ fi
+ fi
- if [ ${do_shrink:-no} = yes ]; then
- if [ ${do_expand:-no} != yes ]; then
- echo "Cancelling the 'shrink' test: it depends on the .h5 file left behind by the 'expand' test." 1>&2
- exit 1
- fi
- echo
- echo "## Remove test - test shrinking the dataset"
-
- # Remove any possible writer message file before launching writer
- rm -f $WRITER_MESSAGE
- # Launch the Remove Writer
- echo launch the vfd_swmr_remove_writer
- seed="" # Put -r <random seed> command here
- catch_out_err_and_rc vfd_swmr_writer \
- ../vfd_swmr_remove_writer -q -o $Nrecs_rem $seed &
- pid_writer=$!
- $DPRINT pid_writer=$pid_writer
-
- # Wait for message from writer process before starting reader(s)
- WAIT_MESSAGE $WRITER_MESSAGE
- #
- # Launch the Remove Readers
- #declare -a seeds=(<seed1> <seed2> <seed3> ... )
- n=0
- pid_readers=""
- echo launch $Nreaders swmr_remove_readers ......may take some time ......
- while [ $n -lt $Nreaders ]; do
- #seed="-r ${seeds[$n]}"
- seed=""
- catch_out_err_and_rc vfd_swmr_reader.$n \
- ../vfd_swmr_remove_reader -q $Nsecs_rem $seed &
- pid_readers="$pid_readers $!"
- n=`expr $n + 1`
- done
- $DPRINT pid_readers=$pid_readers
- $IFDEBUG ps
-
- # Wait for the readers to finish before signalling the
- # writer to quit: the writer holds the file open so that the
- # readers will find the shadow file when they reopen
- # the .h5 file.
- wait $pid_readers
- kill -USR1 $(cat vfd_swmr_writer.pid)
- wait $pid_writer
-
- # Collect exit codes of the readers
- n=0
- while [ $n -lt $Nreaders ]; do
- if [ $(cat vfd_swmr_reader.$n.rc) -ne 0 ]; then
- echo reader had error
- nerrors=$((nerrors + 1))
- fi
- n=$((n + 1))
- done
-
- # Collect exit code of the writer
- $DPRINT checked writer $pid_writer
- if [ $(cat vfd_swmr_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
-
- # Clean up output files
- rm -f vfd_swmr_writer.{out,rc}
- rm -f vfd_swmr_reader.*.{out,rc}
- fi
+ if [ ${do_expand:-no} = yes ]; then
+ echo
+ echo "## Writer test - test expanding the dataset"
- if [ ${do_expand_shrink:-no} = yes ]; then
- echo
- echo "## Expand/shrink test - randomly grow or shrink the dataset"
-
- # Launch the Generator
- echo launch the vfd_swmr_generator with VFD SWMR write
- ../vfd_swmr_generator -s $compress $index_type
- if test $? -ne 0; then
- echo generator had error
- nerrors=`expr $nerrors + 1`
- fi
-
- # Launch the Writer (not in parallel - just to rebuild the datasets)
- echo launch the vfd_swmr_writer
- seed="" # Put -r <random seed> command here
- ../vfd_swmr_writer -q -W $Nrecords $seed
- if test $? -ne 0; then
- echo writer had error
- nerrors=`expr $nerrors + 1`
- fi
-
- # Remove any possible writer message file before launching writer
- rm -f $WRITER_MESSAGE
- #
- # Launch the Add/Remove Writer
- echo launch the vfd_swmr_addrem_writer
- seed="" # Put -r <random seed> command here
- catch_out_err_and_rc vfd_swmr_writer \
- ../vfd_swmr_addrem_writer -q $Nrecords $seed &
- pid_writer=$!
- $DPRINT pid_writer=$pid_writer
-
- # Wait for message from writer process before starting reader(s)
- WAIT_MESSAGE $WRITER_MESSAGE
- #
- # Launch the Add/Remove Readers
- #declare -a seeds=(<seed1> <seed2> <seed3> ... )
- n=0
- pid_readers=""
- echo launch $Nreaders vfd_swmr_remove_readers ...... may take some time ......
- while [ $n -lt $Nreaders ]; do
- #seed="-r ${seeds[$n]}"
- seed=""
- catch_out_err_and_rc vfd_swmr_reader.$n \
- ../vfd_swmr_remove_reader -q $Nsecs_addrem $seed &
- pid_readers="$pid_readers $!"
- n=`expr $n + 1`
- done
- $DPRINT pid_readers=$pid_readers
- $IFDEBUG ps
-
- # Wait for the readers to finish before signalling the
- # writer to quit: the writer holds the file open so that the
- # readers will find the shadow file when they reopen
- # the .h5 file.
- wait $pid_readers
- kill -USR1 $(cat vfd_swmr_writer.pid)
- wait $pid_writer
-
- # Collect exit codes of the readers
- n=0
- while [ $n -lt $Nreaders ]; do
- if [ $(cat vfd_swmr_reader.$n.rc) -ne 0 ]; then
- echo reader had error
- nerrors=$((nerrors + 1))
- fi
- n=$((n + 1))
- done
-
- # Collect exit code of the writer
- $DPRINT checked writer $pid_writer
- if [ ! -e vfd_swmr_writer.rc ] ||
- [ $(cat vfd_swmr_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
-
- # Clean up output files
- rm -f vfd_swmr_writer.{out,rc}
- rm -f vfd_swmr_reader.*.{out,rc}
- fi
+ # Launch the Generator
+ echo launch the vfd_swmr_generator with VFD SWMR write
+ $testdir/vfd_swmr_generator -s $compress $index_type
+ if test $? -ne 0; then
+ echo generator had error
+ nerrors=$((nerrors + 1))
+ fi
- if [ ${do_sparse:-no} = yes ]; then
- echo
- echo "## Sparse writer test - write random dataset locations"
-
- # Launch the Generator
- # NOTE: Random seed is shared between readers and writers and is
- # created by the generator.
- echo launch the vfd_swmr_generator with VFD SWMR write
- seed="" # Put -r <random seed> command here
- ../vfd_swmr_generator -s $compress $index_type $seed
- if test $? -ne 0; then
- echo generator had error
- nerrors=`expr $nerrors + 1`
- fi
-
- # Remove any possible writer message file before launching writer
- rm -f $WRITER_MESSAGE
- # Launch the Sparse writer
- echo launch the vfd_swmr_sparse_writer
- catch_out_err_and_rc vfd_swmr_writer nice -n 20 \
- ../vfd_swmr_sparse_writer -q $Nrecs_spa &
- pid_writer=$!
- $DPRINT pid_writer=$pid_writer
-
- # Wait for message from writer process before starting reader(s)
- WAIT_MESSAGE $WRITER_MESSAGE
- #
- # Launch the Sparse readers
- n=0
- pid_readers=""
- echo launch $Nrdrs_spa vfd_swmr_sparse_readers ..... may take some time ......
- while [ $n -lt $Nrdrs_spa ]; do
- # The sparse reader spits out a LOT of data so it's set to 'quiet'
- catch_out_err_and_rc vfd_swmr_reader.$n \
- ../vfd_swmr_sparse_reader -q $Nrecs_spa &
- pid_readers="$pid_readers $!"
- n=`expr $n + 1`
- done
- $DPRINT pid_readers=$pid_readers
- $IFDEBUG ps
-
- # Wait for the readers and the writer to finish.
- echo "pid_readers=$pid_readers"
- echo "pid_writer=$pid_writer"
-
- # Wait for the readers to finish before signalling the
- # writer to quit: the writer holds the file open so that the
- # readers will find the shadow file when they reopen
- # the .h5 file.
- wait $pid_readers
- kill -USR1 $(cat vfd_swmr_writer.pid)
- wait $pid_writer
-
- # Collect exit codes of the readers
- n=0
- while [ $n -lt $Nrdrs_spa ]; do
- if [ $(cat vfd_swmr_reader.$n.rc) -ne 0 ]; then
- echo reader had error
- nerrors=$((nerrors + 1))
- fi
- n=$((n + 1))
- done
-
- # Collect exit code of the writer
- $DPRINT checked writer $pid_writer
- if [ $(cat vfd_swmr_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
-
- # Clean up output files
- rm -f vfd_swmr_writer.{out,rc}
- rm -f vfd_swmr_reader.*.{out,rc}
- fi
+ # Remove any possible writer message file before launching writer
+ rm -f $WRITER_MESSAGE
+ #
+ # Launch the Writer
+ echo launch the vfd_swmr_writer
+ seed="" # Put -r <random seed> command here
+ catch_out_err_and_rc vfd_swmr_writer \
+ $testdir/vfd_swmr_writer -q -o $Nrecords $seed &
+ pid_writer=$!
+ $DPRINT pid_writer=$pid_writer
+
+ # Wait for message from writer process before starting reader(s)
+ WAIT_MESSAGE $WRITER_MESSAGE
+
+ # Launch the Readers
+ #declare -a seeds=(<seed1> <seed2> <seed3> ... )
+ echo launch $Nreaders vfd_swmr_readers ......may take some time......
+ pid_readers=""
+ n=0
+ while [ $n -lt $Nreaders ]; do
+ #seed="-r ${seeds[$n]}"
+ seed=""
+ catch_out_err_and_rc vfd_swmr_reader.$n \
+ $testdir/vfd_swmr_reader -q $Nsecs_add $seed &
+ pid_readers="$pid_readers $!"
+ n=$((n + 1))
+ done
+ $DPRINT pid_readers=$pid_readers
+ $IFDEBUG ps
+
+ # Wait for the readers to finish before signalling the
+ # writer to quit: the writer holds the file open so that the
+ # readers will find the shadow file when they reopen
+ # the .h5 file.
+ wait $pid_readers
+ kill -USR1 $(cat vfd_swmr_writer.pid)
+ wait $pid_writer
+
+ # Collect exit codes of the readers
+ n=0
+ while [ $n -lt $Nreaders ]; do
+ if [ $(cat vfd_swmr_reader.$n.rc) -ne 0 ]; then
+ echo reader had error
+ nerrors=$((nerrors + 1))
+ fi
+ n=$((n + 1))
+ done
+
+ # Collect exit code of the writer
+ $DPRINT checked writer $pid_writer
+ if [ $(cat vfd_swmr_writer.rc) -ne 0 ]; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Clean up output files
+ rm -f vfd_swmr_writer.{out,rc}
+ rm -f vfd_swmr_reader.*.{out,rc}
+ fi
+
+ if [ ${do_shrink:-no} = yes ]; then
+ if [ ${do_expand:-no} != yes ]; then
+ echo "Cancelling the 'shrink' test: it depends on the .h5 file left behind by the 'expand' test." 1>&2
+ exit 1
+ fi
+ echo
+ echo "###############################################################################"
+ echo "## Remove test - test shrinking the dataset"
+ echo "###############################################################################"
+
+ # Remove any possible writer message file before launching writer
+ rm -f $WRITER_MESSAGE
+ # Launch the Remove Writer
+ echo launch the vfd_swmr_remove_writer
+ seed="" # Put -r <random seed> command here
+ catch_out_err_and_rc vfd_swmr_writer \
+ $testdir/vfd_swmr_remove_writer -q -o $Nrecs_rem $seed &
+ pid_writer=$!
+ $DPRINT pid_writer=$pid_writer
+
+ # Wait for message from writer process before starting reader(s)
+ WAIT_MESSAGE $WRITER_MESSAGE
+
+ # Launch the Remove Readers
+ #declare -a seeds=(<seed1> <seed2> <seed3> ... )
+ n=0
+ pid_readers=""
+ echo launch $Nreaders swmr_remove_readers ......may take some time ......
+ while [ $n -lt $Nreaders ]; do
+ #seed="-r ${seeds[$n]}"
+ seed=""
+ catch_out_err_and_rc vfd_swmr_reader.$n \
+ $testdir/vfd_swmr_remove_reader -q $Nsecs_rem $seed &
+ pid_readers="$pid_readers $!"
+ n=$((n + 1))
+ done
+ $DPRINT pid_readers=$pid_readers
+ $IFDEBUG ps
+
+ # Wait for the readers to finish before signalling the
+ # writer to quit: the writer holds the file open so that the
+ # readers will find the shadow file when they reopen
+ # the .h5 file.
+ wait $pid_readers
+ kill -USR1 $(cat vfd_swmr_writer.pid)
+ wait $pid_writer
+
+ # Collect exit codes of the readers
+ n=0
+ while [ $n -lt $Nreaders ]; do
+ if [ $(cat vfd_swmr_reader.$n.rc) -ne 0 ]; then
+ echo reader had error
+ nerrors=$((nerrors + 1))
+ fi
+ n=$((n + 1))
+ done
+
+ # Collect exit code of the writer
+ $DPRINT checked writer $pid_writer
+ if [ $(cat vfd_swmr_writer.rc) -ne 0 ]; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Clean up output files
+ rm -f vfd_swmr_writer.{out,rc}
+ rm -f vfd_swmr_reader.*.{out,rc}
+ fi
+
+ if [ ${do_expand_shrink:-no} = yes ]; then
+ echo
+ echo "## Expand/shrink test - randomly grow or shrink the dataset"
+
+ # Launch the Generator
+ echo launch the vfd_swmr_generator with VFD SWMR write
+ $testdir/vfd_swmr_generator -s $compress $index_type
+ if test $? -ne 0; then
+ echo generator had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Launch the Writer (not in parallel - just to rebuild the datasets)
+ echo launch the vfd_swmr_writer
+ seed="" # Put -r <random seed> command here
+ $testdir/vfd_swmr_writer -q -W $Nrecords $seed
+ if test $? -ne 0; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Remove any possible writer message file before launching writer
+ rm -f $WRITER_MESSAGE
+ #
+ # Launch the Add/Remove Writer
+ echo launch the vfd_swmr_addrem_writer
+ seed="" # Put -r <random seed> command here
+ catch_out_err_and_rc vfd_swmr_writer \
+ $testdir/vfd_swmr_addrem_writer -q $Nrecords $seed &
+ pid_writer=$!
+ $DPRINT pid_writer=$pid_writer
+
+ # Wait for message from writer process before starting reader(s)
+ WAIT_MESSAGE $WRITER_MESSAGE
+ #
+ # Launch the Add/Remove Readers
+ #declare -a seeds=(<seed1> <seed2> <seed3> ... )
+ n=0
+ pid_readers=""
+ echo launch $Nreaders vfd_swmr_remove_readers ...... may take some time ......
+ while [ $n -lt $Nreaders ]; do
+ #seed="-r ${seeds[$n]}"
+ seed=""
+ catch_out_err_and_rc vfd_swmr_reader.$n \
+ $testdir/vfd_swmr_remove_reader -q $Nsecs_addrem $seed &
+ pid_readers="$pid_readers $!"
+ n=$((n + 1))
+ done
+ $DPRINT pid_readers=$pid_readers
+ $IFDEBUG ps
+
+ # Wait for the readers to finish before signalling the
+ # writer to quit: the writer holds the file open so that the
+ # readers will find the shadow file when they reopen
+ # the .h5 file.
+ wait $pid_readers
+ kill -USR1 $(cat vfd_swmr_writer.pid)
+ wait $pid_writer
+
+ # Collect exit codes of the readers
+ n=0
+ while [ $n -lt $Nreaders ]; do
+ if [ $(cat vfd_swmr_reader.$n.rc) -ne 0 ]; then
+ echo reader had error
+ nerrors=$((nerrors + 1))
+ fi
+ n=$((n + 1))
+ done
+
+ # Collect exit code of the writer
+ $DPRINT checked writer $pid_writer
+ if [ ! -e vfd_swmr_writer.rc ] ||
+ [ $(cat vfd_swmr_writer.rc) -ne 0 ]; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Clean up output files
+ rm -f vfd_swmr_writer.{out,rc}
+ rm -f vfd_swmr_reader.*.{out,rc}
+ fi
+
+ if [ ${do_sparse:-no} = yes ]; then
+ echo
+ echo "## Sparse writer test - write random dataset locations"
+
+ # Launch the Generator
+ # NOTE: Random seed is shared between readers and writers and is
+ # created by the generator.
+ echo launch the vfd_swmr_generator with VFD SWMR write
+ seed="" # Put -r <random seed> command here
+ $testdir/vfd_swmr_generator -s $compress $index_type $seed
+ if test $? -ne 0; then
+ echo generator had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Remove any possible writer message file before launching writer
+ rm -f $WRITER_MESSAGE
+ # Launch the Sparse writer
+ echo launch the vfd_swmr_sparse_writer
+ catch_out_err_and_rc vfd_swmr_writer nice -n 20 \
+ $testdir/vfd_swmr_sparse_writer -q $Nrecs_spa &
+ pid_writer=$!
+ $DPRINT pid_writer=$pid_writer
+
+ # Wait for message from writer process before starting reader(s)
+ WAIT_MESSAGE $WRITER_MESSAGE
+ #
+ # Launch the Sparse readers
+ n=0
+ pid_readers=""
+ echo launch $Nrdrs_spa vfd_swmr_sparse_readers ..... may take some time ......
+ while [ $n -lt $Nrdrs_spa ]; do
+ # The sparse reader spits out a LOT of data so it's set to 'quiet'
+ catch_out_err_and_rc vfd_swmr_reader.$n \
+ $testdir/vfd_swmr_sparse_reader -q $Nrecs_spa &
+ pid_readers="$pid_readers $!"
+ n=$((n + 1))
+ done
+ $DPRINT pid_readers=$pid_readers
+ $IFDEBUG ps
+
+ # Wait for the readers and the writer to finish.
+ echo "pid_readers=$pid_readers"
+ echo "pid_writer=$pid_writer"
+
+ # Wait for the readers to finish before signalling the
+ # writer to quit: the writer holds the file open so that the
+ # readers will find the shadow file when they reopen
+ # the .h5 file.
+ wait $pid_readers
+ kill -USR1 $(cat vfd_swmr_writer.pid)
+ wait $pid_writer
+
+ # Collect exit codes of the readers
+ n=0
+ while [ $n -lt $Nrdrs_spa ]; do
+ if [ $(cat vfd_swmr_reader.$n.rc) -ne 0 ]; then
+ echo reader had error
+ nerrors=$((nerrors + 1))
+ fi
+ n=$((n + 1))
+ done
+
+ # Collect exit code of the writer
+ $DPRINT checked writer $pid_writer
+ if [ $(cat vfd_swmr_writer.rc) -ne 0 ]; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Clean up output files
+ rm -f vfd_swmr_writer.{out,rc}
+ rm -f vfd_swmr_reader.*.{out,rc}
+ fi
done
done
@@ -595,50 +592,50 @@ done
#
for ty in null oob; do
- if [ ${ty} = null ]; then
- [ ${do_vlstr_null:-no} = no ] && continue
- echo
- echo "## VL string 1 - expect to read NULL"
- else
- [ ${do_vlstr_oob:-no} = no ] && continue
- echo
- echo "## VL string 2 - expect out-of-bounds access"
- fi
+ if [ ${ty} = null ]; then
+ [ ${do_vlstr_null:-no} = no ] && continue
+ echo
+ echo "## VL string 1 - expect to read NULL"
+ else
+ [ ${do_vlstr_oob:-no} = no ] && continue
+ echo
+ echo "## VL string 2 - expect out-of-bounds access"
+ fi
- echo launch vfd_swmr_vlstr_writer ..... may take some time ......
- catch_out_err_and_rc vfd_swmr_vlstr_writer \
- ../vfd_swmr_vlstr_writer -n 500 -q -t ${ty} &
- pid_writer=$!
-
- # pause?
-
- catch_out_err_and_rc vfd_swmr_vlstr_reader \
- ../vfd_swmr_vlstr_reader -n 500 -q -t ${ty} &
- pid_reader=$!
-
- # Wait for the reader to finish before signalling the
- # writer to quit: the writer holds the file open so that the
- # reader will find the shadow file when it opens
- # the .h5 file.
- wait $pid_reader
- kill -USR1 $(cat vfd_swmr_vlstr_writer.pid)
- wait $pid_writer
-
- # Collect exit code of the reader
- if [ $(cat vfd_swmr_vlstr_reader.rc) -ne 0 ]; then
- echo reader had error
- nsofterrors=$((nsofterrors + 1))
- fi
+ echo launch vfd_swmr_vlstr_writer ..... may take some time ......
+ catch_out_err_and_rc vfd_swmr_vlstr_writer \
+ $testdir/vfd_swmr_vlstr_writer -n 500 -q -t ${ty} &
+ pid_writer=$!
- # Collect exit code of the writer
- if [ $(cat vfd_swmr_vlstr_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
+ # pause?
- # Clean up output files
- rm -f vfd_swmr_vlstr_writer.{out,rc}
- rm -f vfd_swmr_vlstr_reader.*.{out,rc}
+ catch_out_err_and_rc vfd_swmr_vlstr_reader \
+ $testdir/vfd_swmr_vlstr_reader -n 500 -q -t ${ty} &
+ pid_reader=$!
+
+ # Wait for the reader to finish before signalling the
+ # writer to quit: the writer holds the file open so that the
+ # reader will find the shadow file when it opens
+ # the .h5 file.
+ wait $pid_reader
+ kill -USR1 $(cat vfd_swmr_vlstr_writer.pid)
+ wait $pid_writer
+
+ # Collect exit code of the reader
+ if [ $(cat vfd_swmr_vlstr_reader.rc) -ne 0 ]; then
+ echo reader had error
+ nsofterrors=$((nsofterrors + 1))
+ fi
+
+ # Collect exit code of the writer
+ if [ $(cat vfd_swmr_vlstr_writer.rc) -ne 0 ]; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Clean up output files
+ rm -f vfd_swmr_vlstr_writer.{out,rc}
+ rm -f vfd_swmr_vlstr_reader.*.{out,rc}
done
###############################################################################
@@ -652,40 +649,40 @@ done
#
#
if [ ${do_zoo:-no} = yes ]; then
- rm -f ./shared_tick_num
- echo launch vfd_swmr_zoo_writer
- catch_out_err_and_rc vfd_swmr_zoo_writer \
- ../vfd_swmr_zoo_writer -q &
- pid_writer=$!
+ rm -f ./shared_tick_num
+ echo launch vfd_swmr_zoo_writer
+ catch_out_err_and_rc vfd_swmr_zoo_writer \
+ $testdir/vfd_swmr_zoo_writer -q &
+ pid_writer=$!
# -l is the expected maximal number of ticks from the writer's finishing zoo creation or deletion
# to the reader's finishing validation of zoo creation or deletion
- catch_out_err_and_rc vfd_swmr_zoo_reader \
- ../vfd_swmr_zoo_reader -l 4 -q &
- pid_reader=$!
-
- # Wait for the reader to finish before signalling the
- # writer to quit: the writer holds the file open so that the
- # reader will find the shadow file when it opens
- # the .h5 file.
- wait $pid_reader
- wait $pid_writer
-
- # Collect exit code of the reader
- if [ $(cat vfd_swmr_zoo_reader.rc) -ne 0 ]; then
- echo reader had error
- nerrors=$((nerrors + 1))
- fi
+ catch_out_err_and_rc vfd_swmr_zoo_reader \
+ $testdir/vfd_swmr_zoo_reader -l 4 -q &
+ pid_reader=$!
- # Collect exit code of the writer
- if [ $(cat vfd_swmr_zoo_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
+ # Wait for the reader to finish before signalling the
+ # writer to quit: the writer holds the file open so that the
+ # reader will find the shadow file when it opens
+ # the .h5 file.
+ wait $pid_reader
+ wait $pid_writer
- # Clean up output files
- rm -f vfd_swmr_zoo_writer.{out,rc}
- rm -f vfd_swmr_zoo_reader.*.{out,rc}
+ # Collect exit code of the reader
+ if [ $(cat vfd_swmr_zoo_reader.rc) -ne 0 ]; then
+ echo reader had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Collect exit code of the writer
+ if [ $(cat vfd_swmr_zoo_writer.rc) -ne 0 ]; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Clean up output files
+ rm -f vfd_swmr_zoo_writer.{out,rc}
+ rm -f vfd_swmr_zoo_reader.*.{out,rc}
fi
@@ -715,37 +712,37 @@ fi
#
#
if [ ${do_groups:-no} = yes ]; then
- echo launch vfd_swmr_group_writer ......may take some time......
- catch_out_err_and_rc vfd_swmr_group_writer \
- ../vfd_swmr_group_writer -q -c 10 -n $GROUP_n &
- pid_writer=$!
-
- catch_out_err_and_rc vfd_swmr_group_reader \
- ../vfd_swmr_group_reader -q -c 10 -n $GROUP_n -u 5 &
- pid_reader=$!
-
- # Wait for the reader to finish before signalling the
- # writer to quit: the writer holds the file open so that the
- # reader will find the shadow file when it opens
- # the .h5 file.
- wait $pid_reader
- wait $pid_writer
-
- # Collect exit code of the reader
- if [ $(cat vfd_swmr_group_reader.rc) -ne 0 ]; then
- echo reader had error
- nerrors=$((nerrors + 1))
- fi
+ echo launch vfd_swmr_group_writer ......may take some time......
+ catch_out_err_and_rc vfd_swmr_group_writer \
+ $testdir/vfd_swmr_group_writer -q -c 10 -n $GROUP_n &
+ pid_writer=$!
- # Collect exit code of the writer
- if [ $(cat vfd_swmr_group_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
+ catch_out_err_and_rc vfd_swmr_group_reader \
+ $testdir/vfd_swmr_group_reader -q -c 10 -n $GROUP_n -u 5 &
+ pid_reader=$!
- # Clean up output files
- rm -f vfd_swmr_group_writer.{out,rc}
- rm -f vfd_swmr_group_reader.*.{out,rc}
+ # Wait for the reader to finish before signalling the
+ # writer to quit: the writer holds the file open so that the
+ # reader will find the shadow file when it opens
+ # the .h5 file.
+ wait $pid_reader
+ wait $pid_writer
+
+ # Collect exit code of the reader
+ if [ $(cat vfd_swmr_group_reader.rc) -ne 0 ]; then
+ echo reader had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Collect exit code of the writer
+ if [ $(cat vfd_swmr_group_writer.rc) -ne 0 ]; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Clean up output files
+ rm -f vfd_swmr_group_writer.{out,rc}
+ rm -f vfd_swmr_group_reader.*.{out,rc}
fi
###############################################################################
@@ -772,10 +769,8 @@ grp_attr_list=(
"modify-vstr"
"del-ohr-block"
)
-#
-#
+
# Setting for exhaustive and quick runs
-#
if [[ "$HDF5TestExpress" -eq 0 ]] ; then # exhaustive run
GROUP_attr_n=2
grp_attr_list=(
@@ -801,43 +796,42 @@ elif [[ "$HDF5TestExpress" -gt 1 ]] ; then # quick run
"del-ohr-block"
)
fi
-#
-#
+
for options in ${grp_attr_list[*]}; do
- if [ ${do_groups_attrs:-no} = no ]; then
- continue
- fi
- echo launch vfd_swmr_group attribute: $options ......may take some time......
- catch_out_err_and_rc vfd_swmr_group_writer \
- ../vfd_swmr_group_writer -q -c 1 -n $GROUP_attr_n -a 1 -A $options &
- pid_writer=$!
-
- catch_out_err_and_rc vfd_swmr_group_reader \
- ../vfd_swmr_group_reader -q -c 1 -n $GROUP_attr_n -a 1 -A $options &
- pid_reader=$!
-
- # Wait for the reader to finish before signalling the
- # writer to quit: the writer holds the file open so that the
- # reader will find the shadow file when it opens
- # the .h5 file.
- wait $pid_reader
- wait $pid_writer
-
- # Collect exit code of the reader
- if [ $(cat vfd_swmr_group_reader.rc) -ne 0 ]; then
- echo reader had error
- nerrors=$((nerrors + 1))
- fi
+ if [ ${do_groups_attrs:-no} = no ]; then
+ continue
+ fi
+ echo launch vfd_swmr_group attribute: $options ......may take some time......
+ catch_out_err_and_rc vfd_swmr_group_writer \
+ $testdir/vfd_swmr_group_writer -q -c 1 -n $GROUP_attr_n -a 1 -A $options &
+ pid_writer=$!
- # Collect exit code of the writer
- if [ $(cat vfd_swmr_group_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
+ catch_out_err_and_rc vfd_swmr_group_reader \
+ $testdir/vfd_swmr_group_reader -q -c 1 -n $GROUP_attr_n -a 1 -A $options &
+ pid_reader=$!
- # Clean up output files
- rm -f vfd_swmr_group_writer.{out,rc}
- rm -f vfd_swmr_group_reader.*.{out,rc}
+ # Wait for the reader to finish before signalling the
+ # writer to quit: the writer holds the file open so that the
+ # reader will find the shadow file when it opens
+ # the .h5 file.
+ wait $pid_reader
+ wait $pid_writer
+
+ # Collect exit code of the reader
+ if [ $(cat vfd_swmr_group_reader.rc) -ne 0 ]; then
+ echo reader had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Collect exit code of the writer
+ if [ $(cat vfd_swmr_group_writer.rc) -ne 0 ]; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Clean up output files
+ rm -f vfd_swmr_group_writer.{out,rc}
+ rm -f vfd_swmr_group_reader.*.{out,rc}
done
###############################################################################
@@ -867,43 +861,42 @@ os_grp_attr_list=(
"add-ohr-block"
"del-ohr-block"
)
-#
-#
+
for options in ${os_grp_attr_list[*]}; do
- if [ ${do_os_groups_attrs:-no} = no ]; then
- continue
- fi
- echo launch vfd_swmr_group attribute with old-style group: $options ......may take some time......
- catch_out_err_and_rc vfd_swmr_group_writer \
- ../vfd_swmr_group_writer -q -G -c 1 -n $GROUP_attr_n -a 1 -A $options &
- pid_writer=$!
-
- catch_out_err_and_rc vfd_swmr_group_reader \
- ../vfd_swmr_group_reader -q -G -c 1 -n $GROUP_attr_n -a 1 -A $options &
- pid_reader=$!
-
- # Wait for the reader to finish before signalling the
- # writer to quit: the writer holds the file open so that the
- # reader will find the shadow file when it opens
- # the .h5 file.
- wait $pid_reader
- wait $pid_writer
-
- # Collect exit code of the reader
- if [ $(cat vfd_swmr_group_reader.rc) -ne 0 ]; then
- echo reader had error
- nerrors=$((nerrors + 1))
- fi
+ if [ ${do_os_groups_attrs:-no} = no ]; then
+ continue
+ fi
+ echo launch vfd_swmr_group attribute with old-style group: $options ......may take some time......
+ catch_out_err_and_rc vfd_swmr_group_writer \
+ $testdir/vfd_swmr_group_writer -q -G -c 1 -n $GROUP_attr_n -a 1 -A $options &
+ pid_writer=$!
- # Collect exit code of the writer
- if [ $(cat vfd_swmr_group_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
+ catch_out_err_and_rc vfd_swmr_group_reader \
+ $testdir/vfd_swmr_group_reader -q -G -c 1 -n $GROUP_attr_n -a 1 -A $options &
+ pid_reader=$!
- # Clean up output files
- rm -f vfd_swmr_group_writer.{out,rc}
- rm -f vfd_swmr_group_reader.*.{out,rc}
+ # Wait for the reader to finish before signalling the
+ # writer to quit: the writer holds the file open so that the
+ # reader will find the shadow file when it opens
+ # the .h5 file.
+ wait $pid_reader
+ wait $pid_writer
+
+ # Collect exit code of the reader
+ if [ $(cat vfd_swmr_group_reader.rc) -ne 0 ]; then
+ echo reader had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Collect exit code of the writer
+ if [ $(cat vfd_swmr_group_writer.rc) -ne 0 ]; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Clean up output files
+ rm -f vfd_swmr_group_writer.{out,rc}
+ rm -f vfd_swmr_group_reader.*.{out,rc}
done
###############################################################################
@@ -927,10 +920,8 @@ grp_op_list=(
"grp-compact-t-dense"
"grp-dense-t-compact"
)
-#
-#
+
# Setting for exhaustive and quick run
-#
if [[ "$HDF5TestExpress" -eq 0 ]] ; then # exhaustive run
GROUP_op_n=2
grp_op_list=(
@@ -948,43 +939,42 @@ elif [[ "$HDF5TestExpress" -gt 1 ]] ; then # quick run
"grp-dense-t-compact"
)
fi
-#
-#
+
for options in ${grp_op_list[*]}; do
- if [ ${do_groups_ops:-no} = no ]; then
- continue
- fi
- echo launch vfd_swmr_group operations: $options ......may take some time......
- catch_out_err_and_rc vfd_swmr_group_writer \
- ../vfd_swmr_group_writer -q -c 1 -n $GROUP_op_n -O $options &
- pid_writer=$!
-
- catch_out_err_and_rc vfd_swmr_group_reader \
- ../vfd_swmr_group_reader -q -c 1 -n $GROUP_op_n -O $options &
- pid_reader=$!
-
- # Wait for the reader to finish before signalling the
- # writer to quit: the writer holds the file open so that the
- # reader will find the shadow file when it opens
- # the .h5 file.
- wait $pid_reader
- wait $pid_writer
-
- # Collect exit code of the reader
- if [ $(cat vfd_swmr_group_reader.rc) -ne 0 ]; then
- echo reader had error
- nerrors=$((nerrors + 1))
- fi
+ if [ ${do_groups_ops:-no} = no ]; then
+ continue
+ fi
+ echo launch vfd_swmr_group operations: $options ......may take some time......
+ catch_out_err_and_rc vfd_swmr_group_writer \
+ $testdir/vfd_swmr_group_writer -q -c 1 -n $GROUP_op_n -O $options &
+ pid_writer=$!
- # Collect exit code of the writer
- if [ $(cat vfd_swmr_group_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
+ catch_out_err_and_rc vfd_swmr_group_reader \
+ $testdir/vfd_swmr_group_reader -q -c 1 -n $GROUP_op_n -O $options &
+ pid_reader=$!
- # Clean up output files
- rm -f vfd_swmr_group_writer.{out,rc}
- rm -f vfd_swmr_group_reader.*.{out,rc}
+ # Wait for the reader to finish before signalling the
+ # writer to quit: the writer holds the file open so that the
+ # reader will find the shadow file when it opens
+ # the .h5 file.
+ wait $pid_reader
+ wait $pid_writer
+
+ # Collect exit code of the reader
+ if [ $(cat vfd_swmr_group_reader.rc) -ne 0 ]; then
+ echo reader had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Collect exit code of the writer
+ if [ $(cat vfd_swmr_group_writer.rc) -ne 0 ]; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Clean up output files
+ rm -f vfd_swmr_group_writer.{out,rc}
+ rm -f vfd_swmr_group_reader.*.{out,rc}
done
###############################################################################
@@ -1008,40 +998,40 @@ os_grp_op_list=(
#
#
for options in ${os_grp_op_list[*]}; do
- if [ ${do_os_groups_ops:-no} = no ]; then
- continue
- fi
- echo launch vfd_swmr_group operations with old-style group: $options ......may take some time......
- catch_out_err_and_rc vfd_swmr_group_writer \
- ../vfd_swmr_group_writer -q -G -c 1 -n $GROUP_op_n -O $options &
- pid_writer=$!
-
- catch_out_err_and_rc vfd_swmr_group_reader \
- ../vfd_swmr_group_reader -q -G -c 1 -n $GROUP_op_n -O $options &
- pid_reader=$!
-
- # Wait for the reader to finish before signalling the
- # writer to quit: the writer holds the file open so that the
- # reader will find the shadow file when it opens
- # the .h5 file.
- wait $pid_reader
- wait $pid_writer
-
- # Collect exit code of the reader
- if [ $(cat vfd_swmr_group_reader.rc) -ne 0 ]; then
- echo reader had error
- nerrors=$((nerrors + 1))
- fi
+ if [ ${do_os_groups_ops:-no} = no ]; then
+ continue
+ fi
+ echo launch vfd_swmr_group operations with old-style group: $options ......may take some time......
+ catch_out_err_and_rc vfd_swmr_group_writer \
+ $testdir/vfd_swmr_group_writer -q -G -c 1 -n $GROUP_op_n -O $options &
+ pid_writer=$!
- # Collect exit code of the writer
- if [ $(cat vfd_swmr_group_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
+ catch_out_err_and_rc vfd_swmr_group_reader \
+ $testdir/vfd_swmr_group_reader -q -G -c 1 -n $GROUP_op_n -O $options &
+ pid_reader=$!
- # Clean up output files
- rm -f vfd_swmr_group_writer.{out,rc}
- rm -f vfd_swmr_group_reader.*.{out,rc}
+ # Wait for the reader to finish before signalling the
+ # writer to quit: the writer holds the file open so that the
+ # reader will find the shadow file when it opens
+ # the .h5 file.
+ wait $pid_reader
+ wait $pid_writer
+
+ # Collect exit code of the reader
+ if [ $(cat vfd_swmr_group_reader.rc) -ne 0 ]; then
+ echo reader had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Collect exit code of the writer
+ if [ $(cat vfd_swmr_group_writer.rc) -ne 0 ]; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Clean up output files
+ rm -f vfd_swmr_group_writer.{out,rc}
+ rm -f vfd_swmr_group_reader.*.{out,rc}
done
###############################################################################
@@ -1062,7 +1052,7 @@ GROUP_seg_n=1000000 # Number of groups when segmentation fa
if [ ${do_os_groups_seg:-no} != no ]; then
echo launch vfd_swmr_group operations with old-style group: $GROUP_seg_n groups ......may take some time......
catch_out_err_and_rc vfd_swmr_group_writer \
- ../vfd_swmr_group_writer -q -N -G -n $GROUP_seg_n -a $GROUP_seg_n
+ $testdir/vfd_swmr_group_writer -q -N -G -n $GROUP_seg_n -a $GROUP_seg_n
# Collect exit code of the writer
if [ $(cat vfd_swmr_group_writer.rc) -ne 0 ]; then
@@ -1134,11 +1124,11 @@ for options in "-d 1" "-d 1 -F" "-d 2 -l 16" "-d 2 -F -l 16" "-d 1 -t" "-d 1 -t
echo launch vfd_swmr_bigset_writer many small, options $options
catch_out_err_and_rc vfd_swmr_bigset_writer \
- ../vfd_swmr_bigset_writer -n $BIGSET_n $options -s $BIGSET_many_s -e 1 -r 16 -c 16 -q &
+ $testdir/vfd_swmr_bigset_writer -n $BIGSET_n $options -s $BIGSET_many_s -e 1 -r 16 -c 16 -q &
pid_writer=$!
catch_out_err_and_rc vfd_swmr_bigset_reader \
- ../vfd_swmr_bigset_reader -n $BIGSET_n $options -s $BIGSET_many_s -e 1 -r 16 -c 16 -q &
+ $testdir/vfd_swmr_bigset_reader -n $BIGSET_n $options -s $BIGSET_many_s -e 1 -r 16 -c 16 -q &
pid_reader=$!
# Wait for the reader to finish before signalling the
@@ -1165,13 +1155,13 @@ for options in "-d 1" "-d 1 -F" "-d 2 -l 16" "-d 2 -F -l 16" "-d 1 -t" "-d 1 -t
nerrors=$((nerrors + 1))
fi
- # Collect exit code of the writer
- if [ $(cat vfd_swmr_bigset_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
+ # Collect exit code of the writer
+ if [ $(cat vfd_swmr_bigset_writer.rc) -ne 0 ]; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
- # Clean up output files
+ # Clean up output files
rm -f vfd_swmr_bigset_writer.{out,rc}
rm -f vfd_swmr_bigset_reader.*.{out,rc}
rm -f aux_process.{out,rc}
@@ -1213,11 +1203,11 @@ for options in "-d 1" "-d 1 -F" "-d 2 -l 10" "-d 2 -F -l 10" "-d 1 -t -l 10" "-d
fi
catch_out_err_and_rc vfd_swmr_bigset_writer \
- ../vfd_swmr_bigset_writer -n $BIGSET_n $options -s $BIGSET_few_s -e 8 -r 256 -c 256 -q &
+ $testdir/vfd_swmr_bigset_writer -n $BIGSET_n $options -s $BIGSET_few_s -e 8 -r 256 -c 256 -q &
pid_writer=$!
catch_out_err_and_rc vfd_swmr_bigset_reader \
- ../vfd_swmr_bigset_reader -n $BIGSET_n $options -s $BIGSET_few_s -e 8 -r 256 -c 256 -q &
+ $testdir/vfd_swmr_bigset_reader -n $BIGSET_n $options -s $BIGSET_few_s -e 8 -r 256 -c 256 -q &
pid_reader=$!
# Wait for the reader to finish before signalling the
@@ -1296,11 +1286,11 @@ for options in "${attrdset_list[@]}"; do
echo launch vfd_swmr_attrdset_writer attrdset, options $options ......may take some time......
catch_out_err_and_rc vfd_swmr_attrdset_writer \
- ../vfd_swmr_attrdset_writer $options &
+ $testdir/vfd_swmr_attrdset_writer $options &
pid_writer=$!
catch_out_err_and_rc vfd_swmr_attrdset_reader \
- ../vfd_swmr_attrdset_reader $options &
+ $testdir/vfd_swmr_attrdset_reader $options &
pid_reader=$!
# Wait for the reader to finish before signaling the
@@ -1340,11 +1330,9 @@ done
for flush in "" "-U"; do
# Loop with different operations
for options in "-p -e 20 -t -q" "-g -m 5 -n 2 -s 10 -w 7 -q" "-k -m 10 -n 5 -r 5 -l 10 -q"; do
- #
- #
- if [ ${do_dsetops:-no} = no ]; then
- continue
- fi
+ if [ ${do_dsetops:-no} = no ]; then
+ continue
+ fi
# Clean up any existing fifo files from previous runs
if [ -e ./$DSETOPS_FIFO_WRITER_TO_READER ]; then # If writer fifo file is found
rm -f ./$DSETOPS_FIFO_WRITER_TO_READER
@@ -1353,37 +1341,37 @@ for flush in "" "-U"; do
rm -f ./$DSETOPS_FIFO_READER_TO_WRITER
fi
#
- echo launch vfd_swmr_dsetops_writer dsetops, options $options $flush......may take some time......
- catch_out_err_and_rc vfd_swmr_dsetops_writer \
- ../vfd_swmr_dsetops_writer $options $flush &
- pid_writer=$!
-
- catch_out_err_and_rc vfd_swmr_dsetops_reader \
- ../vfd_swmr_dsetops_reader $options $flush &
- pid_reader=$!
-
- # Wait for the reader to finish before signaling the
- # writer to quit: the writer holds the file open so that the
- # reader will find the shadow file when it opens
- # the .h5 file.
- wait $pid_reader
- wait $pid_writer
-
- # Collect exit code of the reader
- if [ $(cat vfd_swmr_dsetops_reader.rc) -ne 0 ]; then
- echo reader had error
- nerrors=$((nerrors + 1))
- fi
+ echo launch vfd_swmr_dsetops_writer dsetops, options $options $flush......may take some time......
+ catch_out_err_and_rc vfd_swmr_dsetops_writer \
+ $testdir/vfd_swmr_dsetops_writer $options $flush &
+ pid_writer=$!
+
+ catch_out_err_and_rc vfd_swmr_dsetops_reader \
+ $testdir/vfd_swmr_dsetops_reader $options $flush &
+ pid_reader=$!
+
+ # Wait for the reader to finish before signaling the
+ # writer to quit: the writer holds the file open so that the
+ # reader will find the shadow file when it opens
+ # the .h5 file.
+ wait $pid_reader
+ wait $pid_writer
- # Collect exit code of the writer
- if [ $(cat vfd_swmr_dsetops_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
+ # Collect exit code of the reader
+ if [ $(cat vfd_swmr_dsetops_reader.rc) -ne 0 ]; then
+ echo reader had error
+ nerrors=$((nerrors + 1))
+ fi
- # Clean up output files
- rm -f vfd_swmr_dsetops_writer.{out,rc}
- rm -f vfd_swmr_dsetops_reader.*.{out,rc}
+ # Collect exit code of the writer
+ if [ $(cat vfd_swmr_dsetops_writer.rc) -ne 0 ]; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Clean up output files
+ rm -f vfd_swmr_dsetops_writer.{out,rc}
+ rm -f vfd_swmr_dsetops_reader.*.{out,rc}
done
done
@@ -1404,11 +1392,10 @@ done
for ref in "-O" "-R" "-O -R"; do
# Loop with different operations
for options in "-p -e 20 -t -g -q" "-g -m 5 -n 2 -s 10 -w 7 -q" "-k -m 10 -n 5 -r 5 -l 10 -q"; do
- #
- #
- if [ ${do_dsetops_ref:-no} = no ]; then
- continue
- fi
+
+ if [ ${do_dsetops_ref:-no} = no ]; then
+ continue
+ fi
# Clean up any existing fifo files from previous runs
if [ -e ./$DSETOPS_FIFO_WRITER_TO_READER ]; then # If writer fifo file is found
rm -f ./$DSETOPS_FIFO_WRITER_TO_READER
@@ -1416,38 +1403,38 @@ for ref in "-O" "-R" "-O -R"; do
if [ -e ./$DSETOPS_FIFO_READER_TO_WRITER ]; then # If reader fifo file is found
rm -f ./$DSETOPS_FIFO_READER_TO_WRITER
fi
- #
- echo launch vfd_swmr_dsetops_writer dsetops, options $options $ref......may take some time......
- catch_out_err_and_rc vfd_swmr_dsetops_writer \
- ../vfd_swmr_dsetops_writer $options $ref &
- pid_writer=$!
-
- catch_out_err_and_rc vfd_swmr_dsetops_reader \
- ../vfd_swmr_dsetops_reader $options $ref &
- pid_reader=$!
-
- # Wait for the reader to finish before signaling the
- # writer to quit: the writer holds the file open so that the
- # reader will find the shadow file when it opens
- # the .h5 file.
- wait $pid_reader
- wait $pid_writer
-
- # Collect exit code of the reader
- if [ $(cat vfd_swmr_dsetops_reader.rc) -ne 0 ]; then
- echo reader had error
- nerrors=$((nerrors + 1))
- fi
- # Collect exit code of the writer
- if [ $(cat vfd_swmr_dsetops_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
+ echo launch vfd_swmr_dsetops_writer dsetops, options $options $ref......may take some time......
+ catch_out_err_and_rc vfd_swmr_dsetops_writer \
+ $testdir/vfd_swmr_dsetops_writer $options $ref &
+ pid_writer=$!
- # Clean up output files
- rm -f vfd_swmr_dsetops_writer.{out,rc}
- rm -f vfd_swmr_dsetops_reader.*.{out,rc}
+ catch_out_err_and_rc vfd_swmr_dsetops_reader \
+ $testdir/vfd_swmr_dsetops_reader $options $ref &
+ pid_reader=$!
+
+ # Wait for the reader to finish before signaling the
+ # writer to quit: the writer holds the file open so that the
+ # reader will find the shadow file when it opens
+ # the .h5 file.
+ wait $pid_reader
+ wait $pid_writer
+
+ # Collect exit code of the reader
+ if [ $(cat vfd_swmr_dsetops_reader.rc) -ne 0 ]; then
+ echo reader had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Collect exit code of the writer
+ if [ $(cat vfd_swmr_dsetops_writer.rc) -ne 0 ]; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Clean up output files
+ rm -f vfd_swmr_dsetops_writer.{out,rc}
+ rm -f vfd_swmr_dsetops_reader.*.{out,rc}
done
done
@@ -1486,56 +1473,56 @@ for flush in "" "-U"; do
rm -f ./$DSETCHKS_FIFO_READER_TO_WRITER
fi
#
- echo launch vfd_swmr_dsetchks_writer dsetchks, options $options $flush ......may take some time......
- catch_out_err_and_rc vfd_swmr_dsetchks_writer \
- ../vfd_swmr_dsetchks_writer $options $flush &
- pid_writer=$!
-
- catch_out_err_and_rc vfd_swmr_dsetchks_reader \
- ../vfd_swmr_dsetchks_reader $options $flush &
- pid_reader=$!
-
- # Wait for the reader to finish before signaling the
- # writer to quit: the writer holds the file open so that the
- # reader will find the shadow file when it opens
- # the .h5 file.
- wait $pid_reader
- wait $pid_writer
-
- # Collect exit code of the reader
- if [ $(cat vfd_swmr_dsetchks_reader.rc) -ne 0 ]; then
- echo reader had error
- nerrors=$((nerrors + 1))
- fi
+ echo launch vfd_swmr_dsetchks_writer dsetchks, options $options $flush ......may take some time......
+ catch_out_err_and_rc vfd_swmr_dsetchks_writer \
+ $testdir/vfd_swmr_dsetchks_writer $options $flush &
+ pid_writer=$!
+
+ catch_out_err_and_rc vfd_swmr_dsetchks_reader \
+ $testdir/vfd_swmr_dsetchks_reader $options $flush &
+ pid_reader=$!
+
+ # Wait for the reader to finish before signaling the
+ # writer to quit: the writer holds the file open so that the
+ # reader will find the shadow file when it opens
+ # the .h5 file.
+ wait $pid_reader
+ wait $pid_writer
- # Collect exit code of the writer
- if [ $(cat vfd_swmr_dsetchks_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
+ # Collect exit code of the reader
+ if [ $(cat vfd_swmr_dsetchks_reader.rc) -ne 0 ]; then
+ echo reader had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Collect exit code of the writer
+ if [ $(cat vfd_swmr_dsetchks_writer.rc) -ne 0 ]; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
- # Clean up output files
- rm -f vfd_swmr_dsetchks_writer.{out,rc}
- rm -f vfd_swmr_dsetchks_reader.*.{out,rc}
+ # Clean up output files
+ rm -f vfd_swmr_dsetchks_writer.{out,rc}
+ rm -f vfd_swmr_dsetchks_reader.*.{out,rc}
done
done
if [ ${do_independ_wr:-no} = yes ]; then
- echo launch vfd_swmr_indep_wr_p0 ..... process 0 ......
- echo launch vfd_swmr_indep_wr_p1 ..... process 1 ......
- catch_out_err_and_rc vfd_swmr_indep_wr_p0 \
- ../vfd_swmr_indep_wr_p0 &
- pid_writer=$!
+ echo launch vfd_swmr_indep_wr_p0 ..... process 0 ......
+ echo launch vfd_swmr_indep_wr_p1 ..... process 1 ......
+ catch_out_err_and_rc vfd_swmr_indep_wr_p0 \
+ $testdir/vfd_swmr_indep_wr_p0 &
+ pid_writer=$!
- catch_out_err_and_rc vfd_swmr_group_reader \
- ../vfd_swmr_indep_wr_p1 &
- pid_reader=$!
+ catch_out_err_and_rc vfd_swmr_group_reader \
+ $testdir/vfd_swmr_indep_wr_p1 &
+ pid_reader=$!
wait $pid_reader
wait $pid_writer
- # Clean up output files
- rm -f vfd_swmr_indep_wr_p0.{out,rc}
- rm -f vfd_swmr_indep_wr_p1.{out,rc}
+ # Clean up output files
+ rm -f vfd_swmr_indep_wr_p0.{out,rc}
+ rm -f vfd_swmr_indep_wr_p1.{out,rc}
fi
@@ -1552,7 +1539,7 @@ fi
#
#
if [ ${do_gfail_entry_length:-no} = yes ]; then
- #
+
# Clean up any existing fifo files from previous runs
if [ -e ./$GFAIL_FIFO_WRITER_TO_READER ]; then # If writer fifo file is found
rm -f ./$GFAIL_FIFO_WRITER_TO_READER
@@ -1560,39 +1547,39 @@ if [ ${do_gfail_entry_length:-no} = yes ]; then
if [ -e ./$GFAIL_FIFO_READER_TO_WRITER ]; then # If reader fifo file is found
rm -f ./$GFAIL_FIFO_READER_TO_WRITER
fi
- #
- echo launch vfd_swmr_gfail_writer -q -m 10 -n 340000
- catch_out_err_and_rc vfd_swmr_gfail_entry_length_writer \
- ../vfd_swmr_gfail_writer -q -m 10 -n 340000 &
- pid_writer=$!
-
- echo launch vfd_swmr_gfail_reader -m 10 -n 340000
- catch_out_err_and_rc vfd_swmr_gfail_entry_length_reader \
- ../vfd_swmr_gfail_reader -m 10 -n 340000 &
- pid_reader=$!
-
- # Wait for the reader to finish before signaling the
- # writer to quit: the writer holds the file open so that the
- # reader will find the shadow file when it opens
- # the .h5 file.
- wait $pid_reader
- wait $pid_writer
-
- # Collect exit code of the reader
+
+ echo launch vfd_swmr_gfail_writer -q -m 10 -n 340000
+ catch_out_err_and_rc vfd_swmr_gfail_entry_length_writer \
+ $testdir/vfd_swmr_gfail_writer -q -m 10 -n 340000 &
+ pid_writer=$!
+
+ echo launch vfd_swmr_gfail_reader -m 10 -n 340000
+ catch_out_err_and_rc vfd_swmr_gfail_entry_length_reader \
+ $testdir/vfd_swmr_gfail_reader -m 10 -n 340000 &
+ pid_reader=$!
+
+ # Wait for the reader to finish before signaling the
+ # writer to quit: the writer holds the file open so that the
+ # reader will find the shadow file when it opens
+ # the .h5 file.
+ wait $pid_reader
+ wait $pid_writer
+
+ # Collect exit code of the reader
if [ $(cat vfd_swmr_gfail_entry_length_reader.rc) -ne 0 ]; then
- echo reader had error
- nerrors=$((nerrors + 1))
+ echo reader had error
+ nerrors=$((nerrors + 1))
fi
- # Collect exit code of the writer
- if [ $(cat vfd_swmr_gfail_entry_length_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
+ # Collect exit code of the writer
+ if [ $(cat vfd_swmr_gfail_entry_length_writer.rc) -ne 0 ]; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
- # Clean up output files
- rm -f vfd_swmr_gfail_entry_length_writer.{out,rc}
- rm -f vfd_swmr_gfail_entry_length_reader.*.{out,rc}
+ # Clean up output files
+ rm -f vfd_swmr_gfail_entry_length_writer.{out,rc}
+ rm -f vfd_swmr_gfail_entry_length_reader.*.{out,rc}
fi
###############################################################################
@@ -1613,7 +1600,7 @@ fi
#
#
if [ ${do_gfail_checksum:-no} = yes ]; then
- #
+
# Clean up any existing fifo files from previous runs
if [ -e ./$GFAIL_FIFO_WRITER_TO_READER ]; then # If writer fifo file is found
rm -f ./$GFAIL_FIFO_WRITER_TO_READER
@@ -1621,42 +1608,42 @@ if [ ${do_gfail_checksum:-no} = yes ]; then
if [ -e ./$GFAIL_FIFO_READER_TO_WRITER ]; then # If reader fifo file is found
rm -f ./$GFAIL_FIFO_READER_TO_WRITER
fi
- #
- echo launch vfd_swmr_gfail_writer -q -n 420000 ......may take some time......
- catch_out_err_and_rc vfd_swmr_gfail_checksum_writer \
- ../vfd_swmr_gfail_writer -q -m 50 -t 10 -n 4000000 &
- pid_writer=$!
-
- echo launch vfd_swmr_gfail_reader -n 420000 ......may take some time......
- catch_out_err_and_rc vfd_swmr_gfail_checksum_reader \
- ../vfd_swmr_gfail_reader -q -m 50 -t 10 -n 4000000 &
- pid_reader=$!
-
- # Wait for the reader to finish before signaling the
- # writer to quit: the writer holds the file open so that the
- # reader will find the shadow file when it opens
- # the .h5 file.
- wait $pid_reader
- wait $pid_writer
-
- # Collect exit code of the reader
+
+ echo launch vfd_swmr_gfail_writer -q -n 420000 ......may take some time......
+ catch_out_err_and_rc vfd_swmr_gfail_checksum_writer \
+ $testdir/vfd_swmr_gfail_writer -q -m 50 -t 10 -n 4000000 &
+ pid_writer=$!
+
+ echo launch vfd_swmr_gfail_reader -n 420000 ......may take some time......
+ catch_out_err_and_rc vfd_swmr_gfail_checksum_reader \
+ $testdir/vfd_swmr_gfail_reader -q -m 50 -t 10 -n 4000000 &
+ pid_reader=$!
+
+ # Wait for the reader to finish before signaling the
+ # writer to quit: the writer holds the file open so that the
+ # reader will find the shadow file when it opens
+ # the .h5 file.
+ wait $pid_reader
+ wait $pid_writer
+
+ # Collect exit code of the reader
if [ $(cat vfd_swmr_gfail_checksum_reader.rc) -ne 0 ]; then
grep "suggest to increase the value of max_lag" vfd_swmr_gfail_checksum_reader.out >/dev/null 2>&1
if test $? -ne 0; then
echo reader had error
- nerrors=$((nerrors + 1))
+ nerrors=$((nerrors + 1))
fi
fi
- # Collect exit code of the writer
- if [ $(cat vfd_swmr_gfail_checksum_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
+ # Collect exit code of the writer
+ if [ $(cat vfd_swmr_gfail_checksum_writer.rc) -ne 0 ]; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
- # Clean up output files
- rm -f vfd_swmr_gfail_checksum_writer.{out,rc}
- rm -f vfd_swmr_gfail_checksum_reader.*.{out,rc}
+ # Clean up output files
+ rm -f vfd_swmr_gfail_checksum_writer.{out,rc}
+ rm -f vfd_swmr_gfail_checksum_reader.*.{out,rc}
fi
###############################################################################
@@ -1672,7 +1659,7 @@ fi
#
#
if [ ${do_gfail_page_size:-no} = yes ]; then
- #
+
# Clean up any existing fifo files from previous runs
if [ -e ./$GFAIL_FIFO_WRITER_TO_READER ]; then # If writer fifo file is found
rm -f ./$GFAIL_FIFO_WRITER_TO_READER
@@ -1680,35 +1667,35 @@ if [ ${do_gfail_page_size:-no} = yes ]; then
if [ -e ./$GFAIL_FIFO_READER_TO_WRITER ]; then # If reader fifo file is found
rm -f ./$GFAIL_FIFO_READER_TO_WRITER
fi
- #
- echo launch vfd_swmr_gfail_writer -q -m 10 -B 8192 -s 8192 -n 320000
- catch_out_err_and_rc vfd_swmr_gfail_page_size_writer \
- ../vfd_swmr_gfail_writer -q -m 10 -B 8192 -s 8192 -n 320000 &
- pid_writer=$!
-
- echo launch vfd_swmr_gfail_reader -m 10 -B 8192 -s 8192 -n 320000
- catch_out_err_and_rc vfd_swmr_gfail_page_size_reader \
- ../vfd_swmr_gfail_reader -m 10 -B 8192 -s 8192 -n 320000 &
- pid_reader=$!
-
- # Wait for the reader to finish before signaling the
- # writer to quit: the writer holds the file open so that the
- # reader will find the shadow file when it opens
- # the .h5 file.
- wait $pid_reader
- wait $pid_writer
-
- # Collect exit code of the reader
- if [ $(cat vfd_swmr_gfail_page_size_reader.rc) -ne 0 ]; then
- echo reader had error
- nerrors=$((nerrors + 1))
- fi
- # Collect exit code of the writer
- if [ $(cat vfd_swmr_gfail_page_size_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
+ echo launch vfd_swmr_gfail_writer -q -m 10 -B 8192 -s 8192 -n 320000
+ catch_out_err_and_rc vfd_swmr_gfail_page_size_writer \
+ $testdir/vfd_swmr_gfail_writer -q -m 10 -B 8192 -s 8192 -n 320000 &
+ pid_writer=$!
+
+ echo launch vfd_swmr_gfail_reader -m 10 -B 8192 -s 8192 -n 320000
+ catch_out_err_and_rc vfd_swmr_gfail_page_size_reader \
+ $testdir/vfd_swmr_gfail_reader -m 10 -B 8192 -s 8192 -n 320000 &
+ pid_reader=$!
+
+ # Wait for the reader to finish before signaling the
+ # writer to quit: the writer holds the file open so that the
+ # reader will find the shadow file when it opens
+ # the .h5 file.
+ wait $pid_reader
+ wait $pid_writer
+
+ # Collect exit code of the reader
+ if [ $(cat vfd_swmr_gfail_page_size_reader.rc) -ne 0 ]; then
+ echo reader had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Collect exit code of the writer
+ if [ $(cat vfd_swmr_gfail_page_size_writer.rc) -ne 0 ]; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
# Clean up output files
rm -f vfd_swmr_gfail_page_size_writer.{out,rc}
@@ -1728,7 +1715,7 @@ fi
#
#
if [ ${do_gfail_index_space:-no} = yes ]; then
- #
+
# Clean up any existing fifo files from previous runs
if [ -e ./$GFAIL_FIFO_WRITER_TO_READER ]; then # If writer fifo file is found
rm -f ./$GFAIL_FIFO_WRITER_TO_READER
@@ -1736,39 +1723,39 @@ if [ ${do_gfail_index_space:-no} = yes ]; then
if [ -e ./$GFAIL_FIFO_READER_TO_WRITER ]; then # If reader fifo file is found
rm -f ./$GFAIL_FIFO_READER_TO_WRITER
fi
- #
- echo launch vfd_swmr_gfail_writer -q -m 50 -t 10 -n 1000000 ......may take some time......
- catch_out_err_and_rc vfd_swmr_gfail_index_space_writer \
- ../vfd_swmr_gfail_writer -q -m 50 -t 10 -n 1000000 &
- pid_writer=$!
-
- echo launch vfd_swmr_gfail_reader -m 50 -t 10 -n 1000000 ......may take some time......
- catch_out_err_and_rc vfd_swmr_gfail_index_space_reader \
- ../vfd_swmr_gfail_reader -m 50 -t 10 -n 1000000 &
- pid_reader=$!
-
- # Wait for the reader to finish before signaling the
- # writer to quit: the writer holds the file open so that the
- # reader will find the shadow file when it opens
- # the .h5 file.
- wait $pid_reader
- wait $pid_writer
-
- # Collect exit code of the reader
- if [ $(cat vfd_swmr_gfail_index_space_reader.rc) -ne 0 ]; then
- echo reader had error
- nerrors=$((nerrors + 1))
- fi
- # Collect exit code of the writer
- if [ $(cat vfd_swmr_gfail_index_space_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
+ echo launch vfd_swmr_gfail_writer -q -m 50 -t 10 -n 1000000 ......may take some time......
+ catch_out_err_and_rc vfd_swmr_gfail_index_space_writer \
+ $testdir/vfd_swmr_gfail_writer -q -m 50 -t 10 -n 1000000 &
+ pid_writer=$!
- # Clean up output files
- rm -f vfd_swmr_gfail_index_space_writer.{out,rc}
- rm -f vfd_swmr_gfail_index_space_reader.*.{out,rc}
+ echo launch vfd_swmr_gfail_reader -m 50 -t 10 -n 1000000 ......may take some time......
+ catch_out_err_and_rc vfd_swmr_gfail_index_space_reader \
+ $testdir/vfd_swmr_gfail_reader -m 50 -t 10 -n 1000000 &
+ pid_reader=$!
+
+ # Wait for the reader to finish before signaling the
+ # writer to quit: the writer holds the file open so that the
+ # reader will find the shadow file when it opens
+ # the .h5 file.
+ wait $pid_reader
+ wait $pid_writer
+
+ # Collect exit code of the reader
+ if [ $(cat vfd_swmr_gfail_index_space_reader.rc) -ne 0 ]; then
+ echo reader had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Collect exit code of the writer
+ if [ $(cat vfd_swmr_gfail_index_space_writer.rc) -ne 0 ]; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Clean up output files
+ rm -f vfd_swmr_gfail_index_space_writer.{out,rc}
+ rm -f vfd_swmr_gfail_index_space_reader.*.{out,rc}
fi
###############################################################################
@@ -1779,7 +1766,7 @@ $DPRINT nerrors $nerrors nsofterrors $nsofterrors
if test $nerrors -eq 0 ; then
echo "VFD SWMR tests passed."
if test $nsofterrors -ne 0 ; then
- echo
+ echo
echo "${nsofterrors} expected errors occurred. Expected errors are ok."
fi
if test -z "$HDF5_NOCLEANUP"; then
diff --git a/testpar/t_2Gio.c b/testpar/t_2Gio.c
index 911be2c..79241c6 100644
--- a/testpar/t_2Gio.c
+++ b/testpar/t_2Gio.c
@@ -3644,7 +3644,7 @@ test_actual_io_mode(int selection_mode)
/* Set the threshold number of processes per chunk to twice mpi_size.
* This will prevent the threshold from ever being met, thus forcing
* multi chunk io instead of link chunk io.
- * This is via deault.
+ * This is via default.
*/
if (multi_chunk_io) {
/* force multi-chunk-io by threshold */
diff --git a/testpar/t_cache.c b/testpar/t_cache.c
index 70ada01..d889b3b 100644
--- a/testpar/t_cache.c
+++ b/testpar/t_cache.c
@@ -325,7 +325,7 @@ struct mssg_t {
unsigned magic;
};
-MPI_Datatype mpi_mssg_t; /* for MPI derived type created from mssg */
+MPI_Datatype mpi_mssg_t = MPI_DATATYPE_NULL; /* for MPI derived type created from mssg */
/*****************************************************************************/
/************************** function declarations ****************************/
@@ -565,8 +565,8 @@ set_up_file_communicator(void)
int mpi_result;
int num_excluded_ranks;
int excluded_ranks[1];
- MPI_Group file_group;
- MPI_Group world_group;
+ MPI_Group file_group = MPI_GROUP_NULL;
+ MPI_Group world_group = MPI_GROUP_NULL;
if (success) {
@@ -674,6 +674,12 @@ set_up_file_communicator(void)
}
}
+ if (file_group != MPI_GROUP_NULL)
+ MPI_Group_free(&file_group);
+
+ if (world_group != MPI_GROUP_NULL)
+ MPI_Group_free(&world_group);
+
return (success);
} /* set_up_file_communicator() */
@@ -1195,6 +1201,9 @@ takedown_derived_types(void)
hbool_t success = TRUE;
int result;
+ if (mpi_mssg_t == MPI_DATATYPE_NULL)
+ return (success);
+
result = MPI_Type_free(&mpi_mssg_t);
if (result != MPI_SUCCESS) {
@@ -6724,7 +6733,7 @@ smoke_check_6(int metadata_write_strategy)
if (FALSE != entry_ptr->header.coll_access) {
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Entry inserted indepedently marked as collective.\n",
+ HDfprintf(stdout, "%d:%s: Entry inserted independently marked as collective.\n",
world_mpi_rank, __func__);
}
}
@@ -6780,7 +6789,7 @@ smoke_check_6(int metadata_write_strategy)
if (FALSE != entry_ptr->header.coll_access) {
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Entry inserted indepedently marked as collective.\n",
+ HDfprintf(stdout, "%d:%s: Entry inserted independently marked as collective.\n",
world_mpi_rank, __func__);
}
}
@@ -7047,6 +7056,10 @@ finish:
/* make sure all processes are finished before final report, cleanup
* and exit.
*/
+
+ if (file_mpi_comm != MPI_COMM_NULL)
+ MPI_Comm_free(&file_mpi_comm);
+
MPI_Barrier(MPI_COMM_WORLD);
if (MAINPROCESS) { /* only process 0 reports */
HDprintf("===================================\n");
diff --git a/testpar/t_dset.c b/testpar/t_dset.c
index 8616bef..ee4438c 100644
--- a/testpar/t_dset.c
+++ b/testpar/t_dset.c
@@ -3202,7 +3202,7 @@ test_actual_io_mode(int selection_mode)
/* Set the threshold number of processes per chunk to twice mpi_size.
* This will prevent the threshold from ever being met, thus forcing
* multi chunk io instead of link chunk io.
- * This is via deault.
+ * This is via default.
*/
if (multi_chunk_io) {
/* force multi-chunk-io by threshold */
diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c
index 96cbc4b..39d7722 100644
--- a/testpar/t_mpi.c
+++ b/testpar/t_mpi.c
@@ -768,6 +768,24 @@ test_mpio_derived_dtype(char *filename)
return 1;
}
+ if ((mpi_err = MPI_Type_free(&filetype)) != MPI_SUCCESS) {
+ MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
+ HDprintf("MPI_Type_free failed (%s)\n", mpi_err_str);
+ return 1;
+ }
+
+ if ((mpi_err = MPI_Type_free(&adv_filetype)) != MPI_SUCCESS) {
+ MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
+ HDprintf("MPI_Type_free failed (%s)\n", mpi_err_str);
+ return 1;
+ }
+
+ if ((mpi_err = MPI_Type_free(&filetypenew)) != MPI_SUCCESS) {
+ MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
+ HDprintf("MPI_Type_free failed (%s)\n", mpi_err_str);
+ return 1;
+ }
+
if ((mpi_err = MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_RDONLY, MPI_INFO_NULL, &fh)) !=
MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
@@ -848,7 +866,9 @@ test_mpio_special_collective(char *filename)
{
int mpi_size, mpi_rank;
MPI_File fh;
- MPI_Datatype etype, buftype, filetype;
+ MPI_Datatype etype;
+ MPI_Datatype filetype = MPI_BYTE;
+ MPI_Datatype buftype = MPI_BYTE;
char mpi_err_str[MPI_MAX_ERROR_STRING];
int mpi_err_strlen;
int mpi_err;
@@ -906,10 +926,6 @@ test_mpio_special_collective(char *filename)
return 1;
} /* end if */
} /* end if */
- else {
- filetype = MPI_BYTE;
- buftype = MPI_BYTE;
- } /* end else */
/* Open a file */
if ((mpi_err = MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_RDWR | MPI_MODE_CREATE, MPI_INFO_NULL,
@@ -931,6 +947,12 @@ test_mpio_special_collective(char *filename)
return 1;
} /* end if */
+ if (filetype != MPI_BYTE && (mpi_err = MPI_Type_free(&filetype)) != MPI_SUCCESS) {
+ MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
+ HDprintf("MPI_Type_free failed (%s)\n", mpi_err_str);
+ return 1;
+ }
+
/* Collectively write into the file */
if ((mpi_err = MPI_File_write_at_all(fh, mpi_off, writedata, bufcount, buftype, &mpi_stat)) !=
MPI_SUCCESS) {
@@ -940,6 +962,12 @@ test_mpio_special_collective(char *filename)
return 1;
} /* end if */
+ if (buftype != MPI_BYTE && (mpi_err = MPI_Type_free(&buftype)) != MPI_SUCCESS) {
+ MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
+ HDprintf("MPI_Type_free failed (%s)\n", mpi_err_str);
+ return 1;
+ }
+
/* Close the file */
if ((mpi_err = MPI_File_close(&fh)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
diff --git a/testpar/t_prop.c b/testpar/t_prop.c
index 606e100..930b895 100644
--- a/testpar/t_prop.c
+++ b/testpar/t_prop.c
@@ -535,10 +535,10 @@ external_links(void)
for (i = 0; i < 2; i++) {
- if (i == 0) {
+ comm = MPI_COMM_WORLD;
+
+ if (i == 0)
doIO = 1;
- comm = MPI_COMM_WORLD;
- }
else {
doIO = mpi_rank % 2;
mrc = MPI_Comm_split(MPI_COMM_WORLD, doIO, mpi_rank, &comm);
@@ -614,11 +614,11 @@ external_links(void)
ret = H5Fclose(fid);
VRFY((ret >= 0), "H5Fclose succeeded");
+ }
- if (i == 1) {
- mrc = MPI_Comm_free(&comm);
- VRFY((mrc == MPI_SUCCESS), "MPI_Comm_free succeeded");
- }
+ if (comm != MPI_COMM_WORLD) {
+ mrc = MPI_Comm_free(&comm);
+ VRFY((mrc == MPI_SUCCESS), "MPI_Comm_free succeeded");
}
}