Compare commits
35 Commits
H5hut-1.99.1
...
1.99.3
| Author | SHA1 | Date | |
|---|---|---|---|
| 7baf635bef | |||
| 87eae5c238 | |||
| 562f9ac3e3 | |||
| cfc13be3af | |||
| ade15f37ca | |||
| ad6bcf73d7 | |||
| 601bebc183 | |||
| ad7c1cf026 | |||
| 375132fac9 | |||
| b47448390e | |||
| 91eeefb9d2 | |||
| 9bdff77a00 | |||
| bb5bbb4216 | |||
| 2a2c461f71 | |||
| 87feccada8 | |||
| ed913eaa0f | |||
| 0b94f58cc9 | |||
| 4818fa0efb | |||
| 5b6e145e87 | |||
| 22c45153a8 | |||
| a7b9621850 | |||
| f79b06ef4d | |||
| 1a8433681f | |||
| 0dbb8f22e3 | |||
| 532da439a6 | |||
| 7075ab7712 | |||
| 5bd6ab7109 | |||
| f3517f3775 | |||
| 30ea30603e | |||
| 1f8f6cddde | |||
| 11fd3c10c5 | |||
| c676222a03 | |||
| 09cad98413 | |||
| 53b8850329 | |||
| 808d489564 |
+7
-7
@@ -368,7 +368,6 @@ src/C++/Makefile.am -text
|
||||
src/C/H5.c -text
|
||||
src/C/H5Block.c -text
|
||||
src/C/H5Block_readwrite.c -text
|
||||
src/C/H5Fed.c -text
|
||||
src/C/H5Fed_adjacency.c -text
|
||||
src/C/H5Fed_inquiry.c -text
|
||||
src/C/H5Fed_retrieve.c -text
|
||||
@@ -392,6 +391,7 @@ src/Fortran/H5_attribs_F.c -text
|
||||
src/Fortran/Makefile.am -text
|
||||
src/Fortran/TestUnderscore.f -text
|
||||
src/Fortran/TestUnderscoreC.c -text
|
||||
src/Fortran/generate-h5-attribs-f.py -text
|
||||
src/Makefile.am -text
|
||||
src/h5core/Makefile.am -text
|
||||
src/h5core/h5_attach.c -text
|
||||
@@ -435,18 +435,17 @@ src/h5core/h5t_adjacencies.c -text
|
||||
src/h5core/h5t_adjacencies_private.h -text
|
||||
src/h5core/h5t_adjacencies_tetm.c -text
|
||||
src/h5core/h5t_adjacencies_trim.c -text
|
||||
src/h5core/h5t_consts.c -text
|
||||
src/h5core/h5t_consts_private.h -text
|
||||
src/h5core/h5t_core_private.h -text
|
||||
src/h5core/h5t_errorhandling.c -text
|
||||
src/h5core/h5t_errorhandling_private.h -text
|
||||
src/h5core/h5t_hsearch.c -text
|
||||
src/h5core/h5t_hsearch_private.h -text
|
||||
src/h5core/h5t_inquiry.c -text
|
||||
src/h5core/h5t_map.c -text
|
||||
src/h5core/h5t_map_private.h -text
|
||||
src/h5core/h5t_openclose.c -text
|
||||
src/h5core/h5t_openclose_private.h -text
|
||||
src/h5core/h5t_model.c -text
|
||||
src/h5core/h5t_model_private.h -text
|
||||
src/h5core/h5t_model_tetm.c -text
|
||||
src/h5core/h5t_model_trim.c -text
|
||||
src/h5core/h5t_readwrite.c -text
|
||||
src/h5core/h5t_readwrite_private.h -text
|
||||
src/h5core/h5t_readwrite_tetm.c -text
|
||||
@@ -501,7 +500,7 @@ src/include/h5core/h5t_adjacencies.h -text
|
||||
src/include/h5core/h5t_core.h -text
|
||||
src/include/h5core/h5t_inquiry.h -text
|
||||
src/include/h5core/h5t_map.h -text
|
||||
src/include/h5core/h5t_openclose.h -text
|
||||
src/include/h5core/h5t_model.h -text
|
||||
src/include/h5core/h5t_readwrite.h -text
|
||||
src/include/h5core/h5t_ref_elements.h -text
|
||||
src/include/h5core/h5t_retrieve.h -text
|
||||
@@ -541,6 +540,7 @@ test/H5Part/H5testF.f -text
|
||||
test/H5Part/H5testFpar.f90 -text
|
||||
test/H5Part/Makefile.am -text
|
||||
test/Makefile.am -text
|
||||
test/h5_attach_test.c -text
|
||||
test/h5b_read.c -text
|
||||
test/h5b_test.c -text
|
||||
test/h5b_write.c -text
|
||||
|
||||
@@ -43,16 +43,20 @@ test/H5Block/Makefile.in
|
||||
test/H5Fed/.deps
|
||||
test/H5Fed/Makefile
|
||||
test/H5Fed/Makefile.in
|
||||
test/H5Fed/large_tet.h5
|
||||
test/H5Fed/simple_tet.h5
|
||||
test/H5Fed/simple_triangle.h5
|
||||
test/H5Fed/small_tet.h5
|
||||
test/H5Fed/tetmesh_adjacencies
|
||||
test/H5Fed/tetmesh_read
|
||||
test/H5Fed/tetmesh_read_tags
|
||||
test/H5Fed/tetmesh_write
|
||||
test/H5Fed/tetmesh_write2
|
||||
test/H5Fed/tetmesh_write_tags
|
||||
test/H5Fed/trimesh_adjacencies
|
||||
test/H5Fed/trimesh_read
|
||||
test/H5Fed/trimesh_write
|
||||
test/H5Fed/trimesh_write_dunetest
|
||||
test/H5Part/Bench
|
||||
test/H5Part/H5PartAndreasTest
|
||||
test/H5Part/H5PartTestP
|
||||
@@ -61,6 +65,8 @@ test/H5Part/Makefile
|
||||
test/H5Part/Makefile.in
|
||||
test/Makefile
|
||||
test/Makefile.in
|
||||
test/h5_attach.h5
|
||||
test/h5_attach_test
|
||||
test/h5b_test
|
||||
test/h5u_test
|
||||
tools/.deps
|
||||
|
||||
+20
-19
@@ -130,23 +130,25 @@ if test "x$uname" = "xAIX"; then
|
||||
AC_AIX
|
||||
fi
|
||||
|
||||
#if test -n "$MPIPATH"; then
|
||||
# PATH="$MPIPATH/bin:$PATH"
|
||||
#fi
|
||||
|
||||
# Determine a C compiler to use.
|
||||
# Determine a C/C++ compiler to use.
|
||||
# If CC is not already set in the environment, check for gcc and cc, then
|
||||
# for other C compilers.
|
||||
# Set output variable CC to the name of the compiler found.
|
||||
AC_PROG_CC(pgcc pathcc icc cc_r gcc cc)
|
||||
|
||||
|
||||
# Determine a C++ compiler to use.
|
||||
# Check if the environment variable CXX or CCC (in that order) is set;
|
||||
# if so, then set output variable CXX to its value.
|
||||
# Otherwise, if the macro is invoked without an argument,
|
||||
# then search for a C++ compiler under the likely names (first g++ and c++
|
||||
# then other names).
|
||||
# If none of those checks succeed, then as a last resort set CXX to g++.
|
||||
AC_PROG_CXX(pgCC pathCC icc cc_r g++ gcc cc)
|
||||
|
||||
if test "x$USE_PARALLEL" = "xyes"; then
|
||||
AC_PROG_CC(mpicc)
|
||||
AC_PROG_CXX(mpicxx)
|
||||
CC=`which $CC`
|
||||
CXX=`which $CXX`
|
||||
else
|
||||
AC_PROG_CC(pgcc pathcc icc cc_r gcc cc)
|
||||
AC_PROG_CXX(pgCC pathCC icc cc_r g++ gcc cc)
|
||||
CC=`which $CC`
|
||||
CXX=`which $CXX`
|
||||
fi
|
||||
|
||||
# Set output variable INSTALL to the path of a BSD-compatible install program,
|
||||
# if one is found in the current PATH.
|
||||
@@ -194,8 +196,8 @@ AC_MSG_CHECKING([if C interface enabled])
|
||||
if test "X$USE_C" = "Xyes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
BINDINGS="$BINDINGS C"
|
||||
LIB_C="libH5hutC.a"
|
||||
BUILD_LIBS="$BUILD_LIBS $LIB_C"
|
||||
LIB_C="../lib/libH5hutC.a"
|
||||
BUILD_LIBS="$BUILD_LIBS libH5hutC.a"
|
||||
BUILD_TESTS="$BUILD_TESTS h5u_test h5b_test"
|
||||
BUILD_TOOLS="$BUILD_TOOLS h5hutcc"
|
||||
fi
|
||||
@@ -205,8 +207,8 @@ AC_MSG_CHECKING([if fortran interface enabled])
|
||||
if test "X$USE_FORTRAN" = "Xyes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
BINDINGS="$BINDINGS Fortran"
|
||||
LIB_FORTRAN="libH5hutF.a"
|
||||
BUILD_LIBS="$BUILD_LIBS $LIB_FORTRAN"
|
||||
LIB_FORTRAN="../lib/libH5hutF.a"
|
||||
BUILD_LIBS="$BUILD_LIBS libH5hutF.a"
|
||||
|
||||
AC_PROG_FC(pgf90 ifort xlf_r pathf90 g95 g90 ftn gfortran)
|
||||
if test -z "$FC" ; then
|
||||
@@ -507,8 +509,7 @@ AC_CONFIG_FILES([
|
||||
src/h5core/Makefile
|
||||
src/Fortran/Makefile
|
||||
test/Makefile
|
||||
test/H5Fed/Makefile
|
||||
test/H5Part/Makefile
|
||||
test/H5Fed/Makefile
|
||||
tools/Makefile
|
||||
tools/h5hutcc
|
||||
])
|
||||
|
||||
+37
-19
@@ -41,6 +41,16 @@
|
||||
Open file with name \c filbename. This function is available in the parallel
|
||||
and serial version. In the serial case \c comm may have any value.
|
||||
|
||||
File mode flags are:
|
||||
- H5_O_RDONLY: only reading allowed
|
||||
- H5_O_WRONLY: create new file, dataset must not exist
|
||||
- H5_O_APPEND: allows to append a new datasets to an existing file
|
||||
- H5_O_RDWR: dataset may exist
|
||||
|
||||
You can also select a "virtual file driver" in the HDF5 layer using:
|
||||
- H5_VFD_INDEPENDENT: MPI-IO in independent (asynchronous) mode
|
||||
- H5_VFD_MPIPOSIX: parallel I/O implemented directly by HDF5, bypassing MPI-IO
|
||||
|
||||
\return File handle.
|
||||
\return NULL on error.
|
||||
*/
|
||||
@@ -50,14 +60,16 @@ H5OpenFile (
|
||||
h5_int32_t flags, /*!< file open flags */
|
||||
MPI_Comm comm /*!< MPI communicator */
|
||||
) {
|
||||
H5_API_ENTER (h5_file_p);
|
||||
H5_API_ENTER2 (h5_file_p,
|
||||
"filename=\"%s\", flags=%d, ...",
|
||||
filename, flags);
|
||||
H5_API_RETURN (h5_open_file (filename, flags, comm));
|
||||
}
|
||||
|
||||
/*!
|
||||
\ingroup h5hut_file
|
||||
|
||||
Close file.
|
||||
Close file and free all memory associated with the file handle.
|
||||
|
||||
\return \c H5_SUCCESS or error code
|
||||
*/
|
||||
@@ -65,14 +77,14 @@ h5_err_t
|
||||
H5CloseFile (
|
||||
h5_file_t* const f /*!< file handle */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
H5_API_RETURN (h5_close_file (f));
|
||||
}
|
||||
|
||||
/*!
|
||||
\ingroup h5hut_file
|
||||
|
||||
Close file.
|
||||
Verify that the file handle points to a valid H5hut file structure.
|
||||
|
||||
\return \c H5_SUCCESS or error code
|
||||
*/
|
||||
@@ -80,7 +92,7 @@ h5_err_t
|
||||
H5CheckFile (
|
||||
h5_file_t* const f /*!< file handle */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
H5_API_RETURN (h5_check_filehandle (f));
|
||||
}
|
||||
|
||||
@@ -100,7 +112,9 @@ H5SetStepNameFormat (
|
||||
const char* name, /*!< Prefix */
|
||||
const h5_int64_t width /*!< Width of the number */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER3 (h5_err_t,
|
||||
"f=0x%p, name=\"%s\", width=%lld",
|
||||
f, name, (long long) width);
|
||||
H5_API_RETURN (h5_set_stepname_fmt (f, name, width));
|
||||
}
|
||||
|
||||
@@ -119,7 +133,9 @@ H5GetStepNameFormat (
|
||||
const h5_size_t l_name, /*!< length of buffer name */
|
||||
int* width /*!< OUT: Width of the number */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER4 (h5_err_t,
|
||||
"f=0x%p, name=0x%p, l_name=%llu, width=0x%p",
|
||||
f, name, (unsigned long long)l_name, width);
|
||||
H5_API_RETURN (h5_get_stepname_fmt (f, name, l_name, width));
|
||||
}
|
||||
|
||||
@@ -135,8 +151,7 @@ H5SetStep (
|
||||
h5_file_t* const f, /*!< [in] Handle to open file */
|
||||
const h5_id_t step /*!< [in] Step to set. */
|
||||
) {
|
||||
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER2 (h5_err_t, "f=0x%p, step=%lld", f, (long long)step);
|
||||
H5_API_RETURN (h5_set_step (f, step));
|
||||
}
|
||||
|
||||
@@ -151,7 +166,7 @@ h5_id_t
|
||||
H5GetStep (
|
||||
h5_file_t* const f /*!< Handle to open file */
|
||||
) {
|
||||
H5_API_ENTER (h5_id_t);
|
||||
H5_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
H5_API_RETURN (h5_get_step (f));
|
||||
}
|
||||
|
||||
@@ -169,7 +184,7 @@ int
|
||||
H5GetNumProcs (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_API_ENTER (int);
|
||||
H5_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
H5_API_RETURN (h5_get_num_procs(f));
|
||||
}
|
||||
|
||||
@@ -190,7 +205,7 @@ h5_ssize_t
|
||||
H5GetNumSteps (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_API_ENTER (h5_ssize_t);
|
||||
H5_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
H5_API_RETURN (h5_get_num_steps(f));
|
||||
}
|
||||
|
||||
@@ -209,7 +224,10 @@ H5HasStep (
|
||||
h5_file_t* const f,
|
||||
h5_id_t stepno
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER2 (h5_err_t,
|
||||
"f=0x%p, stepno=%lld",
|
||||
f,
|
||||
(long long)stepno);
|
||||
H5_API_RETURN (h5_has_step (f, stepno));
|
||||
}
|
||||
|
||||
@@ -224,7 +242,7 @@ h5_err_t
|
||||
H5StartTraverseSteps (
|
||||
h5_file_t* const f /*!< Handle to open file */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
H5_API_RETURN (h5_start_traverse_steps (f));
|
||||
}
|
||||
|
||||
@@ -239,7 +257,7 @@ h5_err_t
|
||||
H5TraverseSteps (
|
||||
h5_file_t* const f /*!< Handle to open file */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
H5_API_RETURN (h5_traverse_steps (f));
|
||||
}
|
||||
|
||||
@@ -265,7 +283,7 @@ H5SetThrottle (
|
||||
h5_file_t* f,
|
||||
int factor
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER2 (h5_err_t, "f=0x%p, factor=%d", f, factor);
|
||||
H5_API_RETURN (h5_set_throttle(f, factor));
|
||||
}
|
||||
#endif // PARALLEL_IO
|
||||
@@ -281,7 +299,7 @@ h5_err_t
|
||||
H5SetVerbosityLevel (
|
||||
const h5_id_t level
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER1 (h5_err_t, "level=%lld", (long long) level);
|
||||
H5_API_RETURN (h5_set_debuglevel (level));
|
||||
}
|
||||
|
||||
@@ -296,7 +314,7 @@ h5_err_t
|
||||
H5SetErrorHandler (
|
||||
h5_errorhandler_t handler
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER1 (h5_err_t, "handler=0x%p", handler);
|
||||
H5_API_RETURN (h5_set_errorhandler (handler));
|
||||
}
|
||||
|
||||
@@ -311,7 +329,7 @@ h5_errorhandler_t
|
||||
H5GetErrorHandler (
|
||||
void
|
||||
) {
|
||||
H5_API_ENTER (h5_errorhandler_t);
|
||||
H5_API_ENTER0 (h5_errorhandler_t);
|
||||
H5_API_RETURN (h5_get_errorhandler());
|
||||
}
|
||||
|
||||
|
||||
+122
-27
@@ -72,7 +72,7 @@ h5_int64_t
|
||||
H5Block3dHasView (
|
||||
h5_file_t *const f /*!< IN: File handle */
|
||||
) {
|
||||
H5_API_ENTER (h5_int64_t);
|
||||
H5_API_ENTER1 (h5_int64_t, "f=0x%p", f);
|
||||
H5_API_RETURN (h5b_3d_has_view (f));
|
||||
}
|
||||
|
||||
@@ -99,7 +99,15 @@ H5Block3dSetView (
|
||||
const h5_int64_t k_start, /*!< IN: start index of \c k */
|
||||
const h5_int64_t k_end /*!< IN: end index of \c k */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER7 (h5_err_t,
|
||||
"f=0X%p, "
|
||||
"i_start=%lld, i_end=%lld, "
|
||||
"j_start=%lld, j_end=%lld, "
|
||||
"k_start=%lld, k_end=%lld",
|
||||
f,
|
||||
(long long)i_start, (long long)i_end,
|
||||
(long long)j_start, (long long)j_end,
|
||||
(long long)k_start, (long long)k_end);
|
||||
H5_API_RETURN (h5b_3d_set_view(f, i_start, i_end, j_start, j_end, k_start, k_end));
|
||||
}
|
||||
|
||||
@@ -120,7 +128,15 @@ H5Block3dGetView (
|
||||
h5_size_t *k_start, /*!< OUT: start index of \c k */
|
||||
h5_size_t *k_end /*!< OUT: end index of \c k */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER7 (h5_err_t,
|
||||
"f=0X%p, "
|
||||
"i_start=0x%p, i_end=0x%p, "
|
||||
"j_start=0x%p, j_end=0x%p, "
|
||||
"k_start=0x%p, k_end=0x%p",
|
||||
f,
|
||||
i_start, i_end,
|
||||
j_start, j_end,
|
||||
k_start, k_end);
|
||||
H5_API_RETURN (h5b_3d_get_view (f, i_start, i_end, j_start, j_end, k_start, k_end));
|
||||
}
|
||||
|
||||
@@ -141,7 +157,15 @@ H5Block3dGetReducedView (
|
||||
h5_size_t *const k_start, /*!< OUT: start index of \c j */
|
||||
h5_size_t *const k_end /*!< OUT: end index of \c j */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER7 (h5_err_t,
|
||||
"f=0X%p, "
|
||||
"i_start=0x%p, i_end=0x%p, "
|
||||
"j_start=0x%p, j_end=0x%p, "
|
||||
"k_start=0x%p, k_end=0x%p",
|
||||
f,
|
||||
i_start, i_end,
|
||||
j_start, j_end,
|
||||
k_start, k_end);
|
||||
H5_API_RETURN (h5b_3d_get_reduced_view(f, i_start, i_end, j_start, j_end, k_start, k_end));
|
||||
}
|
||||
|
||||
@@ -160,7 +184,12 @@ H5Block3dSetChunk (
|
||||
const h5_size_t j, /*!< IN: size of \c j */
|
||||
const h5_size_t k /*!< IN: size of \c k */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER4 (h5_err_t,
|
||||
"f=0x%p, i=%llu, j=%llu, k=%llu",
|
||||
f,
|
||||
(long long unsigned)i,
|
||||
(long long unsigned)j,
|
||||
(long long unsigned)k);
|
||||
H5_API_RETURN (h5b_3d_set_chunk(f, i, j, k));
|
||||
}
|
||||
|
||||
@@ -179,7 +208,9 @@ H5Block3dGetChunk (
|
||||
h5_size_t *const j, /*!< OUT: size of \c j */
|
||||
h5_size_t *const k /*!< OUT: size of \c k */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER4 (h5_err_t,
|
||||
"f=0x%p, i=0x%p, j=0x%p, k=0x%p",
|
||||
f, i, j, k);
|
||||
H5_API_RETURN (h5b_3d_get_chunk(f, field_name, i, j, k));
|
||||
}
|
||||
|
||||
@@ -205,7 +236,12 @@ H5Block3dSetGrid (
|
||||
const h5_size_t j, /*!< IN: dimension in \c j */
|
||||
const h5_size_t k /*!< IN: dimension in \c k */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER4 (h5_err_t,
|
||||
"f=0x%p, i=%llu, j=%llu, k=%llu",
|
||||
f,
|
||||
(long long unsigned)i,
|
||||
(long long unsigned)j,
|
||||
(long long unsigned)k);
|
||||
H5_API_RETURN (h5b_3d_set_grid(f, i, j, k));
|
||||
}
|
||||
|
||||
@@ -225,7 +261,9 @@ H5Block3dGetGridCoords (
|
||||
h5_int64_t *j, /*!< OUT: index in \c j */
|
||||
h5_int64_t *k /*!< OUT: index in \c k */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER5 (h5_err_t,
|
||||
"f=0x%p, proc=%d, i=0x%p, j=0x%p, k=0x%p",
|
||||
f, proc, i, j, k);
|
||||
H5_API_RETURN (h5b_3d_get_grid_coords(f, proc, i, j, k));
|
||||
}
|
||||
|
||||
@@ -247,7 +285,12 @@ H5Block3dSetDims (
|
||||
const h5_size_t j, /*!< IN: dimension in \c j */
|
||||
const h5_size_t k /*!< IN: dimension in \c k */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER4 (h5_err_t,
|
||||
"f=0x%p, i=%llu, j=%llu, k=%llu",
|
||||
f,
|
||||
(long long unsigned)i,
|
||||
(long long unsigned)j,
|
||||
(long long unsigned)k);
|
||||
H5_API_RETURN (h5b_3d_set_dims(f, i, j, k));
|
||||
}
|
||||
#endif
|
||||
@@ -271,7 +314,12 @@ H5Block3dSetHalo (
|
||||
const h5_size_t j, /*!< IN: radius in \c j */
|
||||
const h5_size_t k /*!< IN: radius in \c k */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER4 (h5_err_t,
|
||||
"f=0x%p, i=%llu, j=%llu, k=%llu",
|
||||
f,
|
||||
(long long unsigned)i,
|
||||
(long long unsigned)j,
|
||||
(long long unsigned)k);
|
||||
H5_API_RETURN (h5b_3d_set_halo(f, i, j, k));
|
||||
}
|
||||
|
||||
@@ -282,11 +330,11 @@ H5Block3dSetHalo (
|
||||
|
||||
\return \c H5_SUCCESS or error code
|
||||
*/
|
||||
h5_size_t
|
||||
h5_ssize_t
|
||||
H5BlockGetNumFields (
|
||||
h5_file_t *const f /*!< IN: file handle */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER1 (h5_ssize_t, "f=0x%p", f);
|
||||
H5_API_RETURN (h5b_get_num_fields(f));
|
||||
}
|
||||
|
||||
@@ -318,7 +366,14 @@ H5BlockGetFieldInfo (
|
||||
h5_size_t *elem_rank, /*!< OUT: element rank */
|
||||
h5_int64_t *type /*!< OUT: datatype */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER8 (h5_err_t,
|
||||
"f=0x%p, idx=%llu, "
|
||||
"name=0x%p, len_name=%llu, "
|
||||
"field_rank=0x%p, field_dims=0x%p, elem_rank=0x%p, type=0x%p",
|
||||
f, (long long unsigned)idx,
|
||||
name, (long long unsigned)len_name,
|
||||
field_rank, field_dims, elem_rank,
|
||||
type);
|
||||
H5_API_RETURN (
|
||||
h5b_get_field_info (
|
||||
f,
|
||||
@@ -348,7 +403,10 @@ H5BlockGetFieldInfoByName (
|
||||
h5_size_t *elem_rank, /*!< OUT: element rank */
|
||||
h5_int64_t *type /*!< OUT: datatype */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER6 (h5_err_t,
|
||||
"f=0x%p, name=\"%s\", "
|
||||
"field_rank=0x%p, field_dims=0x%p, elem_rank=0x%p, type=0x%p",
|
||||
f, name, field_rank, field_dims, elem_rank, type);
|
||||
H5_API_RETURN (
|
||||
h5b_get_field_info_by_name (
|
||||
f,
|
||||
@@ -374,17 +432,25 @@ H5BlockWriteFieldAttribString (
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *field_name, /*!< IN: field name */
|
||||
const char *attrib_name, /*!< IN: attribute name */
|
||||
const char *value /*!< IN: attribute value */
|
||||
const char *buffer /*!< IN: attribute value */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER4 (h5_err_t,
|
||||
"f=%p, "
|
||||
"field_name=\"%s\", "
|
||||
"attrib_name=\"%s\", "
|
||||
"buffer=\"%s\"",
|
||||
f,
|
||||
field_name,
|
||||
attrib_name,
|
||||
buffer);
|
||||
H5_API_RETURN (
|
||||
h5_write_field_attrib (
|
||||
f,
|
||||
field_name,
|
||||
attrib_name,
|
||||
H5T_NATIVE_CHAR,
|
||||
value,
|
||||
strlen(value) + 1));
|
||||
buffer,
|
||||
strlen(buffer) + 1));
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -402,7 +468,15 @@ H5BlockReadFieldAttribString (
|
||||
const char *attrib_name, /*!< IN: attribute name */
|
||||
char *buffer /*!< OUT: attribute value */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER4 (h5_err_t,
|
||||
"f=%p, "
|
||||
"field_name=\"%s\", "
|
||||
"attrib_name=\"%s\", "
|
||||
"buffer=0x%p",
|
||||
f,
|
||||
field_name,
|
||||
attrib_name,
|
||||
buffer);
|
||||
H5_API_RETURN (
|
||||
h5_read_field_attrib (
|
||||
f,
|
||||
@@ -424,7 +498,9 @@ H5BlockGetNumFieldAttribs (
|
||||
h5_file_t *const f, /*<! IN: file handle */
|
||||
const char *field_name /*<! IN: field name */
|
||||
) {
|
||||
H5_API_ENTER (h5_ssize_t);
|
||||
H5_API_ENTER2 (h5_ssize_t,
|
||||
"f=0x%p, field_name=\"%s\"",
|
||||
f, field_name);
|
||||
H5_API_RETURN (h5b_get_num_field_attribs (f, field_name));
|
||||
}
|
||||
|
||||
@@ -448,19 +524,30 @@ H5BlockGetFieldAttribInfo (
|
||||
const h5_size_t attrib_idx, /*<! IN: Index of attribute to
|
||||
get infos about */
|
||||
char *attrib_name, /*<! OUT: Name of attribute */
|
||||
const h5_size_t len_of_attrib_name,
|
||||
const h5_size_t len_attrib_name,
|
||||
/*<! IN: length of buffer \c name */
|
||||
h5_int64_t *attrib_type, /*<! OUT: Type of value. */
|
||||
h5_size_t *attrib_nelem /*<! OUT: Number of elements */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER7 (h5_err_t,
|
||||
"f=%p field_name=\"%s\", "
|
||||
"attrib_idx=%llu, "
|
||||
"attrib_name=0x%p, len_attrib_name=%llu, "
|
||||
"attrib_type=0x%p, "
|
||||
"attrib_nelem=0x%p",
|
||||
f,
|
||||
field_name,
|
||||
(long long unsigned)attrib_idx,
|
||||
attrib_name, (long long unsigned)len_attrib_name,
|
||||
attrib_type,
|
||||
attrib_nelem);
|
||||
H5_API_RETURN (
|
||||
h5b_get_field_attrib_info (
|
||||
f,
|
||||
field_name,
|
||||
attrib_idx,
|
||||
attrib_name,
|
||||
len_of_attrib_name,
|
||||
len_attrib_name,
|
||||
attrib_type,
|
||||
attrib_nelem));
|
||||
}
|
||||
@@ -483,7 +570,9 @@ H5Block3dGetFieldOrigin (
|
||||
h5_float64_t *y_origin, /*!< OUT: Y origin */
|
||||
h5_float64_t *z_origin /*!< OUT: Z origin */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER5 (h5_err_t,
|
||||
"f=0x%p, field_name=\"%s\", x_origin=0x%p, y_origin=0x%p, z_origin=0x%p",
|
||||
f, field_name, x_origin, y_origin, z_origin);
|
||||
h5_float64_t origin[3];
|
||||
|
||||
TRY (h5_read_field_attrib (
|
||||
@@ -515,7 +604,9 @@ H5Block3dSetFieldOrigin (
|
||||
const h5_float64_t y_origin, /*!< IN: Y origin */
|
||||
const h5_float64_t z_origin /*!< IN: Z origin */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER5 (h5_err_t,
|
||||
"f=0x%p, field_name=\"%s\", x_origin=%g, y_origin=%g, z_origin=%g",
|
||||
f, field_name, x_origin, y_origin, z_origin);
|
||||
h5_float64_t origin[3] = { x_origin, y_origin, z_origin };
|
||||
H5_API_RETURN (h5_write_field_attrib (
|
||||
f,
|
||||
@@ -541,7 +632,9 @@ H5Block3dGetFieldSpacing (
|
||||
h5_float64_t *y_spacing, /*!< OUT: Y spacing */
|
||||
h5_float64_t *z_spacing /*!< OUT: Z spacing */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER5 (h5_err_t,
|
||||
"f=0x%p, field_name=\"%s\", x_spacing=0x%p, y_spacing=0x%p, z_spacing=0x%p",
|
||||
f, field_name, x_spacing, y_spacing, z_spacing);
|
||||
h5_float64_t spacing[3];
|
||||
TRY (h5_read_field_attrib (
|
||||
f,
|
||||
@@ -570,7 +663,9 @@ H5Block3dSetFieldSpacing (
|
||||
const h5_float64_t y_spacing, /*!< IN: Y spacing */
|
||||
const h5_float64_t z_spacing /*!< IN: Z spacing */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER5 (h5_err_t,
|
||||
"f=0x%p, field_name=\"%s\", x_spacing=%g, y_spacing=%g, z_spacing=%g",
|
||||
f, field_name, x_spacing, y_spacing, z_spacing);
|
||||
h5_float64_t spacing[3] = { x_spacing, y_spacing, z_spacing };
|
||||
H5_API_RETURN (h5_write_field_attrib (
|
||||
f,
|
||||
|
||||
+247
-259
@@ -1,6 +1,6 @@
|
||||
|
||||
#include "H5hut.h"
|
||||
#include "h5core/h5_core.h"
|
||||
#include "H5Block_readwrite.h"
|
||||
|
||||
/*!
|
||||
\ingroup h5block_data
|
||||
@@ -15,16 +15,14 @@
|
||||
*/
|
||||
h5_err_t
|
||||
H5Block3dWriteScalarFieldFloat64 (
|
||||
h5_file_t *f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to write */
|
||||
const h5_float64_t *data /*!< IN: scalar data to write */
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to write */
|
||||
const h5_float64_t *buffer /*!< IN: pointer to write buffer */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_RETURN (
|
||||
h5b_write_scalar_data (
|
||||
f, name,
|
||||
(void*)data,
|
||||
H5T_NATIVE_DOUBLE));
|
||||
|
||||
H5_API_ENTER3 (h5_err_t, "f=0x%p, name=\"%s\", buffer=0x%p",
|
||||
f, name, buffer);
|
||||
H5_API_RETURN (h5b_write_scalar_data(f, name, (void*)buffer, H5T_NATIVE_DOUBLE ));
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -40,16 +38,14 @@ H5Block3dWriteScalarFieldFloat64 (
|
||||
*/
|
||||
h5_err_t
|
||||
H5Block3dReadScalarFieldFloat64 (
|
||||
h5_file_t *f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to read */
|
||||
h5_float64_t *data /*!< OUT: ptr to read buffer */
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to read */
|
||||
h5_float64_t *buffer /*!< OUT: pointer to read buffer */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_RETURN (
|
||||
h5b_read_scalar_data (
|
||||
f, name,
|
||||
(void*)data,
|
||||
H5T_NATIVE_DOUBLE));
|
||||
|
||||
H5_API_ENTER3 (h5_err_t, "f=0x%p, name=\"%s\", buffer=0x%p",
|
||||
f, name, buffer);
|
||||
H5_API_RETURN (h5b_read_scalar_data(f, name, (void*)buffer, H5T_NATIVE_DOUBLE));
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -57,28 +53,27 @@ H5Block3dReadScalarFieldFloat64 (
|
||||
*/
|
||||
/*!
|
||||
Write a 3-dimensional field \c name with 3-dimensional vectors as values
|
||||
from the buffers starting at \c x_data, \c y_data and \c z_data to the
|
||||
from the buffers starting at \c x_buf, \c y_buf and \c z_buf to the
|
||||
current time-step using the defined field layout. Values are 3-dimensional
|
||||
vectors with floating points (64-bit) values.
|
||||
|
||||
You must use the Fortran indexing scheme to access items in \c data.
|
||||
You must use the Fortran indexing scheme to access items in \c x_buf.
|
||||
|
||||
\return \c H5_SUCCESS or error code
|
||||
*/
|
||||
h5_err_t
|
||||
H5Block3dWriteVector3dFieldFloat64 (
|
||||
h5_file_t *f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to write */
|
||||
const h5_float64_t *x_data, /*!< IN: X axis data */
|
||||
const h5_float64_t *y_data, /*!< IN: Y axis data */
|
||||
const h5_float64_t *z_data /*!< IN: Z axis data */
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to write */
|
||||
const h5_float64_t *x_buf, /*!< IN: pointer to X axis buffer */
|
||||
const h5_float64_t *y_buf, /*!< IN: pointer to Y axis buffer */
|
||||
const h5_float64_t *z_buf /*!< IN: pointer to Z axis buffer */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_RETURN (
|
||||
h5b_write_vector3d_data(
|
||||
f, name,
|
||||
(void*)x_data, (void*)y_data, (void*)z_data,
|
||||
H5T_NATIVE_DOUBLE));
|
||||
|
||||
H5_API_ENTER5 (h5_err_t, "f=0x%p, name=\"%s\", x_buf=0x%p, y_buf=0x%p, z_buf=0x%p",
|
||||
f, name, x_buf, y_buf, z_buf);
|
||||
H5_API_RETURN(h5b_write_vector3d_data(f, name,
|
||||
(void*)x_buf, (void*)y_buf, (void*)z_buf, H5T_NATIVE_DOUBLE));
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -86,7 +81,7 @@ H5Block3dWriteVector3dFieldFloat64 (
|
||||
*/
|
||||
/*!
|
||||
Read a 3-dimensional field \c name with 3-dimensional vectors as values
|
||||
from the buffers starting at \c x_data, \c y_data and \c z_data to the
|
||||
from the buffers starting at \c x_buf, \c y_buf and \c z_buf to the
|
||||
current time-step using the defined field layout. Values are 3-dimensional
|
||||
vectors with floating points (64-bit) values.
|
||||
|
||||
@@ -96,18 +91,17 @@ H5Block3dWriteVector3dFieldFloat64 (
|
||||
*/
|
||||
h5_err_t
|
||||
H5Block3dReadVector3dFieldFloat64 (
|
||||
h5_file_t *f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to write */
|
||||
h5_float64_t *x_data, /*!< OUT: X axis data */
|
||||
h5_float64_t *y_data, /*!< OUT: Y axis data */
|
||||
h5_float64_t *z_data /*!< OUT: Z axis data */
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to write */
|
||||
h5_float64_t *const x_buf, /*!< OUT: pointer to X axis buffer */
|
||||
h5_float64_t *const y_buf, /*!< OUT: pointer to Y axis buffer */
|
||||
h5_float64_t *const z_buf /*!< OUT: pointer to Z axis buffer */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_RETURN (
|
||||
h5b_read_vector3d_data(
|
||||
f, name,
|
||||
(void*)x_data, (void*)y_data, (void*)z_data,
|
||||
H5T_NATIVE_DOUBLE));
|
||||
|
||||
H5_API_ENTER5 (h5_err_t, "f=0x%p, name=\"%s\", x_buf=0x%p, y_buf=0x%p, z_buf=0x%p",
|
||||
f, name, x_buf, y_buf, z_buf);
|
||||
H5_API_RETURN(h5b_read_vector3d_data(f, name,
|
||||
x_buf, y_buf, z_buf, H5T_NATIVE_DOUBLE));
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -123,16 +117,14 @@ H5Block3dReadVector3dFieldFloat64 (
|
||||
*/
|
||||
h5_err_t
|
||||
H5Block3dWriteScalarFieldFloat32 (
|
||||
h5_file_t *f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to write */
|
||||
const h5_float32_t *data /*!< IN: scalar data to write */
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to write */
|
||||
const h5_float32_t *buffer /*!< IN: pointer to write buffer */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_RETURN (
|
||||
h5b_write_scalar_data(
|
||||
f, name,
|
||||
(void*)data,
|
||||
H5T_NATIVE_FLOAT));
|
||||
|
||||
H5_API_ENTER3 (h5_err_t, "f=0x%p, name=\"%s\", buffer=0x%p",
|
||||
f, name, buffer);
|
||||
H5_API_RETURN (h5b_write_scalar_data(f, name, buffer, H5T_NATIVE_FLOAT ));
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -148,16 +140,14 @@ H5Block3dWriteScalarFieldFloat32 (
|
||||
*/
|
||||
h5_err_t
|
||||
H5Block3dReadScalarFieldFloat32 (
|
||||
h5_file_t *f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to read */
|
||||
h5_float32_t *data /*!< OUT: ptr to read buffer */
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to read */
|
||||
h5_float32_t *const buffer /*!< OUT: pointer to read buffer */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_RETURN (
|
||||
h5b_read_scalar_data(
|
||||
f, name,
|
||||
(void*)data,
|
||||
H5T_NATIVE_FLOAT));
|
||||
|
||||
H5_API_ENTER3 (h5_err_t, "f=0x%p, name=\"%s\", buffer=0x%p",
|
||||
f, name, buffer);
|
||||
H5_API_RETURN (h5b_read_scalar_data(f, name, buffer, H5T_NATIVE_FLOAT));
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -165,28 +155,27 @@ H5Block3dReadScalarFieldFloat32 (
|
||||
*/
|
||||
/*!
|
||||
Write a 3-dimensional field \c name with 3-dimensional vectors as values
|
||||
from the buffers starting at \c x_data, \c y_data and \c z_data to the
|
||||
from the buffers starting at \c x_buf, \c y_buf and \c z_buf to the
|
||||
current time-step using the defined field layout. Values are 3-dimensional
|
||||
vectors with floating points (32-bit) values.
|
||||
|
||||
You must use the Fortran indexing scheme to access items in \c data.
|
||||
You must use the Fortran indexing scheme to access items in \c x_buf.
|
||||
|
||||
\return \c H5_SUCCESS or error code
|
||||
*/
|
||||
h5_err_t
|
||||
H5Block3dWriteVector3dFieldFloat32 (
|
||||
h5_file_t *f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to write */
|
||||
const h5_float32_t *x_data, /*!< IN: X axis data */
|
||||
const h5_float32_t *y_data, /*!< IN: Y axis data */
|
||||
const h5_float32_t *z_data /*!< IN: Z axis data */
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to write */
|
||||
const h5_float32_t *x_buf, /*!< IN: pointer to X axis buffer */
|
||||
const h5_float32_t *y_buf, /*!< IN: pointer to Y axis buffer */
|
||||
const h5_float32_t *z_buf /*!< IN: pointer to Z axis buffer */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_RETURN (
|
||||
h5b_write_vector3d_data(
|
||||
f, name,
|
||||
(void*)x_data, (void*)y_data, (void*)z_data,
|
||||
H5T_NATIVE_FLOAT));
|
||||
|
||||
H5_API_ENTER5 (h5_err_t, "f=0x%p, name=\"%s\", x_buf=0x%p, y_buf=0x%p, z_buf=0x%p",
|
||||
f, name, x_buf, y_buf, z_buf);
|
||||
H5_API_RETURN(h5b_write_vector3d_data(f, name,
|
||||
x_buf, y_buf, z_buf, H5T_NATIVE_FLOAT));
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -194,7 +183,7 @@ H5Block3dWriteVector3dFieldFloat32 (
|
||||
*/
|
||||
/*!
|
||||
Read a 3-dimensional field \c name with 3-dimensional vectors as values
|
||||
from the buffers starting at \c x_data, \c y_data and \c z_data to the
|
||||
from the buffers starting at \c x_buf, \c y_buf and \c z_buf to the
|
||||
current time-step using the defined field layout. Values are 3-dimensional
|
||||
vectors with floating points (32-bit) values.
|
||||
|
||||
@@ -204,18 +193,17 @@ H5Block3dWriteVector3dFieldFloat32 (
|
||||
*/
|
||||
h5_err_t
|
||||
H5Block3dReadVector3dFieldFloat32 (
|
||||
h5_file_t *f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to write */
|
||||
h5_float32_t *x_data, /*!< OUT: X axis data */
|
||||
h5_float32_t *y_data, /*!< OUT: Y axis data */
|
||||
h5_float32_t *z_data /*!< OUT: Z axis data */
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to write */
|
||||
h5_float32_t *const x_buf, /*!< OUT: pointer to X axis buffer */
|
||||
h5_float32_t *const y_buf, /*!< OUT: pointer to Y axis buffer */
|
||||
h5_float32_t *const z_buf /*!< OUT: pointer to Z axis buffer */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_RETURN (
|
||||
h5b_read_vector3d_data(
|
||||
f, name,
|
||||
(void*)x_data, (void*)y_data, (void*)z_data,
|
||||
H5T_NATIVE_FLOAT));
|
||||
|
||||
H5_API_ENTER5 (h5_err_t, "f=0x%p, name=\"%s\", x_buf=0x%p, y_buf=0x%p, z_buf=0x%p",
|
||||
f, name, x_buf, y_buf, z_buf);
|
||||
H5_API_RETURN(h5b_read_vector3d_data(f, name,
|
||||
x_buf, y_buf, z_buf, H5T_NATIVE_FLOAT));
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -231,16 +219,14 @@ H5Block3dReadVector3dFieldFloat32 (
|
||||
*/
|
||||
h5_err_t
|
||||
H5Block3dWriteScalarFieldInt64 (
|
||||
h5_file_t *f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to write */
|
||||
const h5_int64_t *data /*!< IN: scalar data to write */
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to write */
|
||||
const h5_int64_t *buffer /*!< IN: pointer to write buffer */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_RETURN (
|
||||
h5b_write_scalar_data (
|
||||
f, name,
|
||||
(void*)data,
|
||||
H5T_NATIVE_INT64));
|
||||
|
||||
H5_API_ENTER3 (h5_err_t, "f=0x%p, name=\"%s\", buffer=0x%p",
|
||||
f, name, buffer);
|
||||
H5_API_RETURN (h5b_write_scalar_data(f, name, buffer, H5T_NATIVE_INT64 ));
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -256,16 +242,14 @@ H5Block3dWriteScalarFieldInt64 (
|
||||
*/
|
||||
h5_err_t
|
||||
H5Block3dReadScalarFieldInt64 (
|
||||
h5_file_t *f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to read */
|
||||
h5_int64_t *data /*!< OUT: ptr to read buffer */
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to read */
|
||||
h5_int64_t *const buffer /*!< OUT: pointer to read buffer */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_RETURN (
|
||||
h5b_read_scalar_data(
|
||||
f, name,
|
||||
(void*)data,
|
||||
H5T_NATIVE_INT64));
|
||||
|
||||
H5_API_ENTER3 (h5_err_t, "f=0x%p, name=\"%s\", buffer=0x%p",
|
||||
f, name, buffer);
|
||||
H5_API_RETURN (h5b_read_scalar_data(f, name, buffer, H5T_NATIVE_INT64));
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -273,28 +257,27 @@ H5Block3dReadScalarFieldInt64 (
|
||||
*/
|
||||
/*!
|
||||
Write a 3-dimensional field \c name with 3-dimensional vectors as values
|
||||
from the buffers starting at \c x_data, \c y_data and \c z_data to the
|
||||
from the buffers starting at \c x_buf, \c y_buf and \c z_buf to the
|
||||
current time-step using the defined field layout. Values are 3-dimensional
|
||||
vectors with integers (64-bit) values.
|
||||
|
||||
You must use the Fortran indexing scheme to access items in \c data.
|
||||
You must use the Fortran indexing scheme to access items in \c x_buf.
|
||||
|
||||
\return \c H5_SUCCESS or error code
|
||||
*/
|
||||
h5_err_t
|
||||
H5Block3dWriteVector3dFieldInt64 (
|
||||
h5_file_t *f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to write */
|
||||
const h5_int64_t *x_data, /*!< IN: X axis data */
|
||||
const h5_int64_t *y_data, /*!< IN: Y axis data */
|
||||
const h5_int64_t *z_data /*!< IN: Z axis data */
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to write */
|
||||
const h5_int64_t *x_buf, /*!< IN: pointer to X axis buffer */
|
||||
const h5_int64_t *y_buf, /*!< IN: pointer to Y axis buffer */
|
||||
const h5_int64_t *z_buf /*!< IN: pointer to Z axis buffer */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_RETURN (
|
||||
h5b_write_vector3d_data(
|
||||
f, name,
|
||||
(void*)x_data, (void*)y_data, (void*)z_data,
|
||||
H5T_NATIVE_INT64));
|
||||
|
||||
H5_API_ENTER5 (h5_err_t, "f=0x%p, name=\"%s\", x_buf=0x%p, y_buf=0x%p, z_buf=0x%p",
|
||||
f, name, x_buf, y_buf, z_buf);
|
||||
H5_API_RETURN (h5b_write_vector3d_data(f, name,
|
||||
x_buf, y_buf, z_buf, H5T_NATIVE_INT64));
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -302,7 +285,7 @@ H5Block3dWriteVector3dFieldInt64 (
|
||||
*/
|
||||
/*!
|
||||
Read a 3-dimensional field \c name with 3-dimensional vectors as values
|
||||
from the buffers starting at \c x_data, \c y_data and \c z_data to the
|
||||
from the buffers starting at \c x_buf, \c y_buf and \c z_buf to the
|
||||
current time-step using the defined field layout. Values are 3-dimensional
|
||||
vectors with integers (64-bit) values.
|
||||
|
||||
@@ -312,18 +295,17 @@ H5Block3dWriteVector3dFieldInt64 (
|
||||
*/
|
||||
h5_err_t
|
||||
H5Block3dReadVector3dFieldInt64 (
|
||||
h5_file_t *f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to write */
|
||||
h5_int64_t *x_data, /*!< OUT: X axis data */
|
||||
h5_int64_t *y_data, /*!< OUT: Y axis data */
|
||||
h5_int64_t *z_data /*!< OUT: Z axis data */
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to write */
|
||||
h5_int64_t *const x_buf, /*!< OUT: pointer to X axis buffer */
|
||||
h5_int64_t *const y_buf, /*!< OUT: pointer to Y axis buffer */
|
||||
h5_int64_t *const z_buf /*!< OUT: pointer to Z axis buffer */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_RETURN (
|
||||
h5b_read_vector3d_data(
|
||||
f, name,
|
||||
(void*)x_data, (void*)y_data, (void*)z_data,
|
||||
H5T_NATIVE_INT64));
|
||||
|
||||
H5_API_ENTER5 (h5_err_t, "f=0x%p, name=\"%s\", x_buf=0x%p, y_buf=0x%p, z_buf=0x%p",
|
||||
f, name, x_buf, y_buf, z_buf);
|
||||
H5_API_RETURN (h5b_read_vector3d_data(f, name,
|
||||
x_buf, y_buf, z_buf, H5T_NATIVE_INT64));
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -339,16 +321,14 @@ H5Block3dReadVector3dFieldInt64 (
|
||||
*/
|
||||
h5_err_t
|
||||
H5Block3dWriteScalarFieldInt32 (
|
||||
h5_file_t *f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to write */
|
||||
const h5_int32_t *data /*!< IN: scalar data to write */
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to write */
|
||||
const h5_int32_t *buffer /*!< IN: pointer to write buffer */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_RETURN (
|
||||
h5b_write_scalar_data(
|
||||
f, name,
|
||||
(void*)data,
|
||||
H5T_NATIVE_INT32));
|
||||
|
||||
H5_API_ENTER3 (h5_err_t, "f=0x%p, name=\"%s\", buffer=0x%p",
|
||||
f, name, buffer);
|
||||
H5_API_RETURN (h5b_write_scalar_data(f, name, buffer, H5T_NATIVE_INT32 ));
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -364,16 +344,14 @@ H5Block3dWriteScalarFieldInt32 (
|
||||
*/
|
||||
h5_err_t
|
||||
H5Block3dReadScalarFieldInt32 (
|
||||
h5_file_t *f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to read */
|
||||
h5_int32_t *data /*!< OUT: ptr to read buffer */
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to read */
|
||||
h5_int32_t *const buffer /*!< OUT: pointer to read buffer */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_RETURN (
|
||||
h5b_read_scalar_data(
|
||||
f, name,
|
||||
(void*)data,
|
||||
H5T_NATIVE_INT32));
|
||||
|
||||
H5_API_ENTER3 (h5_err_t, "f=0x%p, name=\"%s\", buffer=0x%p",
|
||||
f, name, buffer);
|
||||
H5_API_RETURN (h5b_read_scalar_data(f, name, buffer, H5T_NATIVE_INT32));
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -381,28 +359,27 @@ H5Block3dReadScalarFieldInt32 (
|
||||
*/
|
||||
/*!
|
||||
Write a 3-dimensional field \c name with 3-dimensional vectors as values
|
||||
from the buffers starting at \c x_data, \c y_data and \c z_data to the
|
||||
from the buffers starting at \c x_buf, \c y_buf and \c z_buf to the
|
||||
current time-step using the defined field layout. Values are 3-dimensional
|
||||
vectors with integers (32-bit) values.
|
||||
|
||||
You must use the Fortran indexing scheme to access items in \c data.
|
||||
You must use the Fortran indexing scheme to access items in \c x_buf.
|
||||
|
||||
\return \c H5_SUCCESS or error code
|
||||
*/
|
||||
h5_err_t
|
||||
H5Block3dWriteVector3dFieldInt32 (
|
||||
h5_file_t *f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to write */
|
||||
const h5_int32_t *x_data, /*!< IN: X axis data */
|
||||
const h5_int32_t *y_data, /*!< IN: Y axis data */
|
||||
const h5_int32_t *z_data /*!< IN: Z axis data */
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to write */
|
||||
const h5_int32_t *x_buf, /*!< IN: pointer to X axis buffer */
|
||||
const h5_int32_t *y_buf, /*!< IN: pointer to Y axis buffer */
|
||||
const h5_int32_t *z_buf /*!< IN: pointer to Z axis buffer */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_RETURN (
|
||||
h5b_write_vector3d_data(
|
||||
f, name,
|
||||
(void*)x_data, (void*)y_data, (void*)z_data,
|
||||
H5T_NATIVE_INT32));
|
||||
|
||||
H5_API_ENTER5 (h5_err_t, "f=0x%p, name=\"%s\", x_buf=0x%p, y_buf=0x%p, z_buf=0x%p",
|
||||
f, name, x_buf, y_buf, z_buf);
|
||||
H5_API_RETURN(h5b_write_vector3d_data(f, name,
|
||||
x_buf, y_buf, z_buf, H5T_NATIVE_INT32));
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -410,7 +387,7 @@ H5Block3dWriteVector3dFieldInt32 (
|
||||
*/
|
||||
/*!
|
||||
Read a 3-dimensional field \c name with 3-dimensional vectors as values
|
||||
from the buffers starting at \c x_data, \c y_data and \c z_data to the
|
||||
from the buffers starting at \c x_buf, \c y_buf and \c z_buf to the
|
||||
current time-step using the defined field layout. Values are 3-dimensional
|
||||
vectors with integers (32-bit) values.
|
||||
|
||||
@@ -420,18 +397,17 @@ H5Block3dWriteVector3dFieldInt32 (
|
||||
*/
|
||||
h5_err_t
|
||||
H5Block3dReadVector3dFieldInt32 (
|
||||
h5_file_t *f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to write */
|
||||
h5_int32_t *x_data, /*!< OUT: X axis data */
|
||||
h5_int32_t *y_data, /*!< OUT: Y axis data */
|
||||
h5_int32_t *z_data /*!< OUT: Z axis data */
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to write */
|
||||
h5_int32_t *const x_buf, /*!< OUT: pointer to X axis buffer */
|
||||
h5_int32_t *const y_buf, /*!< OUT: pointer to Y axis buffer */
|
||||
h5_int32_t *const z_buf /*!< OUT: pointer to Z axis buffer */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_RETURN (
|
||||
h5b_read_vector3d_data(
|
||||
f, name,
|
||||
(void*)x_data, (void*)y_data, (void*)z_data,
|
||||
H5T_NATIVE_INT32));
|
||||
|
||||
H5_API_ENTER5 (h5_err_t, "f=0x%p, name=\"%s\", x_buf=0x%p, y_buf=0x%p, z_buf=0x%p",
|
||||
f, name, x_buf, y_buf, z_buf);
|
||||
H5_API_RETURN(h5b_read_vector3d_data(f, name,
|
||||
x_buf, y_buf, z_buf, H5T_NATIVE_INT32));
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -444,21 +420,23 @@ H5Block3dReadVector3dFieldInt32 (
|
||||
*/
|
||||
h5_err_t
|
||||
H5BlockWriteFieldAttribFloat64 (
|
||||
h5_file_t *f, /*!< IN: file handle */
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *field_name, /*!< IN: field name */
|
||||
const char *attrib_name, /*!< IN: attribute name */
|
||||
const h5_float64_t *values, /*!< IN: attribute values */
|
||||
const h5_size_t nvalues /*!< IN: number of elements */
|
||||
const h5_float64_t *buffer, /*!< IN: attribute values */
|
||||
const h5_size_t nelems /*!< IN: number of elements */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_RETURN (
|
||||
h5_write_field_attrib (
|
||||
f,
|
||||
field_name,
|
||||
attrib_name,
|
||||
H5T_NATIVE_DOUBLE,
|
||||
values,
|
||||
nvalues));
|
||||
|
||||
H5_API_ENTER5 (h5_err_t, "f=0x%p, field_name=\"%s\", attrib_name=\"%s\", "
|
||||
"buffer=0x%p, nelems=%lld",
|
||||
f, field_name, attrib_name, buffer, (long long)nelems);
|
||||
H5_API_RETURN (h5_write_field_attrib (
|
||||
f,
|
||||
field_name,
|
||||
attrib_name,
|
||||
H5T_NATIVE_DOUBLE,
|
||||
buffer,
|
||||
nelems ));
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -471,19 +449,20 @@ H5BlockWriteFieldAttribFloat64 (
|
||||
*/
|
||||
h5_err_t
|
||||
H5BlockReadFieldAttribFloat64 (
|
||||
h5_file_t *f, /*!< IN: file handle */
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *field_name, /*!< IN: field name */
|
||||
const char *attrib_name, /*!< IN: attribute name */
|
||||
h5_float64_t *buffer /*!< OUT: attribute values */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
h5_err_t h5err = h5_read_field_attrib (
|
||||
f,
|
||||
field_name,
|
||||
attrib_name,
|
||||
H5T_NATIVE_DOUBLE,
|
||||
(void*)buffer);
|
||||
H5_API_RETURN (h5err);
|
||||
|
||||
H5_API_ENTER4 (h5_err_t, "f=%p, field_name=\"%s\", attrib_name=\"%s\", buffer=0x%p",
|
||||
f, field_name, attrib_name, buffer);
|
||||
H5_API_RETURN (h5_read_field_attrib (
|
||||
f,
|
||||
field_name,
|
||||
attrib_name,
|
||||
H5T_NATIVE_DOUBLE,
|
||||
(void*)buffer ));
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -496,21 +475,23 @@ H5BlockReadFieldAttribFloat64 (
|
||||
*/
|
||||
h5_err_t
|
||||
H5BlockWriteFieldAttribFloat32 (
|
||||
h5_file_t *f, /*!< IN: file handle */
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *field_name, /*!< IN: field name */
|
||||
const char *attrib_name, /*!< IN: attribute name */
|
||||
const h5_float32_t *values, /*!< IN: attribute values */
|
||||
const h5_size_t nvalues /*!< IN: number of elements */
|
||||
const h5_float32_t *buffer, /*!< IN: attribute values */
|
||||
const h5_size_t nelems /*!< IN: number of elements */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_RETURN (
|
||||
h5_write_field_attrib (
|
||||
f,
|
||||
field_name,
|
||||
attrib_name,
|
||||
H5T_NATIVE_FLOAT,
|
||||
values,
|
||||
nvalues));
|
||||
|
||||
H5_API_ENTER5 (h5_err_t, "f=0x%p, field_name=\"%s\", attrib_name=\"%s\", "
|
||||
"buffer=0x%p, nelems=%lld",
|
||||
f, field_name, attrib_name, buffer, (long long)nelems);
|
||||
H5_API_RETURN (h5_write_field_attrib (
|
||||
f,
|
||||
field_name,
|
||||
attrib_name,
|
||||
H5T_NATIVE_FLOAT,
|
||||
buffer,
|
||||
nelems ));
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -523,19 +504,20 @@ H5BlockWriteFieldAttribFloat32 (
|
||||
*/
|
||||
h5_err_t
|
||||
H5BlockReadFieldAttribFloat32 (
|
||||
h5_file_t *f, /*!< IN: file handle */
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *field_name, /*!< IN: field name */
|
||||
const char *attrib_name, /*!< IN: attribute name */
|
||||
h5_float32_t *buffer /*!< OUT: attribute values */
|
||||
h5_float32_t *const buffer /*!< OUT: attribute values */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_RETURN (
|
||||
h5_read_field_attrib (
|
||||
f,
|
||||
field_name,
|
||||
attrib_name,
|
||||
H5T_NATIVE_FLOAT,
|
||||
(void*)buffer));
|
||||
|
||||
H5_API_ENTER4 (h5_err_t, "f=%p, field_name=\"%s\", attrib_name=\"%s\", buffer=0x%p",
|
||||
f, field_name, attrib_name, buffer);
|
||||
H5_API_RETURN (h5_read_field_attrib (
|
||||
f,
|
||||
field_name,
|
||||
attrib_name,
|
||||
H5T_NATIVE_FLOAT,
|
||||
buffer ));
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -548,21 +530,23 @@ H5BlockReadFieldAttribFloat32 (
|
||||
*/
|
||||
h5_err_t
|
||||
H5BlockWriteFieldAttribInt64 (
|
||||
h5_file_t *f, /*!< IN: file handle */
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *field_name, /*!< IN: field name */
|
||||
const char *attrib_name, /*!< IN: attribute name */
|
||||
const h5_int64_t *values, /*!< IN: attribute values */
|
||||
const h5_size_t nvalues /*!< IN: number of elements */
|
||||
const h5_int64_t *buffer, /*!< IN: attribute values */
|
||||
const h5_size_t nelems /*!< IN: number of elements */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_RETURN (
|
||||
h5_write_field_attrib (
|
||||
f,
|
||||
field_name,
|
||||
attrib_name,
|
||||
H5T_NATIVE_INT64,
|
||||
values,
|
||||
nvalues));
|
||||
|
||||
H5_API_ENTER5 (h5_err_t, "f=0x%p, field_name=\"%s\", attrib_name=\"%s\", "
|
||||
"buffer=0x%p, nelems=%lld",
|
||||
f, field_name, attrib_name, buffer, (long long)nelems);
|
||||
H5_API_RETURN(h5_write_field_attrib (
|
||||
f,
|
||||
field_name,
|
||||
attrib_name,
|
||||
H5T_NATIVE_INT64,
|
||||
buffer,
|
||||
nelems ));
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -575,19 +559,20 @@ H5BlockWriteFieldAttribInt64 (
|
||||
*/
|
||||
h5_err_t
|
||||
H5BlockReadFieldAttribInt64 (
|
||||
h5_file_t *f, /*!< IN: file handle */
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *field_name, /*!< IN: field name */
|
||||
const char *attrib_name, /*!< IN: attribute name */
|
||||
h5_int64_t *buffer /*!< OUT: attribute values */
|
||||
h5_int64_t *const buffer /*!< OUT: attribute values */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_RETURN (
|
||||
h5_read_field_attrib (
|
||||
f,
|
||||
field_name,
|
||||
attrib_name,
|
||||
H5T_NATIVE_INT64,
|
||||
(void*)buffer));
|
||||
|
||||
H5_API_ENTER4 (h5_err_t, "f=%p, field_name=\"%s\", attrib_name=\"%s\", buffer=0x%p",
|
||||
f, field_name, attrib_name, buffer);
|
||||
H5_API_RETURN (h5_read_field_attrib (
|
||||
f,
|
||||
field_name,
|
||||
attrib_name,
|
||||
H5T_NATIVE_INT64,
|
||||
buffer ));
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -600,21 +585,23 @@ H5BlockReadFieldAttribInt64 (
|
||||
*/
|
||||
h5_err_t
|
||||
H5BlockWriteFieldAttribInt32 (
|
||||
h5_file_t *f, /*!< IN: file handle */
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *field_name, /*!< IN: field name */
|
||||
const char *attrib_name, /*!< IN: attribute name */
|
||||
const h5_int32_t *values, /*!< IN: attribute values */
|
||||
const h5_size_t nvalues /*!< IN: number of elements */
|
||||
const h5_int32_t *buffer, /*!< IN: attribute values */
|
||||
const h5_size_t nelems /*!< IN: number of elements */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_RETURN (
|
||||
h5_write_field_attrib (
|
||||
f,
|
||||
field_name,
|
||||
attrib_name,
|
||||
H5T_NATIVE_INT32,
|
||||
values,
|
||||
nvalues));
|
||||
|
||||
H5_API_ENTER5 (h5_err_t, "f=0x%p, field_name=\"%s\", attrib_name=\"%s\", "
|
||||
"buffer=0x%p, nelems=%lld",
|
||||
f, field_name, attrib_name, buffer, (long long)nelems);
|
||||
H5_API_RETURN (h5_write_field_attrib (
|
||||
f,
|
||||
field_name,
|
||||
attrib_name,
|
||||
H5T_NATIVE_INT32,
|
||||
buffer,
|
||||
nelems ));
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -627,17 +614,18 @@ H5BlockWriteFieldAttribInt32 (
|
||||
*/
|
||||
h5_err_t
|
||||
H5BlockReadFieldAttribInt32 (
|
||||
h5_file_t *f, /*!< IN: file handle */
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *field_name, /*!< IN: field name */
|
||||
const char *attrib_name, /*!< IN: attribute name */
|
||||
h5_int32_t *buffer /*!< OUT: attribute values */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_RETURN (
|
||||
h5_read_field_attrib (
|
||||
f,
|
||||
field_name,
|
||||
attrib_name,
|
||||
H5T_NATIVE_INT32,
|
||||
(void*)buffer));
|
||||
|
||||
H5_API_ENTER4 (h5_err_t, "f=%p, field_name=\"%s\", attrib_name=\"%s\", buffer=0x%p",
|
||||
f, field_name, attrib_name, buffer);
|
||||
H5_API_RETURN (h5_read_field_attrib (
|
||||
f,
|
||||
field_name,
|
||||
attrib_name,
|
||||
H5T_NATIVE_INT32,
|
||||
(void*)buffer ));
|
||||
}
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
/*
|
||||
Copyright 2007-2009
|
||||
Paul Scherrer Institut, Villigen, Switzerland;
|
||||
Benedikt Oswald;
|
||||
Achim Gsell
|
||||
All rights reserved.
|
||||
|
||||
Authors
|
||||
Achim Gsell
|
||||
|
||||
Warning
|
||||
This code is under development.
|
||||
|
||||
*/
|
||||
#include "h5core/h5_core.h"
|
||||
#include "H5Fed.h"
|
||||
|
||||
h5_err_t
|
||||
H5FedOpenMesh (
|
||||
h5_file_t* const f,
|
||||
const h5_id_t mesh_id,
|
||||
const h5_oid_t mesh_type_id
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_RETURN (h5t_open_mesh (f, mesh_id, mesh_type_id));
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
H5FedCloseMesh (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_RETURN (h5t_close_mesh (f));
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
H5FedSetLevel (
|
||||
h5_file_t* const f,
|
||||
const h5t_lvl_idx_t level_id
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_RETURN (h5t_set_level (f, level_id));
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
H5FedLinkMeshToStep (
|
||||
h5_file_t* const f,
|
||||
const h5_id_t mesh_id
|
||||
) {
|
||||
UNUSED_ARGUMENT (f);
|
||||
UNUSED_ARGUMENT (mesh_id);
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_RETURN (h5_error_not_implemented ());
|
||||
}
|
||||
@@ -28,7 +28,9 @@ H5FedGetAdjacencies (
|
||||
const h5_int32_t dim,
|
||||
h5_loc_idlist_t** list
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER4 (h5_err_t,
|
||||
"f=0x%p, entity_id=%lld, dim=%d, list=0x%p",
|
||||
f, (long long)entity_id, dim, list);
|
||||
H5_API_RETURN (h5t_get_adjacencies (f, entity_id, dim, list));
|
||||
}
|
||||
|
||||
@@ -37,6 +39,8 @@ H5FedReleaseListOfAdjacencies (
|
||||
h5_file_t* const f,
|
||||
h5_loc_idlist_t** list
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER2 (h5_err_t,
|
||||
"f=0x%p, list=0x%p",
|
||||
f, list);
|
||||
H5_API_RETURN (h5t_release_list_of_adjacencies (f, list));
|
||||
}
|
||||
|
||||
+11
-26
@@ -20,22 +20,6 @@
|
||||
#include "h5core/h5_core.h"
|
||||
#include "H5Fed.h"
|
||||
|
||||
/*!
|
||||
Get number of meshes of given type.
|
||||
|
||||
\param[in] f File handle
|
||||
\param[in] type_id Type of mesh we want the number of.
|
||||
|
||||
\return Number of meshes of type \c type_id or error code.
|
||||
*/
|
||||
h5_ssize_t
|
||||
H5FedGetNumMeshes (
|
||||
h5_file_t* const f,
|
||||
const h5_oid_t type_id
|
||||
) {
|
||||
H5_API_ENTER (h5_ssize_t);
|
||||
H5_API_RETURN (h5t_get_num_meshes (f, type_id));
|
||||
}
|
||||
|
||||
/*!
|
||||
Get the number of hierarchical mesh levels.
|
||||
@@ -48,7 +32,7 @@ h5_ssize_t
|
||||
H5FedGetNumLevels (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_API_ENTER (h5_ssize_t);
|
||||
H5_API_ENTER1 (h5_ssize_t, "f=0x%p", f);
|
||||
H5_API_RETURN (h5t_get_num_leaf_levels (f));
|
||||
}
|
||||
|
||||
@@ -63,7 +47,7 @@ h5t_lvl_idx_t
|
||||
H5FedGetLevel (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_API_ENTER (h5t_lvl_idx_t);
|
||||
H5_API_ENTER1 (h5t_lvl_idx_t, "f=0x%p", f);
|
||||
H5_API_RETURN (h5t_get_level (f));
|
||||
}
|
||||
|
||||
@@ -79,7 +63,7 @@ h5_ssize_t
|
||||
H5FedGetNumVertices (
|
||||
h5_file_t* const f /*!< file handle */
|
||||
) {
|
||||
H5_API_ENTER (h5_ssize_t);
|
||||
H5_API_ENTER1 (h5_ssize_t, "f=0x%p", f);
|
||||
H5_API_RETURN (h5t_get_num_vertices (f, -1));
|
||||
}
|
||||
|
||||
@@ -95,9 +79,9 @@ H5FedGetNumVertices (
|
||||
h5_ssize_t
|
||||
H5FedGetNumVerticesCnode (
|
||||
h5_file_t* const f,
|
||||
const h5_id_t cnode
|
||||
const int cnode
|
||||
) {
|
||||
H5_API_ENTER (h5_ssize_t);
|
||||
H5_API_ENTER2 (h5_ssize_t, "f=0x%p, cnode=%d", f, cnode);
|
||||
H5_API_RETURN (h5t_get_num_vertices (f, cnode));
|
||||
}
|
||||
|
||||
@@ -113,7 +97,7 @@ h5_ssize_t
|
||||
H5FedGetNumVerticesTotal (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_API_ENTER (h5_ssize_t);
|
||||
H5_API_ENTER1 (h5_ssize_t, "f=0x%p", f);
|
||||
H5_API_RETURN (h5t_get_num_vertices (f, -1));
|
||||
}
|
||||
|
||||
@@ -129,7 +113,7 @@ h5_ssize_t
|
||||
H5FedGetNumElements (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_API_ENTER (h5_ssize_t);
|
||||
H5_API_ENTER1 (h5_ssize_t, "f=0x%p", f);
|
||||
// MLH: can't use field from opaque h5_file_t!
|
||||
//h5_ssize_t num = h5t_get_num_elems (f, f->myproc);
|
||||
H5_API_RETURN (h5t_get_num_elems (f, -1));
|
||||
@@ -147,11 +131,12 @@ H5FedGetNumElements (
|
||||
h5_ssize_t
|
||||
H5FedGetNumElementsCnode (
|
||||
h5_file_t* const f,
|
||||
const h5_id_t cnode
|
||||
const int cnode
|
||||
) {
|
||||
H5_API_ENTER (h5_ssize_t);
|
||||
H5_API_ENTER2 (h5_ssize_t, "f=0x%p, cnode=%d", f, cnode);
|
||||
H5_API_RETURN (h5t_get_num_elems (f, cnode));
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns the number of elements present in the mesh
|
||||
at current level over all compute nodes.
|
||||
@@ -164,6 +149,6 @@ h5_ssize_t
|
||||
H5FedGetNumElementsTotal (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_API_ENTER (h5_ssize_t);
|
||||
H5_API_ENTER1 (h5_ssize_t, "f=0x%p", f);
|
||||
H5_API_RETURN (h5t_get_num_elems (f, -1));
|
||||
}
|
||||
|
||||
+22
-10
@@ -36,7 +36,7 @@ H5FedBeginTraverseEntities (
|
||||
h5_file_t* const f,
|
||||
const int codim
|
||||
) {
|
||||
H5_API_ENTER (h5t_iterator_p);
|
||||
H5_API_ENTER2 (h5t_iterator_p, "f=0x%p, codim=%d", f, codim);
|
||||
h5t_iterator_p iter;
|
||||
TRY2 (iter = h5_calloc (1, sizeof (*iter)));
|
||||
TRY2 (h5t_init_leaf_iterator (f, iter, codim));
|
||||
@@ -48,7 +48,7 @@ H5FedBeginTraverseBoundaryFaces (
|
||||
h5_file_t* const f,
|
||||
const int codim
|
||||
) {
|
||||
H5_API_ENTER (h5t_iterator_p);
|
||||
H5_API_ENTER2 (h5t_iterator_p, "f=0x%p, codim=%d", f, codim);
|
||||
h5t_iterator_p iter;
|
||||
TRY2 (iter = h5_calloc (1, sizeof (*iter)));
|
||||
TRY2 (h5t_init_boundary_face_iterator (f, iter, codim));
|
||||
@@ -70,7 +70,7 @@ H5FedTraverseEntities (
|
||||
h5_file_t* const f,
|
||||
h5t_iterator_t* iter
|
||||
) {
|
||||
H5_API_ENTER (h5_loc_id_t);
|
||||
H5_API_ENTER2 (h5_loc_id_t, "f=0x%p, iter=0x%p", f, iter);
|
||||
H5_API_RETURN (h5t_iterate_entities (f, iter));
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ H5FedEndTraverseEntities (
|
||||
h5_file_t* const f,
|
||||
h5t_iterator_t* iter
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER2 (h5_err_t, "f=0x%p, iter=0x%p", f, iter);
|
||||
H5_API_RETURN (h5t_release_entity_iterator (f, iter));
|
||||
}
|
||||
|
||||
@@ -107,7 +107,9 @@ H5FedGetVertexCoordsByIndex (
|
||||
h5_loc_idx_t vertex_index,
|
||||
h5_float64_t P[3]
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER3 (h5_err_t,
|
||||
"f=0x%p, vertex_index=%lld, P=0x%p",
|
||||
f, (long long)vertex_index, P);
|
||||
H5_API_RETURN (h5t_get_vertex_coords_by_index (f, vertex_index, P));
|
||||
}
|
||||
|
||||
@@ -117,7 +119,9 @@ H5FedGetVertexCoordsByID (
|
||||
h5_loc_id_t vertex_id,
|
||||
h5_float64_t P[3]
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER3 (h5_err_t,
|
||||
"f=0x%p, vertex_id=%lld, P=0x%p",
|
||||
f, (long long)vertex_id, P);
|
||||
H5_API_RETURN (h5t_get_vertex_coords_by_id (f, vertex_id, P));
|
||||
}
|
||||
|
||||
@@ -127,7 +131,9 @@ H5FedGetVertexIndicesOfEdge (
|
||||
h5_loc_id_t entity_id,
|
||||
h5_loc_idx_t* vertex_indices
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER3 (h5_err_t,
|
||||
"f=0x%p, entity_id=%lld, vertex_indices=0x%p",
|
||||
f, (long long)entity_id, vertex_indices);
|
||||
H5_API_RETURN (h5t_get_vertex_indices_of_edge (f, entity_id, vertex_indices));
|
||||
}
|
||||
|
||||
@@ -137,7 +143,9 @@ H5FedGetVertexIndicesOfTriangle (
|
||||
h5_loc_id_t entity_id,
|
||||
h5_loc_idx_t* vertex_indices
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER3 (h5_err_t,
|
||||
"f=0x%p, entity_id=%lld, vertex_indices=0x%p",
|
||||
f, (long long)entity_id, vertex_indices);
|
||||
H5_API_RETURN (h5t_get_vertex_indices_of_triangle (f, entity_id, vertex_indices));
|
||||
}
|
||||
|
||||
@@ -147,7 +155,9 @@ H5FedGetVertexIndicesOfTet (
|
||||
h5_loc_id_t entity_id,
|
||||
h5_loc_idx_t* vertex_indices
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER3 (h5_err_t,
|
||||
"f=0x%p, entity_id=%lld, vertex_indices=0x%p",
|
||||
f, (long long)entity_id, vertex_indices);
|
||||
H5_API_RETURN (h5t_get_vertex_indices_of_tet (f, entity_id, vertex_indices));
|
||||
}
|
||||
|
||||
@@ -157,7 +167,9 @@ H5FedGetVertexIndicesOfEntity (
|
||||
h5_loc_id_t entity_id,
|
||||
h5_loc_idx_t* vertex_indices
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER3 (h5_err_t,
|
||||
"f=0x%p, entity_id=%lld, vertex_indices=0x%p",
|
||||
f, (long long)entity_id, vertex_indices);
|
||||
H5_API_RETURN (h5t_get_vertex_indices_of_entity (f, entity_id, vertex_indices));
|
||||
}
|
||||
|
||||
|
||||
+18
-18
@@ -17,14 +17,6 @@
|
||||
#include "H5Fed.h"
|
||||
|
||||
|
||||
h5_id_t
|
||||
H5FedAddMesh (
|
||||
h5_file_t* const f,
|
||||
const h5_oid_t mesh_type_id
|
||||
) {
|
||||
H5_API_ENTER (h5_id_t);
|
||||
H5_API_RETURN (h5t_add_mesh (f, mesh_type_id));
|
||||
}
|
||||
|
||||
/*!
|
||||
\ingroup h5fed_c_api
|
||||
@@ -50,7 +42,7 @@ h5t_lvl_idx_t
|
||||
H5FedAddLevel (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_API_ENTER (h5t_lvl_idx_t);
|
||||
H5_API_ENTER1 (h5t_lvl_idx_t, "f=0x%p", f);
|
||||
H5_API_RETURN (h5t_add_level (f));
|
||||
}
|
||||
|
||||
@@ -59,7 +51,9 @@ H5FedBeginStoreVertices (
|
||||
h5_file_t* const f,
|
||||
const h5_size_t num
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER2 (h5_err_t,
|
||||
"f=0x%p, num=%llu",
|
||||
f, (long long unsigned)num);
|
||||
H5_API_RETURN (h5t_begin_store_vertices (f, num));
|
||||
}
|
||||
|
||||
@@ -78,7 +72,9 @@ H5FedStoreVertex (
|
||||
const h5_glb_id_t vertex_id, /*!< id from mesher or -1 */
|
||||
const h5_float64_t P[3] /*!< coordinates */
|
||||
) {
|
||||
H5_API_ENTER (h5_loc_idx_t);
|
||||
H5_API_ENTER3 (h5_loc_idx_t,
|
||||
"f=0x%p, vertex_id=%lld, P=0x%p",
|
||||
f, (long long)vertex_id, P);
|
||||
if (h5t_get_level (f) != 0) {
|
||||
H5_API_LEAVE (
|
||||
h5_error (
|
||||
@@ -92,7 +88,7 @@ h5_err_t
|
||||
H5FedEndStoreVertices (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
H5_API_RETURN (h5t_end_store_vertices (f));
|
||||
}
|
||||
|
||||
@@ -101,7 +97,9 @@ H5FedBeginStoreElements (
|
||||
h5_file_t* const f,
|
||||
const h5_size_t num
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER2 (h5_err_t,
|
||||
"f=0x%p, num=%llu",
|
||||
f, (long long unsigned)num);
|
||||
H5_API_RETURN (h5t_begin_store_elems (f, num));
|
||||
}
|
||||
|
||||
@@ -124,7 +122,7 @@ H5FedStoreElement (
|
||||
h5_file_t* const f, /*!< file handle */
|
||||
const h5_loc_idx_t local_vids[] /*!< tuple with vertex id's */
|
||||
) {
|
||||
H5_API_ENTER (h5_loc_idx_t);
|
||||
H5_API_ENTER2 (h5_loc_idx_t, "f=0x%p, local_vids=0x%p", f, local_vids);
|
||||
if (h5t_get_level (f) != 0) {
|
||||
H5_API_LEAVE (
|
||||
h5_error (
|
||||
@@ -138,7 +136,7 @@ h5_err_t
|
||||
H5FedEndStoreElements (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
H5_API_RETURN (h5t_end_store_elems (f));
|
||||
}
|
||||
|
||||
@@ -146,7 +144,7 @@ h5_err_t
|
||||
H5FedBeginRefineElements (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
H5_API_RETURN (h5t_begin_refine_elems (f));
|
||||
}
|
||||
|
||||
@@ -155,7 +153,9 @@ H5FedRefineElement (
|
||||
h5_file_t* const f, /*!< file handle */
|
||||
const h5_loc_id_t local_eid /*!< local element id */
|
||||
) {
|
||||
H5_API_ENTER (h5_loc_idx_t);
|
||||
H5_API_ENTER2 (h5_loc_idx_t,
|
||||
"f=0x%p, local_eid=%lld",
|
||||
f, (long long)local_eid);
|
||||
H5_API_RETURN (h5t_mark_entity (f, local_eid));
|
||||
}
|
||||
|
||||
@@ -163,6 +163,6 @@ h5_err_t
|
||||
H5FedEndRefineElements (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
H5_API_RETURN (h5t_end_refine_elems (f));
|
||||
}
|
||||
|
||||
+18
-12
@@ -29,7 +29,8 @@ H5FedAddMTagset (
|
||||
char* name,
|
||||
h5_id_t type
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER3 (h5_err_t, "f=0x%p, name=\"%s\", type=%lld",
|
||||
f, name, (long long)type);
|
||||
H5_API_RETURN (h5t_add_mtagset (f, name, type));
|
||||
}
|
||||
|
||||
@@ -46,7 +47,7 @@ H5FedRemoveMTagset (
|
||||
h5_file_t* const f,
|
||||
char name[]
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER2 (h5_err_t, "f=0x%p, name=\"%s\"", f, name);
|
||||
H5_API_RETURN (h5t_remove_mtagset (f, name));
|
||||
}
|
||||
|
||||
@@ -63,7 +64,7 @@ H5FedGetMTagsets (
|
||||
h5_file_t* const f,
|
||||
char** names[]
|
||||
) {
|
||||
H5_API_ENTER (h5_ssize_t);
|
||||
H5_API_ENTER2 (h5_ssize_t, "f=0x%p, names=0x%p", f, names);
|
||||
H5_API_RETURN (h5t_get_mtagsets (f, names));
|
||||
}
|
||||
|
||||
@@ -80,7 +81,7 @@ H5FedGetTypeOfMTagset (
|
||||
h5_file_t* const f,
|
||||
char name[]
|
||||
) {
|
||||
H5_API_ENTER (h5_id_t);
|
||||
H5_API_ENTER2 (h5_err_t, "f=0x%p, name=\"%s\"", f, name);
|
||||
H5_API_RETURN (h5t_get_mtagset_type_by_name (f, name));
|
||||
}
|
||||
|
||||
@@ -100,11 +101,13 @@ H5FedSetMTag (
|
||||
h5_file_t* const f,
|
||||
char name[],
|
||||
h5_loc_id_t id,
|
||||
const size_t dims,
|
||||
void* val
|
||||
const size_t dim,
|
||||
void* buffer
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_RETURN (h5t_set_mtag_by_name (f, name, id, dims, val));
|
||||
H5_API_ENTER5 (h5_err_t,
|
||||
"f=0x%p, name=\"%s\", id=%lld, dim=%lld, val=0x%p",
|
||||
f, name, (long long)id, (long long)dim, buffer);
|
||||
H5_API_RETURN (h5t_set_mtag_by_name (f, name, id, dim, buffer));
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -124,10 +127,12 @@ H5FedGetMTag (
|
||||
const char name[],
|
||||
const h5_loc_id_t id,
|
||||
size_t* dim,
|
||||
void* vals
|
||||
void* buffer
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_RETURN (h5t_get_mtag_by_name (f, name, id, dim, vals));
|
||||
H5_API_ENTER5 (h5_err_t,
|
||||
"f=0x%p, name=\"%s\", id=%lld, dim=0x%p, val=0x%p",
|
||||
f, name, (long long)id, dim, buffer);
|
||||
H5_API_RETURN (h5t_get_mtag_by_name (f, name, id, dim, buffer));
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -143,6 +148,7 @@ H5FedRemoveMTag (
|
||||
const char name[],
|
||||
const h5_loc_id_t id
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER3 (h5_err_t, "f=0x%p, name=\"%s\", id=%lld",
|
||||
f, name, (long long)id);
|
||||
H5_API_RETURN (h5t_remove_mtag_by_name (f, name, id));
|
||||
}
|
||||
|
||||
+56
-23
@@ -49,7 +49,9 @@ H5PartSetNumParticles (
|
||||
h5_file_t *f, /*!< [in] Handle to open file */
|
||||
h5_size_t nparticles /*!< [in] Number of particles */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER2 (h5_err_t,
|
||||
"f=0x%p, nparticles=%llu",
|
||||
f, (long long unsigned)nparticles);
|
||||
h5_size_t stride = 1;
|
||||
H5_API_RETURN (h5u_set_num_particles(f, nparticles, stride));
|
||||
}
|
||||
@@ -87,7 +89,10 @@ H5PartSetNumParticlesStrided (
|
||||
h5_size_t nparticles, /*!< [in] Number of particles */
|
||||
h5_size_t stride /*!< [in] Stride value (e.g. number of fields in the particle array) */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER3 (h5_err_t,
|
||||
"f=0x%p, nparticles=%llu, stride=%llu",
|
||||
f, (long long unsigned)nparticles,
|
||||
(long long unsigned)stride);
|
||||
H5_API_RETURN (h5u_set_num_particles (f, nparticles, stride));
|
||||
}
|
||||
|
||||
@@ -109,7 +114,9 @@ H5PartSetChunk (
|
||||
h5_file_t *f,
|
||||
h5_size_t size
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER2 (h5_err_t,
|
||||
"f=0x%p, size=%llu",
|
||||
f, (long long unsigned)size);
|
||||
H5_API_RETURN (h5u_set_chunk (f, size));
|
||||
}
|
||||
|
||||
@@ -145,7 +152,7 @@ H5PartWriteDataFloat64 (
|
||||
const char *name, /*!< [in] Name to associate array with */
|
||||
const h5_float64_t *data /*!< [in] Array to commit to disk */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER3 (h5_err_t, "f=0x%p, name=\"%s\", date=0x%p", f,name,data);
|
||||
H5_API_RETURN (h5u_write_data (f, name, (void*)data, H5T_NATIVE_DOUBLE));
|
||||
}
|
||||
|
||||
@@ -181,7 +188,7 @@ H5PartWriteDataFloat32 (
|
||||
const char *name, /*!< [in] Name to associate array with */
|
||||
const h5_float32_t *data /*!< [in] Array to commit to disk */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER3 (h5_err_t, "f=0x%p, name=\"%s\", date=0x%p", f,name,data);
|
||||
h5_err_t h5err = h5u_write_data( f, name, (void*)data, H5T_NATIVE_FLOAT );
|
||||
H5_API_RETURN (h5err);
|
||||
}
|
||||
@@ -218,7 +225,7 @@ H5PartWriteDataInt64 (
|
||||
const char *name, /*!< [in] Name to associate array with */
|
||||
const h5_int64_t *data /*!< [in] Array to commit to disk */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER3 (h5_err_t, "f=0x%p, name=\"%s\", date=0x%p", f,name,data);
|
||||
H5_API_RETURN (h5u_write_data (f, name, (void*)data, H5T_NATIVE_INT64));
|
||||
}
|
||||
|
||||
@@ -254,7 +261,7 @@ H5PartWriteDataInt32 (
|
||||
const char *name, /*!< [in] Name to associate array with */
|
||||
const h5_int32_t *data /*!< [in] Array to commit to disk */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER3 (h5_err_t, "f=0x%p, name=\"%s\", date=0x%p", f,name,data);
|
||||
H5_API_RETURN (h5u_write_data (f, name, (void*)data, H5T_NATIVE_INT32));
|
||||
}
|
||||
|
||||
@@ -276,7 +283,7 @@ H5PartReadDataFloat64 (
|
||||
const char *name, /*!< [in] Name to associate dataset with */
|
||||
h5_float64_t *data /*!< [out] Array of data */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER3 (h5_err_t, "f=0x%p, name=\"%s\", date=0x%p", f,name,data);
|
||||
H5_API_RETURN (h5u_read_data (f, name, data, H5T_NATIVE_DOUBLE));
|
||||
}
|
||||
|
||||
@@ -298,7 +305,7 @@ H5PartReadDataFloat32 (
|
||||
const char *name, /*!< [in] Name to associate dataset with */
|
||||
h5_float32_t *data /*!< [out] Array of data */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER3 (h5_err_t, "f=0x%p, name=\"%s\", date=0x%p", f,name,data);
|
||||
H5_API_RETURN (h5u_read_data (f, name, data, H5T_NATIVE_FLOAT));
|
||||
}
|
||||
|
||||
@@ -320,7 +327,7 @@ H5PartReadDataInt64 (
|
||||
const char *name, /*!< [in] Name to associate dataset with */
|
||||
h5_int64_t *data /*!< [out] Array of data */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER3 (h5_err_t, "f=0x%p, name=\"%s\", date=0x%p", f,name,data);
|
||||
H5_API_RETURN (h5u_read_data (f, name, data, H5T_NATIVE_INT64));
|
||||
}
|
||||
|
||||
@@ -342,7 +349,7 @@ H5PartReadDataInt32 (
|
||||
const char *name, /*!< [in] Name to associate dataset with */
|
||||
h5_int32_t *data /*!< [out] Array of data */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER3 (h5_err_t, "f=0x%p, name=\"%s\", date=0x%p", f,name,data);
|
||||
H5_API_RETURN (h5u_read_data (f, name, data, H5T_NATIVE_INT32));
|
||||
}
|
||||
|
||||
@@ -358,7 +365,7 @@ h5_ssize_t
|
||||
H5PartGetNumDatasets (
|
||||
h5_file_t *f /*!< [in] Handle to open file */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
H5_API_RETURN (h5u_get_num_datasets(f));
|
||||
}
|
||||
|
||||
@@ -379,7 +386,13 @@ H5PartGetDatasetName (
|
||||
char *name, /*!< [out] Name of dataset */
|
||||
const h5_size_t len /*!< [in] Size of buffer \c name */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER4 (h5_err_t,
|
||||
"f=0x%p, "
|
||||
"idx=%lld, "
|
||||
"name=\"%s\", len=%llu, ",
|
||||
f,
|
||||
(long long)idx,
|
||||
name, (unsigned long long)len);
|
||||
H5_API_RETURN (h5u_get_dataset_info(f, idx, name, len, NULL, NULL));
|
||||
}
|
||||
|
||||
@@ -408,8 +421,17 @@ H5PartGetDatasetInfo (
|
||||
h5_int64_t *type, /*!< [out] Type of data in dataset */
|
||||
h5_size_t *nelem /*!< [out] Number of elements. */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_RETURN (h5u_get_dataset_info(f, idx, dataset_name, len_dataset_name, type, nelem));
|
||||
H5_API_ENTER6 (h5_int64_t,
|
||||
"f=0x%p, "
|
||||
"idx=%lld, "
|
||||
"dataset_name=\"%s\", len_dataset_name=%llu, "
|
||||
"type=0x%p, nelem=0x%p",
|
||||
f,
|
||||
(long long)idx,
|
||||
dataset_name, (long long unsigned)len_dataset_name,
|
||||
type, nelem);
|
||||
H5_API_RETURN (h5u_get_dataset_info (
|
||||
f, idx, dataset_name, len_dataset_name, type, nelem));
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -437,7 +459,7 @@ h5_ssize_t
|
||||
H5PartGetNumParticles (
|
||||
h5_file_t *f /*!< [in] Handle to open file */
|
||||
) {
|
||||
H5_API_ENTER (h5_ssize_t);
|
||||
H5_API_ENTER1 (h5_ssize_t, "f=0x%p", f);
|
||||
CHECK_FILEHANDLE( f );
|
||||
H5_API_RETURN (h5u_get_num_particles (f));
|
||||
}
|
||||
@@ -453,7 +475,7 @@ h5_err_t
|
||||
H5PartResetView (
|
||||
h5_file_t *f /*!< [in] Handle to open file */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER1 (h5_ssize_t, "f=0x%p", f);
|
||||
H5_API_RETURN (h5u_reset_view (f));
|
||||
}
|
||||
|
||||
@@ -470,7 +492,7 @@ h5_err_t
|
||||
H5PartHasView (
|
||||
h5_file_t *f /*!< [in] Handle to open file */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER1 (h5_ssize_t, "f=0x%p", f);
|
||||
H5_API_RETURN (h5u_has_view (f));
|
||||
}
|
||||
|
||||
@@ -501,7 +523,9 @@ H5PartSetView (
|
||||
h5_int64_t start, /*!< [in] Start particle */
|
||||
h5_int64_t end /*!< [in] End particle */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER3 (h5_err_t,
|
||||
"f=0x%p, start=%lld, end=%lld",
|
||||
f, (long long)start, (long long)end);
|
||||
H5_API_RETURN (h5u_set_view (f, start, end));
|
||||
}
|
||||
|
||||
@@ -516,6 +540,11 @@ H5PartSetView (
|
||||
is set, or the number of particles in a dataset changes, or the view is
|
||||
"unset" by calling \c H5PartSetViewIndices(NULL,0);
|
||||
|
||||
When you perform a read or write on a view consisting of indices, it
|
||||
is assumed that your buffer is \b unpacked, meaning that there is room
|
||||
for all the intermediate values (which will not be touched by the read
|
||||
or write).
|
||||
|
||||
Before you set a view, the \c H5PartGetNumParticles() will return the
|
||||
total number of particles in the current time-step (even for the parallel
|
||||
reads). However, after you set a view, it will return the number of
|
||||
@@ -526,10 +555,12 @@ H5PartSetView (
|
||||
h5_err_t
|
||||
H5PartSetViewIndices (
|
||||
h5_file_t *f, /*!< [in] Handle to open file */
|
||||
const h5_id_t *indices, /*!< [in] List of indices */
|
||||
const h5_size_t *indices, /*!< [in] List of indices */
|
||||
h5_size_t nelems /*!< [in] Size of list */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER3 (h5_err_t,
|
||||
"f=0x%p, indices=0x%p, nelems=%llu",
|
||||
f, indices, (long long unsigned)nelems);
|
||||
H5_API_RETURN (h5u_set_view_indices (f, indices, nelems));
|
||||
}
|
||||
|
||||
@@ -549,7 +580,9 @@ H5PartGetView (
|
||||
h5_int64_t *start, /*!< [out] Start particle */
|
||||
h5_int64_t *end /*!< [out] End particle */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER3 (h5_err_t,
|
||||
"f=0x%p, start=0x%p, end=0x%p",
|
||||
f, start, end);
|
||||
H5_API_RETURN (h5u_get_view (f, start, end));
|
||||
}
|
||||
|
||||
@@ -567,7 +600,7 @@ h5_err_t
|
||||
H5PartSetCanonicalView (
|
||||
h5_file_t *f /*!< [in] Handle to open file */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
H5_API_RETURN (h5u_set_canonical_view (f));
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ h5_ssize_t
|
||||
H5GetNumAttachments (
|
||||
h5_file_t* const f /*!< [in] Handle to open file */
|
||||
) {
|
||||
H5_API_ENTER (h5_ssize_t);
|
||||
H5_API_ENTER1 (h5_ssize_t, "f=0x%p", f);
|
||||
H5_API_RETURN (h5_get_num_attachments (f));
|
||||
}
|
||||
|
||||
|
||||
+178
-24
@@ -20,7 +20,13 @@ H5WriteFileAttribString (
|
||||
const char *name, /*!< [in] Name of attribute to create */
|
||||
const char *value /*!< [in] Value of attribute */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER3 (h5_err_t,
|
||||
"f=%p, "
|
||||
"name=\"%s\""
|
||||
"value=\"%s\"",
|
||||
f,
|
||||
name,
|
||||
value);
|
||||
H5_API_RETURN (h5_write_attrib (
|
||||
f,
|
||||
H5_ATTRIB_FILE,
|
||||
@@ -44,7 +50,13 @@ H5WriteStepAttribString (
|
||||
const char *name, /*!< [in] Name of attribute to create */
|
||||
const char *value /*!< [in] Value of attribute */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER3 (h5_err_t,
|
||||
"f=%p, "
|
||||
"name=\"%s\""
|
||||
"value=\"%s\"",
|
||||
f,
|
||||
name,
|
||||
value);
|
||||
H5_API_RETURN (h5_write_attrib (
|
||||
f,
|
||||
H5_ATTRIB_STEP,
|
||||
@@ -69,7 +81,15 @@ H5WriteFileAttribFloat32 (
|
||||
const h5_float32_t *values, /*!< [in] Values of attribute */
|
||||
const h5_size_t nelems /*!< [in] Number of values */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER4 (h5_err_t,
|
||||
"f=%p, "
|
||||
"name=\"%s\""
|
||||
"values=0x%p, "
|
||||
"nelems=%llu",
|
||||
f,
|
||||
name,
|
||||
values,
|
||||
(long long unsigned)nelems);
|
||||
H5_API_RETURN (h5_write_attrib (
|
||||
f,
|
||||
H5_ATTRIB_FILE,
|
||||
@@ -94,7 +114,15 @@ H5WriteStepAttribFloat32 (
|
||||
const h5_float32_t *values, /*!< [in] Values of attribute */
|
||||
const h5_size_t nelems /*!< [in] Number of values */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER4 (h5_err_t,
|
||||
"f=%p, "
|
||||
"name=\"%s\""
|
||||
"values=0x%p, "
|
||||
"nelems=%llu",
|
||||
f,
|
||||
name,
|
||||
values,
|
||||
(long long unsigned)nelems);
|
||||
H5_API_RETURN (h5_write_attrib (
|
||||
f,
|
||||
H5_ATTRIB_STEP,
|
||||
@@ -119,7 +147,15 @@ H5WriteFileAttribFloat64 (
|
||||
const h5_float64_t *values, /*!< [in] Values of attribute */
|
||||
const h5_size_t nelems /*!< [in] Number of values */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER4 (h5_err_t,
|
||||
"f=%p, "
|
||||
"name=\"%s\""
|
||||
"values=0x%p, "
|
||||
"nelems=%llu",
|
||||
f,
|
||||
name,
|
||||
values,
|
||||
(long long unsigned)nelems);
|
||||
H5_API_RETURN (h5_write_attrib (
|
||||
f,
|
||||
H5_ATTRIB_FILE,
|
||||
@@ -144,7 +180,15 @@ H5WriteStepAttribFloat64 (
|
||||
const h5_float64_t *values, /*!< [in] Values of attribute */
|
||||
const h5_size_t nelems /*!< [in] Number of values */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER4 (h5_err_t,
|
||||
"f=%p, "
|
||||
"name=\"%s\""
|
||||
"values=0x%p, "
|
||||
"nelems=%llu",
|
||||
f,
|
||||
name,
|
||||
values,
|
||||
(long long unsigned)nelems);
|
||||
H5_API_RETURN (h5_write_attrib (
|
||||
f,
|
||||
H5_ATTRIB_STEP,
|
||||
@@ -169,7 +213,15 @@ H5WriteFileAttribInt32 (
|
||||
const h5_int32_t *values, /*!< [in] Values of attribute */
|
||||
const h5_size_t nelems /*!< [in] Number of values */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER4 (h5_err_t,
|
||||
"f=%p, "
|
||||
"name=\"%s\""
|
||||
"values=0x%p, "
|
||||
"nelems=%llu",
|
||||
f,
|
||||
name,
|
||||
values,
|
||||
(long long unsigned)nelems);
|
||||
H5_API_RETURN (h5_write_attrib (
|
||||
f,
|
||||
H5_ATTRIB_FILE,
|
||||
@@ -194,7 +246,15 @@ H5WriteStepAttribInt32 (
|
||||
const h5_int32_t *values, /*!< [in] Values of attribute */
|
||||
const h5_size_t nelems /*!< [in] Number of values */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER4 (h5_err_t,
|
||||
"f=%p, "
|
||||
"name=\"%s\""
|
||||
"values=0x%p, "
|
||||
"nelems=%llu",
|
||||
f,
|
||||
name,
|
||||
values,
|
||||
(long long unsigned)nelems);
|
||||
H5_API_RETURN (h5_write_attrib (
|
||||
f,
|
||||
H5_ATTRIB_STEP,
|
||||
@@ -219,7 +279,15 @@ H5WriteFileAttribInt64 (
|
||||
const h5_int64_t *values, /*!< [in] Values of attribute */
|
||||
const h5_size_t nelems /*!< [in] Number of values */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER4 (h5_err_t,
|
||||
"f=%p, "
|
||||
"name=\"%s\""
|
||||
"values=0x%p, "
|
||||
"nelems=%llu",
|
||||
f,
|
||||
name,
|
||||
values,
|
||||
(long long unsigned)nelems);
|
||||
H5_API_RETURN (h5_write_attrib (
|
||||
f,
|
||||
H5_ATTRIB_FILE,
|
||||
@@ -244,7 +312,15 @@ H5WriteStepAttribInt64 (
|
||||
const h5_int64_t *values, /*!< [in] Values of attribute */
|
||||
const h5_size_t nelems /*!< [in] Number of values */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER4 (h5_err_t,
|
||||
"f=%p, "
|
||||
"name=\"%s\""
|
||||
"values=0x%p, "
|
||||
"nelems=%llu",
|
||||
f,
|
||||
name,
|
||||
values,
|
||||
(long long unsigned)nelems);
|
||||
H5_API_RETURN (h5_write_attrib (
|
||||
f,
|
||||
H5_ATTRIB_STEP,
|
||||
@@ -270,7 +346,13 @@ H5ReadFileAttribString (
|
||||
const char *name, /*!< [in] Name of attribute to create */
|
||||
char *buffer /*!< [out] Value of attribute */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER3 (h5_err_t,
|
||||
"f=%p, "
|
||||
"name=\"%s\""
|
||||
"value=\"%s\"",
|
||||
f,
|
||||
name,
|
||||
buffer);
|
||||
H5_API_RETURN (h5_read_attrib (
|
||||
f,
|
||||
H5_ATTRIB_FILE,
|
||||
@@ -293,7 +375,13 @@ H5ReadStepAttribString (
|
||||
const char *name, /*!< [in] Name of attribute to create */
|
||||
char *buffer /*!< [out] Value of attribute */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER3 (h5_err_t,
|
||||
"f=%p, "
|
||||
"name=\"%s\""
|
||||
"value=\"%s\"",
|
||||
f,
|
||||
name,
|
||||
buffer);
|
||||
H5_API_RETURN (h5_read_attrib (
|
||||
f,
|
||||
H5_ATTRIB_STEP,
|
||||
@@ -316,7 +404,13 @@ H5ReadFileAttribInt32 (
|
||||
const char *name, /*!< [in] Name of attribute to create */
|
||||
h5_int32_t *buffer /*!< [out] Values of attribute */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER3 (h5_err_t,
|
||||
"f=%p, "
|
||||
"name=\"%s\""
|
||||
"buffer=0x%p",
|
||||
f,
|
||||
name,
|
||||
buffer);
|
||||
H5_API_RETURN (h5_read_attrib (
|
||||
f,
|
||||
H5_ATTRIB_FILE,
|
||||
@@ -339,7 +433,13 @@ H5ReadStepAttribInt32 (
|
||||
const char *name, /*!< [in] Name of attribute to create */
|
||||
h5_int32_t *buffer /*!< [out] Values of attribute */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER3 (h5_err_t,
|
||||
"f=%p, "
|
||||
"name=\"%s\""
|
||||
"buffer=0x%p",
|
||||
f,
|
||||
name,
|
||||
buffer);
|
||||
H5_API_RETURN (h5_read_attrib (
|
||||
f,
|
||||
H5_ATTRIB_STEP,
|
||||
@@ -362,7 +462,13 @@ H5ReadFileAttribInt64 (
|
||||
const char *name, /*!< [in] Name of attribute to create */
|
||||
h5_int64_t *buffer /*!< [out] Values of attribute */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER3 (h5_err_t,
|
||||
"f=%p, "
|
||||
"name=\"%s\""
|
||||
"buffer=0x%p",
|
||||
f,
|
||||
name,
|
||||
buffer);
|
||||
H5_API_RETURN (h5_read_attrib (
|
||||
f,
|
||||
H5_ATTRIB_FILE,
|
||||
@@ -385,7 +491,13 @@ H5ReadStepAttribInt64 (
|
||||
const char *name, /*!< [in] Name of attribute to create */
|
||||
h5_int64_t *buffer /*!< [out] Values of attribute */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER3 (h5_err_t,
|
||||
"f=%p, "
|
||||
"name=\"%s\""
|
||||
"buffer=0x%p",
|
||||
f,
|
||||
name,
|
||||
buffer);
|
||||
h5_err_t h5err = h5_read_attrib (
|
||||
f,
|
||||
H5_ATTRIB_STEP,
|
||||
@@ -409,7 +521,13 @@ H5ReadFileAttribFloat32 (
|
||||
const char *name, /*!< [in] Name of attribute to create */
|
||||
h5_float32_t *buffer /*!< [out] Values of attribute */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER3 (h5_err_t,
|
||||
"f=%p, "
|
||||
"name=\"%s\""
|
||||
"buffer=0x%p",
|
||||
f,
|
||||
name,
|
||||
buffer);
|
||||
H5_API_RETURN (h5_read_attrib (
|
||||
f,
|
||||
H5_ATTRIB_FILE,
|
||||
@@ -432,7 +550,13 @@ H5ReadStepAttribFloat32 (
|
||||
const char *name, /*!< [in] Name of attribute to create */
|
||||
h5_float32_t *buffer /*!< [out] Values of attribute */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER3 (h5_err_t,
|
||||
"f=%p, "
|
||||
"name=\"%s\""
|
||||
"buffer=0x%p",
|
||||
f,
|
||||
name,
|
||||
buffer);
|
||||
H5_API_RETURN (h5_read_attrib (
|
||||
f,
|
||||
H5_ATTRIB_STEP,
|
||||
@@ -455,7 +579,13 @@ H5ReadFileAttribFloat64 (
|
||||
const char *name, /*!< [in] Name of attribute to create */
|
||||
h5_float64_t *buffer /*!< [out] Values of attribute */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER3 (h5_err_t,
|
||||
"f=%p, "
|
||||
"name=\"%s\""
|
||||
"buffer=0x%p",
|
||||
f,
|
||||
name,
|
||||
buffer);
|
||||
H5_API_RETURN (h5_read_attrib (
|
||||
f,
|
||||
H5_ATTRIB_FILE,
|
||||
@@ -478,7 +608,13 @@ H5ReadStepAttribFloat64 (
|
||||
const char *name, /*!< [in] Name of attribute to create */
|
||||
h5_float64_t *buffer /*!< [out] Values of attribute */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER3 (h5_err_t,
|
||||
"f=%p, "
|
||||
"name=\"%s\""
|
||||
"buffer=0x%p",
|
||||
f,
|
||||
name,
|
||||
buffer);
|
||||
H5_API_RETURN (h5_read_attrib (
|
||||
f,
|
||||
H5_ATTRIB_STEP,
|
||||
@@ -500,7 +636,7 @@ h5_int64_t
|
||||
H5GetNumFileAttribs (
|
||||
h5_file_t *const f /*!< [in] Handle to open file */
|
||||
) {
|
||||
H5_API_ENTER (h5_int64_t);
|
||||
H5_API_ENTER1 (h5_int64_t, "f=0x%p", f);
|
||||
H5_API_RETURN (h5_get_num_attribs (f, H5_ATTRIB_FILE));
|
||||
}
|
||||
|
||||
@@ -515,7 +651,7 @@ h5_int64_t
|
||||
H5GetNumStepAttribs (
|
||||
h5_file_t *const f /*!< [in] Handle to open file */
|
||||
) {
|
||||
H5_API_ENTER (h5_int64_t);
|
||||
H5_API_ENTER1 (h5_int64_t, "f=0x%p", f);
|
||||
H5_API_RETURN (h5_get_num_attribs (f, H5_ATTRIB_STEP));
|
||||
}
|
||||
|
||||
@@ -545,7 +681,16 @@ H5GetFileAttribInfo (
|
||||
h5_int64_t *attrib_type, /*!< [out] Type of value. */
|
||||
h5_size_t *attrib_nelem /*!< [out] Number of elements */
|
||||
) {
|
||||
H5_API_ENTER (h5_int64_t);
|
||||
H5_API_ENTER6 (h5_err_t,
|
||||
"f=%p, "
|
||||
"attrib_idx=%llu, attrib_name=0x%p, len_attrib_name=%llu, "
|
||||
"attrib_type=%p, attrib_nelem=%p",
|
||||
f,
|
||||
(long long unsigned)attrib_idx,
|
||||
attrib_name,
|
||||
(long long unsigned)len_of_attrib_name,
|
||||
attrib_type,
|
||||
attrib_nelem);
|
||||
H5_API_RETURN (h5_get_attrib_info (
|
||||
f,
|
||||
H5_ATTRIB_FILE,
|
||||
@@ -580,7 +725,16 @@ H5GetStepAttribInfo (
|
||||
h5_int64_t *attrib_type, /*!< [out] Type of value. */
|
||||
h5_size_t *attrib_nelem /*!< [out] Number of elements */
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t);
|
||||
H5_API_ENTER6 (h5_err_t,
|
||||
"f=%p, "
|
||||
"attrib_idx=%llu, attrib_name=%p, len_attrib_name=%llu, "
|
||||
"attrib_type=%p, attrib_nelem=%p",
|
||||
f,
|
||||
(unsigned long long)attrib_idx,
|
||||
attrib_name,
|
||||
(unsigned long long)len_of_attrib_name,
|
||||
attrib_type,
|
||||
attrib_nelem);
|
||||
H5_API_RETURN (h5_get_attrib_info (
|
||||
f,
|
||||
H5_ATTRIB_STEP,
|
||||
|
||||
+3
-7
@@ -9,7 +9,7 @@ INCLUDES = -I../include @INCLUDES@
|
||||
lib_LIBRARIES = @LIB_C@
|
||||
|
||||
# Listing of all possible targets that I may build.
|
||||
EXTRA_LIBRARIES = libH5hutC.a
|
||||
EXTRA_LIBRARIES = ../lib/libH5hutC.a
|
||||
|
||||
# Header files that I wish to install in $(prefix)/include
|
||||
include_HEADERS = \
|
||||
@@ -31,24 +31,20 @@ include_HEADERS = \
|
||||
EXTRA_HEADERS =
|
||||
|
||||
# Listing of sources
|
||||
libH5hutC_a_SOURCES = \
|
||||
___lib_libH5hutC_a_SOURCES = \
|
||||
H5.c \
|
||||
H5_attribs.c \
|
||||
H5_attachments.c \
|
||||
H5Part.c \
|
||||
H5Block.c \
|
||||
H5Block_readwrite.c \
|
||||
H5Fed.c \
|
||||
H5Fed_adjacency.c \
|
||||
H5Fed_inquiry.c \
|
||||
H5Fed_retrieve.c \
|
||||
H5Fed_store.c \
|
||||
H5Fed_tags.c
|
||||
|
||||
all: all-am install-libs-local
|
||||
|
||||
install-libs-local:
|
||||
-cp ${lib_LIBRARIES} ../lib
|
||||
all: all-am
|
||||
|
||||
clean: clean-am
|
||||
|
||||
|
||||
+140
-129
@@ -32,18 +32,18 @@ fc_head = """
|
||||
write_scalar_h = """
|
||||
h5_err_t
|
||||
H5Block#DIM#dWriteScalarField#TYPE_ABV# (
|
||||
h5_file_t *f,
|
||||
h5_file_t *const f,
|
||||
const char *name,
|
||||
const h5_#TYPE_H5P#_t *data
|
||||
const h5_#TYPE_H5P#_t *buffer
|
||||
);
|
||||
"""
|
||||
|
||||
read_scalar_h = """
|
||||
h5_err_t
|
||||
H5Block#DIM#dReadScalarField#TYPE_ABV# (
|
||||
h5_file_t *f,
|
||||
h5_file_t *const f,
|
||||
const char *name,
|
||||
h5_#TYPE_H5P#_t *data
|
||||
h5_#TYPE_H5P#_t *buffer
|
||||
);
|
||||
"""
|
||||
|
||||
@@ -61,14 +61,14 @@ write_scalar_c = """
|
||||
*/
|
||||
h5_err_t
|
||||
H5Block#DIM#dWriteScalarField#TYPE_ABV# (
|
||||
h5_file_t *f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to write */
|
||||
const h5_#TYPE_H5P#_t *data /*!< IN: scalar data to write */
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to write */
|
||||
const h5_#TYPE_H5P#_t *buffer /*!< IN: pointer to write buffer */
|
||||
) {
|
||||
|
||||
SET_FNAME( f, __func__ );
|
||||
|
||||
return h5b_write_scalar_data(f, name, (void*)data, #TYPE_HDF5# );
|
||||
H5_API_ENTER3 (h5_err_t, "f=0x%p, name=\\"%s\\", buffer=0x%p",
|
||||
f, name, buffer);
|
||||
H5_API_RETURN (h5b_write_scalar_data(f, name, (void*)buffer, #TYPE_HDF5# ));
|
||||
}
|
||||
"""
|
||||
|
||||
@@ -86,14 +86,14 @@ read_scalar_c = """
|
||||
*/
|
||||
h5_err_t
|
||||
H5Block#DIM#dReadScalarField#TYPE_ABV# (
|
||||
h5_file_t *f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to read */
|
||||
h5_#TYPE_H5P#_t *data /*!< OUT: ptr to read buffer */
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to read */
|
||||
h5_#TYPE_H5P#_t *buffer /*!< OUT: pointer to read buffer */
|
||||
) {
|
||||
|
||||
SET_FNAME( f, __func__ );
|
||||
|
||||
return h5b_read_scalar_data(f, name, (void*)data, #TYPE_HDF5#);
|
||||
H5_API_ENTER3 (h5_err_t, "f=0x%p, name=\\"%s\\", buffer=0x%p",
|
||||
f, name, buffer);
|
||||
H5_API_RETURN (h5b_read_scalar_data(f, name, (void*)buffer, #TYPE_HDF5#));
|
||||
}
|
||||
"""
|
||||
|
||||
@@ -102,10 +102,10 @@ write_scalar_fi = """
|
||||
!! See \\ref H5Block#DIM#dWriteScalarField#TYPE_ABV#
|
||||
!! \\return 0 on success or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5bl_#DIM#d_write_scalar_field_#TYPE_F90_ABV# ( filehandle, name, data )
|
||||
INTEGER*8 FUNCTION h5bl_#DIM#d_write_scalar_field_#TYPE_F90_ABV# ( filehandle, name, buffer )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset
|
||||
#TYPE_F90#, INTENT(IN) :: data(*) !< the array of data
|
||||
#TYPE_F90#, INTENT(IN) :: buffer(*) !< the array of data
|
||||
END FUNCTION
|
||||
"""
|
||||
|
||||
@@ -114,10 +114,10 @@ read_scalar_fi = """
|
||||
!! See \\ref H5Block#DIM#dReadScalarField#TYPE_ABV#
|
||||
!! \\return 0 on success or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5bl_#DIM#d_read_scalar_field_#TYPE_F90_ABV# ( filehandle, name, data )
|
||||
INTEGER*8 FUNCTION h5bl_#DIM#d_read_scalar_field_#TYPE_F90_ABV# ( filehandle, name, buffer )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset
|
||||
#TYPE_F90#, INTENT(OUT) :: data(*) !< buffer to read the data into
|
||||
#TYPE_F90#, INTENT(OUT) :: buffer(*) !< buffer to read the data into
|
||||
END FUNCTION
|
||||
"""
|
||||
|
||||
@@ -130,19 +130,20 @@ write_scalar_fc = """
|
||||
|
||||
h5_err_t
|
||||
h5bl_#DIM#d_write_scalar_field_#TYPE_F90_ABV# (
|
||||
h5_int64_t *f,
|
||||
const char *field_name,
|
||||
const h5_#TYPE_H5P#_t *data,
|
||||
const int l_field_name
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
const h5_#TYPE_H5P#_t *buffer,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER4 (h5_err_t, "f=0x%p, name=\\"%s\\", buffer=0x%p, l_name=%d",
|
||||
fh, name, buffer, l_name);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
h5_err_t herr = h5b_write_scalar_data (
|
||||
filehandle, field_name2, (void*)data, #TYPE_HDF5# );
|
||||
free ( field_name2 );
|
||||
return herr;
|
||||
fh, name2, (void*)buffer, #TYPE_HDF5# );
|
||||
free ( name2 );
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
"""
|
||||
|
||||
@@ -155,41 +156,42 @@ read_scalar_fc = """
|
||||
|
||||
h5_err_t
|
||||
h5bl_#DIM#d_read_scalar_field_#TYPE_F90_ABV# (
|
||||
h5_int64_t *f,
|
||||
const char *field_name,
|
||||
h5_#TYPE_H5P#_t *data,
|
||||
const int l_field_name
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
h5_#TYPE_H5P#_t *buffer,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER4 (h5_err_t, "f=0x%p, name=\\"%s\\", buffer=0x%p, l_name=%d",
|
||||
fh, name, buffer, l_name);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
h5_err_t herr = h5b_read_scalar_data (
|
||||
filehandle, field_name2, data, #TYPE_HDF5# );
|
||||
free ( field_name2 );
|
||||
return herr;
|
||||
fh, name2, buffer, #TYPE_HDF5# );
|
||||
free ( name2 );
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
"""
|
||||
|
||||
write_vector_h = """
|
||||
h5_err_t
|
||||
H5Block#DIM#dWriteVector3dField#TYPE_ABV# (
|
||||
h5_file_t *f,
|
||||
h5_file_t *const f,
|
||||
const char *name,
|
||||
const h5_#TYPE_H5P#_t *x_data,
|
||||
const h5_#TYPE_H5P#_t *y_data,
|
||||
const h5_#TYPE_H5P#_t *z_data
|
||||
const h5_#TYPE_H5P#_t *x_buf,
|
||||
const h5_#TYPE_H5P#_t *y_buf,
|
||||
const h5_#TYPE_H5P#_t *z_buf
|
||||
);
|
||||
"""
|
||||
|
||||
read_vector_h = """
|
||||
h5_err_t
|
||||
H5Block#DIM#dReadVector3dField#TYPE_ABV# (
|
||||
h5_file_t *f,
|
||||
h5_file_t *const f,
|
||||
const char *name,
|
||||
h5_#TYPE_H5P#_t *x_data,
|
||||
h5_#TYPE_H5P#_t *y_data,
|
||||
h5_#TYPE_H5P#_t *z_data
|
||||
h5_#TYPE_H5P#_t *x_buf,
|
||||
h5_#TYPE_H5P#_t *y_buf,
|
||||
h5_#TYPE_H5P#_t *z_buf
|
||||
);
|
||||
"""
|
||||
|
||||
@@ -199,27 +201,27 @@ write_vector_c = """
|
||||
*/
|
||||
/*!
|
||||
Write a 3-dimensional field \\c name with 3-dimensional vectors as values
|
||||
from the buffers starting at \\c x_data, \\c y_data and \\c z_data to the
|
||||
from the buffers starting at \\c x_buf, \\c y_buf and \\c z_buf to the
|
||||
current time-step using the defined field layout. Values are 3-dimensional
|
||||
vectors with #TYPE_FULL# values.
|
||||
|
||||
You must use the Fortran indexing scheme to access items in \\c data.
|
||||
You must use the Fortran indexing scheme to access items in \\c x_buf.
|
||||
|
||||
\\return \\c H5_SUCCESS or error code
|
||||
*/
|
||||
h5_err_t
|
||||
H5Block#DIM#dWriteVector3dField#TYPE_ABV# (
|
||||
h5_file_t *f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to write */
|
||||
const h5_#TYPE_H5P#_t *x_data, /*!< IN: X axis data */
|
||||
const h5_#TYPE_H5P#_t *y_data, /*!< IN: Y axis data */
|
||||
const h5_#TYPE_H5P#_t *z_data /*!< IN: Z axis data */
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to write */
|
||||
const h5_#TYPE_H5P#_t *x_buf, /*!< IN: pointer to X axis buffer */
|
||||
const h5_#TYPE_H5P#_t *y_buf, /*!< IN: pointer to Y axis buffer */
|
||||
const h5_#TYPE_H5P#_t *z_buf /*!< IN: pointer to Z axis buffer */
|
||||
) {
|
||||
|
||||
SET_FNAME( f, __func__ );
|
||||
|
||||
return h5b_write_vector3d_data(f, name,
|
||||
(void*)x_data, (void*)y_data, (void*)z_data, #TYPE_HDF5#);
|
||||
H5_API_ENTER5 (h5_err_t, "f=0x%p, name=\\"%s\\", x_buf=0x%p, y_buf=0x%p, z_buf=0x%p",
|
||||
f, name, x_buf, y_buf, z_buf);
|
||||
H5_API_RETURN(h5b_write_vector3d_data(f, name,
|
||||
(void*)x_buf, (void*)y_buf, (void*)z_buf, #TYPE_HDF5#));
|
||||
}
|
||||
"""
|
||||
|
||||
@@ -229,7 +231,7 @@ read_vector_c = """
|
||||
*/
|
||||
/*!
|
||||
Read a 3-dimensional field \\c name with 3-dimensional vectors as values
|
||||
from the buffers starting at \\c x_data, \\c y_data and \\c z_data to the
|
||||
from the buffers starting at \\c x_buf, \\c y_buf and \\c z_buf to the
|
||||
current time-step using the defined field layout. Values are 3-dimensional
|
||||
vectors with #TYPE_FULL# values.
|
||||
|
||||
@@ -239,17 +241,17 @@ read_vector_c = """
|
||||
*/
|
||||
h5_err_t
|
||||
H5Block#DIM#dReadVector3dField#TYPE_ABV# (
|
||||
h5_file_t *f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to write */
|
||||
h5_#TYPE_H5P#_t *x_data, /*!< OUT: X axis data */
|
||||
h5_#TYPE_H5P#_t *y_data, /*!< OUT: Y axis data */
|
||||
h5_#TYPE_H5P#_t *z_data /*!< OUT: Z axis data */
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *name, /*!< IN: name of dataset to write */
|
||||
const h5_#TYPE_H5P#_t *x_buf, /*!< OUT: pointer to X axis buffer */
|
||||
const h5_#TYPE_H5P#_t *y_buf, /*!< OUT: pointer to Y axis buffer */
|
||||
const h5_#TYPE_H5P#_t *z_buf /*!< OUT: pointer to Z axis buffer */
|
||||
) {
|
||||
|
||||
SET_FNAME( f, __func__ );
|
||||
|
||||
return h5b_read_vector3d_data(f, name,
|
||||
(void*)x_data, (void*)y_data, (void*)z_data, #TYPE_HDF5#);
|
||||
H5_API_ENTER5 (h5_err_t, "f=0x%p, name=\\"%s\\", x_buf=0x%p, y_buf=0x%p, z_buf=0x%p",
|
||||
f, name, x_buf, y_buf, z_buf);
|
||||
H5_API_RETURN(h5b_read_vector3d_data(f, name,
|
||||
(void*)x_buf, (void*)y_buf, (void*)z_buf, #TYPE_HDF5#));
|
||||
}
|
||||
"""
|
||||
|
||||
@@ -290,22 +292,23 @@ write_vector_fc = """
|
||||
|
||||
h5_err_t
|
||||
h5bl_#DIM#d_write_vector3d_field_#TYPE_F90_ABV# (
|
||||
h5_int64_t *f, /*!< file handle */
|
||||
const char *field_name, /*!< name of the data set */
|
||||
const h5_#TYPE_H5P#_t *xval, /*!< array of x component data */
|
||||
const h5_#TYPE_H5P#_t *yval, /*!< array of y component data */
|
||||
const h5_#TYPE_H5P#_t *zval, /*!< array of z component data */
|
||||
const int l_field_name
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
const h5_#TYPE_H5P#_t *x_buf,
|
||||
const h5_#TYPE_H5P#_t *y_buf,
|
||||
const h5_#TYPE_H5P#_t *z_buf,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER6 (h5_err_t, "f=0x%p, name=\\"%s\\", x_buf=0x%p, y_buf=0x%p, z_buf=0x%p, l_name=%d",
|
||||
fh, name, x_buf, y_buf, z_buf, l_name);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
h5_err_t herr = h5b_write_vector3d_data (
|
||||
filehandle, field_name2,
|
||||
(void*)xval, (void*)yval, (void*)zval, #TYPE_HDF5# );
|
||||
free ( field_name2 );
|
||||
return herr;
|
||||
fh, name2,
|
||||
(void*)x_buf, (void*)y_buf, (void*)z_buf, #TYPE_HDF5# );
|
||||
free ( name2 );
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
"""
|
||||
|
||||
@@ -318,33 +321,34 @@ read_vector_fc = """
|
||||
|
||||
h5_err_t
|
||||
h5bl_#DIM#d_read_vector3d_field_#TYPE_F90_ABV# (
|
||||
h5_int64_t *f, /*!< file handle */
|
||||
const char *field_name, /*!< name of the data set */
|
||||
h5_#TYPE_H5P#_t *xval, /*!< array of x component data */
|
||||
h5_#TYPE_H5P#_t *yval, /*!< array of y component data */
|
||||
h5_#TYPE_H5P#_t *zval, /*!< array of z component data */
|
||||
const int l_field_name
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
h5_#TYPE_H5P#_t *x_buf,
|
||||
h5_#TYPE_H5P#_t *y_buf,
|
||||
h5_#TYPE_H5P#_t *z_buf,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER6 (h5_err_t, "f=0x%p, name=\\"%s\\", x_buf=0x%p, y_buf=0x%p, z_buf=0x%p, l_name=%d",
|
||||
fh, name, x_buf, y_buf, z_buf, l_name);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
h5_err_t herr = h5b_read_vector3d_data (
|
||||
filehandle, field_name2,
|
||||
(void*)xval, (void*)yval, (void*)zval, #TYPE_HDF5# );
|
||||
free ( field_name2 );
|
||||
return herr;
|
||||
fh, name2,
|
||||
(void*)x_buf, (void*)y_buf, (void*)z_buf, #TYPE_HDF5# );
|
||||
free ( name2 );
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
"""
|
||||
|
||||
write_attr_h = """
|
||||
h5_err_t
|
||||
H5BlockWriteFieldAttrib#TYPE_ABV# (
|
||||
h5_file_t *f,
|
||||
h5_file_t *const f,
|
||||
const char *field_name,
|
||||
const char *attrib_name,
|
||||
const h5_#TYPE_H5P#_t *values,
|
||||
const h5_size_t nvalues
|
||||
const h5_#TYPE_H5P#_t *buffer,
|
||||
const h5_size_t nelems
|
||||
);
|
||||
"""
|
||||
|
||||
@@ -359,22 +363,23 @@ write_attr_c = """
|
||||
*/
|
||||
h5_err_t
|
||||
H5BlockWriteFieldAttrib#TYPE_ABV# (
|
||||
h5_file_t *f, /*!< IN: file handle */
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *field_name, /*!< IN: field name */
|
||||
const char *attrib_name, /*!< IN: attribute name */
|
||||
const h5_#TYPE_H5P#_t *values, /*!< IN: attribute values */
|
||||
const h5_size_t nvalues /*!< IN: number of elements */
|
||||
const h5_#TYPE_H5P#_t *buffer, /*!< IN: attribute values */
|
||||
const h5_size_t nelems /*!< IN: number of elements */
|
||||
) {
|
||||
|
||||
SET_FNAME( f, __func__ );
|
||||
|
||||
return h5_write_field_attrib (
|
||||
H5_API_ENTER5 (h5_err_t, "f=0x%p, field_name=\\"%s\\", attrib_name=\\"%s\\", "
|
||||
"buffer=0x%p, nelems=%lld",
|
||||
f, field_name, attrib_name, buffer, (long long)nelems);
|
||||
H5_API_RETURN(h5_write_field_attrib (
|
||||
f,
|
||||
field_name,
|
||||
attrib_name,
|
||||
#TYPE_HDF5#,
|
||||
values,
|
||||
nvalues );
|
||||
buffer,
|
||||
nelems ));
|
||||
}
|
||||
"""
|
||||
|
||||
@@ -387,8 +392,8 @@ INTEGER*8 FUNCTION h5bl_writefieldattrib_#TYPE_F90_ABV# ( filehandle, field_name
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: field_name !< the name of the field
|
||||
CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< the name of the attribute
|
||||
#TYPE_F90#, INTENT(IN) :: values(*) !< the array of data to write into the attribute
|
||||
INTEGER*8, INTENT(IN) :: nvalues !< the number of elements in the array
|
||||
#TYPE_F90#, INTENT(IN) :: buffer(*) !< the array of data to write into the attribute
|
||||
INTEGER*8, INTENT(IN) :: nelems !< the number of elements in the array
|
||||
END FUNCTION
|
||||
"""
|
||||
|
||||
@@ -401,32 +406,35 @@ write_attr_fc = """
|
||||
|
||||
h5_err_t
|
||||
h5bl_writefieldattrib_#TYPE_F90_ABV# (
|
||||
h5_int64_t *f,
|
||||
h5_int64_t *const f,
|
||||
const char *field_name,
|
||||
const char *attrib_name,
|
||||
const h5_#TYPE_H5P#_t *values,
|
||||
const h5_size_t *nvalues,
|
||||
const h5_#TYPE_H5P#_t *buffer,
|
||||
const h5_size_t *nelems,
|
||||
const int l_field_name,
|
||||
const int l_attrib_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER7 (h5_err_t, "f=0x%p, field_name=\\"%s\\", attrib_name=\\"%s\\", "
|
||||
"buffer=0x%p, nelems=%lld, l_field_name=%d, l_attrib_name=%d",
|
||||
fh, field_name, attrib_name, buffer, (long long)*nelems,
|
||||
l_field_name, l_attrib_name);
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
char *attrib_name2 = h5_strdupfor2c ( attrib_name, l_attrib_name );
|
||||
h5_err_t herr = h5_write_field_attrib (
|
||||
filehandle, field_name2, attrib_name2,
|
||||
#TYPE_HDF5#, values, *nvalues );
|
||||
fh, field_name2, attrib_name2,
|
||||
#TYPE_HDF5#, buffer, *nelems );
|
||||
free ( field_name2 );
|
||||
free ( attrib_name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
"""
|
||||
|
||||
read_attr_h = """
|
||||
h5_err_t
|
||||
H5BlockReadFieldAttrib#TYPE_ABV# (
|
||||
h5_file_t *f,
|
||||
h5_file_t *const f,
|
||||
const char *field_name,
|
||||
const char *attrib_name,
|
||||
h5_#TYPE_H5P#_t *buffer
|
||||
@@ -444,20 +452,20 @@ read_attr_c = """
|
||||
*/
|
||||
h5_err_t
|
||||
H5BlockReadFieldAttrib#TYPE_ABV# (
|
||||
h5_file_t *f, /*!< IN: file handle */
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *field_name, /*!< IN: field name */
|
||||
const char *attrib_name, /*!< IN: attribute name */
|
||||
h5_#TYPE_H5P#_t *buffer /*!< OUT: attribute values */
|
||||
) {
|
||||
|
||||
SET_FNAME( f, __func__ );
|
||||
|
||||
return h5_read_field_attrib (
|
||||
H5_API_ENTER4 (h5_err_t, "f=%p, field_name=\\\"%s\\", attrib_name=\\"%s\\", buffer=0x%p",
|
||||
f, field_name, attrib_name, buffer);
|
||||
H5_API_RETURN(h5_read_field_attrib (
|
||||
f,
|
||||
field_name,
|
||||
attrib_name,
|
||||
#TYPE_HDF5#,
|
||||
(void*)buffer);
|
||||
(void*)buffer ));
|
||||
}
|
||||
"""
|
||||
|
||||
@@ -470,7 +478,7 @@ INTEGER*8 FUNCTION h5bl_readfieldattrib_#TYPE_F90_ABV# ( filehandle, field_name,
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: field_name !< the name of the field
|
||||
CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< the name of the attribute
|
||||
#TYPE_F90#, INTENT(IN) :: values(*) !< the buffer to read into
|
||||
#TYPE_F90#, INTENT(IN) :: buffer(*) !< the buffer to read into
|
||||
END FUNCTION
|
||||
"""
|
||||
|
||||
@@ -483,23 +491,26 @@ read_attr_fc = """
|
||||
|
||||
h5_err_t
|
||||
h5bl_readfieldattrib_#TYPE_F90_ABV# (
|
||||
h5_int64_t *f,
|
||||
h5_int64_t *const f,
|
||||
const char *field_name,
|
||||
const char *attrib_name,
|
||||
h5_#TYPE_H5P#_t *values,
|
||||
h5_#TYPE_H5P#_t *buffer,
|
||||
const int l_field_name,
|
||||
const int l_attrib_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER6 (h5_err_t, "f=0x%p, field_name=\\"%s\\", attrib_name=\\"%s\\", "
|
||||
"values=0x%p, l_field_name=%d, l_attrib_name=%d",
|
||||
fh, field_name, attrib_name, buffer,
|
||||
l_field_name, l_attrib_name);
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
char *attrib_name2 = h5_strdupfor2c ( attrib_name, l_attrib_name );
|
||||
h5_err_t herr = h5_read_field_attrib (
|
||||
filehandle, field_name2, attrib_name2, #TYPE_HDF5#, values );
|
||||
fh, field_name2, attrib_name2, #TYPE_HDF5#, buffer );
|
||||
free ( field_name2 );
|
||||
free ( attrib_name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
"""
|
||||
|
||||
|
||||
+146
-103
@@ -52,173 +52,202 @@
|
||||
|
||||
h5_err_t
|
||||
h5bl_3d_setview (
|
||||
h5_int64_t *f,
|
||||
h5_int64_t *const f,
|
||||
const h5_int64_t *i_start, /*!< start index of i */
|
||||
const h5_int64_t *i_end, /*!< end index of i */
|
||||
const h5_int64_t *j_start, /*!< start index of j */
|
||||
const h5_int64_t *j_end, /*!< end index of j */
|
||||
const h5_int64_t *k_start, /*!< start index of k */
|
||||
const h5_int64_t *k_end /*!< end index of k */
|
||||
const h5_int64_t *k_end /*!< end index of k */
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
return h5b_3d_set_view (
|
||||
filehandle,
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER7 (h5_err_t,
|
||||
"f=0X%p, "
|
||||
"i_start=%lld, i_end=%lld, "
|
||||
"j_start=%lld, j_end=%lld, "
|
||||
"k_start=%lld, k_end=%lld",
|
||||
fh,
|
||||
(long long)i_start, (long long)i_end,
|
||||
(long long)j_start, (long long)j_end,
|
||||
(long long)k_start, (long long)k_end);
|
||||
H5_API_RETURN(h5b_3d_set_view (
|
||||
fh,
|
||||
*i_start-1, *i_end-1,
|
||||
*j_start-1, *j_end-1,
|
||||
*k_start-1, *k_end-1 );
|
||||
*k_start-1, *k_end-1 ));
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
h5bl_3d_setchunk (
|
||||
h5_int64_t *f,
|
||||
h5_int64_t *const f,
|
||||
const h5_int64_t *i,
|
||||
const h5_int64_t *j,
|
||||
const h5_int64_t *k
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
return h5b_3d_set_chunk ( filehandle, *i, *j, *k );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER4 (h5_err_t,
|
||||
"f=0x%p, i=%lld, j=%lld, k=%lld",
|
||||
fh, (long long)i, (long long)j, (long long)k);
|
||||
H5_API_RETURN(h5b_3d_set_chunk ( fh, *i, *j, *k ));
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
h5bl_3d_getview (
|
||||
h5_int64_t *f,
|
||||
h5_int64_t *i_start,
|
||||
h5_int64_t *i_end,
|
||||
h5_int64_t *j_start,
|
||||
h5_int64_t *j_end,
|
||||
h5_int64_t *k_start,
|
||||
h5_int64_t *k_end
|
||||
h5_int64_t *const f,
|
||||
h5_int64_t *const i_start,
|
||||
h5_int64_t *const i_end,
|
||||
h5_int64_t *const j_start,
|
||||
h5_int64_t *const j_end,
|
||||
h5_int64_t *const k_start,
|
||||
h5_int64_t *const k_end
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
|
||||
h5_err_t herr = h5b_3d_get_view (
|
||||
filehandle,
|
||||
i_start, i_end, j_start, j_end, k_start, k_end );
|
||||
if ( herr < 0 ) return herr;
|
||||
|
||||
return H5_SUCCESS;
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER7 (h5_err_t,
|
||||
"f=0X%p, "
|
||||
"i_start=0x%p, i_end=0x%p, "
|
||||
"j_start=0x%p, j_end=0x%p, "
|
||||
"k_start=0x%p, k_end=0x%p",
|
||||
fh,
|
||||
i_start, i_end,
|
||||
j_start, j_end,
|
||||
k_start, k_end);
|
||||
H5_API_RETURN(h5b_3d_get_view (
|
||||
fh,
|
||||
i_start, i_end, j_start, j_end, k_start, k_end ));
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
h5bl_3d_getreducedview (
|
||||
h5_int64_t *f,
|
||||
h5_int64_t *i_start,
|
||||
h5_int64_t *i_end,
|
||||
h5_int64_t *j_start,
|
||||
h5_int64_t *j_end,
|
||||
h5_int64_t *k_start,
|
||||
h5_int64_t *k_end
|
||||
h5_int64_t *const f,
|
||||
h5_int64_t *const i_start,
|
||||
h5_int64_t *const i_end,
|
||||
h5_int64_t *const j_start,
|
||||
h5_int64_t *const j_end,
|
||||
h5_int64_t *const k_start,
|
||||
h5_int64_t *const k_end
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
|
||||
h5_err_t herr = h5b_3d_get_reduced_view (
|
||||
filehandle,
|
||||
i_start, i_end, j_start, j_end, k_start, k_end );
|
||||
if ( herr < 0 ) return herr;
|
||||
|
||||
return H5_SUCCESS;
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER7 (h5_err_t,
|
||||
"f=0X%p, "
|
||||
"i_start=0x%p, i_end=0x%p, "
|
||||
"j_start=0x%p, j_end=0x%p, "
|
||||
"k_start=0x%p, k_end=0x%p",
|
||||
fh,
|
||||
i_start, i_end,
|
||||
j_start, j_end,
|
||||
k_start, k_end);
|
||||
H5_API_RETURN(h5b_3d_get_reduced_view (
|
||||
fh,
|
||||
i_start, i_end, j_start, j_end, k_start, k_end ));
|
||||
}
|
||||
|
||||
h5_int64_t
|
||||
h5bl_3d_hasview (
|
||||
h5_int64_t *f
|
||||
h5_int64_t *const f
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
return h5b_3d_has_view ( filehandle );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER1 (h5_int64_t, "f=0x%p", fh);
|
||||
H5_API_RETURN(h5b_3d_has_view ( fh ));
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
h5bl_getnumfields (
|
||||
h5_int64_t *f /*!< file handle */
|
||||
h5_int64_t *const f
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
return h5b_get_num_fields ( filehandle );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER1 (h5_int64_t, "f=0x%p", fh);
|
||||
H5_API_RETURN(h5b_get_num_fields ( fh ));
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
h5bl_getfieldinfo (
|
||||
h5_int64_t *f,
|
||||
h5_int64_t *const f,
|
||||
const h5_int64_t *idx,
|
||||
char *field_name,
|
||||
char *name,
|
||||
h5_size_t *field_rank,
|
||||
h5_size_t *field_dims,
|
||||
h5_size_t *elem_rank,
|
||||
h5_int64_t *type,
|
||||
const int l_field_name
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER8 (h5_err_t,
|
||||
"f=0x%p, idx=%lld, "
|
||||
"name=0x%p,"
|
||||
"field_rank=0x%p, field_dims=0x%p, elem_rank=0x%p, type=0x%p, l_name=%d",
|
||||
fh, (long long)*idx, name,
|
||||
field_rank, field_dims, elem_rank, type, l_name);
|
||||
h5_err_t herr = h5b_get_field_info (
|
||||
filehandle, *idx, field_name, l_field_name,
|
||||
fh, *idx, name, (h5_size_t)l_name,
|
||||
field_rank, field_dims, elem_rank, type );
|
||||
h5_strc2for ( field_name, l_field_name );
|
||||
return herr;
|
||||
h5_strc2for ( name, l_name );
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
h5bl_writefieldattrib_string (
|
||||
h5_int64_t *f,
|
||||
h5_int64_t *const f,
|
||||
const char *field_name,
|
||||
const char *attrib_name,
|
||||
const char *attrib_value,
|
||||
const char *buffer,
|
||||
const int l_field_name,
|
||||
const int l_attrib_name,
|
||||
const int l_attrib_value
|
||||
const int l_buffer
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
char *attrib_name2 = h5_strdupfor2c ( attrib_name, l_attrib_name );
|
||||
char *attrib_value2 = h5_strdupfor2c ( attrib_value, l_attrib_value );
|
||||
|
||||
char *buffer2 = h5_strdupfor2c ( buffer, l_buffer );
|
||||
H5_API_ENTER7 (h5_err_t,
|
||||
"f=%p, "
|
||||
"field_name=\"%s\", "
|
||||
"attrib_name=\"%s\", "
|
||||
"buffer=\"%s\", "
|
||||
"l_field_name=%d, "
|
||||
"l_attrib_name=%d, "
|
||||
"l_buffer=%d",
|
||||
fh,
|
||||
field_name2,
|
||||
attrib_name2,
|
||||
buffer2, l_field_name, l_attrib_name, l_buffer);
|
||||
h5_err_t herr = h5_write_field_attrib (
|
||||
filehandle, field_name2, attrib_name2,
|
||||
H5T_NATIVE_CHAR, attrib_value2, strlen(attrib_value2)+1 );
|
||||
fh, field_name2, attrib_name2,
|
||||
H5_STRING_T, buffer2, strlen(buffer2)+1 );
|
||||
|
||||
free ( field_name2 );
|
||||
free ( attrib_name2 );
|
||||
free ( attrib_value2 );
|
||||
return herr;
|
||||
free ( buffer2 );
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
|
||||
h5_err_t
|
||||
h5bl_getnfieldattribs (
|
||||
h5_int64_t *f,
|
||||
const char *field_name,
|
||||
const int l_field_name
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
|
||||
h5_err_t herr = h5b_get_num_field_attribs (
|
||||
filehandle, field_name2 );
|
||||
|
||||
free ( field_name2 );
|
||||
return herr;
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
H5_API_ENTER3 (h5_err_t,
|
||||
"f=0x%p, name=\"%s\", l_name=%d", fh, name2, l_name);
|
||||
h5_err_t herr = h5b_get_num_field_attribs ( fh, name2 );
|
||||
free ( name2 );
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
h5bl_getfieldattribinfo (
|
||||
h5_int64_t *f,
|
||||
h5_int64_t *const f,
|
||||
const char *field_name,
|
||||
const h5_int64_t *attrib_idx,
|
||||
char *attrib_name,
|
||||
@@ -227,15 +256,21 @@ h5bl_getfieldattribinfo (
|
||||
const int l_attrib_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
|
||||
h5_int64_t attrib_type;
|
||||
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
H5_API_ENTER7 (h5_err_t,
|
||||
"f=%p field_name=\"%s\", "
|
||||
"attrib_idx=%lld, "
|
||||
"attrib_name=0x%p, "
|
||||
"attrib_nelem=0x%p, l_field_name=%d, l_attrib_name=%d",
|
||||
fh,
|
||||
field_name2,
|
||||
(long long)*attrib_idx,
|
||||
attrib_name, attrib_nelem, l_field_name, l_attrib_name);
|
||||
|
||||
h5_int64_t attrib_type;
|
||||
h5_err_t herr = h5b_get_field_attrib_info (
|
||||
filehandle, field_name2, *attrib_idx,
|
||||
fh, field_name2, *attrib_idx,
|
||||
attrib_name, l_attrib_name,
|
||||
&attrib_type,
|
||||
attrib_nelem );
|
||||
@@ -243,35 +278,43 @@ h5bl_getfieldattribinfo (
|
||||
h5_strc2for ( attrib_name, l_attrib_name );
|
||||
|
||||
free ( field_name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
|
||||
h5_err_t
|
||||
h5bl_readfieldattrib_string (
|
||||
h5_int64_t *f,
|
||||
h5_int64_t *const f,
|
||||
const char *field_name,
|
||||
const char *attrib_name,
|
||||
char *attrib_value,
|
||||
char *buffer,
|
||||
const int l_field_name,
|
||||
const int l_attrib_name,
|
||||
const int l_attrib_value
|
||||
const int l_buffer
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
char *attrib_name2 = h5_strdupfor2c ( attrib_name, l_attrib_name );
|
||||
H5_API_ENTER7 (h5_err_t,
|
||||
"f=%p, "
|
||||
"field_name=\"%s\", "
|
||||
"attrib_name=\"%s\", "
|
||||
"buffer=0x%p, l_field_name=%d, l_attrib_name=%d, l_buffer=%d",
|
||||
fh,
|
||||
field_name,
|
||||
attrib_name,
|
||||
buffer, l_field_name, l_attrib_name, l_buffer);
|
||||
|
||||
h5_err_t herr = h5_read_field_attrib (
|
||||
filehandle, field_name2, attrib_name2,
|
||||
H5_STRING_T, attrib_value );
|
||||
fh, field_name2, attrib_name2,
|
||||
H5_STRING_T, buffer );
|
||||
|
||||
h5_strc2for ( attrib_value, l_attrib_value );
|
||||
h5_strc2for ( buffer, l_buffer );
|
||||
|
||||
free ( field_name2 );
|
||||
free ( attrib_name2 );
|
||||
return herr;
|
||||
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,20 +3,20 @@
|
||||
!! See \ref H5Block3dWriteScalarFieldFloat64
|
||||
!! \return 0 on success or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5bl_3d_write_scalar_field_r8 ( filehandle, name, data )
|
||||
INTEGER*8 FUNCTION h5bl_3d_write_scalar_field_r8 ( filehandle, name, buffer )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset
|
||||
REAL*8, INTENT(IN) :: data(*) !< the array of data
|
||||
REAL*8, INTENT(IN) :: buffer(*) !< the array of data
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5block_data_f
|
||||
!! See \ref H5Block3dReadScalarFieldFloat64
|
||||
!! \return 0 on success or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5bl_3d_read_scalar_field_r8 ( filehandle, name, data )
|
||||
INTEGER*8 FUNCTION h5bl_3d_read_scalar_field_r8 ( filehandle, name, buffer )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset
|
||||
REAL*8, INTENT(OUT) :: data(*) !< buffer to read the data into
|
||||
REAL*8, INTENT(OUT) :: buffer(*) !< buffer to read the data into
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5block_data_f
|
||||
@@ -47,20 +47,20 @@ END FUNCTION
|
||||
!! See \ref H5Block3dWriteScalarFieldFloat32
|
||||
!! \return 0 on success or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5bl_3d_write_scalar_field_r4 ( filehandle, name, data )
|
||||
INTEGER*8 FUNCTION h5bl_3d_write_scalar_field_r4 ( filehandle, name, buffer )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset
|
||||
REAL*4, INTENT(IN) :: data(*) !< the array of data
|
||||
REAL*4, INTENT(IN) :: buffer(*) !< the array of data
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5block_data_f
|
||||
!! See \ref H5Block3dReadScalarFieldFloat32
|
||||
!! \return 0 on success or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5bl_3d_read_scalar_field_r4 ( filehandle, name, data )
|
||||
INTEGER*8 FUNCTION h5bl_3d_read_scalar_field_r4 ( filehandle, name, buffer )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset
|
||||
REAL*4, INTENT(OUT) :: data(*) !< buffer to read the data into
|
||||
REAL*4, INTENT(OUT) :: buffer(*) !< buffer to read the data into
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5block_data_f
|
||||
@@ -91,20 +91,20 @@ END FUNCTION
|
||||
!! See \ref H5Block3dWriteScalarFieldInt64
|
||||
!! \return 0 on success or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5bl_3d_write_scalar_field_i8 ( filehandle, name, data )
|
||||
INTEGER*8 FUNCTION h5bl_3d_write_scalar_field_i8 ( filehandle, name, buffer )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset
|
||||
INTEGER*8, INTENT(IN) :: data(*) !< the array of data
|
||||
INTEGER*8, INTENT(IN) :: buffer(*) !< the array of data
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5block_data_f
|
||||
!! See \ref H5Block3dReadScalarFieldInt64
|
||||
!! \return 0 on success or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5bl_3d_read_scalar_field_i8 ( filehandle, name, data )
|
||||
INTEGER*8 FUNCTION h5bl_3d_read_scalar_field_i8 ( filehandle, name, buffer )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset
|
||||
INTEGER*8, INTENT(OUT) :: data(*) !< buffer to read the data into
|
||||
INTEGER*8, INTENT(OUT) :: buffer(*) !< buffer to read the data into
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5block_data_f
|
||||
@@ -135,20 +135,20 @@ END FUNCTION
|
||||
!! See \ref H5Block3dWriteScalarFieldInt32
|
||||
!! \return 0 on success or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5bl_3d_write_scalar_field_i4 ( filehandle, name, data )
|
||||
INTEGER*8 FUNCTION h5bl_3d_write_scalar_field_i4 ( filehandle, name, buffer )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset
|
||||
INTEGER*4, INTENT(IN) :: data(*) !< the array of data
|
||||
INTEGER*4, INTENT(IN) :: buffer(*) !< the array of data
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5block_data_f
|
||||
!! See \ref H5Block3dReadScalarFieldInt32
|
||||
!! \return 0 on success or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5bl_3d_read_scalar_field_i4 ( filehandle, name, data )
|
||||
INTEGER*8 FUNCTION h5bl_3d_read_scalar_field_i4 ( filehandle, name, buffer )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset
|
||||
INTEGER*4, INTENT(OUT) :: data(*) !< buffer to read the data into
|
||||
INTEGER*4, INTENT(OUT) :: buffer(*) !< buffer to read the data into
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5block_data_f
|
||||
@@ -183,8 +183,8 @@ INTEGER*8 FUNCTION h5bl_writefieldattrib_r8 ( filehandle, field_name, attrib_nam
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: field_name !< the name of the field
|
||||
CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< the name of the attribute
|
||||
REAL*8, INTENT(IN) :: values(*) !< the array of data to write into the attribute
|
||||
INTEGER*8, INTENT(IN) :: nvalues !< the number of elements in the array
|
||||
REAL*8, INTENT(IN) :: buffer(*) !< the array of data to write into the attribute
|
||||
INTEGER*8, INTENT(IN) :: nelems !< the number of elements in the array
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5block_attrib_f
|
||||
@@ -195,7 +195,7 @@ INTEGER*8 FUNCTION h5bl_readfieldattrib_r8 ( filehandle, field_name, attrib_name
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: field_name !< the name of the field
|
||||
CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< the name of the attribute
|
||||
REAL*8, INTENT(IN) :: values(*) !< the buffer to read into
|
||||
REAL*8, INTENT(IN) :: buffer(*) !< the buffer to read into
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5block_attrib_f
|
||||
@@ -206,8 +206,8 @@ INTEGER*8 FUNCTION h5bl_writefieldattrib_r4 ( filehandle, field_name, attrib_nam
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: field_name !< the name of the field
|
||||
CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< the name of the attribute
|
||||
REAL*4, INTENT(IN) :: values(*) !< the array of data to write into the attribute
|
||||
INTEGER*8, INTENT(IN) :: nvalues !< the number of elements in the array
|
||||
REAL*4, INTENT(IN) :: buffer(*) !< the array of data to write into the attribute
|
||||
INTEGER*8, INTENT(IN) :: nelems !< the number of elements in the array
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5block_attrib_f
|
||||
@@ -218,7 +218,7 @@ INTEGER*8 FUNCTION h5bl_readfieldattrib_r4 ( filehandle, field_name, attrib_name
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: field_name !< the name of the field
|
||||
CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< the name of the attribute
|
||||
REAL*4, INTENT(IN) :: values(*) !< the buffer to read into
|
||||
REAL*4, INTENT(IN) :: buffer(*) !< the buffer to read into
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5block_attrib_f
|
||||
@@ -229,8 +229,8 @@ INTEGER*8 FUNCTION h5bl_writefieldattrib_i8 ( filehandle, field_name, attrib_nam
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: field_name !< the name of the field
|
||||
CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< the name of the attribute
|
||||
INTEGER*8, INTENT(IN) :: values(*) !< the array of data to write into the attribute
|
||||
INTEGER*8, INTENT(IN) :: nvalues !< the number of elements in the array
|
||||
INTEGER*8, INTENT(IN) :: buffer(*) !< the array of data to write into the attribute
|
||||
INTEGER*8, INTENT(IN) :: nelems !< the number of elements in the array
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5block_attrib_f
|
||||
@@ -241,7 +241,7 @@ INTEGER*8 FUNCTION h5bl_readfieldattrib_i8 ( filehandle, field_name, attrib_name
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: field_name !< the name of the field
|
||||
CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< the name of the attribute
|
||||
INTEGER*8, INTENT(IN) :: values(*) !< the buffer to read into
|
||||
INTEGER*8, INTENT(IN) :: buffer(*) !< the buffer to read into
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5block_attrib_f
|
||||
@@ -252,8 +252,8 @@ INTEGER*8 FUNCTION h5bl_writefieldattrib_i4 ( filehandle, field_name, attrib_nam
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: field_name !< the name of the field
|
||||
CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< the name of the attribute
|
||||
INTEGER*4, INTENT(IN) :: values(*) !< the array of data to write into the attribute
|
||||
INTEGER*8, INTENT(IN) :: nvalues !< the number of elements in the array
|
||||
INTEGER*4, INTENT(IN) :: buffer(*) !< the array of data to write into the attribute
|
||||
INTEGER*8, INTENT(IN) :: nelems !< the number of elements in the array
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5block_attrib_f
|
||||
@@ -264,5 +264,5 @@ INTEGER*8 FUNCTION h5bl_readfieldattrib_i4 ( filehandle, field_name, attrib_name
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: field_name !< the name of the field
|
||||
CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< the name of the attribute
|
||||
INTEGER*4, INTENT(IN) :: values(*) !< the buffer to read into
|
||||
INTEGER*4, INTENT(IN) :: buffer(*) !< the buffer to read into
|
||||
END FUNCTION
|
||||
|
||||
+280
-240
@@ -21,19 +21,20 @@
|
||||
|
||||
h5_err_t
|
||||
h5bl_3d_write_scalar_field_r8 (
|
||||
h5_int64_t *f,
|
||||
const char *field_name,
|
||||
const h5_float64_t *data,
|
||||
const int l_field_name
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
const h5_float64_t *buffer,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER4 (h5_err_t, "f=0x%p, name=\"%s\", buffer=0x%p, l_name=%d",
|
||||
fh, name, buffer, l_name);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
h5_err_t herr = h5b_write_scalar_data (
|
||||
filehandle, field_name2, (void*)data, H5T_NATIVE_DOUBLE );
|
||||
free ( field_name2 );
|
||||
return herr;
|
||||
fh, name2, (void*)buffer, H5T_NATIVE_DOUBLE );
|
||||
free ( name2 );
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
@@ -44,19 +45,20 @@ h5bl_3d_write_scalar_field_r8 (
|
||||
|
||||
h5_err_t
|
||||
h5bl_3d_read_scalar_field_r8 (
|
||||
h5_int64_t *f,
|
||||
const char *field_name,
|
||||
h5_float64_t *data,
|
||||
const int l_field_name
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
h5_float64_t *buffer,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER4 (h5_err_t, "f=0x%p, name=\"%s\", buffer=0x%p, l_name=%d",
|
||||
fh, name, buffer, l_name);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
h5_err_t herr = h5b_read_scalar_data (
|
||||
filehandle, field_name2, data, H5T_NATIVE_DOUBLE );
|
||||
free ( field_name2 );
|
||||
return herr;
|
||||
fh, name2, buffer, H5T_NATIVE_DOUBLE );
|
||||
free ( name2 );
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
@@ -67,22 +69,23 @@ h5bl_3d_read_scalar_field_r8 (
|
||||
|
||||
h5_err_t
|
||||
h5bl_3d_write_vector3d_field_r8 (
|
||||
h5_int64_t *f, /*!< file handle */
|
||||
const char *field_name, /*!< name of the data set */
|
||||
const h5_float64_t *xval, /*!< array of x component data */
|
||||
const h5_float64_t *yval, /*!< array of y component data */
|
||||
const h5_float64_t *zval, /*!< array of z component data */
|
||||
const int l_field_name
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
const h5_float64_t *x_buf,
|
||||
const h5_float64_t *y_buf,
|
||||
const h5_float64_t *z_buf,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER6 (h5_err_t, "f=0x%p, name=\"%s\", x_buf=0x%p, y_buf=0x%p, z_buf=0x%p, l_name=%d",
|
||||
fh, name, x_buf, y_buf, z_buf, l_name);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
h5_err_t herr = h5b_write_vector3d_data (
|
||||
filehandle, field_name2,
|
||||
(void*)xval, (void*)yval, (void*)zval, H5T_NATIVE_DOUBLE );
|
||||
free ( field_name2 );
|
||||
return herr;
|
||||
fh, name2,
|
||||
(void*)x_buf, (void*)y_buf, (void*)z_buf, H5T_NATIVE_DOUBLE );
|
||||
free ( name2 );
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
@@ -93,22 +96,23 @@ h5bl_3d_write_vector3d_field_r8 (
|
||||
|
||||
h5_err_t
|
||||
h5bl_3d_read_vector3d_field_r8 (
|
||||
h5_int64_t *f, /*!< file handle */
|
||||
const char *field_name, /*!< name of the data set */
|
||||
h5_float64_t *xval, /*!< array of x component data */
|
||||
h5_float64_t *yval, /*!< array of y component data */
|
||||
h5_float64_t *zval, /*!< array of z component data */
|
||||
const int l_field_name
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
h5_float64_t *x_buf,
|
||||
h5_float64_t *y_buf,
|
||||
h5_float64_t *z_buf,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER6 (h5_err_t, "f=0x%p, name=\"%s\", x_buf=0x%p, y_buf=0x%p, z_buf=0x%p, l_name=%d",
|
||||
fh, name, x_buf, y_buf, z_buf, l_name);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
h5_err_t herr = h5b_read_vector3d_data (
|
||||
filehandle, field_name2,
|
||||
(void*)xval, (void*)yval, (void*)zval, H5T_NATIVE_DOUBLE );
|
||||
free ( field_name2 );
|
||||
return herr;
|
||||
fh, name2,
|
||||
(void*)x_buf, (void*)y_buf, (void*)z_buf, H5T_NATIVE_DOUBLE );
|
||||
free ( name2 );
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
@@ -119,19 +123,20 @@ h5bl_3d_read_vector3d_field_r8 (
|
||||
|
||||
h5_err_t
|
||||
h5bl_3d_write_scalar_field_r4 (
|
||||
h5_int64_t *f,
|
||||
const char *field_name,
|
||||
const h5_float32_t *data,
|
||||
const int l_field_name
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
const h5_float32_t *buffer,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER4 (h5_err_t, "f=0x%p, name=\"%s\", buffer=0x%p, l_name=%d",
|
||||
fh, name, buffer, l_name);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
h5_err_t herr = h5b_write_scalar_data (
|
||||
filehandle, field_name2, (void*)data, H5T_NATIVE_FLOAT );
|
||||
free ( field_name2 );
|
||||
return herr;
|
||||
fh, name2, (void*)buffer, H5T_NATIVE_FLOAT );
|
||||
free ( name2 );
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
@@ -142,19 +147,20 @@ h5bl_3d_write_scalar_field_r4 (
|
||||
|
||||
h5_err_t
|
||||
h5bl_3d_read_scalar_field_r4 (
|
||||
h5_int64_t *f,
|
||||
const char *field_name,
|
||||
h5_float32_t *data,
|
||||
const int l_field_name
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
h5_float32_t *buffer,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER4 (h5_err_t, "f=0x%p, name=\"%s\", buffer=0x%p, l_name=%d",
|
||||
fh, name, buffer, l_name);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
h5_err_t herr = h5b_read_scalar_data (
|
||||
filehandle, field_name2, data, H5T_NATIVE_FLOAT );
|
||||
free ( field_name2 );
|
||||
return herr;
|
||||
fh, name2, buffer, H5T_NATIVE_FLOAT );
|
||||
free ( name2 );
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
@@ -165,22 +171,23 @@ h5bl_3d_read_scalar_field_r4 (
|
||||
|
||||
h5_err_t
|
||||
h5bl_3d_write_vector3d_field_r4 (
|
||||
h5_int64_t *f, /*!< file handle */
|
||||
const char *field_name, /*!< name of the data set */
|
||||
const h5_float32_t *xval, /*!< array of x component data */
|
||||
const h5_float32_t *yval, /*!< array of y component data */
|
||||
const h5_float32_t *zval, /*!< array of z component data */
|
||||
const int l_field_name
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
const h5_float32_t *x_buf,
|
||||
const h5_float32_t *y_buf,
|
||||
const h5_float32_t *z_buf,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER6 (h5_err_t, "f=0x%p, name=\"%s\", x_buf=0x%p, y_buf=0x%p, z_buf=0x%p, l_name=%d",
|
||||
fh, name, x_buf, y_buf, z_buf, l_name);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
h5_err_t herr = h5b_write_vector3d_data (
|
||||
filehandle, field_name2,
|
||||
(void*)xval, (void*)yval, (void*)zval, H5T_NATIVE_FLOAT );
|
||||
free ( field_name2 );
|
||||
return herr;
|
||||
fh, name2,
|
||||
(void*)x_buf, (void*)y_buf, (void*)z_buf, H5T_NATIVE_FLOAT );
|
||||
free ( name2 );
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
@@ -191,22 +198,23 @@ h5bl_3d_write_vector3d_field_r4 (
|
||||
|
||||
h5_err_t
|
||||
h5bl_3d_read_vector3d_field_r4 (
|
||||
h5_int64_t *f, /*!< file handle */
|
||||
const char *field_name, /*!< name of the data set */
|
||||
h5_float32_t *xval, /*!< array of x component data */
|
||||
h5_float32_t *yval, /*!< array of y component data */
|
||||
h5_float32_t *zval, /*!< array of z component data */
|
||||
const int l_field_name
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
h5_float32_t *x_buf,
|
||||
h5_float32_t *y_buf,
|
||||
h5_float32_t *z_buf,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER6 (h5_err_t, "f=0x%p, name=\"%s\", x_buf=0x%p, y_buf=0x%p, z_buf=0x%p, l_name=%d",
|
||||
fh, name, x_buf, y_buf, z_buf, l_name);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
h5_err_t herr = h5b_read_vector3d_data (
|
||||
filehandle, field_name2,
|
||||
(void*)xval, (void*)yval, (void*)zval, H5T_NATIVE_FLOAT );
|
||||
free ( field_name2 );
|
||||
return herr;
|
||||
fh, name2,
|
||||
(void*)x_buf, (void*)y_buf, (void*)z_buf, H5T_NATIVE_FLOAT );
|
||||
free ( name2 );
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
@@ -217,19 +225,20 @@ h5bl_3d_read_vector3d_field_r4 (
|
||||
|
||||
h5_err_t
|
||||
h5bl_3d_write_scalar_field_i8 (
|
||||
h5_int64_t *f,
|
||||
const char *field_name,
|
||||
const h5_int64_t *data,
|
||||
const int l_field_name
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
const h5_int64_t *buffer,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER4 (h5_err_t, "f=0x%p, name=\"%s\", buffer=0x%p, l_name=%d",
|
||||
fh, name, buffer, l_name);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
h5_err_t herr = h5b_write_scalar_data (
|
||||
filehandle, field_name2, (void*)data, H5T_NATIVE_INT64 );
|
||||
free ( field_name2 );
|
||||
return herr;
|
||||
fh, name2, (void*)buffer, H5T_NATIVE_INT64 );
|
||||
free ( name2 );
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
@@ -240,19 +249,20 @@ h5bl_3d_write_scalar_field_i8 (
|
||||
|
||||
h5_err_t
|
||||
h5bl_3d_read_scalar_field_i8 (
|
||||
h5_int64_t *f,
|
||||
const char *field_name,
|
||||
h5_int64_t *data,
|
||||
const int l_field_name
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
h5_int64_t *buffer,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER4 (h5_err_t, "f=0x%p, name=\"%s\", buffer=0x%p, l_name=%d",
|
||||
fh, name, buffer, l_name);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
h5_err_t herr = h5b_read_scalar_data (
|
||||
filehandle, field_name2, data, H5T_NATIVE_INT64 );
|
||||
free ( field_name2 );
|
||||
return herr;
|
||||
fh, name2, buffer, H5T_NATIVE_INT64 );
|
||||
free ( name2 );
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
@@ -263,22 +273,23 @@ h5bl_3d_read_scalar_field_i8 (
|
||||
|
||||
h5_err_t
|
||||
h5bl_3d_write_vector3d_field_i8 (
|
||||
h5_int64_t *f, /*!< file handle */
|
||||
const char *field_name, /*!< name of the data set */
|
||||
const h5_int64_t *xval, /*!< array of x component data */
|
||||
const h5_int64_t *yval, /*!< array of y component data */
|
||||
const h5_int64_t *zval, /*!< array of z component data */
|
||||
const int l_field_name
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
const h5_int64_t *x_buf,
|
||||
const h5_int64_t *y_buf,
|
||||
const h5_int64_t *z_buf,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER6 (h5_err_t, "f=0x%p, name=\"%s\", x_buf=0x%p, y_buf=0x%p, z_buf=0x%p, l_name=%d",
|
||||
fh, name, x_buf, y_buf, z_buf, l_name);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
h5_err_t herr = h5b_write_vector3d_data (
|
||||
filehandle, field_name2,
|
||||
(void*)xval, (void*)yval, (void*)zval, H5T_NATIVE_INT64 );
|
||||
free ( field_name2 );
|
||||
return herr;
|
||||
fh, name2,
|
||||
(void*)x_buf, (void*)y_buf, (void*)z_buf, H5T_NATIVE_INT64 );
|
||||
free ( name2 );
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
@@ -289,22 +300,23 @@ h5bl_3d_write_vector3d_field_i8 (
|
||||
|
||||
h5_err_t
|
||||
h5bl_3d_read_vector3d_field_i8 (
|
||||
h5_int64_t *f, /*!< file handle */
|
||||
const char *field_name, /*!< name of the data set */
|
||||
h5_int64_t *xval, /*!< array of x component data */
|
||||
h5_int64_t *yval, /*!< array of y component data */
|
||||
h5_int64_t *zval, /*!< array of z component data */
|
||||
const int l_field_name
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
h5_int64_t *x_buf,
|
||||
h5_int64_t *y_buf,
|
||||
h5_int64_t *z_buf,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER6 (h5_err_t, "f=0x%p, name=\"%s\", x_buf=0x%p, y_buf=0x%p, z_buf=0x%p, l_name=%d",
|
||||
fh, name, x_buf, y_buf, z_buf, l_name);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
h5_err_t herr = h5b_read_vector3d_data (
|
||||
filehandle, field_name2,
|
||||
(void*)xval, (void*)yval, (void*)zval, H5T_NATIVE_INT64 );
|
||||
free ( field_name2 );
|
||||
return herr;
|
||||
fh, name2,
|
||||
(void*)x_buf, (void*)y_buf, (void*)z_buf, H5T_NATIVE_INT64 );
|
||||
free ( name2 );
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
@@ -315,19 +327,20 @@ h5bl_3d_read_vector3d_field_i8 (
|
||||
|
||||
h5_err_t
|
||||
h5bl_3d_write_scalar_field_i4 (
|
||||
h5_int64_t *f,
|
||||
const char *field_name,
|
||||
const h5_int32_t *data,
|
||||
const int l_field_name
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
const h5_int32_t *buffer,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER4 (h5_err_t, "f=0x%p, name=\"%s\", buffer=0x%p, l_name=%d",
|
||||
fh, name, buffer, l_name);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
h5_err_t herr = h5b_write_scalar_data (
|
||||
filehandle, field_name2, (void*)data, H5T_NATIVE_INT32 );
|
||||
free ( field_name2 );
|
||||
return herr;
|
||||
fh, name2, (void*)buffer, H5T_NATIVE_INT32 );
|
||||
free ( name2 );
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
@@ -338,19 +351,20 @@ h5bl_3d_write_scalar_field_i4 (
|
||||
|
||||
h5_err_t
|
||||
h5bl_3d_read_scalar_field_i4 (
|
||||
h5_int64_t *f,
|
||||
const char *field_name,
|
||||
h5_int32_t *data,
|
||||
const int l_field_name
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
h5_int32_t *buffer,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER4 (h5_err_t, "f=0x%p, name=\"%s\", buffer=0x%p, l_name=%d",
|
||||
fh, name, buffer, l_name);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
h5_err_t herr = h5b_read_scalar_data (
|
||||
filehandle, field_name2, data, H5T_NATIVE_INT32 );
|
||||
free ( field_name2 );
|
||||
return herr;
|
||||
fh, name2, buffer, H5T_NATIVE_INT32 );
|
||||
free ( name2 );
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
@@ -361,22 +375,23 @@ h5bl_3d_read_scalar_field_i4 (
|
||||
|
||||
h5_err_t
|
||||
h5bl_3d_write_vector3d_field_i4 (
|
||||
h5_int64_t *f, /*!< file handle */
|
||||
const char *field_name, /*!< name of the data set */
|
||||
const h5_int32_t *xval, /*!< array of x component data */
|
||||
const h5_int32_t *yval, /*!< array of y component data */
|
||||
const h5_int32_t *zval, /*!< array of z component data */
|
||||
const int l_field_name
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
const h5_int32_t *x_buf,
|
||||
const h5_int32_t *y_buf,
|
||||
const h5_int32_t *z_buf,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER6 (h5_err_t, "f=0x%p, name=\"%s\", x_buf=0x%p, y_buf=0x%p, z_buf=0x%p, l_name=%d",
|
||||
fh, name, x_buf, y_buf, z_buf, l_name);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
h5_err_t herr = h5b_write_vector3d_data (
|
||||
filehandle, field_name2,
|
||||
(void*)xval, (void*)yval, (void*)zval, H5T_NATIVE_INT32 );
|
||||
free ( field_name2 );
|
||||
return herr;
|
||||
fh, name2,
|
||||
(void*)x_buf, (void*)y_buf, (void*)z_buf, H5T_NATIVE_INT32 );
|
||||
free ( name2 );
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
@@ -387,22 +402,23 @@ h5bl_3d_write_vector3d_field_i4 (
|
||||
|
||||
h5_err_t
|
||||
h5bl_3d_read_vector3d_field_i4 (
|
||||
h5_int64_t *f, /*!< file handle */
|
||||
const char *field_name, /*!< name of the data set */
|
||||
h5_int32_t *xval, /*!< array of x component data */
|
||||
h5_int32_t *yval, /*!< array of y component data */
|
||||
h5_int32_t *zval, /*!< array of z component data */
|
||||
const int l_field_name
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
h5_int32_t *x_buf,
|
||||
h5_int32_t *y_buf,
|
||||
h5_int32_t *z_buf,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER6 (h5_err_t, "f=0x%p, name=\"%s\", x_buf=0x%p, y_buf=0x%p, z_buf=0x%p, l_name=%d",
|
||||
fh, name, x_buf, y_buf, z_buf, l_name);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
h5_err_t herr = h5b_read_vector3d_data (
|
||||
filehandle, field_name2,
|
||||
(void*)xval, (void*)yval, (void*)zval, H5T_NATIVE_INT32 );
|
||||
free ( field_name2 );
|
||||
return herr;
|
||||
fh, name2,
|
||||
(void*)x_buf, (void*)y_buf, (void*)z_buf, H5T_NATIVE_INT32 );
|
||||
free ( name2 );
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
@@ -413,25 +429,28 @@ h5bl_3d_read_vector3d_field_i4 (
|
||||
|
||||
h5_err_t
|
||||
h5bl_writefieldattrib_r8 (
|
||||
h5_int64_t *f,
|
||||
h5_int64_t *const f,
|
||||
const char *field_name,
|
||||
const char *attrib_name,
|
||||
const h5_float64_t *values,
|
||||
const h5_size_t *nvalues,
|
||||
const h5_float64_t *buffer,
|
||||
const h5_size_t *nelems,
|
||||
const int l_field_name,
|
||||
const int l_attrib_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER7 (h5_err_t, "f=0x%p, field_name=\"%s\", attrib_name=\"%s\", "
|
||||
"buffer=0x%p, nelems=%lld, l_field_name=%d, l_attrib_name=%d",
|
||||
fh, field_name, attrib_name, buffer, (long long)*nelems,
|
||||
l_field_name, l_attrib_name);
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
char *attrib_name2 = h5_strdupfor2c ( attrib_name, l_attrib_name );
|
||||
h5_err_t herr = h5_write_field_attrib (
|
||||
filehandle, field_name2, attrib_name2,
|
||||
H5T_NATIVE_DOUBLE, values, *nvalues );
|
||||
fh, field_name2, attrib_name2,
|
||||
H5T_NATIVE_DOUBLE, buffer, *nelems );
|
||||
free ( field_name2 );
|
||||
free ( attrib_name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
@@ -442,23 +461,26 @@ h5bl_writefieldattrib_r8 (
|
||||
|
||||
h5_err_t
|
||||
h5bl_readfieldattrib_r8 (
|
||||
h5_int64_t *f,
|
||||
h5_int64_t *const f,
|
||||
const char *field_name,
|
||||
const char *attrib_name,
|
||||
h5_float64_t *values,
|
||||
h5_float64_t *buffer,
|
||||
const int l_field_name,
|
||||
const int l_attrib_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER6 (h5_err_t, "f=0x%p, field_name=\"%s\", attrib_name=\"%s\", "
|
||||
"values=0x%p, l_field_name=%d, l_attrib_name=%d",
|
||||
fh, field_name, attrib_name, buffer,
|
||||
l_field_name, l_attrib_name);
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
char *attrib_name2 = h5_strdupfor2c ( attrib_name, l_attrib_name );
|
||||
h5_err_t herr = h5_read_field_attrib (
|
||||
filehandle, field_name2, attrib_name2, H5T_NATIVE_DOUBLE, values );
|
||||
fh, field_name2, attrib_name2, H5T_NATIVE_DOUBLE, buffer );
|
||||
free ( field_name2 );
|
||||
free ( attrib_name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
@@ -469,25 +491,28 @@ h5bl_readfieldattrib_r8 (
|
||||
|
||||
h5_err_t
|
||||
h5bl_writefieldattrib_r4 (
|
||||
h5_int64_t *f,
|
||||
h5_int64_t *const f,
|
||||
const char *field_name,
|
||||
const char *attrib_name,
|
||||
const h5_float32_t *values,
|
||||
const h5_size_t *nvalues,
|
||||
const h5_float32_t *buffer,
|
||||
const h5_size_t *nelems,
|
||||
const int l_field_name,
|
||||
const int l_attrib_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER7 (h5_err_t, "f=0x%p, field_name=\"%s\", attrib_name=\"%s\", "
|
||||
"buffer=0x%p, nelems=%lld, l_field_name=%d, l_attrib_name=%d",
|
||||
fh, field_name, attrib_name, buffer, (long long)*nelems,
|
||||
l_field_name, l_attrib_name);
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
char *attrib_name2 = h5_strdupfor2c ( attrib_name, l_attrib_name );
|
||||
h5_err_t herr = h5_write_field_attrib (
|
||||
filehandle, field_name2, attrib_name2,
|
||||
H5T_NATIVE_FLOAT, values, *nvalues );
|
||||
fh, field_name2, attrib_name2,
|
||||
H5T_NATIVE_FLOAT, buffer, *nelems );
|
||||
free ( field_name2 );
|
||||
free ( attrib_name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
@@ -498,23 +523,26 @@ h5bl_writefieldattrib_r4 (
|
||||
|
||||
h5_err_t
|
||||
h5bl_readfieldattrib_r4 (
|
||||
h5_int64_t *f,
|
||||
h5_int64_t *const f,
|
||||
const char *field_name,
|
||||
const char *attrib_name,
|
||||
h5_float32_t *values,
|
||||
h5_float32_t *buffer,
|
||||
const int l_field_name,
|
||||
const int l_attrib_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER6 (h5_err_t, "f=0x%p, field_name=\"%s\", attrib_name=\"%s\", "
|
||||
"values=0x%p, l_field_name=%d, l_attrib_name=%d",
|
||||
fh, field_name, attrib_name, buffer,
|
||||
l_field_name, l_attrib_name);
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
char *attrib_name2 = h5_strdupfor2c ( attrib_name, l_attrib_name );
|
||||
h5_err_t herr = h5_read_field_attrib (
|
||||
filehandle, field_name2, attrib_name2, H5T_NATIVE_FLOAT, values );
|
||||
fh, field_name2, attrib_name2, H5T_NATIVE_FLOAT, buffer );
|
||||
free ( field_name2 );
|
||||
free ( attrib_name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
@@ -525,25 +553,28 @@ h5bl_readfieldattrib_r4 (
|
||||
|
||||
h5_err_t
|
||||
h5bl_writefieldattrib_i8 (
|
||||
h5_int64_t *f,
|
||||
h5_int64_t *const f,
|
||||
const char *field_name,
|
||||
const char *attrib_name,
|
||||
const h5_int64_t *values,
|
||||
const h5_size_t *nvalues,
|
||||
const h5_int64_t *buffer,
|
||||
const h5_size_t *nelems,
|
||||
const int l_field_name,
|
||||
const int l_attrib_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER7 (h5_err_t, "f=0x%p, field_name=\"%s\", attrib_name=\"%s\", "
|
||||
"buffer=0x%p, nelems=%lld, l_field_name=%d, l_attrib_name=%d",
|
||||
fh, field_name, attrib_name, buffer, (long long)*nelems,
|
||||
l_field_name, l_attrib_name);
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
char *attrib_name2 = h5_strdupfor2c ( attrib_name, l_attrib_name );
|
||||
h5_err_t herr = h5_write_field_attrib (
|
||||
filehandle, field_name2, attrib_name2,
|
||||
H5T_NATIVE_INT64, values, *nvalues );
|
||||
fh, field_name2, attrib_name2,
|
||||
H5T_NATIVE_INT64, buffer, *nelems );
|
||||
free ( field_name2 );
|
||||
free ( attrib_name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
@@ -554,23 +585,26 @@ h5bl_writefieldattrib_i8 (
|
||||
|
||||
h5_err_t
|
||||
h5bl_readfieldattrib_i8 (
|
||||
h5_int64_t *f,
|
||||
h5_int64_t *const f,
|
||||
const char *field_name,
|
||||
const char *attrib_name,
|
||||
h5_int64_t *values,
|
||||
h5_int64_t *buffer,
|
||||
const int l_field_name,
|
||||
const int l_attrib_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER6 (h5_err_t, "f=0x%p, field_name=\"%s\", attrib_name=\"%s\", "
|
||||
"values=0x%p, l_field_name=%d, l_attrib_name=%d",
|
||||
fh, field_name, attrib_name, buffer,
|
||||
l_field_name, l_attrib_name);
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
char *attrib_name2 = h5_strdupfor2c ( attrib_name, l_attrib_name );
|
||||
h5_err_t herr = h5_read_field_attrib (
|
||||
filehandle, field_name2, attrib_name2, H5T_NATIVE_INT64, values );
|
||||
fh, field_name2, attrib_name2, H5T_NATIVE_INT64, buffer );
|
||||
free ( field_name2 );
|
||||
free ( attrib_name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
@@ -581,25 +615,28 @@ h5bl_readfieldattrib_i8 (
|
||||
|
||||
h5_err_t
|
||||
h5bl_writefieldattrib_i4 (
|
||||
h5_int64_t *f,
|
||||
h5_int64_t *const f,
|
||||
const char *field_name,
|
||||
const char *attrib_name,
|
||||
const h5_int32_t *values,
|
||||
const h5_size_t *nvalues,
|
||||
const h5_int32_t *buffer,
|
||||
const h5_size_t *nelems,
|
||||
const int l_field_name,
|
||||
const int l_attrib_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER7 (h5_err_t, "f=0x%p, field_name=\"%s\", attrib_name=\"%s\", "
|
||||
"buffer=0x%p, nelems=%lld, l_field_name=%d, l_attrib_name=%d",
|
||||
fh, field_name, attrib_name, buffer, (long long)*nelems,
|
||||
l_field_name, l_attrib_name);
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
char *attrib_name2 = h5_strdupfor2c ( attrib_name, l_attrib_name );
|
||||
h5_err_t herr = h5_write_field_attrib (
|
||||
filehandle, field_name2, attrib_name2,
|
||||
H5T_NATIVE_INT32, values, *nvalues );
|
||||
fh, field_name2, attrib_name2,
|
||||
H5T_NATIVE_INT32, buffer, *nelems );
|
||||
free ( field_name2 );
|
||||
free ( attrib_name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
@@ -610,21 +647,24 @@ h5bl_writefieldattrib_i4 (
|
||||
|
||||
h5_err_t
|
||||
h5bl_readfieldattrib_i4 (
|
||||
h5_int64_t *f,
|
||||
h5_int64_t *const f,
|
||||
const char *field_name,
|
||||
const char *attrib_name,
|
||||
h5_int32_t *values,
|
||||
h5_int32_t *buffer,
|
||||
const int l_field_name,
|
||||
const int l_attrib_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER6 (h5_err_t, "f=0x%p, field_name=\"%s\", attrib_name=\"%s\", "
|
||||
"values=0x%p, l_field_name=%d, l_attrib_name=%d",
|
||||
fh, field_name, attrib_name, buffer,
|
||||
l_field_name, l_attrib_name);
|
||||
char *field_name2 = h5_strdupfor2c ( field_name, l_field_name );
|
||||
char *attrib_name2 = h5_strdupfor2c ( attrib_name, l_attrib_name );
|
||||
h5_err_t herr = h5_read_field_attrib (
|
||||
filehandle, field_name2, attrib_name2, H5T_NATIVE_INT32, values );
|
||||
fh, field_name2, attrib_name2, H5T_NATIVE_INT32, buffer );
|
||||
free ( field_name2 );
|
||||
free ( attrib_name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
+79
-66
@@ -77,24 +77,25 @@
|
||||
h5_err_t
|
||||
h5pt_setnpoints (
|
||||
const h5_int64_t *f,
|
||||
h5_int64_t *np
|
||||
h5_int64_t *n
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
return h5u_set_num_particles ( filehandle, *np, 1 );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER2(h5_err_t, "f=0x%p, n=%lld", fh, (long long)*n);
|
||||
H5_API_RETURN(h5u_set_num_particles ( fh, *n, 1 ));
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
h5pt_setnpoints_strided (
|
||||
const h5_int64_t *f,
|
||||
h5_int64_t *np,
|
||||
h5_int64_t *stride
|
||||
h5_int64_t *n,
|
||||
h5_int64_t *stride
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
return h5u_set_num_particles ( filehandle, *np, *stride );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER3(h5_err_t, "f=0x%p, n=%lld, stride=%lld",
|
||||
fh, (long long)*n, (long long)*stride);
|
||||
H5_API_RETURN(h5u_set_num_particles ( fh, *n, *stride ));
|
||||
}
|
||||
|
||||
/*==============Reading Data Characteristics============*/
|
||||
@@ -104,9 +105,9 @@ h5pt_getndatasets (
|
||||
const h5_int64_t *f
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
return h5u_get_num_datasets ( filehandle );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER1(h5_int64_t, "f=0x%p", fh);
|
||||
H5_API_RETURN(h5u_get_num_datasets ( fh ));
|
||||
}
|
||||
|
||||
h5_int64_t
|
||||
@@ -114,9 +115,9 @@ h5pt_getnpoints (
|
||||
const h5_int64_t *f
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
return h5u_get_num_particles ( filehandle );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER1(h5_int64_t, "f=0x%p", fh);
|
||||
H5_API_RETURN(h5u_get_num_particles ( fh ));
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
@@ -127,12 +128,13 @@ h5pt_getdatasetname (
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER4(h5_err_t, "f=0x%p, index=%lld, name=\"%s\", l_name=%d",
|
||||
fh, (long long)*index, name, l_name);
|
||||
h5_err_t herr = h5u_get_dataset_info (
|
||||
filehandle, *index, name, l_name, NULL, NULL );
|
||||
fh, *index, name, l_name, NULL, NULL );
|
||||
h5_strc2for ( name, l_name );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
/*=============Setting and getting views================*/
|
||||
@@ -144,9 +146,10 @@ h5pt_setview (
|
||||
const h5_int64_t *end
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
return h5u_set_view ( filehandle, *start, *end );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER3(h5_err_t, "f=0x%p, start=%lld, end=%lld",
|
||||
fh, (long long)*start, (long long)*end);
|
||||
H5_API_RETURN(h5u_set_view ( fh, (*start)-1, (*end)-1 ));
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
@@ -156,9 +159,10 @@ h5pt_setview_indices (
|
||||
const h5_int64_t *nelem
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
return h5u_set_view_indices ( filehandle, indices, *nelem );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER3(h5_err_t, "f=0x%p, indices=0x%p, nelem=%lld",
|
||||
fh, indices, (long long)*nelem);
|
||||
H5_API_RETURN(h5u_set_view_indices ( fh, indices, *nelem ));
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
@@ -166,9 +170,9 @@ h5pt_resetview (
|
||||
const h5_int64_t *f
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
return h5u_reset_view ( filehandle );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER1(h5_err_t, "f=0x%p", fh);
|
||||
H5_API_RETURN(h5u_reset_view ( fh ));
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
@@ -176,9 +180,9 @@ h5pt_hasview (
|
||||
const h5_int64_t *f
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
return h5u_has_view ( filehandle );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER1(h5_err_t, "f=0x%p", fh);
|
||||
H5_API_RETURN(h5u_has_view ( fh ));
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
@@ -188,9 +192,10 @@ h5pt_getview (
|
||||
h5_int64_t *end
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
return h5u_get_view ( filehandle, start, end);
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER3(h5_err_t, "f=0x%p, start=0x%p, end=0x%p",
|
||||
fh, start, end);
|
||||
H5_API_RETURN(h5u_get_view ( fh, start, end));
|
||||
}
|
||||
|
||||
|
||||
@@ -202,13 +207,14 @@ h5pt_writedata_r8 (
|
||||
const h5_float64_t *data,
|
||||
const int l_name ) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER4(h5_err_t, "f=0x%p, name=\"%s\", data=0x%p, l_name=%d",
|
||||
fh, name, data, l_name);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
h5_err_t herr = h5u_write_data (
|
||||
filehandle, name2, (void*)data, H5T_NATIVE_DOUBLE );
|
||||
fh, name2, (void*)data, H5T_NATIVE_DOUBLE );
|
||||
free ( name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
@@ -218,13 +224,14 @@ h5pt_writedata_r4 (
|
||||
const h5_float32_t *data,
|
||||
const int l_name ) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER4(h5_err_t, "f=0x%p, name=\"%s\", data=0x%p, l_name=%d",
|
||||
fh, name, data, l_name);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
h5_err_t herr = h5u_write_data (
|
||||
filehandle, name2, (void*)data, H5T_NATIVE_FLOAT );
|
||||
fh, name2, (void*)data, H5T_NATIVE_FLOAT );
|
||||
free ( name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
@@ -234,13 +241,14 @@ h5pt_writedata_i8 (
|
||||
const h5_int64_t *data,
|
||||
const int l_name ) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER4(h5_err_t, "f=0x%p, name=\"%s\", data=0x%p, l_name=%d",
|
||||
fh, name, data, l_name);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
h5_err_t herr = h5u_write_data (
|
||||
filehandle, name2, (void*)data, H5T_NATIVE_INT64 );
|
||||
fh, name2, (void*)data, H5T_NATIVE_INT64 );
|
||||
free ( name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
@@ -250,13 +258,14 @@ h5pt_writedata_i4 (
|
||||
const h5_int32_t *data,
|
||||
const int l_name ) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER4(h5_err_t, "f=0x%p, name=\"%s\", data=0x%p, l_name=%d",
|
||||
fh, name, data, l_name);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
h5_err_t herr = h5u_write_data (
|
||||
filehandle, name2, (void*)data, H5T_NATIVE_INT32 );
|
||||
fh, name2, (void*)data, H5T_NATIVE_INT32 );
|
||||
free ( name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
|
||||
@@ -269,13 +278,14 @@ h5pt_readdata_r8 (
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER4(h5_err_t, "f=0x%p, name=\"%s\", data=0x%p, l_name=%d",
|
||||
fh, name, data, l_name);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
h5_err_t herr = h5u_read_data (
|
||||
filehandle, name2, data, H5T_NATIVE_DOUBLE );
|
||||
fh, name2, data, H5T_NATIVE_DOUBLE );
|
||||
free ( name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
@@ -286,13 +296,14 @@ h5pt_readdata_r4 (
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER4(h5_err_t, "f=0x%p, name=\"%s\", data=0x%p, l_name=%d",
|
||||
fh, name, data, l_name);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
h5_err_t herr = h5u_read_data (
|
||||
filehandle, name2, data, H5T_NATIVE_FLOAT );
|
||||
fh, name2, data, H5T_NATIVE_FLOAT );
|
||||
free ( name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
@@ -303,14 +314,15 @@ h5pt_readdata_i8 (
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER4(h5_err_t, "f=0x%p, name=\"%s\", data=0x%p, l_name=%d",
|
||||
fh, name, data, l_name);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
h5_err_t herr = h5u_read_data (
|
||||
filehandle, name2, data, H5T_NATIVE_INT64 );
|
||||
fh, name2, data, H5T_NATIVE_INT64 );
|
||||
|
||||
free ( name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
@@ -321,12 +333,13 @@ h5pt_readdata_i4 (
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER4(h5_err_t, "f=0x%p, name=\"%s\", data=0x%p, l_name=%d",
|
||||
fh, name, data, l_name);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
h5_err_t herr = h5u_read_data (
|
||||
filehandle, name2, data, H5T_NATIVE_INT32 );
|
||||
fh, name2, data, H5T_NATIVE_INT32 );
|
||||
free ( name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
|
||||
+66
-60
@@ -73,106 +73,110 @@ _flagsfor2c (
|
||||
/* open/close interface */
|
||||
h5_err_t
|
||||
h5_openr (
|
||||
const char *file_name,
|
||||
const int l_file_name
|
||||
const char *name,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
char *file_name2 = h5_strdupfor2c ( file_name, l_file_name );
|
||||
h5_file_t* f = h5_open_file ( file_name2, H5_O_RDONLY, 0, __func__ );
|
||||
free ( file_name2 );
|
||||
return (h5_int64_t)(size_t)f;
|
||||
H5_API_ENTER2(h5_err_t, "name=\"%s\", l_name=%d", name, l_name);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
h5_file_t* f = h5_open_file ( name2, H5_O_RDONLY, 0 );
|
||||
free ( name2 );
|
||||
H5_API_RETURN((h5_int64_t)(size_t)f);
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
h5_openw (
|
||||
const char *file_name,
|
||||
const int l_file_name
|
||||
const char *name,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
char *file_name2 = h5_strdupfor2c ( file_name, l_file_name );
|
||||
h5_file_t* f = h5_open_file ( file_name2, H5_O_WRONLY, 0, __func__ );
|
||||
free ( file_name2 );
|
||||
return (h5_int64_t)(size_t)f;
|
||||
H5_API_ENTER2(h5_err_t, "name=\"%s\", l_name=%d", name, l_name);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
h5_file_t* f = h5_open_file ( name2, H5_O_WRONLY, 0 );
|
||||
free ( name2 );
|
||||
H5_API_RETURN((h5_int64_t)(size_t)f);
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
h5pt_opena (
|
||||
const char *file_name,
|
||||
const int l_file_name
|
||||
const char *name,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
char *file_name2 = h5_strdupfor2c ( file_name, l_file_name );
|
||||
h5_file_t* f = h5_open_file ( file_name2, H5_O_APPEND, 0, __func__ );
|
||||
free ( file_name2 );
|
||||
return (h5_int64_t)(size_t)f;
|
||||
|
||||
H5_API_ENTER2(h5_err_t, "name=\"%s\", l_name=%d", name, l_name);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
h5_file_t* f = h5_open_file ( name2, H5_O_APPEND, 0 );
|
||||
free ( name2 );
|
||||
H5_API_RETURN((h5_int64_t)(size_t)f);
|
||||
}
|
||||
|
||||
#ifdef PARALLEL_IO
|
||||
h5_err_t
|
||||
h5_openr_par (
|
||||
const char *file_name,
|
||||
const char *name,
|
||||
MPI_Fint *fcomm,
|
||||
const char *flags,
|
||||
const int l_file_name,
|
||||
const int l_name,
|
||||
const int l_flags
|
||||
) {
|
||||
|
||||
H5_API_ENTER5(h5_err_t, "name=\"%s\", fcomm=%d, flags=%s, "
|
||||
"l_name=%d, l_flags=%d",
|
||||
name, *fcomm, flags, l_name, l_flags);
|
||||
MPI_Comm ccomm = MPI_Comm_f2c (*fcomm);
|
||||
char *file_name2 = h5_strdupfor2c ( file_name, l_file_name );
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
char *flags2 = h5_strdupfor2c ( flags, l_flags );
|
||||
|
||||
h5_int32_t fbits = H5_O_RDONLY | _flagsfor2c ( flags2 );
|
||||
|
||||
h5_file_t* f = h5_open_file ( file_name2, fbits, ccomm, __func__ );
|
||||
|
||||
free ( file_name2 );
|
||||
h5_file_t* f = h5_open_file ( name2, fbits, ccomm );
|
||||
free ( name2 );
|
||||
free ( flags2 );
|
||||
return (h5_int64_t)(size_t)f;
|
||||
H5_API_RETURN((h5_int64_t)(size_t)f);
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
h5_openw_par (
|
||||
const char *file_name,
|
||||
const char *name,
|
||||
MPI_Fint *fcomm,
|
||||
const char *flags,
|
||||
const int l_file_name,
|
||||
const int l_name,
|
||||
const int l_flags
|
||||
) {
|
||||
|
||||
H5_API_ENTER5(h5_err_t, "name=\"%s\", fcomm=%d, flags=%s, "
|
||||
"l_name=%d, l_flags=%d",
|
||||
name, *fcomm, flags, l_name, l_flags);
|
||||
MPI_Comm ccomm = MPI_Comm_f2c (*fcomm);
|
||||
char *file_name2 = h5_strdupfor2c ( file_name, l_file_name );
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
char *flags2 = h5_strdupfor2c ( flags, l_flags );
|
||||
|
||||
h5_int32_t fbits = H5_O_WRONLY | _flagsfor2c ( flags2 );
|
||||
|
||||
h5_file_t* f = h5_open_file ( file_name2, ccomm, fbits, __func__ );
|
||||
|
||||
free ( file_name2 );
|
||||
h5_file_t* f = h5_open_file ( name2, fbits, ccomm );
|
||||
free ( name2 );
|
||||
free ( flags2 );
|
||||
return (h5_int64_t)(size_t)f;
|
||||
H5_API_RETURN((h5_int64_t)(size_t)f);
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
h5pt_opena_par_align (
|
||||
const char *file_name,
|
||||
const char *name,
|
||||
MPI_Fint *fcomm,
|
||||
const h5_int64_t *align,
|
||||
const char *flags,
|
||||
const int l_file_name,
|
||||
const int l_name,
|
||||
const int l_flags
|
||||
) {
|
||||
|
||||
|
||||
H5_API_ENTER6(h5_err_t, "name=\"%s\", fcomm=%d, align=%lld, flags=%s, "
|
||||
"l_name=%d, l_flags=%d",
|
||||
name, *fcomm, (long long)*align,
|
||||
flags, l_name, l_flags);
|
||||
MPI_Comm ccomm = MPI_Comm_f2c (*fcomm);
|
||||
char *file_name2 = h5_strdupfor2c ( file_name, l_file_name );
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
char *flags2 = h5_strdupfor2c ( flags, l_flags );
|
||||
|
||||
h5_int32_t fbits = H5_O_APPEND | _flagsfor2c ( flags2 );
|
||||
|
||||
h5_file_t* f = h5_open_file( file_name2, ccomm, fbits, __func__ );
|
||||
|
||||
free ( file_name2 );
|
||||
h5_file_t* f = h5_open_file ( name2, fbits, ccomm );
|
||||
free ( name2 );
|
||||
free ( flags2 );
|
||||
return (h5_int64_t)(size_t)f;
|
||||
H5_API_RETURN((h5_int64_t)(size_t)f);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -181,9 +185,9 @@ h5_close (
|
||||
const h5_int64_t *f
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
return h5_close_file ( filehandle );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER1(h5_err_t, "f=0x%p", fh);
|
||||
H5_API_RETURN(h5_close_file ( fh ));
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
@@ -191,9 +195,9 @@ h5_check (
|
||||
const h5_int64_t *f
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
return h5_check_filehandle ( filehandle );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER1(h5_err_t, "f=0x%p", fh);
|
||||
H5_API_RETURN(h5_check_filehandle ( fh ));
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
@@ -201,9 +205,9 @@ h5_setstep (
|
||||
const h5_int64_t *f,
|
||||
h5_int64_t *step ) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
return h5_set_step ( filehandle, (*step)-1 );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER2(h5_err_t, "f=0x%p, step=%lld", fh, (long long)*step);
|
||||
H5_API_RETURN(h5_set_step ( fh, (*step)-1 ));
|
||||
}
|
||||
|
||||
h5_ssize_t
|
||||
@@ -211,15 +215,17 @@ h5_getnsteps (
|
||||
const h5_int64_t *f
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
return h5_get_num_steps ( filehandle );
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
H5_API_ENTER1(h5_ssize_t, "f=0x%p", fh);
|
||||
H5_API_RETURN(h5_get_num_steps ( fh ));
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
h5_set_verbosity_level (
|
||||
const h5_int64_t *level
|
||||
) {
|
||||
return h5_set_debuglevel ( *level );
|
||||
|
||||
H5_API_ENTER1(h5_err_t, "level=%lld", (long long)*level);
|
||||
H5_API_RETURN(h5_set_debuglevel ( *level ));
|
||||
}
|
||||
|
||||
|
||||
+172
-213
@@ -1,249 +1,208 @@
|
||||
!!!!!!!! Reading and Writing Attributes !!!!!!!!
|
||||
|
||||
!> \ingroup h5hut_attrib_f
|
||||
!! See \ref H5WriteFileAttribString
|
||||
!! \return 0 on success or error code
|
||||
!! See
|
||||
ef H5WriteFileAttribString
|
||||
!!
|
||||
INTEGER*8 FUNCTION h5_writefileattrib_string (filehandle,attrib_name,attrib_value)
|
||||
eturn 0 on success or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5_writefileattrib_string ( filehandle, name, buffer )
|
||||
CHARACTER(LEN=*), INTENT(IN) :: value !< the string value to store
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
CHARACTER(LEN=*), INTENT(IN) :: buffer !< the string value to store
|
||||
END FUNCTION
|
||||
!! See \ref H5WriteStepAttribString
|
||||
!! \return 0 on success or error code
|
||||
|
||||
!> \ingroup h5hut_attrib_f
|
||||
!! See
|
||||
INTEGER*8 FUNCTION h5_writestepattrib_string (filehandle,attrib_name,attrib_value)
|
||||
ef H5WriteStepAttribString
|
||||
!!
|
||||
eturn 0 on success or error code
|
||||
CHARACTER(LEN=*), INTENT(IN) :: value !< the string value to store
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5_writestepattrib_string ( filehandle, name, buffer )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
!! See \ref H5ReadFileAttribString
|
||||
!! \return 0 on success or error code
|
||||
CHARACTER(LEN=*), INTENT(IN) :: buffer !< the string value to store
|
||||
END FUNCTION
|
||||
|
||||
INTEGER*8 FUNCTION h5_readfileattrib_string (filehandle,attrib_name,attrib_value)
|
||||
!> \ingroup h5hut_attrib_f
|
||||
!! See
|
||||
ef H5ReadFileAttribString
|
||||
CHARACTER(LEN=*), INTENT(OUT) :: value !< buffer to read the string value into
|
||||
!!
|
||||
eturn 0 on success or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5_readfileattrib_string ( filehandle, name, buffer )
|
||||
!! See \ref H5ReadStepAttribString
|
||||
!! \return 0 on success or error code
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
CHARACTER(LEN=*), INTENT(OUT) :: buffer !< buffer to read the string value into
|
||||
INTEGER*8 FUNCTION h5_readstepattrib_string (filehandle,attrib_name,attrib_value)
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5hut_attrib_f
|
||||
CHARACTER(LEN=*), INTENT(OUT) :: value !< buffer to read the string value into
|
||||
END FUNCTION
|
||||
|
||||
!< \ingroup h5hut_attrib_f
|
||||
!! See \ref H5WriteFileAttribFloat64
|
||||
!! \return 0 on success or error code
|
||||
!>
|
||||
INTEGER*8 FUNCTION h5_writefileattrib_r8 ( filehandle, field_name, attrib_name, attrib_value, attrib_nelem)
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
REAL*8, INTENT(IN) :: data(*) !< the array of data to write into the attribute
|
||||
INTEGER*8, INTENT(IN) :: nelem !< the number of elements in the array
|
||||
END FUNCTION
|
||||
|
||||
!< \ingroup h5hut_attrib_f
|
||||
!! See \ref H5ReadFileAttribFloat64
|
||||
!! \return 0 on success or error code
|
||||
!>
|
||||
INTEGER*8 FUNCTION h5_readfileattrib_r8 ( filehandle, name, data )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
REAL*8, INTENT(OUT) :: data(*) !< buffer to read value into
|
||||
END FUNCTION
|
||||
|
||||
!< \ingroup h5hut_attrib_f
|
||||
!! See \ref H5WriteFileAttribFloat32
|
||||
!! \return 0 on success or error code
|
||||
!>
|
||||
INTEGER*8 FUNCTION h5_writefileattrib_r4 ( filehandle, field_name, attrib_name, attrib_value, attrib_nelem)
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
REAL*4, INTENT(IN) :: data(*) !< the array of data to write into the attribute
|
||||
INTEGER*8, INTENT(IN) :: nelem !< the number of elements in the array
|
||||
END FUNCTION
|
||||
|
||||
!< \ingroup h5hut_attrib_f
|
||||
!! See \ref H5ReadFileAttribFloat32
|
||||
!! \return 0 on success or error code
|
||||
!>
|
||||
INTEGER*8 FUNCTION h5_readfileattrib_r4 ( filehandle, name, data )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
REAL*4, INTENT(OUT) :: data(*) !< buffer to read value into
|
||||
END FUNCTION
|
||||
|
||||
!< \ingroup h5hut_attrib_f
|
||||
!! See \ref H5WriteFileAttribInt64
|
||||
!! \return 0 on success or error code
|
||||
!>
|
||||
INTEGER*8 FUNCTION h5_writefileattrib_i8 ( filehandle, field_name, attrib_name, attrib_value, attrib_nelem)
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
INTEGER*8, INTENT(IN) :: data(*) !< the array of data to write into the attribute
|
||||
INTEGER*8, INTENT(IN) :: nelem !< the number of elements in the array
|
||||
END FUNCTION
|
||||
|
||||
!< \ingroup h5hut_attrib_f
|
||||
!! See \ref H5ReadFileAttribInt64
|
||||
!! \return 0 on success or error code
|
||||
!>
|
||||
INTEGER*8 FUNCTION h5_readfileattrib_i8 ( filehandle, name, data )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
INTEGER*8, INTENT(OUT) :: data(*) !< buffer to read value into
|
||||
END FUNCTION
|
||||
|
||||
!< \ingroup h5hut_attrib_f
|
||||
!! See \ref H5WriteFileAttribInt32
|
||||
!! \return 0 on success or error code
|
||||
!>
|
||||
INTEGER*8 FUNCTION h5_writefileattrib_i4 ( filehandle, field_name, attrib_name, attrib_value, attrib_nelem)
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
INTEGER*4, INTENT(IN) :: data(*) !< the array of data to write into the attribute
|
||||
INTEGER*8, INTENT(IN) :: nelem !< the number of elements in the array
|
||||
END FUNCTION
|
||||
|
||||
!< \ingroup h5hut_attrib_f
|
||||
!! See \ref H5ReadFileAttribInt32
|
||||
!! \return 0 on success or error code
|
||||
!>
|
||||
INTEGER*8 FUNCTION h5_readfileattrib_i4 ( filehandle, name, data )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
INTEGER*4, INTENT(OUT) :: data(*) !< buffer to read value into
|
||||
END FUNCTION
|
||||
|
||||
!< \ingroup h5hut_attrib_f
|
||||
!! See \ref H5WriteStepAttribFloat64
|
||||
!! \return 0 on success or error code
|
||||
!>
|
||||
INTEGER*8 FUNCTION h5_writestepattrib_r8 ( filehandle, field_name, attrib_name, attrib_value, attrib_nelem)
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
REAL*8, INTENT(IN) :: data(*) !< the array of data to write into the attribute
|
||||
INTEGER*8, INTENT(IN) :: nelem !< the number of elements in the array
|
||||
END FUNCTION
|
||||
|
||||
!< \ingroup h5hut_attrib_f
|
||||
!! See \ref H5ReadStepAttribFloat64
|
||||
!! \return 0 on success or error code
|
||||
!>
|
||||
INTEGER*8 FUNCTION h5_readstepattrib_r8 ( filehandle, name, data )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
REAL*8, INTENT(OUT) :: data(*) !< buffer to read value into
|
||||
END FUNCTION
|
||||
|
||||
!< \ingroup h5hut_attrib_f
|
||||
!! See \ref H5WriteStepAttribFloat32
|
||||
!! \return 0 on success or error code
|
||||
!>
|
||||
INTEGER*8 FUNCTION h5_writestepattrib_r4 ( filehandle, field_name, attrib_name, attrib_value, attrib_nelem)
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
REAL*4, INTENT(IN) :: data(*) !< the array of data to write into the attribute
|
||||
INTEGER*8, INTENT(IN) :: nelem !< the number of elements in the array
|
||||
END FUNCTION
|
||||
|
||||
!< \ingroup h5hut_attrib_f
|
||||
!! See \ref H5ReadStepAttribFloat32
|
||||
!! \return 0 on success or error code
|
||||
!>
|
||||
INTEGER*8 FUNCTION h5_readstepattrib_r4 ( filehandle, name, data )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
REAL*4, INTENT(OUT) :: data(*) !< buffer to read value into
|
||||
END FUNCTION
|
||||
|
||||
!< \ingroup h5hut_attrib_f
|
||||
!! See \ref H5WriteStepAttribInt64
|
||||
!! \return 0 on success or error code
|
||||
!>
|
||||
INTEGER*8 FUNCTION h5_writestepattrib_i8 ( filehandle, field_name, attrib_name, attrib_value, attrib_nelem)
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
INTEGER*8, INTENT(IN) :: data(*) !< the array of data to write into the attribute
|
||||
INTEGER*8, INTENT(IN) :: nelem !< the number of elements in the array
|
||||
END FUNCTION
|
||||
|
||||
!< \ingroup h5hut_attrib_f
|
||||
!! See \ref H5ReadStepAttribInt64
|
||||
!! \return 0 on success or error code
|
||||
!>
|
||||
INTEGER*8 FUNCTION h5_readstepattrib_i8 ( filehandle, name, data )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
INTEGER*8, INTENT(OUT) :: data(*) !< buffer to read value into
|
||||
END FUNCTION
|
||||
|
||||
!< \ingroup h5hut_attrib_f
|
||||
!! See \ref H5WriteStepAttribInt32
|
||||
!! \return 0 on success or error code
|
||||
!>
|
||||
INTEGER*8 FUNCTION h5_writestepattrib_i4 ( filehandle, field_name, attrib_name, attrib_value, attrib_nelem)
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
INTEGER*4, INTENT(IN) :: data(*) !< the array of data to write into the attribute
|
||||
INTEGER*8, INTENT(IN) :: nelem !< the number of elements in the array
|
||||
END FUNCTION
|
||||
|
||||
!< \ingroup h5hut_attrib_f
|
||||
!! See \ref H5ReadStepAttribInt32
|
||||
!! \return 0 on success or error code
|
||||
!>
|
||||
INTEGER*8 FUNCTION h5_readstepattrib_i4 ( filehandle, name, data )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
INTEGER*4, INTENT(OUT) :: data(*) !< buffer to read value into
|
||||
!! See
|
||||
ef H5ReadStepAttribString
|
||||
!!
|
||||
eturn 0 on success or error code
|
||||
!! See \ref H5GetNumStepAttribs
|
||||
!! \return number of attributes or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5_getnstepattribs (filehandle)
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5hut_attrib_f
|
||||
!! See \ref H5GetNumFileAttribs
|
||||
!! \return number of attributes or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5_getnfileattribs (filehandle)
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5hut_attrib_f
|
||||
!! See \ref H5GetStepAttribInfo
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5_readstepattrib_string ( filehandle, name, buffer )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open
|
||||
INTEGER*8 FUNCTION h5_getstepattribinfo (filehandle,idx,attrib_name,attrib_nelem)
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open
|
||||
INTEGER*8, INTENT(IN) :: index !< index of the attribute to query (starting from 0)
|
||||
CHARACTER(LEN=*), INTENT(OUT) :: name !< buffer to read the attribute name into
|
||||
INTEGER*8, INTENT(OUT) :: nelem !< number of elements in the attribute's array
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
CHARACTER(LEN=*), INTENT(OUT) :: buffer !< buffer to read the string value into
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5hut_attrib_f
|
||||
!! See \ref H5Write#Group#AttribFloat64
|
||||
!! \return 0 on success or error code
|
||||
!<
|
||||
!! See \ref H5GetFileAttribInfo
|
||||
INTEGER*8 FUNCTION h5bl_writefileattrib_r8 ( filehandle, name, buffer, nelems )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
INTEGER*8 FUNCTION h5_getfileattribinfo (filehandle,idx,attrib_name,attrib_nelem)
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open
|
||||
INTEGER*8, INTENT(IN) :: index !< index of the attribute to query (starting from 0)
|
||||
CHARACTER(LEN=*), INTENT(OUT) :: name !< buffer to read the attribute name into
|
||||
INTEGER*8, INTENT(OUT) :: nelem !< number of elements in the attribute's array
|
||||
REAL*8, INTENT(IN) :: buffer(*) !< the buffer to write from
|
||||
INTEGER*8, INTENT(IN) :: nelems !< the number of elements in the array
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5hut_attrib_f
|
||||
!! See \ref H5Write#Group#AttribFloat64
|
||||
!! \return 0 on success or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5_readfileattrib_r8 ( filehandle, name, buffer )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
REAL*8, INTENT(IN) :: buffer(*) !< the buffer to read to
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5hut_attrib_f
|
||||
!! See \ref H5Write#Group#AttribFloat32
|
||||
!! \return 0 on success or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5bl_writefileattrib_r4 ( filehandle, name, buffer, nelems )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
REAL*4, INTENT(IN) :: buffer(*) !< the buffer to write from
|
||||
INTEGER*8, INTENT(IN) :: nelems !< the number of elements in the array
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5hut_attrib_f
|
||||
!! See \ref H5Write#Group#AttribFloat32
|
||||
!! \return 0 on success or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5_readfileattrib_r4 ( filehandle, name, buffer )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
REAL*4, INTENT(IN) :: buffer(*) !< the buffer to read to
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5hut_attrib_f
|
||||
!! See \ref H5Write#Group#AttribInt64
|
||||
!! \return 0 on success or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5bl_writefileattrib_i8 ( filehandle, name, buffer, nelems )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
INTEGER*8, INTENT(IN) :: buffer(*) !< the buffer to write from
|
||||
INTEGER*8, INTENT(IN) :: nelems !< the number of elements in the array
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5hut_attrib_f
|
||||
!! See \ref H5Write#Group#AttribInt64
|
||||
!! \return 0 on success or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5_readfileattrib_i8 ( filehandle, name, buffer )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
INTEGER*8, INTENT(IN) :: buffer(*) !< the buffer to read to
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5hut_attrib_f
|
||||
!! See \ref H5Write#Group#AttribInt32
|
||||
!! \return 0 on success or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5bl_writefileattrib_i4 ( filehandle, name, buffer, nelems )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
INTEGER*4, INTENT(IN) :: buffer(*) !< the buffer to write from
|
||||
INTEGER*8, INTENT(IN) :: nelems !< the number of elements in the array
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5hut_attrib_f
|
||||
!! See \ref H5Write#Group#AttribInt32
|
||||
!! \return 0 on success or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5_readfileattrib_i4 ( filehandle, name, buffer )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
INTEGER*4, INTENT(IN) :: buffer(*) !< the buffer to read to
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5hut_attrib_f
|
||||
!! See \ref H5Write#Group#AttribFloat64
|
||||
!! \return 0 on success or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5bl_writestepattrib_r8 ( filehandle, name, buffer, nelems )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
REAL*8, INTENT(IN) :: buffer(*) !< the buffer to write from
|
||||
INTEGER*8, INTENT(IN) :: nelems !< the number of elements in the array
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5hut_attrib_f
|
||||
!! See \ref H5Write#Group#AttribFloat64
|
||||
!! \return 0 on success or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5_readstepattrib_r8 ( filehandle, name, buffer )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
REAL*8, INTENT(IN) :: buffer(*) !< the buffer to read to
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5hut_attrib_f
|
||||
!! See \ref H5Write#Group#AttribFloat32
|
||||
!! \return 0 on success or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5bl_writestepattrib_r4 ( filehandle, name, buffer, nelems )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
REAL*4, INTENT(IN) :: buffer(*) !< the buffer to write from
|
||||
INTEGER*8, INTENT(IN) :: nelems !< the number of elements in the array
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5hut_attrib_f
|
||||
!! See \ref H5Write#Group#AttribFloat32
|
||||
!! \return 0 on success or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5_readstepattrib_r4 ( filehandle, name, buffer )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
REAL*4, INTENT(IN) :: buffer(*) !< the buffer to read to
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5hut_attrib_f
|
||||
!! See \ref H5Write#Group#AttribInt64
|
||||
!! \return 0 on success or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5bl_writestepattrib_i8 ( filehandle, name, buffer, nelems )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
INTEGER*8, INTENT(IN) :: buffer(*) !< the buffer to write from
|
||||
INTEGER*8, INTENT(IN) :: nelems !< the number of elements in the array
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5hut_attrib_f
|
||||
!! See \ref H5Write#Group#AttribInt64
|
||||
!! \return 0 on success or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5_readstepattrib_i8 ( filehandle, name, buffer )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
INTEGER*8, INTENT(IN) :: buffer(*) !< the buffer to read to
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5hut_attrib_f
|
||||
!! See \ref H5Write#Group#AttribInt32
|
||||
!! \return 0 on success or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5bl_writestepattrib_i4 ( filehandle, name, buffer, nelems )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
INTEGER*4, INTENT(IN) :: buffer(*) !< the buffer to write from
|
||||
INTEGER*8, INTENT(IN) :: nelems !< the number of elements in the array
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5hut_attrib_f
|
||||
|
||||
+243
-323
@@ -1,3 +1,4 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -15,636 +16,555 @@
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
|
||||
#define h5_writefileattrib_string F77NAME ( \
|
||||
h5_writefileattrib_string_, \
|
||||
H5_writefileattrib_string )
|
||||
#define h5_writestepattrib_string F77NAME ( \
|
||||
h5_writestepattrib_string_, \
|
||||
H5_WRITESTEPATTRIB_STRING )
|
||||
#define h5_readstepattrib_string F77NAME ( \
|
||||
h5_readstepattrib_string_, \
|
||||
h5_READSTEPATTRIB_STRING )
|
||||
#define h5_readfileattrib_string F77NAME ( \
|
||||
h5_readfileattrib_string_, \
|
||||
h5_READFILEATTRIB_STRING )
|
||||
#define h5_writefileattrib_string F77NAME ( h5_writefileattrib_string_, H5_writefileattrib_string )
|
||||
#define h5_writestepattrib_string F77NAME ( h5_writestepattrib_string_, H5_WRITESTEPATTRIB_STRING )
|
||||
#define h5_readstepattrib_string F77NAME ( h5_readstepattrib_string_, h5_READSTEPATTRIB_STRING )
|
||||
#define h5_readfileattrib_string F77NAME ( h5_readfileattrib_string_, h5_READFILEATTRIB_STRING )
|
||||
|
||||
#endif
|
||||
|
||||
h5_err_t
|
||||
h5_writefileattrib_string (
|
||||
const h5_int64_t *f,
|
||||
const char *attrib_name,
|
||||
const char *attrib_value,
|
||||
const int l_attrib_name,
|
||||
const int l_attrib_value
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
const char *buffer,
|
||||
const int l_name,
|
||||
const int l_buffer
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
|
||||
char *attrib_name2 = h5_strdupfor2c (attrib_name,l_attrib_name);
|
||||
char *attrib_value2= h5_strdupfor2c (attrib_value,l_attrib_value);
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
char *buffer2 = h5_strdupfor2c ( buffer, l_buffer );
|
||||
H5_API_ENTER5 (h5_err_t,
|
||||
"f=%p, name=\"%s\", buffer=\"%s\", l_name=%d, l_buffer=%d",
|
||||
fh, name2, buffer2, l_name, l_buffer);
|
||||
|
||||
h5_err_t herr = h5_write_attrib (
|
||||
filehandle, H5_ATTRIB_FILE, attrib_name2,
|
||||
H5T_NATIVE_CHAR, attrib_value2, strlen(attrib_value2)+1 );
|
||||
fh, H5_ATTRIB_FILE, name2,
|
||||
H5_STRING_T, buffer2, strlen(buffer2)+1 );
|
||||
|
||||
free ( attrib_name2 );
|
||||
free ( attrib_value2 );
|
||||
return herr;
|
||||
free ( name2 );
|
||||
free ( buffer2 );
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
h5_writestepattrib_string (
|
||||
const h5_int64_t *f,
|
||||
const char *attrib_name,
|
||||
const char *attrib_value,
|
||||
const int l_attrib_name,
|
||||
const int l_attrib_value
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
const char *buffer,
|
||||
const int l_name,
|
||||
const int l_buffer
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
|
||||
char *attrib_name2 = h5_strdupfor2c (attrib_name,l_attrib_name);
|
||||
char *attrib_value2= h5_strdupfor2c (attrib_value,l_attrib_value);
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
char *buffer2 = h5_strdupfor2c ( buffer, l_buffer );
|
||||
H5_API_ENTER5 (h5_err_t,
|
||||
"f=%p, name=\"%s\", buffer=\"%s\", l_name=%d, l_buffer=%d",
|
||||
fh, name2, buffer2, l_name, l_buffer);
|
||||
|
||||
h5_err_t herr = h5_write_attrib (
|
||||
filehandle, H5_ATTRIB_STEP, attrib_name2,
|
||||
H5T_NATIVE_CHAR, attrib_value2, strlen(attrib_value2)+1 );
|
||||
fh, H5_ATTRIB_STEP, name2,
|
||||
H5_STRING_T, buffer2, strlen(buffer2)+1 );
|
||||
|
||||
free ( attrib_name2 );
|
||||
free ( attrib_value2 );
|
||||
return herr;
|
||||
free ( name2 );
|
||||
free ( buffer2 );
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
h5_readfileattrib_string (
|
||||
const h5_int64_t *f,
|
||||
const char *attrib_name,
|
||||
char *attrib_value,
|
||||
const int l_attrib_name,
|
||||
const int l_attrib_value
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
char *buffer,
|
||||
const int l_name,
|
||||
const int l_buffer
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
|
||||
char * attrib_name2 = h5_strdupfor2c (attrib_name,l_attrib_name);
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
char * name2 = h5_strdupfor2c ( name, l_name );
|
||||
H5_API_ENTER5 (h5_err_t,
|
||||
"f=%p, name=\"%s\", buffer=0x%p, l_name=%d, l_buffer=%d",
|
||||
fh, name2, buffer, l_name, l_buffer);
|
||||
|
||||
h5_err_t herr = h5_read_attrib (
|
||||
filehandle, H5_ATTRIB_FILE, attrib_name2,
|
||||
H5_STRING_T, attrib_value );
|
||||
fh, H5_ATTRIB_FILE, name2, H5_STRING_T, buffer );
|
||||
|
||||
h5_strc2for ( attrib_value, l_attrib_value );
|
||||
h5_strc2for ( buffer, l_buffer );
|
||||
|
||||
free ( attrib_name2 );
|
||||
return herr;
|
||||
free ( name2 );
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
h5_readstepattrib_string (
|
||||
const h5_int64_t *f,
|
||||
const char *attrib_name,
|
||||
char *attrib_value,
|
||||
const int l_attrib_name,
|
||||
const int l_attrib_value
|
||||
h5_readstepeattrib_string (
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
char *buffer,
|
||||
const int l_name,
|
||||
const int l_buffer
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
|
||||
char * attrib_name2 = h5_strdupfor2c (attrib_name,l_attrib_name);
|
||||
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
char * name2 = h5_strdupfor2c ( name, l_name );
|
||||
H5_API_ENTER5 (h5_err_t,
|
||||
"f=%p, name=\"%s\", buffer=0x%p, l_name=%d, l_buffer=%d",
|
||||
fh, name2, buffer, l_name, l_buffer);
|
||||
|
||||
h5_err_t herr = h5_read_attrib (
|
||||
filehandle, H5_ATTRIB_STEP, attrib_name2,
|
||||
H5_STRING_T, attrib_value );
|
||||
fh, H5_ATTRIB_STEP, name2, H5_STRING_T, buffer );
|
||||
|
||||
h5_strc2for ( attrib_value, l_attrib_value );
|
||||
h5_strc2for ( buffer, l_buffer );
|
||||
|
||||
free ( attrib_name2 );
|
||||
return herr;
|
||||
free ( name2 );
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
#define h5_writefileattrib_r8 F77NAME ( \
|
||||
h5_writefileattrib_r8_, \
|
||||
h5_WRITEFILEATTRIB_R8 )
|
||||
H5_WRITEFILEATTRIB_R8 )
|
||||
#endif
|
||||
|
||||
h5_err_t
|
||||
h5_writefileattrib_r8 (
|
||||
h5_int64_t *f,
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
const h5_float64_t *data,
|
||||
const h5_float64_t *buffer,
|
||||
const h5_int64_t *nelem,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
H5_API_ENTER5 (h5_err_t,
|
||||
"f=%p, name=\"%s\", buffer=0x%p, nelem=%lld, l_name=%d",
|
||||
fh, name2, buffer, (long long)*nelem, l_name);
|
||||
|
||||
h5_err_t herr = h5_write_attrib(
|
||||
filehandle, H5_ATTRIB_FILE, name2,
|
||||
H5T_NATIVE_DOUBLE, data, (hsize_t) *nelem);
|
||||
fh, H5_ATTRIB_FILE, name2,
|
||||
H5_FLOAT64_T, buffer, (hsize_t)*nelem);
|
||||
|
||||
free ( name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
#define h5_writefileattrib_r8 F77NAME ( \
|
||||
h5_writefileattrib_r8_, \
|
||||
h5_WRITEFILEATTRIB_R8 )
|
||||
#define h5_readfileattrib_r8 F77NAME ( \
|
||||
h5_readfileattrib_r8_, \
|
||||
H5_READFILEATTRIB_R8 )
|
||||
#endif
|
||||
|
||||
h5_err_t
|
||||
h5_readfileattrib_r8 (
|
||||
h5_int64_t *f,
|
||||
h5bl_readfileattrib_r8 (
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
h5_float64_t *data,
|
||||
h5_float64_t *buffer,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
H5_API_ENTER4 (h5_err_t,
|
||||
"f=%p, name=\"%s\", buffer=0x%p, l_name=%d",
|
||||
fh, name2, buffer, l_name);
|
||||
|
||||
h5_err_t herr = h5_read_attrib(
|
||||
filehandle, H5_ATTRIB_FILE, name2, H5_FLOAT64_T, data);
|
||||
fh, H5_ATTRIB_FILE, name2, H5_FLOAT64_T, buffer);
|
||||
|
||||
free ( name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
#define h5_writefileattrib_r4 F77NAME ( \
|
||||
h5_writefileattrib_r4_, \
|
||||
h5_WRITEFILEATTRIB_R4 )
|
||||
H5_WRITEFILEATTRIB_R4 )
|
||||
#endif
|
||||
|
||||
h5_err_t
|
||||
h5_writefileattrib_r4 (
|
||||
h5_int64_t *f,
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
const h5_float32_t *data,
|
||||
const h5_float32_t *buffer,
|
||||
const h5_int64_t *nelem,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
H5_API_ENTER5 (h5_err_t,
|
||||
"f=%p, name=\"%s\", buffer=0x%p, nelem=%lld, l_name=%d",
|
||||
fh, name2, buffer, (long long)*nelem, l_name);
|
||||
|
||||
h5_err_t herr = h5_write_attrib(
|
||||
filehandle, H5_ATTRIB_FILE, name2,
|
||||
H5T_NATIVE_FLOAT, data, (hsize_t) *nelem);
|
||||
fh, H5_ATTRIB_FILE, name2,
|
||||
H5_FLOAT32_T, buffer, (hsize_t)*nelem);
|
||||
|
||||
free ( name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
#define h5_writefileattrib_r4 F77NAME ( \
|
||||
h5_writefileattrib_r4_, \
|
||||
h5_WRITEFILEATTRIB_R4 )
|
||||
#define h5_readfileattrib_r4 F77NAME ( \
|
||||
h5_readfileattrib_r4_, \
|
||||
H5_READFILEATTRIB_R4 )
|
||||
#endif
|
||||
|
||||
h5_err_t
|
||||
h5_readfileattrib_r4 (
|
||||
h5_int64_t *f,
|
||||
h5bl_readfileattrib_r4 (
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
h5_float32_t *data,
|
||||
h5_float64_t *buffer,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
H5_API_ENTER4 (h5_err_t,
|
||||
"f=%p, name=\"%s\", buffer=0x%p, l_name=%d",
|
||||
fh, name2, buffer, l_name);
|
||||
|
||||
h5_err_t herr = h5_read_attrib(
|
||||
filehandle, H5_ATTRIB_FILE, name2, H5_FLOAT32_T, data);
|
||||
fh, H5_ATTRIB_FILE, name2, H5_FLOAT32_T, buffer);
|
||||
|
||||
free ( name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
#define h5_writefileattrib_i8 F77NAME ( \
|
||||
h5_writefileattrib_i8_, \
|
||||
h5_WRITEFILEATTRIB_I8 )
|
||||
H5_WRITEFILEATTRIB_I8 )
|
||||
#endif
|
||||
|
||||
h5_err_t
|
||||
h5_writefileattrib_i8 (
|
||||
h5_int64_t *f,
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
const h5_int64_t *data,
|
||||
const h5_int64_t *buffer,
|
||||
const h5_int64_t *nelem,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
H5_API_ENTER5 (h5_err_t,
|
||||
"f=%p, name=\"%s\", buffer=0x%p, nelem=%lld, l_name=%d",
|
||||
fh, name2, buffer, (long long)*nelem, l_name);
|
||||
|
||||
h5_err_t herr = h5_write_attrib(
|
||||
filehandle, H5_ATTRIB_FILE, name2,
|
||||
H5T_NATIVE_INT64, data, (hsize_t) *nelem);
|
||||
fh, H5_ATTRIB_FILE, name2,
|
||||
H5_INT64_T, buffer, (hsize_t)*nelem);
|
||||
|
||||
free ( name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
#define h5_writefileattrib_i8 F77NAME ( \
|
||||
h5_writefileattrib_i8_, \
|
||||
h5_WRITEFILEATTRIB_I8 )
|
||||
#define h5_readfileattrib_i8 F77NAME ( \
|
||||
h5_readfileattrib_i8_, \
|
||||
H5_READFILEATTRIB_I8 )
|
||||
#endif
|
||||
|
||||
h5_err_t
|
||||
h5_readfileattrib_i8 (
|
||||
h5_int64_t *f,
|
||||
h5bl_readfileattrib_i8 (
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
h5_int64_t *data,
|
||||
h5_float64_t *buffer,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
H5_API_ENTER4 (h5_err_t,
|
||||
"f=%p, name=\"%s\", buffer=0x%p, l_name=%d",
|
||||
fh, name2, buffer, l_name);
|
||||
|
||||
h5_err_t herr = h5_read_attrib(
|
||||
filehandle, H5_ATTRIB_FILE, name2, H5_INT64_T, data);
|
||||
fh, H5_ATTRIB_FILE, name2, H5_INT64_T, buffer);
|
||||
|
||||
free ( name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
#define h5_writefileattrib_i4 F77NAME ( \
|
||||
h5_writefileattrib_i4_, \
|
||||
h5_WRITEFILEATTRIB_I4 )
|
||||
H5_WRITEFILEATTRIB_I4 )
|
||||
#endif
|
||||
|
||||
h5_err_t
|
||||
h5_writefileattrib_i4 (
|
||||
h5_int64_t *f,
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
const h5_int32_t *data,
|
||||
const h5_int32_t *buffer,
|
||||
const h5_int64_t *nelem,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
H5_API_ENTER5 (h5_err_t,
|
||||
"f=%p, name=\"%s\", buffer=0x%p, nelem=%lld, l_name=%d",
|
||||
fh, name2, buffer, (long long)*nelem, l_name);
|
||||
|
||||
h5_err_t herr = h5_write_attrib(
|
||||
filehandle, H5_ATTRIB_FILE, name2,
|
||||
H5T_NATIVE_INT32, data, (hsize_t) *nelem);
|
||||
fh, H5_ATTRIB_FILE, name2,
|
||||
H5_INT32_T, buffer, (hsize_t)*nelem);
|
||||
|
||||
free ( name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
#define h5_writefileattrib_i4 F77NAME ( \
|
||||
h5_writefileattrib_i4_, \
|
||||
h5_WRITEFILEATTRIB_I4 )
|
||||
#define h5_readfileattrib_i4 F77NAME ( \
|
||||
h5_readfileattrib_i4_, \
|
||||
H5_READFILEATTRIB_I4 )
|
||||
#endif
|
||||
|
||||
h5_err_t
|
||||
h5_readfileattrib_i4 (
|
||||
h5_int64_t *f,
|
||||
h5bl_readfileattrib_i4 (
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
h5_int32_t *data,
|
||||
h5_float64_t *buffer,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
H5_API_ENTER4 (h5_err_t,
|
||||
"f=%p, name=\"%s\", buffer=0x%p, l_name=%d",
|
||||
fh, name2, buffer, l_name);
|
||||
|
||||
h5_err_t herr = h5_read_attrib(
|
||||
filehandle, H5_ATTRIB_FILE, name2, H5_INT32_T, data);
|
||||
fh, H5_ATTRIB_FILE, name2, H5_INT32_T, buffer);
|
||||
|
||||
free ( name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
#define h5_writestepattrib_r8 F77NAME ( \
|
||||
h5_writestepattrib_r8_, \
|
||||
h5_WRITESTEPATTRIB_R8 )
|
||||
H5_WRITESTEPATTRIB_R8 )
|
||||
#endif
|
||||
|
||||
h5_err_t
|
||||
h5_writestepattrib_r8 (
|
||||
h5_int64_t *f,
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
const h5_float64_t *data,
|
||||
const h5_float64_t *buffer,
|
||||
const h5_int64_t *nelem,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
H5_API_ENTER5 (h5_err_t,
|
||||
"f=%p, name=\"%s\", buffer=0x%p, nelem=%lld, l_name=%d",
|
||||
fh, name2, buffer, (long long)*nelem, l_name);
|
||||
|
||||
h5_err_t herr = h5_write_attrib(
|
||||
filehandle, H5_ATTRIB_STEP, name2,
|
||||
H5T_NATIVE_DOUBLE, data, (hsize_t) *nelem);
|
||||
fh, H5_ATTRIB_STEP, name2,
|
||||
H5_FLOAT64_T, buffer, (hsize_t)*nelem);
|
||||
|
||||
free ( name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
#define h5_writestepattrib_r8 F77NAME ( \
|
||||
h5_writestepattrib_r8_, \
|
||||
h5_WRITESTEPATTRIB_R8 )
|
||||
#define h5_readstepattrib_r8 F77NAME ( \
|
||||
h5_readstepattrib_r8_, \
|
||||
H5_READSTEPATTRIB_R8 )
|
||||
#endif
|
||||
|
||||
h5_err_t
|
||||
h5_readstepattrib_r8 (
|
||||
h5_int64_t *f,
|
||||
h5bl_readstepattrib_r8 (
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
h5_float64_t *data,
|
||||
h5_float64_t *buffer,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
H5_API_ENTER4 (h5_err_t,
|
||||
"f=%p, name=\"%s\", buffer=0x%p, l_name=%d",
|
||||
fh, name2, buffer, l_name);
|
||||
|
||||
h5_err_t herr = h5_read_attrib(
|
||||
filehandle, H5_ATTRIB_STEP, name2, H5_FLOAT64_T, data);
|
||||
fh, H5_ATTRIB_STEP, name2, H5_FLOAT64_T, buffer);
|
||||
|
||||
free ( name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
#define h5_writestepattrib_r4 F77NAME ( \
|
||||
h5_writestepattrib_r4_, \
|
||||
h5_WRITESTEPATTRIB_R4 )
|
||||
H5_WRITESTEPATTRIB_R4 )
|
||||
#endif
|
||||
|
||||
h5_err_t
|
||||
h5_writestepattrib_r4 (
|
||||
h5_int64_t *f,
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
const h5_float32_t *data,
|
||||
const h5_float32_t *buffer,
|
||||
const h5_int64_t *nelem,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
H5_API_ENTER5 (h5_err_t,
|
||||
"f=%p, name=\"%s\", buffer=0x%p, nelem=%lld, l_name=%d",
|
||||
fh, name2, buffer, (long long)*nelem, l_name);
|
||||
|
||||
h5_err_t herr = h5_write_attrib(
|
||||
filehandle, H5_ATTRIB_STEP, name2,
|
||||
H5T_NATIVE_FLOAT, data, (hsize_t) *nelem);
|
||||
fh, H5_ATTRIB_STEP, name2,
|
||||
H5_FLOAT32_T, buffer, (hsize_t)*nelem);
|
||||
|
||||
free ( name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
#define h5_writestepattrib_r4 F77NAME ( \
|
||||
h5_writestepattrib_r4_, \
|
||||
h5_WRITESTEPATTRIB_R4 )
|
||||
#define h5_readstepattrib_r4 F77NAME ( \
|
||||
h5_readstepattrib_r4_, \
|
||||
H5_READSTEPATTRIB_R4 )
|
||||
#endif
|
||||
|
||||
h5_err_t
|
||||
h5_readstepattrib_r4 (
|
||||
h5_int64_t *f,
|
||||
h5bl_readstepattrib_r4 (
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
h5_float32_t *data,
|
||||
h5_float64_t *buffer,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
H5_API_ENTER4 (h5_err_t,
|
||||
"f=%p, name=\"%s\", buffer=0x%p, l_name=%d",
|
||||
fh, name2, buffer, l_name);
|
||||
|
||||
h5_err_t herr = h5_read_attrib(
|
||||
filehandle, H5_ATTRIB_STEP, name2, H5_FLOAT32_T, data);
|
||||
fh, H5_ATTRIB_STEP, name2, H5_FLOAT32_T, buffer);
|
||||
|
||||
free ( name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
#define h5_writestepattrib_i8 F77NAME ( \
|
||||
h5_writestepattrib_i8_, \
|
||||
h5_WRITESTEPATTRIB_I8 )
|
||||
H5_WRITESTEPATTRIB_I8 )
|
||||
#endif
|
||||
|
||||
h5_err_t
|
||||
h5_writestepattrib_i8 (
|
||||
h5_int64_t *f,
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
const h5_int64_t *data,
|
||||
const h5_int64_t *buffer,
|
||||
const h5_int64_t *nelem,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
H5_API_ENTER5 (h5_err_t,
|
||||
"f=%p, name=\"%s\", buffer=0x%p, nelem=%lld, l_name=%d",
|
||||
fh, name2, buffer, (long long)*nelem, l_name);
|
||||
|
||||
h5_err_t herr = h5_write_attrib(
|
||||
filehandle, H5_ATTRIB_STEP, name2,
|
||||
H5T_NATIVE_INT64, data, (hsize_t) *nelem);
|
||||
fh, H5_ATTRIB_STEP, name2,
|
||||
H5_INT64_T, buffer, (hsize_t)*nelem);
|
||||
|
||||
free ( name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
#define h5_writestepattrib_i8 F77NAME ( \
|
||||
h5_writestepattrib_i8_, \
|
||||
h5_WRITESTEPATTRIB_I8 )
|
||||
#define h5_readstepattrib_i8 F77NAME ( \
|
||||
h5_readstepattrib_i8_, \
|
||||
H5_READSTEPATTRIB_I8 )
|
||||
#endif
|
||||
|
||||
h5_err_t
|
||||
h5_readstepattrib_i8 (
|
||||
h5_int64_t *f,
|
||||
h5bl_readstepattrib_i8 (
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
h5_int64_t *data,
|
||||
h5_float64_t *buffer,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
H5_API_ENTER4 (h5_err_t,
|
||||
"f=%p, name=\"%s\", buffer=0x%p, l_name=%d",
|
||||
fh, name2, buffer, l_name);
|
||||
|
||||
h5_err_t herr = h5_read_attrib(
|
||||
filehandle, H5_ATTRIB_STEP, name2, H5_INT64_T, data);
|
||||
fh, H5_ATTRIB_STEP, name2, H5_INT64_T, buffer);
|
||||
|
||||
free ( name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
#define h5_writestepattrib_i4 F77NAME ( \
|
||||
h5_writestepattrib_i4_, \
|
||||
h5_WRITESTEPATTRIB_I4 )
|
||||
H5_WRITESTEPATTRIB_I4 )
|
||||
#endif
|
||||
|
||||
h5_err_t
|
||||
h5_writestepattrib_i4 (
|
||||
h5_int64_t *f,
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
const h5_int32_t *data,
|
||||
const h5_int32_t *buffer,
|
||||
const h5_int64_t *nelem,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
H5_API_ENTER5 (h5_err_t,
|
||||
"f=%p, name=\"%s\", buffer=0x%p, nelem=%lld, l_name=%d",
|
||||
fh, name2, buffer, (long long)*nelem, l_name);
|
||||
|
||||
h5_err_t herr = h5_write_attrib(
|
||||
filehandle, H5_ATTRIB_STEP, name2,
|
||||
H5T_NATIVE_INT32, data, (hsize_t) *nelem);
|
||||
fh, H5_ATTRIB_STEP, name2,
|
||||
H5_INT32_T, buffer, (hsize_t)*nelem);
|
||||
|
||||
free ( name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
#define h5_writestepattrib_i4 F77NAME ( \
|
||||
h5_writestepattrib_i4_, \
|
||||
h5_WRITESTEPATTRIB_I4 )
|
||||
#define h5_readstepattrib_i4 F77NAME ( \
|
||||
h5_readstepattrib_i4_, \
|
||||
H5_READSTEPATTRIB_I4 )
|
||||
#endif
|
||||
|
||||
h5_err_t
|
||||
h5_readstepattrib_i4 (
|
||||
h5_int64_t *f,
|
||||
h5bl_readstepattrib_i4 (
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
h5_int32_t *data,
|
||||
h5_float64_t *buffer,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
H5_API_ENTER4 (h5_err_t,
|
||||
"f=%p, name=\"%s\", buffer=0x%p, l_name=%d",
|
||||
fh, name2, buffer, l_name);
|
||||
|
||||
h5_err_t herr = h5_read_attrib(
|
||||
filehandle, H5_ATTRIB_STEP, name2, H5_INT32_T, data);
|
||||
fh, H5_ATTRIB_STEP, name2, H5_INT32_T, buffer);
|
||||
|
||||
free ( name2 );
|
||||
return herr;
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
/*** QUERY ***/
|
||||
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
|
||||
#define h5_getnstepattribs F77NAME ( \
|
||||
h5_getnstepattribs_, \
|
||||
h5_GETNSTEPATTRIBS )
|
||||
#define h5_getnfileattribs F77NAME ( \
|
||||
h5_getnfileattribs_, \
|
||||
h5_GETNFILEATTRIBS )
|
||||
#define h5_getstepattribinfo F77NAME ( \
|
||||
h5_getstepattribinfo_, \
|
||||
h5_GETSTEPATTRIBINFO )
|
||||
#define h5_getfileattribinfo F77NAME ( \
|
||||
h5_getfileattribinfo_, \
|
||||
h5_GETFILEATTRIBINFO )
|
||||
|
||||
#endif
|
||||
|
||||
h5_int64_t
|
||||
h5_getnfileattribs (
|
||||
const h5_int64_t *f
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
|
||||
return h5_get_num_attribs ( filehandle, H5_ATTRIB_FILE );
|
||||
}
|
||||
|
||||
h5_int64_t
|
||||
h5_getnstepattribs (
|
||||
const h5_int64_t *f
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
|
||||
return h5_get_num_attribs ( filehandle, H5_ATTRIB_STEP );
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
h5_getfileattribinfo (
|
||||
const h5_int64_t *f,
|
||||
const h5_int64_t *idx,
|
||||
char *name,
|
||||
h5_int64_t *nelem,
|
||||
const int l_name ) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
h5_int64_t type;
|
||||
h5_size_t nelem2;
|
||||
|
||||
h5_err_t herr = h5_get_attrib_info (
|
||||
filehandle, H5_ATTRIB_FILE, (h5_size_t)*idx,
|
||||
name, l_name, &type, &nelem2);
|
||||
|
||||
*nelem = (h5_int64_t)nelem2;
|
||||
|
||||
h5_strc2for( name, l_name );
|
||||
return herr;
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
h5_getstepattribinfo (
|
||||
const h5_int64_t *f,
|
||||
const h5_int64_t *idx,
|
||||
char *name,
|
||||
h5_int64_t *nelem,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
h5_int64_t type;
|
||||
h5_size_t nelem2;
|
||||
|
||||
h5_err_t herr = h5_get_attrib_info (
|
||||
filehandle, H5_ATTRIB_STEP, (h5_size_t)*idx,
|
||||
name, l_name, &type, &nelem2);
|
||||
|
||||
*nelem = (h5_int64_t)nelem2;
|
||||
|
||||
h5_strc2for( name, l_name );
|
||||
return herr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -26,15 +26,16 @@ nodist_include_HEADERS = ../include/H5hutF.h
|
||||
lib_LIBRARIES = @LIB_FORTRAN@
|
||||
|
||||
# Listing of all possible targets that I may build.
|
||||
EXTRA_LIBRARIES = libH5hutF.a
|
||||
EXTRA_LIBRARIES = ../lib/libH5hutF.a
|
||||
|
||||
libH5hutF_a_SOURCES = H5_F.c \
|
||||
H5_attribs_F.c \
|
||||
H5Part_F.c \
|
||||
H5Block_F.c \
|
||||
H5Block_readwrite_F.c
|
||||
___lib_libH5hutF_a_SOURCES = \
|
||||
H5_F.c \
|
||||
H5_attribs_F.c \
|
||||
H5Part_F.c \
|
||||
H5Block_F.c \
|
||||
H5Block_readwrite_F.c
|
||||
|
||||
libH5hutF_a_DEPENDENCIES = ../include/H5hutF.h
|
||||
___lib_libH5hutF_a_DEPENDENCIES = ../include/H5hutF.h
|
||||
|
||||
../include/H5hutF.h: $(F90_FILES)
|
||||
awk '/INTEGER\*8 FUNCTION/{print "\t" $$1 " " $$3}' $^ >$@
|
||||
|
||||
Executable
+301
@@ -0,0 +1,301 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
fc_head = """
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "h5core/h5_core.h"
|
||||
#include "Underscore.h"
|
||||
|
||||
#if defined(F77_SINGLE_UNDERSCORE)
|
||||
#define F77NAME(a,b) a
|
||||
#elif defined(F77_CRAY_UNDERSCORE)
|
||||
#define F77NAME(a,b) b
|
||||
#elif defined(F77_NO_UNDERSCORE)
|
||||
#else
|
||||
#error Error, no way to determine how to construct fortran bindings
|
||||
#endif
|
||||
"""
|
||||
|
||||
string_fi = """
|
||||
!> \ingroup h5hut_attrib_f
|
||||
!! See \ref H5WriteFileAttribString
|
||||
!! \return 0 on success or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5_writefileattrib_string ( filehandle, name, buffer )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
CHARACTER(LEN=*), INTENT(IN) :: buffer !< the string value to store
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5hut_attrib_f
|
||||
!! See \ref H5WriteStepAttribString
|
||||
!! \return 0 on success or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5_writestepattrib_string ( filehandle, name, buffer )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
CHARACTER(LEN=*), INTENT(IN) :: buffer !< the string value to store
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5hut_attrib_f
|
||||
!! See \ref H5ReadFileAttribString
|
||||
!! \return 0 on success or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5_readfileattrib_string ( filehandle, name, buffer )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
CHARACTER(LEN=*), INTENT(OUT) :: buffer !< buffer to read the string value into
|
||||
END FUNCTION
|
||||
|
||||
!> \ingroup h5hut_attrib_f
|
||||
!! See \ref H5ReadStepAttribString
|
||||
!! \return 0 on success or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5_readstepattrib_string ( filehandle, name, buffer )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
CHARACTER(LEN=*), INTENT(OUT) :: buffer !< buffer to read the string value into
|
||||
END FUNCTION
|
||||
"""
|
||||
|
||||
string_fc = """
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
|
||||
#define h5_writefileattrib_string F77NAME ( \
|
||||
h5_writefileattrib_string_, \
|
||||
H5_writefileattrib_string )
|
||||
#define h5_writestepattrib_string F77NAME ( \
|
||||
h5_writestepattrib_string_, \
|
||||
H5_WRITESTEPATTRIB_STRING )
|
||||
#define h5_readstepattrib_string F77NAME ( \
|
||||
h5_readstepattrib_string_, \
|
||||
h5_READSTEPATTRIB_STRING )
|
||||
#define h5_readfileattrib_string F77NAME ( \
|
||||
h5_readfileattrib_string_, \
|
||||
h5_READFILEATTRIB_STRING )
|
||||
|
||||
#endif
|
||||
|
||||
h5_err_t
|
||||
h5_writefileattrib_string (
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
const char *buffer,
|
||||
const int l_name,
|
||||
const int l_buffer
|
||||
) {
|
||||
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
char *buffer2 = h5_strdupfor2c ( buffer, l_buffer );
|
||||
H5_API_ENTER5 (h5_err_t,
|
||||
"f=%p, name=\\"%s\\", buffer=\\"%s\\", l_name=%d, l_buffer=%d",
|
||||
fh, name2, buffer2, l_name, l_buffer);
|
||||
|
||||
h5_err_t herr = h5_write_attrib (
|
||||
fh, H5_ATTRIB_FILE, name2,
|
||||
H5_STRING_T, buffer2, strlen(buffer2)+1 );
|
||||
|
||||
free ( name2 );
|
||||
free ( buffer2 );
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
h5_writestepattrib_string (
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
const char *buffer,
|
||||
const int l_name,
|
||||
const int l_buffer
|
||||
) {
|
||||
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
char *buffer2 = h5_strdupfor2c ( buffer, l_buffer );
|
||||
H5_API_ENTER5 (h5_err_t,
|
||||
"f=%p, name=\\"%s\\", buffer=\\"%s\\", l_name=%d, l_buffer=%d",
|
||||
fh, name2, buffer2, l_name, l_buffer);
|
||||
|
||||
h5_err_t herr = h5_write_attrib (
|
||||
fh, H5_ATTRIB_STEP, name2,
|
||||
H5_STRING_T, buffer2, strlen(buffer2)+1 );
|
||||
|
||||
free ( name2 );
|
||||
free ( buffer2 );
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
h5_readfileattrib_string (
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
char *buffer,
|
||||
const int l_name,
|
||||
const int l_buffer
|
||||
) {
|
||||
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
char * name2 = h5_strdupfor2c ( name, l_name );
|
||||
H5_API_ENTER5 (h5_err_t,
|
||||
"f=%p, name=\\"%s\\", buffer=0x%p, l_name=%d, l_buffer=%d",
|
||||
fh, name2, buffer, l_name, l_buffer);
|
||||
|
||||
h5_err_t herr = h5_read_attrib (
|
||||
fh, H5_ATTRIB_FILE, name2, H5_STRING_T, buffer );
|
||||
|
||||
h5_strc2for ( buffer, l_buffer );
|
||||
|
||||
free ( name2 );
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
h5_readstepeattrib_string (
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
char *buffer,
|
||||
const int l_name,
|
||||
const int l_buffer
|
||||
) {
|
||||
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
char * name2 = h5_strdupfor2c ( name, l_name );
|
||||
H5_API_ENTER5 (h5_err_t,
|
||||
"f=%p, name=\\"%s\\", buffer=0x%p, l_name=%d, l_buffer=%d",
|
||||
fh, name2, buffer, l_name, l_buffer);
|
||||
|
||||
h5_err_t herr = h5_read_attrib (
|
||||
fh, H5_ATTRIB_STEP, name2, H5_STRING_T, buffer );
|
||||
|
||||
h5_strc2for ( buffer, l_buffer );
|
||||
|
||||
free ( name2 );
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
"""
|
||||
|
||||
write_fi = """
|
||||
!> \\ingroup h5hut_attrib_f
|
||||
!! See \\ref H5Write#Group#Attrib#TYPE_ABV#
|
||||
!! \\return 0 on success or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5bl_write#group#attrib_#TYPE_F90_ABV# ( filehandle, name, buffer, nelems )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
#TYPE_F90#, INTENT(IN) :: buffer(*) !< the buffer to write from
|
||||
INTEGER*8, INTENT(IN) :: nelems !< the number of elements in the array
|
||||
END FUNCTION
|
||||
"""
|
||||
|
||||
write_fc = """
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
#define h5_write#group#attrib_#TYPE_F90_ABV# F77NAME ( \\
|
||||
h5_write#group#attrib_#TYPE_F90_ABV#_, \\
|
||||
H5_WRITE#GROUP#ATTRIB_#TYPE_F90_ABVC# )
|
||||
#endif
|
||||
|
||||
h5_err_t
|
||||
h5_write#group#attrib_#TYPE_F90_ABV# (
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
const h5_#TYPE_H5P#_t *buffer,
|
||||
const h5_int64_t *nelem,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
H5_API_ENTER5 (h5_err_t,
|
||||
"f=%p, name=\\"%s\\", buffer=0x%p, nelem=%lld, l_name=%d",
|
||||
fh, name2, buffer, (long long)*nelem, l_name);
|
||||
|
||||
h5_err_t herr = h5_write_attrib(
|
||||
fh, H5_ATTRIB_#GROUP#, name2,
|
||||
#TYPE_HDF5#, buffer, (hsize_t)*nelem);
|
||||
|
||||
free ( name2 );
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
"""
|
||||
|
||||
read_fi = """
|
||||
!> \\ingroup h5hut_attrib_f
|
||||
!! See \\ref H5Write#Group#Attrib#TYPE_ABV#
|
||||
!! \\return 0 on success or error code
|
||||
!<
|
||||
INTEGER*8 FUNCTION h5_read#group#attrib_#TYPE_F90_ABV# ( filehandle, name, buffer )
|
||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the attribute
|
||||
#TYPE_F90#, INTENT(IN) :: buffer(*) !< the buffer to read to
|
||||
END FUNCTION
|
||||
"""
|
||||
|
||||
read_fc = """
|
||||
#if ! defined(F77_NO_UNDERSCORE)
|
||||
#define h5_read#group#attrib_#TYPE_F90_ABV# F77NAME ( \\
|
||||
h5_read#group#attrib_#TYPE_F90_ABV#_, \\
|
||||
H5_READ#GROUP#ATTRIB_#TYPE_F90_ABVC# )
|
||||
#endif
|
||||
|
||||
h5_err_t
|
||||
h5bl_read#group#attrib_#TYPE_F90_ABV# (
|
||||
h5_int64_t *const f,
|
||||
const char *name,
|
||||
h5_float64_t *buffer,
|
||||
const int l_name
|
||||
) {
|
||||
|
||||
h5_file_t *fh = h5_filehandlefor2c(f);
|
||||
char *name2 = h5_strdupfor2c ( name, l_name );
|
||||
H5_API_ENTER4 (h5_err_t,
|
||||
"f=%p, name=\\"%s\\", buffer=0x%p, l_name=%d",
|
||||
fh, name2, buffer, l_name);
|
||||
|
||||
h5_err_t herr = h5_read_attrib(
|
||||
fh, H5_ATTRIB_#GROUP#, name2, #TYPE_HDF5#, buffer);
|
||||
|
||||
free ( name2 );
|
||||
H5_API_RETURN(herr);
|
||||
}
|
||||
"""
|
||||
|
||||
groups = [ "file", "step" ]
|
||||
|
||||
types = [
|
||||
["float64", "H5_FLOAT64_T", "REAL*8", "r8", "R8", "Float64"],
|
||||
["float32", "H5_FLOAT32_T", "REAL*4", "r4", "R4", "Float32"],
|
||||
["int64", "H5_INT64_T", "INTEGER*8", "i8", "I8", "Int64"],
|
||||
["int32", "H5_INT32_T", "INTEGER*4", "i4", "I4", "Int32"]
|
||||
]
|
||||
|
||||
def create_call(template, type, group):
|
||||
fcn = template
|
||||
fcn = fcn.replace('#group#',group)\
|
||||
.replace('#GROUP#',group.upper())\
|
||||
.replace('#TYPE_H5P#',type[0])\
|
||||
.replace('#TYPE_HDF5#',type[1])\
|
||||
.replace('#TYPE_F90#',type[2])\
|
||||
.replace('#TYPE_F90_ABV#',type[3])\
|
||||
.replace('#TYPE_F90_ABVC#',type[4])\
|
||||
.replace('#TYPE_ABV#',type[5])
|
||||
return fcn
|
||||
|
||||
def write_calls():
|
||||
fcfile = file('H5_attribs_F.c','w')
|
||||
fcfile.write(fc_head)
|
||||
fcfile.write(string_fc)
|
||||
fifile = file('H5_attribs.f90','w')
|
||||
fifile.write(string_fi)
|
||||
for group in groups:
|
||||
for type in types:
|
||||
fcfile.write(create_call(write_fc,type,group));
|
||||
fcfile.write(create_call(read_fc,type,group));
|
||||
fifile.write(create_call(write_fi,type,group));
|
||||
fifile.write(create_call(read_fi,type,group));
|
||||
fcfile.close()
|
||||
fifile.close()
|
||||
|
||||
write_calls()
|
||||
|
||||
+16
-18
@@ -26,33 +26,35 @@ EXTRA_HEADERS = \
|
||||
../include/h5core/h5t_core.h \
|
||||
../include/h5core/h5t_inquiry.h \
|
||||
../include/h5core/h5t_map.h \
|
||||
../include/h5core/h5t_openclose.h \
|
||||
../include/h5core/h5t_model.h \
|
||||
../include/h5core/h5t_readwrite.h \
|
||||
../include/h5core/h5t_ref_elements.h \
|
||||
../include/h5core/h5t_retrieve.h \
|
||||
../include/h5core/h5t_storemesh.h \
|
||||
../include/h5core/h5t_tags.h \
|
||||
h5b_errorhandling_private.h \
|
||||
h5b_model_private.h \
|
||||
h5b_types_private.h \
|
||||
h5_attribs_private.h \
|
||||
h5_core_private.h \
|
||||
h5_errorhandling_private.h \
|
||||
h5_fcmp_private.h \
|
||||
h5_hdf5_private.h \
|
||||
h5_hsearch_private.h \
|
||||
h5_lustre_private.h \
|
||||
h5_maps_private.h \
|
||||
h5_mpi_private.h \
|
||||
h5_qsort_private.h \
|
||||
h5_readwrite_private.h \
|
||||
h5_syscall_private.h \
|
||||
h5_types_private.h \
|
||||
h5b_errorhandling_private.h \
|
||||
h5b_model_private.h \
|
||||
h5b_types_private.h \
|
||||
h5t_access_private.h \
|
||||
h5t_adjacencies_private.h \
|
||||
h5t_consts_private.h \
|
||||
h5t_core_private.h \
|
||||
h5t_errorhandling_private.h \
|
||||
h5t_hsearch_private.h \
|
||||
h5t_map_private.h \
|
||||
h5t_openclose_private.h \
|
||||
h5t_model_private.h \
|
||||
h5t_readwrite_private.h \
|
||||
h5t_ref_elements_private.h \
|
||||
h5t_retrieve_private.h \
|
||||
@@ -60,7 +62,6 @@ EXTRA_HEADERS = \
|
||||
h5t_store_trim_private.h \
|
||||
h5t_tags_private.h \
|
||||
h5t_types_private.h \
|
||||
h5_types_private.h \
|
||||
h5u_errorhandling_private.h \
|
||||
h5u_types_private.h
|
||||
|
||||
@@ -68,13 +69,13 @@ EXTRA_HEADERS = \
|
||||
EXTRA_DIST = $(EXTRA_HEADERS)
|
||||
|
||||
# What to build... Will be determined by configure script.
|
||||
lib_LIBRARIES = libH5hut.a
|
||||
lib_LIBRARIES = ../lib/libH5hut.a
|
||||
|
||||
# Listing of all possible targets that I may build.
|
||||
EXTRA_LIBRARIES = libH5hut.a
|
||||
EXTRA_LIBRARIES = ../lib/libH5hut.a
|
||||
|
||||
# Listing of sources
|
||||
libH5hut_a_SOURCES = \
|
||||
___lib_libH5hut_a_SOURCES = \
|
||||
h5_attach.c \
|
||||
h5_attribs.c \
|
||||
h5_errorhandling.c \
|
||||
@@ -99,12 +100,12 @@ libH5hut_a_SOURCES = \
|
||||
h5t_adjacencies.c \
|
||||
h5t_adjacencies_tetm.c \
|
||||
h5t_adjacencies_trim.c \
|
||||
h5t_consts.c \
|
||||
h5t_errorhandling.c \
|
||||
h5t_hsearch.c \
|
||||
h5t_inquiry.c \
|
||||
h5t_map.c \
|
||||
h5t_openclose.c \
|
||||
h5t_model.c \
|
||||
h5t_model_tetm.c \
|
||||
h5t_model_trim.c \
|
||||
h5t_readwrite.c \
|
||||
h5t_readwrite_trim.c \
|
||||
h5t_readwrite_tetm.c \
|
||||
@@ -117,12 +118,9 @@ libH5hut_a_SOURCES = \
|
||||
h5t_store_trim.c \
|
||||
h5t_tags.c
|
||||
|
||||
libH5hut_a_DEPENDENCIES = $(EXTRA_HEADERS)
|
||||
___lib_libH5hut_a_DEPENDENCIES = $(EXTRA_HEADERS)
|
||||
|
||||
all: all-am install-libs-local
|
||||
|
||||
install-libs-local:
|
||||
-cp ${lib_LIBRARIES} ../lib
|
||||
all: all-am
|
||||
|
||||
install-exec-local:
|
||||
@$(INSTALL) -d $(DESTDIR)$(includedir)/h5core
|
||||
|
||||
+91
-3
@@ -141,7 +141,7 @@ h5_get_num_attachments (
|
||||
if (group_id < 0) {
|
||||
H5_CORE_API_LEAVE (0);
|
||||
}
|
||||
TRY (num = hdf5_get_num_datasets (f->file));
|
||||
TRY (num = hdf5_get_num_datasets (group_id));
|
||||
TRY (hdf5_close_group (group_id));
|
||||
H5_CORE_API_RETURN (num);
|
||||
}
|
||||
@@ -204,8 +204,96 @@ h5_get_attachment (
|
||||
const char* const fname
|
||||
) {
|
||||
H5_CORE_API_ENTER1 (h5_err_t, "fname=\"%s\"", fname);
|
||||
UNUSED_ARGUMENT (f);
|
||||
UNUSED_ARGUMENT (fname);
|
||||
// allowed modes: O_RDWR, O_RDONLY; O_APPEND
|
||||
// forbidden modes: O_WRONLY
|
||||
if (f->mode == H5_O_WRONLY) {
|
||||
H5_PRIV_FUNC_LEAVE (
|
||||
h5priv_handle_file_mode_error (f->mode));
|
||||
}
|
||||
|
||||
hid_t loc_id;
|
||||
TRY (loc_id = h5priv_open_group (f, f->file, H5_ATTACHMENT));
|
||||
h5_err_t exists;
|
||||
TRY (exists = hdf5_link_exists (loc_id, fname));
|
||||
if (f->mode == H5_O_WRONLY) {
|
||||
H5_PRIV_FUNC_LEAVE (
|
||||
h5priv_handle_file_mode_error (f->mode));
|
||||
} else if (!exists) {
|
||||
H5_PRIV_FUNC_LEAVE (
|
||||
h5_error (
|
||||
H5_ERR_H5,
|
||||
"Attachment \"%s\" doesn't exist", fname));
|
||||
}
|
||||
|
||||
// read dataset
|
||||
hid_t dataset_id, diskspace_id;
|
||||
h5_ssize_t fsize;
|
||||
TRY (dataset_id = hdf5_open_dataset (loc_id, fname));
|
||||
TRY (diskspace_id = hdf5_get_dataset_space (dataset_id));
|
||||
TRY (fsize = hdf5_get_npoints_of_dataspace (diskspace_id));
|
||||
|
||||
hsize_t read_length;
|
||||
char* buf = NULL;
|
||||
if (f->myproc == 0) {
|
||||
buf = malloc (fsize);
|
||||
read_length = fsize;
|
||||
|
||||
} else {
|
||||
buf = malloc (1);
|
||||
read_length = 0;
|
||||
}
|
||||
|
||||
hsize_t start = 0;
|
||||
TRY (hdf5_select_hyperslab_of_dataspace (
|
||||
diskspace_id,
|
||||
H5S_SELECT_SET,
|
||||
&start,
|
||||
NULL,
|
||||
&read_length,
|
||||
NULL));
|
||||
|
||||
hid_t memspace_id;
|
||||
hsize_t max = H5S_UNLIMITED;
|
||||
TRY (memspace_id = hdf5_create_dataspace (1, &read_length, &max));
|
||||
TRY (hdf5_read_dataset (dataset_id,
|
||||
H5T_NATIVE_CHAR,
|
||||
memspace_id,
|
||||
diskspace_id,
|
||||
f->xfer_prop,
|
||||
buf));
|
||||
|
||||
TRY (hdf5_close_dataspace (diskspace_id));
|
||||
TRY (hdf5_close_dataspace (memspace_id));
|
||||
TRY (hdf5_close_dataset (dataset_id));
|
||||
TRY (hdf5_close_group (loc_id));
|
||||
|
||||
// write file
|
||||
if (f->myproc == 0) {
|
||||
int fd;
|
||||
if ((fd = open (fname, O_WRONLY|O_CREAT|O_TRUNC)) < 0) {
|
||||
H5_CORE_API_LEAVE (
|
||||
h5_error (
|
||||
H5_ERR_H5,
|
||||
"Error opening file \"%s\": %s",
|
||||
fname, strerror(errno)));
|
||||
}
|
||||
if (write (fd, buf, fsize) != fsize) {
|
||||
H5_CORE_API_LEAVE (
|
||||
h5_error (
|
||||
H5_ERR_H5,
|
||||
"Error writing to file \"%s\": %s",
|
||||
fname, strerror(errno)));
|
||||
}
|
||||
if (close (fd) < 0) {
|
||||
H5_CORE_API_LEAVE (
|
||||
h5_error (
|
||||
H5_ERR_H5,
|
||||
"Error closing file \"%s\": %s",
|
||||
fname, strerror(errno)));
|
||||
}
|
||||
}
|
||||
TRY (h5_free (buf));
|
||||
|
||||
H5_CORE_API_RETURN (H5_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
+59
-7
@@ -21,7 +21,12 @@ h5priv_read_attrib (
|
||||
const hid_t attrib_type, /*!< HDF5 type of attribute */
|
||||
void* const attrib_value /*!< OUT: attribute value */
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER4 (h5_err_t,
|
||||
"id=%d, attrib_name=\"%s\", attrib_type=%d, attrib_value=%p",
|
||||
id,
|
||||
attrib_name,
|
||||
attrib_type,
|
||||
attrib_value);
|
||||
hid_t attrib_id;
|
||||
hid_t type_id;
|
||||
hid_t space_id;
|
||||
@@ -64,7 +69,16 @@ h5_read_attrib (
|
||||
const hid_t attrib_type, /*!< HDF5 type of attribute */
|
||||
void* const attrib_value /*!< OUT: attribute value */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER5 (h5_err_t,
|
||||
"f=%p mode=%d, "
|
||||
"attrib_name=\"%s\", attrib_type=%d, "
|
||||
"attrib_value=%p",
|
||||
f,
|
||||
mode,
|
||||
attrib_name,
|
||||
attrib_type,
|
||||
attrib_value);
|
||||
|
||||
if (mode != H5_ATTRIB_FILE) CHECK_TIMEGROUP( f );
|
||||
|
||||
hid_t id;
|
||||
@@ -81,7 +95,14 @@ h5priv_write_attrib (
|
||||
const void* attrib_value, /*!< value of attribute */
|
||||
const hsize_t attrib_nelem /*!< number of elements (dimension) */
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER5 (h5_err_t,
|
||||
"id=%d, attrib_name=\"%s\", attrib_type=%d, "
|
||||
"attrib_value=%p, attrib_nelem=%llu",
|
||||
id,
|
||||
attrib_name,
|
||||
attrib_type,
|
||||
attrib_value,
|
||||
attrib_nelem);
|
||||
hid_t space_id;
|
||||
hid_t attrib_id;
|
||||
hid_t type_id;
|
||||
@@ -126,7 +147,17 @@ h5_write_attrib (
|
||||
const void* attrib_value, /*!< value of attribute */
|
||||
const hsize_t attrib_nelem /*!< number of elements (dimension) */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER6 (h5_err_t,
|
||||
"f=%p mode=%d, "
|
||||
"attrib_name=\"%s\", attrib_type=%d, "
|
||||
"attrib_value=%p, attrib_nelem=%llu",
|
||||
f,
|
||||
mode,
|
||||
attrib_name,
|
||||
attrib_type,
|
||||
attrib_value,
|
||||
attrib_nelem);
|
||||
|
||||
if (mode != H5_ATTRIB_FILE) CHECK_TIMEGROUP( f );
|
||||
CHECK_WRITABLE_MODE( f );
|
||||
|
||||
@@ -146,7 +177,17 @@ h5priv_get_attrib_info (
|
||||
h5_int64_t* attrib_type, /*!< OUT: H5 type of attribute */
|
||||
h5_size_t* attrib_nelem /*!< OUT: number of elements */
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER6 (h5_err_t,
|
||||
"id=%d, "
|
||||
"attrib_idx=%llu, "
|
||||
"attrib_name=%p, len_attrib_name=%llu, "
|
||||
"attrib_type=%p, attrib_nelem=%p",
|
||||
id,
|
||||
(long long unsigned)attrib_idx,
|
||||
attrib_name,
|
||||
(long long unsigned)len_attrib_name,
|
||||
attrib_type,
|
||||
attrib_nelem);
|
||||
hid_t attrib_id;
|
||||
hid_t mytype;
|
||||
hid_t space_id;
|
||||
@@ -191,7 +232,17 @@ h5_get_attrib_info (
|
||||
h5_int64_t* attrib_type, /*!< OUT: H5 type of attribute */
|
||||
h5_size_t* attrib_nelem /*!< OUT: number of elements */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER7 (h5_err_t,
|
||||
"f=0x%p, mode=%d, "
|
||||
"attrib_idx=%llu, attrib_name=%p, len_attrib_name=%llu, "
|
||||
"attrib_type=%p, attrib_nelem=%p",
|
||||
f, mode,
|
||||
(long long unsigned)attrib_idx,
|
||||
attrib_name,
|
||||
(long long unsigned)len_attrib_name,
|
||||
attrib_type,
|
||||
attrib_nelem);
|
||||
|
||||
if (mode != H5_ATTRIB_FILE) CHECK_TIMEGROUP( f );
|
||||
|
||||
hid_t id;
|
||||
@@ -213,7 +264,8 @@ h5_get_num_attribs (
|
||||
h5_file_t *const f, /*!< handle to open file */
|
||||
const char mode /*!< FILE or STEP flag */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_ssize_t);
|
||||
H5_CORE_API_ENTER2 (h5_ssize_t,
|
||||
"f=%p, mode=%d", f, mode);
|
||||
if (mode != H5_ATTRIB_FILE) CHECK_TIMEGROUP( f );
|
||||
hid_t id;
|
||||
TRY (get_hdf5_obj_id(f, mode, &id));
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef __H5_CORE_PRIVATE_H
|
||||
#define __H5_CORE_PRIVATE_H
|
||||
|
||||
#define H5_CORE_API_ENTER(type) __FUNC_ENTER(type)
|
||||
#define H5_CORE_API_ENTER0(type) __FUNC_ENTER(type)
|
||||
#define H5_CORE_API_ENTER1(type, fmt, a1) \
|
||||
__FUNC_ENTER1(type, fmt, a1, H5_DEBUG_CORE_API)
|
||||
@@ -11,16 +10,34 @@
|
||||
__FUNC_ENTER3(type, fmt, a1, a2, a3, H5_DEBUG_CORE_API)
|
||||
#define H5_CORE_API_ENTER4(type, fmt, a1, a2, a3, a4) \
|
||||
__FUNC_ENTER4(type, fmt, a1, a2, a3, a4, H5_DEBUG_CORE_API)
|
||||
#define H5_CORE_API_ENTER5(type, fmt, a1, a2, a3, a4, a5) \
|
||||
__FUNC_ENTER5(type, fmt, a1, a2, a3, a4, a5, H5_DEBUG_CORE_API)
|
||||
#define H5_CORE_API_ENTER6(type, fmt, a1, a2, a3, a4, a5, a6) \
|
||||
__FUNC_ENTER6(type, fmt, a1, a2, a3, a4, a5, a6, H5_DEBUG_CORE_API)
|
||||
#define H5_CORE_API_ENTER7(type, fmt, a1, a2, a3, a4, a5, a6, a7) \
|
||||
__FUNC_ENTER7(type, fmt, a1, a2, a3, a4, a5, a6, a7, H5_DEBUG_CORE_API)
|
||||
#define H5_CORE_API_ENTER8(type, fmt, a1, a2, a3, a4, a5, a6, a7, a8) \
|
||||
__FUNC_ENTER8(type, fmt, a1, a2, a3, a4, a5, a6, a7, a8, H5_DEBUG_CORE_API)
|
||||
#define H5_CORE_API_LEAVE(value) __FUNC_LEAVE(value)
|
||||
#define H5_CORE_API_RETURN(value) __FUNC_RETURN(value, H5_DEBUG_CORE_API)
|
||||
|
||||
#define H5_PRIV_API_ENTER(type) __FUNC_ENTER(type)
|
||||
#define H5_PRIV_API_ENTER0(type) \
|
||||
__FUNC_ENTER1(type, H5_DEBUG_PRIV_API)
|
||||
#define H5_PRIV_API_ENTER1(type, fmt, a1) \
|
||||
__FUNC_ENTER1(type, fmt, a1, H5_DEBUG_PRIV_API)
|
||||
#define H5_PRIV_API_ENTER2(type, fmt, a1, a2) \
|
||||
__FUNC_ENTER2(type, fmt, a1, a2, H5_DEBUG_PRIV_API)
|
||||
#define H5_PRIV_API_ENTER3(type, fmt, a1, a2, a3) \
|
||||
__FUNC_ENTER3(type, fmt, a1, a2, a3, H5_DEBUG_PRIV_API)
|
||||
#define H5_PRIV_API_ENTER4(type, fmt, a1, a2, a3, a4) \
|
||||
__FUNC_ENTER4(type, fmt, a1, a2, a3, a4, H5_DEBUG_PRIV_API)
|
||||
#define H5_PRIV_API_ENTER5(type, fmt, a1, a2, a3, a4, a5) \
|
||||
__FUNC_ENTER5(type, fmt, a1, a2, a3, a4, a5, H5_DEBUG_PRIV_API)
|
||||
#define H5_PRIV_API_ENTER6(type, fmt, a1, a2, a3, a4, a5, a6) \
|
||||
__FUNC_ENTER6(type, fmt, a1, a2, a3, a4, a5, a6, H5_DEBUG_PRIV_API)
|
||||
#define H5_PRIV_API_ENTER7(type, fmt, a1, a2, a3, a4, a5, a6, a7) \
|
||||
__FUNC_ENTER7(type, fmt, a1, a2, a3, a4, a5, a6, a7, H5_DEBUG_PRIV_API)
|
||||
|
||||
#define H5_PRIV_API_LEAVE(value) __FUNC_LEAVE(value)
|
||||
#define H5_PRIV_API_RETURN(value) __FUNC_RETURN(value, H5_DEBUG_PRIV_API)
|
||||
|
||||
@@ -33,6 +50,9 @@
|
||||
__FUNC_ENTER3(type, fmt,a1, a2, a3, H5_DEBUG_PRIV_FUNC)
|
||||
#define H5_PRIV_FUNC_ENTER4(type, fmt, a1, a2, a3, a4) \
|
||||
__FUNC_ENTER4(type, fmt,a1, a2, a3, a4, H5_DEBUG_PRIV_FUNC)
|
||||
#define H5_PRIV_FUNC_ENTER5(type, fmt, a1, a2, a3, a4, a5) \
|
||||
__FUNC_ENTER5(type, fmt,a1, a2, a3, a4, a5, H5_DEBUG_PRIV_FUNC)
|
||||
|
||||
#define H5_PRIV_FUNC_LEAVE(value) __FUNC_LEAVE(value)
|
||||
#define H5_PRIV_FUNC_RETURN(value) __FUNC_RETURN(value, H5_DEBUG_PRIV_FUNC)
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ h5_err_t h5_errno;
|
||||
h5_int32_t h5_debug_level = 1;
|
||||
int h5_initialized = 0;
|
||||
struct call_stack h5_call_stack;
|
||||
int h5_myproc = 0;
|
||||
|
||||
char *h5_rfmts[] = {
|
||||
[e_int] "%d",
|
||||
@@ -48,6 +49,11 @@ h5_initialize (
|
||||
) {
|
||||
memset (&h5_call_stack, 0, sizeof (h5_call_stack));
|
||||
h5_initialized = 1;
|
||||
#ifdef PARALLEL_IO
|
||||
if (h5priv_mpi_comm_rank (MPI_COMM_WORLD, &h5_myproc) < 0) {
|
||||
exit (42);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -83,7 +89,7 @@ h5_set_debuglevel (
|
||||
|
||||
\return current debug level
|
||||
*/
|
||||
h5_id_t
|
||||
h5_err_t
|
||||
h5_get_debuglevel (
|
||||
void
|
||||
) {
|
||||
@@ -198,7 +204,8 @@ h5priv_vprintf (
|
||||
va_list ap
|
||||
) {
|
||||
char fmt2[2048];
|
||||
snprintf (fmt2, sizeof(fmt2), "%s: %s: %s\n", prefix, __funcname, fmt);
|
||||
snprintf (fmt2, sizeof(fmt2), "[proc %d] %s: %s: %s\n", h5_myproc, prefix,
|
||||
__funcname, fmt);
|
||||
vfprintf (f, fmt2, ap);
|
||||
}
|
||||
|
||||
|
||||
@@ -34,16 +34,16 @@
|
||||
(long long)idx, type, group_name );
|
||||
|
||||
|
||||
#define HANDLE_H5_OVERFLOW_ERR( otype, max ) \
|
||||
#define HANDLE_H5_OVERFLOW_ERR( max ) \
|
||||
h5_error( \
|
||||
H5_ERR_INVAL, \
|
||||
"Cannot store more than %lld %s", (long long)max, otype );
|
||||
"Cannot store more than %lld items", (long long)max );
|
||||
|
||||
#define HANDLE_H5_PARENT_ID_ERR( otype, parent_id ) \
|
||||
#define HANDLE_H5_PARENT_ID_ERR( parent_id ) \
|
||||
h5_error( \
|
||||
H5_ERR_INVAL, \
|
||||
"Impossible parent_id %lld for %s.", \
|
||||
(long long)parent_id, otype );
|
||||
"Wrong parent_id %lld.", \
|
||||
(long long)parent_id );
|
||||
|
||||
#define HANDLE_H5_OUT_OF_RANGE_ERR( otype, oid ) \
|
||||
h5_error( \
|
||||
|
||||
+13
-10
@@ -262,7 +262,7 @@ hdf5_close_dataset (
|
||||
"dataset_id=%d (%s)",
|
||||
dataset_id,
|
||||
hdf5_get_objname (dataset_id));
|
||||
if (dataset_id == 0 || dataset_id == -1)
|
||||
if (dataset_id < 0)
|
||||
HDF5_WRAPPER_LEAVE (H5_SUCCESS);
|
||||
|
||||
if (H5Dclose (dataset_id) < 0) {
|
||||
@@ -537,7 +537,7 @@ hdf5_select_elements_of_dataspace (
|
||||
herr = H5Sselect_elements (
|
||||
space_id,
|
||||
op,
|
||||
nelems,
|
||||
(size_t)nelems,
|
||||
indices);
|
||||
} else {
|
||||
herr = H5Sselect_none ( space_id );
|
||||
@@ -1039,7 +1039,7 @@ hdf5_set_errorhandler (
|
||||
if (H5Eset_auto (estack_id, func, client_data) < 0)
|
||||
HDF5_WRAPPER_LEAVE (
|
||||
h5_error (
|
||||
H5_ERR_INIT,
|
||||
H5_ERR_HDF5,
|
||||
"Cannot initialize H5."));
|
||||
HDF5_WRAPPER_RETURN (H5_SUCCESS);
|
||||
}
|
||||
@@ -1606,13 +1606,16 @@ hdf5_get_objname (
|
||||
) {
|
||||
static char objname[256];
|
||||
|
||||
memset ( objname, 0, sizeof(objname) );
|
||||
ssize_t size = H5Iget_name ( id, objname, sizeof(objname) );
|
||||
if ( size < 0 ) {
|
||||
strcpy ( objname, "[error getting object name]" );
|
||||
} else if ( size == 0 ) {
|
||||
strcpy ( objname, "[no name associated with identifier]" );
|
||||
// memset ( objname, 0, sizeof(objname) );
|
||||
if (id == -1) {
|
||||
strcpy ( objname, "[none]" );
|
||||
} else {
|
||||
ssize_t size = H5Iget_name ( id, objname, sizeof(objname) );
|
||||
if ( size < 0 ) {
|
||||
strcpy ( objname, "[error getting object name]" );
|
||||
} else if ( size == 0 ) {
|
||||
strcpy ( objname, "[no name associated with identifier]" );
|
||||
}
|
||||
}
|
||||
|
||||
return objname;
|
||||
}
|
||||
|
||||
+14
-6
@@ -67,7 +67,11 @@ h5priv_hcreate (
|
||||
unsigned int (*compute_hash)(const void*),
|
||||
h5_err_t (*free_entry)(const void*)
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER5 (h5_err_t,
|
||||
"nel=%llu, htab=0x%p, compare=0x%p, "
|
||||
"compute_hash=0x%p, free_entry=0x%p",
|
||||
(long long unsigned)nel,
|
||||
htab, compare, compute_hash, free_entry);
|
||||
|
||||
/* Test for correct arguments. */
|
||||
if (htab == NULL || htab->table != NULL) {
|
||||
@@ -100,7 +104,9 @@ h5priv_hresize (
|
||||
size_t nel, // number of entries to grow
|
||||
h5_hashtable_t* htab // hash table to resize
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER2 (h5_err_t,
|
||||
"nel=%llu, htab=0x%p",
|
||||
(long long unsigned)nel, htab);
|
||||
if (htab == NULL || htab->table == NULL) {
|
||||
H5_PRIV_API_LEAVE (h5_error_internal ());
|
||||
}
|
||||
@@ -138,7 +144,7 @@ hwalk (
|
||||
struct hsearch_data* htab,
|
||||
h5_err_t (*visit)(const void *item)
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER2 (h5_err_t, "htab=0x%p, visit=0x%p", htab, visit);
|
||||
unsigned int idx = 1;
|
||||
for (idx = 1; idx < htab->size; idx++) {
|
||||
if (htab->table[idx].used) {
|
||||
@@ -155,7 +161,7 @@ h5_err_t
|
||||
h5priv_hdestroy (
|
||||
struct hsearch_data* htab
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER1 (h5_err_t, "htab=0x%p", htab);
|
||||
/* Test for correct arguments. */
|
||||
if (htab == NULL) {
|
||||
H5_PRIV_API_LEAVE (h5_error_internal ());
|
||||
@@ -193,7 +199,9 @@ h5priv_hsearch (
|
||||
void** retval,
|
||||
struct hsearch_data* htab
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER4 (h5_err_t,
|
||||
"item=0x%p, action=%d, retval=0x%p, htab=0x%p",
|
||||
item, (int)action, retval, htab);
|
||||
unsigned int hval;
|
||||
unsigned int idx;
|
||||
|
||||
@@ -319,7 +327,7 @@ h5priv_hcreate_string_keyed (
|
||||
h5_hashtable_t* htab,
|
||||
h5_err_t (*free_entry)(const void*)
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER2 (h5_err_t, "htab=0x%p, free_entry=0x%p", htab, free_entry);
|
||||
if (free_entry == NULL) {
|
||||
TRY (h5priv_hcreate (nel, htab,
|
||||
cmp_string_keyed,
|
||||
|
||||
+30
-24
@@ -8,6 +8,7 @@
|
||||
#define __USE_GNU
|
||||
#include <fcntl.h>
|
||||
#undef __USE_GNU
|
||||
#include <unistd.h>
|
||||
#include <lustre/liblustreapi.h>
|
||||
|
||||
#include "h5core/h5_core.h"
|
||||
@@ -32,25 +33,29 @@ _get_lustre_stripe_size(h5_file_t *const f, const char *path )
|
||||
{
|
||||
size_t nbytes = sizeof(struct lov_user_md) +
|
||||
INIT_ALLOC_NUM_OSTS * sizeof(struct lov_user_ost_data);
|
||||
struct lov_user_md *lum;
|
||||
TRY( lum = h5_calloc (1, nbytes) );
|
||||
struct lov_user_md *lum = h5_calloc(1, nbytes);
|
||||
if (!lum) {
|
||||
h5_error(H5_ERR_INTERNAL, MSG_HEADER
|
||||
"cannot allocate lustre struct");
|
||||
return -1;
|
||||
}
|
||||
lum->lmm_magic = LOV_USER_MAGIC;
|
||||
|
||||
int fd = open64(path, O_RDONLY);
|
||||
int fd = open(path, O_RDONLY);
|
||||
if (fd < 0) {
|
||||
extern int errno;
|
||||
if (errno == EINVAL)
|
||||
h5_error(f, H5_ERR_INTERNAL, MSG_HEADER
|
||||
"open64: a flag is invalid!");
|
||||
h5_error(H5_ERR_INTERNAL, MSG_HEADER
|
||||
"open: a flag is invalid!");
|
||||
else if (errno == EACCES)
|
||||
h5_error(f, H5_ERR_INTERNAL, MSG_HEADER
|
||||
"open64: access denied or file does not exist!");
|
||||
h5_error(H5_ERR_INTERNAL, MSG_HEADER
|
||||
"open: access denied or file does not exist!");
|
||||
else if (errno == ENAMETOOLONG)
|
||||
h5_error(f, H5_ERR_INTERNAL, MSG_HEADER
|
||||
"open64: path is too long!");
|
||||
h5_error(H5_ERR_INTERNAL, MSG_HEADER
|
||||
"open: path is too long!");
|
||||
else
|
||||
h5_error(f, H5_ERR_INTERNAL, MSG_HEADER
|
||||
"open64: unspecific error!");
|
||||
h5_error(H5_ERR_INTERNAL, MSG_HEADER
|
||||
"open: unspecific error!");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -58,22 +63,22 @@ _get_lustre_stripe_size(h5_file_t *const f, const char *path )
|
||||
if (ret == -1) {
|
||||
extern int errno;
|
||||
if (errno == EBADF)
|
||||
h5_error(f, H5_ERR_INTERNAL, MSG_HEADER
|
||||
h5_error(H5_ERR_INTERNAL, MSG_HEADER
|
||||
"ioctl: bad file handle!");
|
||||
else if (errno == EINVAL)
|
||||
h5_error(f, H5_ERR_INTERNAL, MSG_HEADER
|
||||
h5_error(H5_ERR_INTERNAL, MSG_HEADER
|
||||
"ioctl: invalid argument!");
|
||||
else if (errno == EIO)
|
||||
h5_error(f, H5_ERR_INTERNAL, MSG_HEADER
|
||||
h5_error(H5_ERR_INTERNAL, MSG_HEADER
|
||||
"ioctl: physical I/O problem!");
|
||||
else if (errno == ENOTTY)
|
||||
h5_error(f, H5_ERR_INTERNAL, MSG_HEADER
|
||||
h5_error(H5_ERR_INTERNAL, MSG_HEADER
|
||||
"ioctl: file handle does not accept control functions!");
|
||||
else if (errno == ENODEV)
|
||||
h5_error(f, H5_ERR_INTERNAL, MSG_HEADER
|
||||
h5_error(H5_ERR_INTERNAL, MSG_HEADER
|
||||
"ioctl: driver doesn't support control functions!");
|
||||
else
|
||||
h5_error(f, H5_ERR_INTERNAL, MSG_HEADER
|
||||
h5_error(H5_ERR_INTERNAL, MSG_HEADER
|
||||
"ioctl: unspecific error!");
|
||||
return -1;
|
||||
}
|
||||
@@ -95,6 +100,7 @@ h5_optimize_for_lustre (
|
||||
const char *filename
|
||||
) {
|
||||
|
||||
H5_CORE_API_ENTER2 (h5_err_t, "f=0x%p, filename=\"%s\"", f, filename);
|
||||
ssize_t stripe_size;
|
||||
if ( f->myproc == 0 )
|
||||
{
|
||||
@@ -119,23 +125,23 @@ h5_optimize_for_lustre (
|
||||
h5_free(path);
|
||||
}
|
||||
|
||||
TRY( h5priv_mpi_bcast(f, &stripe_size, 1, MPI_LONG_LONG, 0, f->comm) );
|
||||
h5_info(f, MSG_HEADER
|
||||
TRY( h5priv_mpi_bcast(&stripe_size, 1, MPI_LONG_LONG, 0, f->comm) );
|
||||
h5_info(MSG_HEADER
|
||||
"Found lustre stripe size of %lld bytes",
|
||||
(long long)stripe_size);
|
||||
|
||||
hsize_t btree_ik = (stripe_size - 4096) / 96;
|
||||
hsize_t btree_bytes = 64 + 96*btree_ik;
|
||||
h5_info(f, MSG_HEADER
|
||||
h5_info(MSG_HEADER
|
||||
"Setting HDF5 btree ik to %lld (= %lld bytes at rank 3)",
|
||||
(long long)btree_ik, (long long)btree_bytes);
|
||||
TRY( hdf5_set_btree_ik_property(f, f->create_prop, btree_ik) );
|
||||
TRY( hdf5_set_btree_ik_property(f->create_prop, btree_ik) );
|
||||
|
||||
/* set alignment to lustre stripe size */
|
||||
TRY( hdf5_set_alignment_property(f,
|
||||
TRY( hdf5_set_alignment_property(
|
||||
f->access_prop, 0, stripe_size) );
|
||||
|
||||
h5_info(f, MSG_HEADER "Disabling metadata cache flushes.");
|
||||
h5_info(MSG_HEADER "Disabling metadata cache flushes.");
|
||||
/* disable metadata cache flushes */
|
||||
/* defer metadata writes */
|
||||
H5AC_cache_config_t config;
|
||||
@@ -149,7 +155,7 @@ h5_optimize_for_lustre (
|
||||
config.flash_incr_mode = H5C_flash_incr__off;
|
||||
TRY( H5Pset_mdc_config( f->access_prop, &config ) );
|
||||
|
||||
return H5_SUCCESS;
|
||||
H5_CORE_API_RETURN (H5_SUCCESS);
|
||||
}
|
||||
|
||||
#endif // H5_USE_LUSTRE
|
||||
|
||||
+34
-12
@@ -18,7 +18,9 @@ h5priv_alloc_idlist (
|
||||
h5_loc_idlist_t** list,
|
||||
const h5_size_t size
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER2 (h5_err_t,
|
||||
"list=0x%p, size=%llu",
|
||||
list, (long long unsigned)size);
|
||||
TRY (*list = h5_calloc (
|
||||
1, sizeof (**list)+size*sizeof ((*list)->items[0])));
|
||||
(*list)->size = size;
|
||||
@@ -29,7 +31,7 @@ h5_err_t
|
||||
h5priv_free_idlist (
|
||||
h5_loc_idlist_t** list
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER1 (h5_err_t, "list=0x%p", list);
|
||||
if (*list == NULL) return H5_SUCCESS;
|
||||
TRY (h5_free (*list));
|
||||
*list = NULL;
|
||||
@@ -41,7 +43,9 @@ grow_idlist (
|
||||
h5_loc_idlist_t** list,
|
||||
size_t new_size
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER2 (h5_err_t,
|
||||
"list=0x%p, new_size=%llu",
|
||||
list, (long long unsigned)new_size);
|
||||
size_t num_bytes = sizeof (**list) + (new_size-1)*sizeof((*list)->items[0]);
|
||||
TRY (*list = h5_alloc (*list, num_bytes));
|
||||
(*list)->size = new_size;
|
||||
@@ -57,7 +61,11 @@ h5priv_insert_idlist (
|
||||
h5_loc_id_t id,
|
||||
h5_loc_idx_t idx
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_loc_idx_t);
|
||||
H5_PRIV_API_ENTER3 (h5_err_t,
|
||||
"list=0x%p, id=%llu, idx=%llu",
|
||||
list,
|
||||
(long long unsigned)id,
|
||||
(long long unsigned)idx);
|
||||
if (*list == NULL) {
|
||||
TRY (h5priv_alloc_idlist (list, 2));
|
||||
} else if ((*list)->num_items == (*list)->size) {
|
||||
@@ -91,7 +99,9 @@ h5priv_find_idlist (
|
||||
h5_loc_idlist_t* list,
|
||||
const h5_loc_id_t item
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_loc_id_t);
|
||||
H5_PRIV_API_ENTER2 (h5_err_t,
|
||||
"list=0x%p, item=%llu",
|
||||
list, (long long unsigned)item);
|
||||
if (!list) {
|
||||
H5_PRIV_API_LEAVE (-1);
|
||||
}
|
||||
@@ -127,7 +137,9 @@ h5priv_search_idlist (
|
||||
h5_loc_idlist_t** list,
|
||||
h5_loc_id_t item
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_loc_idx_t);
|
||||
H5_PRIV_API_ENTER2 (h5_err_t,
|
||||
"list=0x%p, item=%llu",
|
||||
list, (long long unsigned)item);
|
||||
h5_loc_idx_t idx = h5priv_find_idlist (*list, item);
|
||||
if (idx < 0) {
|
||||
idx = -(idx+1);
|
||||
@@ -142,7 +154,9 @@ h5priv_alloc_idxmap (
|
||||
h5_idxmap_t* map,
|
||||
const h5_size_t size
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER2 (h5_err_t,
|
||||
"map=0x%p, size=%llu",
|
||||
map, (long long unsigned)size);
|
||||
int new = (map->items == NULL);
|
||||
size_t size_in_bytes = size * sizeof (map->items[0]);
|
||||
TRY (map->items = h5_alloc (map->items, size_in_bytes));
|
||||
@@ -157,11 +171,15 @@ h5priv_insert_idxmap (
|
||||
h5_glb_idx_t glb_idx,
|
||||
h5_loc_idx_t loc_idx
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER3 (h5_err_t,
|
||||
"map=0x%p, glb_idx=%llu, loc_idx=%llu",
|
||||
map,
|
||||
(long long unsigned)glb_idx,
|
||||
(long long unsigned)loc_idx);
|
||||
if (map->num_items == map->size)
|
||||
H5_PRIV_API_LEAVE (
|
||||
HANDLE_H5_OVERFLOW_ERR (
|
||||
"g2lmap", (long long)map->size));
|
||||
(long long)map->size));
|
||||
|
||||
h5_loc_idx_t i = h5priv_search_idxmap (map, glb_idx);
|
||||
if (i >= 0) /* global id already in use ? */
|
||||
@@ -195,6 +213,9 @@ h5priv_search_idxmap (
|
||||
h5_idxmap_t* map,
|
||||
h5_glb_idx_t value
|
||||
) {
|
||||
H5_PRIV_API_ENTER2 (h5_err_t,
|
||||
"map=0x%p, value=%lld",
|
||||
map, (long long)value);
|
||||
register h5_loc_idx_t low = 0;
|
||||
register h5_loc_idx_t high = map->num_items - 1;
|
||||
while (low <= high) {
|
||||
@@ -205,9 +226,9 @@ h5priv_search_idxmap (
|
||||
else if ( diff < 0 )
|
||||
low = mid + 1;
|
||||
else
|
||||
return mid; // found
|
||||
H5_PRIV_API_LEAVE (mid); // found
|
||||
}
|
||||
return (-(low+1)); // not found
|
||||
H5_PRIV_API_RETURN (-(low+1)); // not found
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -228,7 +249,8 @@ h5_err_t
|
||||
h5priv_sort_idxmap (
|
||||
h5_idxmap_t* map
|
||||
) {
|
||||
H5_PRIV_API_ENTER1 (h5_err_t, "map=0x%p", map);
|
||||
qsort ( map->items, map->num_items, sizeof (map->items[0]),
|
||||
cmp_idxmap_items);
|
||||
return (H5_SUCCESS);
|
||||
H5_PRIV_API_RETURN (H5_SUCCESS);
|
||||
}
|
||||
|
||||
+31
-28
@@ -24,11 +24,7 @@ h5_check_filehandle (
|
||||
h5_file_t* const f /*!< filehandle to check validity of */
|
||||
) {
|
||||
|
||||
if (f == NULL || f->file < 0 || f->u == NULL || f->b == NULL
|
||||
#ifndef PARALLEL_IO
|
||||
|| f->t == NULL
|
||||
#endif
|
||||
) {
|
||||
if (f == NULL || f->file < 0 || f->u == NULL || f->b == NULL || f->t == NULL) {
|
||||
return h5_error (
|
||||
H5_ERR_BADFD,
|
||||
"Called with bad filehandle.");
|
||||
@@ -66,7 +62,7 @@ static h5_err_t
|
||||
h5upriv_open_file (
|
||||
h5_file_t* const f /*!< IN: file handle */
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
TRY (f->u = (h5u_fdata_t*)h5_alloc (NULL, sizeof (*f->u)));
|
||||
h5u_fdata_t *u = f->u;
|
||||
|
||||
@@ -97,7 +93,7 @@ static h5_err_t
|
||||
h5bpriv_open_file (
|
||||
h5_file_t * const f /*!< IN: file handle */
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
h5b_fdata_t* b;
|
||||
|
||||
if (f->b)
|
||||
@@ -142,7 +138,9 @@ h5_open_file (
|
||||
h5_int32_t flags, /*!< The access mode for the file. */
|
||||
MPI_Comm comm /*!< MPI communicator */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_file_p);
|
||||
H5_CORE_API_ENTER2 (h5_file_p,
|
||||
"filename=\"%s\", flags=%d, ...",
|
||||
filename, flags);
|
||||
h5_info ("Opening file %s.", filename);
|
||||
h5_file_p f = NULL;
|
||||
TRY2 (f = h5_calloc (1, sizeof (h5_file_t)));
|
||||
@@ -152,12 +150,11 @@ h5_open_file (
|
||||
|
||||
f->xfer_prop = f->create_prop = f->access_prop = H5P_DEFAULT;
|
||||
|
||||
f->comm = 0; /* init values for serial case */
|
||||
f->comm = comm; /* init values for serial case */
|
||||
f->nprocs = 1;
|
||||
f->myproc = 0;
|
||||
|
||||
#ifdef PARALLEL_IO
|
||||
f->comm = comm;
|
||||
TRY2 (h5priv_mpi_comm_size (comm, &f->nprocs));
|
||||
TRY2 (h5priv_mpi_comm_rank (comm, &f->myproc));
|
||||
|
||||
@@ -234,9 +231,7 @@ h5_open_file (
|
||||
|
||||
TRY2 (h5upriv_open_file (f));
|
||||
TRY2 (h5bpriv_open_file (f));
|
||||
#ifndef PARALLEL_IO
|
||||
TRY2 (h5tpriv_open_file (f));
|
||||
#endif
|
||||
H5_CORE_API_RETURN (f);
|
||||
}
|
||||
|
||||
@@ -254,7 +249,7 @@ static h5_err_t
|
||||
h5upriv_close_file (
|
||||
h5_file_t* const f /*!< file handle */
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
struct h5u_fdata* u = f->u;
|
||||
|
||||
h5_errno = H5_SUCCESS;
|
||||
@@ -282,7 +277,7 @@ static h5_err_t
|
||||
h5bpriv_close_file (
|
||||
h5_file_t* const f /*!< IN: file handle */
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
struct h5b_fdata* b = f->b;
|
||||
TRY (hdf5_close_group (b->block_gid));
|
||||
TRY (hdf5_close_group (b->field_gid));
|
||||
@@ -312,7 +307,7 @@ h5_err_t
|
||||
h5_close_file (
|
||||
h5_file_t* const f /*!< file handle */
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
h5_errno = H5_SUCCESS;
|
||||
|
||||
CHECK_FILEHANDLE (f);
|
||||
@@ -320,16 +315,14 @@ h5_close_file (
|
||||
TRY (h5priv_close_step (f));
|
||||
TRY (h5upriv_close_file (f));
|
||||
TRY (h5bpriv_close_file (f));
|
||||
#ifndef PARALLEL_IO
|
||||
TRY (h5tpriv_close_file (f));
|
||||
#endif
|
||||
TRY (hdf5_close_property (f->xfer_prop));
|
||||
TRY (hdf5_close_property (f->access_prop));
|
||||
TRY (hdf5_close_property (f->create_prop));
|
||||
TRY (hdf5_close_group (f->root_gid));
|
||||
TRY (hdf5_close_file (f->file));
|
||||
h5_free (f);
|
||||
H5_PRIV_API_RETURN (H5_SUCCESS);
|
||||
H5_CORE_API_RETURN (H5_SUCCESS);
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -348,13 +341,15 @@ h5_set_stepname_fmt (
|
||||
const char* name,
|
||||
int width
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER3 (h5_err_t,
|
||||
"f=0x%p, name=\"%s\", width=%d", f, name, width);
|
||||
if (width < 0) width = 0;
|
||||
else if (width > H5_STEPNAME_LEN - 1) width = H5_STEPNAME_LEN - 1;
|
||||
strncpy (
|
||||
f->prefix_step_name,
|
||||
name,
|
||||
H5_STEPNAME_LEN - 1);
|
||||
//H5_STEPNAME_LEN - 1);
|
||||
63);
|
||||
f->width_step_idx = width;
|
||||
|
||||
H5_CORE_API_RETURN (H5_SUCCESS);
|
||||
@@ -407,7 +402,7 @@ int
|
||||
h5_get_num_procs (
|
||||
h5_file_t* const f /*!< file handle */
|
||||
) {
|
||||
H5_CORE_API_ENTER (int);
|
||||
H5_CORE_API_ENTER1 (int, "f=0x%p", f);
|
||||
H5_CORE_API_RETURN (f->nprocs);
|
||||
}
|
||||
|
||||
@@ -422,7 +417,7 @@ hid_t
|
||||
h5_get_hdf5_file(
|
||||
h5_file_t* const f /*!< file handle */
|
||||
) {
|
||||
H5_CORE_API_ENTER (hid_t);
|
||||
H5_CORE_API_ENTER1 (hid_t, "f=0x%p", f);
|
||||
H5_CORE_API_RETURN (f->file);
|
||||
}
|
||||
|
||||
@@ -433,12 +428,12 @@ h5_get_hdf5_file(
|
||||
|
||||
\return Number of steps or error code
|
||||
*/
|
||||
h5_size_t
|
||||
h5_ssize_t
|
||||
h5_get_num_steps(
|
||||
h5_file_t* const f /*!< file handle */
|
||||
) {
|
||||
return hdf5_get_num_groups_matching_prefix (
|
||||
f->step_gid,
|
||||
f->root_gid,
|
||||
f->prefix_step_name);
|
||||
}
|
||||
|
||||
@@ -480,10 +475,11 @@ h5_strdupfor2c (
|
||||
|
||||
char *dup = (char*)malloc ( len + 1 );
|
||||
strncpy ( dup, s, len );
|
||||
char *p = dup + len;
|
||||
do {
|
||||
*p-- = '\0';
|
||||
} while ( *p == ' ' );
|
||||
dup[len] = '\0';
|
||||
for (int i=len-1; i>=0; i--) {
|
||||
if (dup[i] == ' ') dup[i] = '\0';
|
||||
else break;
|
||||
}
|
||||
return dup;
|
||||
}
|
||||
|
||||
@@ -499,3 +495,10 @@ h5_strc2for (
|
||||
return str;
|
||||
}
|
||||
|
||||
h5_file_t *
|
||||
h5_filehandlefor2c (
|
||||
const h5_int64_t *ptr
|
||||
) {
|
||||
return (h5_file_t*)(size_t)*ptr;
|
||||
}
|
||||
|
||||
|
||||
+35
-15
@@ -21,7 +21,12 @@ h5priv_write_dataset_by_name (
|
||||
hid_t (*set_diskspace)(h5_file_t*,hid_t),
|
||||
const void* const data
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER7 (h5_err_t,
|
||||
"f=0x%p, loc_id=%d (%s), dsinfo=0x%p, set_memspace=0x%p, "
|
||||
"set_diskspace=0x%p, data=0x%p",
|
||||
f, loc_id, hdf5_get_objname(loc_id),
|
||||
dsinfo,
|
||||
set_memspace, set_diskspace, data);
|
||||
h5_info ("Writing dataset %s/%s.",
|
||||
hdf5_get_objname (loc_id), dsinfo->name);
|
||||
|
||||
@@ -92,7 +97,13 @@ h5priv_read_dataset (
|
||||
hid_t (*set_dspace)(h5_file_t*,hid_t),
|
||||
void* const data
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER7 (h5_err_t,
|
||||
"f=0x%p, dset_id=%d (%s), dsinfo=0x%p, set_mspace=0x%p, "
|
||||
"set_dspace=0x%p, data=0x%p",
|
||||
f, dset_id, hdf5_get_objname(dset_id),
|
||||
dsinfo,
|
||||
set_mspace, set_dspace, data);
|
||||
|
||||
hid_t mspace_id;
|
||||
hid_t dspace_id;
|
||||
|
||||
@@ -126,7 +137,12 @@ h5priv_read_dataset_by_name (
|
||||
hid_t (*set_dspace)(h5_file_t*,hid_t),
|
||||
void* const data
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER7 (h5_err_t,
|
||||
"f=0x%p, loc_id=%d (%s), dsinfo=0x%p, "
|
||||
"set_mpace=0x%p, set_dspace=0x%p, data=0x%p",
|
||||
f, loc_id, hdf5_get_objname(loc_id),
|
||||
dsinfo,
|
||||
set_mspace, set_dspace, data);
|
||||
hid_t dset_id;
|
||||
TRY (dset_id = hdf5_open_dataset (loc_id, dsinfo->name));
|
||||
TRY (h5priv_read_dataset (f, dset_id, dsinfo, set_mspace, set_dspace, data));
|
||||
@@ -139,7 +155,7 @@ h5_err_t
|
||||
h5priv_close_step (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
if (f->step_gid <= 0)
|
||||
H5_PRIV_API_LEAVE (H5_SUCCESS);
|
||||
TRY (h5tpriv_close_step (f));
|
||||
@@ -155,7 +171,7 @@ h5_set_step (
|
||||
h5_file_t* const f, /*!< [in] Handle to open file */
|
||||
const h5_id_t step_idx /*!< [in] Step to set. */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER2 (h5_err_t, "f=0x%p, step_idx=%lld", f, (long long)step_idx);
|
||||
TRY (h5priv_close_step (f));
|
||||
f->step_idx = step_idx;
|
||||
|
||||
@@ -181,7 +197,7 @@ h5_int64_t
|
||||
h5_normalize_h5_type (
|
||||
hid_t type
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_int64_t);
|
||||
H5_CORE_API_ENTER1 (h5_int64_t, "type=%d", type);
|
||||
H5T_class_t tclass;
|
||||
int size;
|
||||
TRY (tclass = H5Tget_class (type));
|
||||
@@ -217,7 +233,9 @@ h5_get_dataset_type(
|
||||
const hid_t group_id,
|
||||
const char* dset_name
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_int64_t);
|
||||
H5_CORE_API_ENTER2 (h5_int64_t,
|
||||
"group_id=%d, dset_name=\"%s\"",
|
||||
group_id, dset_name);
|
||||
hid_t dset_id;
|
||||
hid_t hdf5_type;
|
||||
h5_int64_t type;
|
||||
@@ -233,13 +251,13 @@ h5_get_dataset_type(
|
||||
h5_err_t
|
||||
h5_has_step (
|
||||
h5_file_t* const f, /*!< [in] Handle to open file */
|
||||
const h5_id_t step /*!< [in] Step number to query */
|
||||
const h5_id_t step_idx /*!< [in] Step number to query */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER2 (h5_err_t, "f=0x%p, step_idx=%lld", f, (long long)step_idx);
|
||||
char name[2*H5_STEPNAME_LEN];
|
||||
sprintf (name,
|
||||
"%s#%0*lld",
|
||||
f->prefix_step_name, f->width_step_idx, (long long)step);
|
||||
f->prefix_step_name, f->width_step_idx, (long long)step_idx);
|
||||
H5_CORE_API_RETURN (hdf5_link_exists(f->file, name));
|
||||
}
|
||||
|
||||
@@ -248,8 +266,10 @@ h5_normalize_dataset_name (
|
||||
const char *name,
|
||||
char *name2
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
if ( strlen(name) > H5_DATANAME_LEN ) {
|
||||
H5_CORE_API_ENTER2 (h5_err_t,
|
||||
"name=\"%s\", name2=\"%s\"",
|
||||
name, name2);
|
||||
if ( strlen(name) > H5_DATANAME_LEN-1 ) {
|
||||
strncpy ( name2, name, H5_DATANAME_LEN-1 );
|
||||
name2[H5_DATANAME_LEN-1] = '\0';
|
||||
h5_warn ("Truncated name '%s' to '%s'.", name, name2);
|
||||
@@ -274,7 +294,7 @@ h5_set_throttle (
|
||||
h5_file_t* const f,
|
||||
const int factor
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER2 (h5_err_t, "f=0x%p, factor=%d", f, factor);
|
||||
if ( (f->mode & H5_VFD_INDEPENDENT) || (f->mode & H5_VFD_MPIPOSIX) ) {
|
||||
f->throttle = factor;
|
||||
h5_info ("Throttling enabled with factor = %d", f->throttle );
|
||||
@@ -290,7 +310,7 @@ h5_err_t
|
||||
h5_start_throttle (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
if (f->throttle > 0) {
|
||||
int token = 1;
|
||||
h5_info ("Throttling with factor = %d", f->throttle);
|
||||
@@ -314,7 +334,7 @@ h5_err_t
|
||||
h5_end_throttle (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
if (f->throttle > 0) {
|
||||
int token;
|
||||
if (f->myproc + f->throttle < f->nprocs) {
|
||||
|
||||
@@ -10,7 +10,16 @@ h5_write_field_attrib (
|
||||
const void *attrib_value, /*!< IN: attribute value */
|
||||
const h5_int64_t attrib_nelem /*!< IN: number of elements */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER6 (h5_err_t,
|
||||
"f=%p, field_name=\"%s\", "
|
||||
"attrib_name=\"%s\", attrib_type=%d, "
|
||||
"attrib_value=%p, attrib_nelem=%lld",
|
||||
f,
|
||||
field_name,
|
||||
attrib_name,
|
||||
attrib_type,
|
||||
attrib_value,
|
||||
(long long)attrib_nelem);
|
||||
TRY( h5bpriv_create_field_group(f, field_name) );
|
||||
|
||||
TRY( h5_write_attrib (
|
||||
@@ -32,7 +41,16 @@ h5_read_field_attrib (
|
||||
const h5_int64_t attrib_type, /*!< IN: attribute type */
|
||||
void *buffer /*!< OUT: attribute value */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER5 (h5_err_t,
|
||||
"f=%p, field_name=\"%s\", "
|
||||
"attrib_name=\"%s\", attrib_type=%lld, "
|
||||
"attrib_value=%p",
|
||||
f,
|
||||
field_name,
|
||||
attrib_name,
|
||||
(long long)attrib_type,
|
||||
buffer);
|
||||
|
||||
TRY( h5bpriv_open_field_group(f, field_name) );
|
||||
|
||||
TRY( h5_read_attrib (
|
||||
@@ -50,7 +68,10 @@ h5b_get_num_field_attribs (
|
||||
h5_file_t *const f, /*<! IN: file handle */
|
||||
const char *field_name /*<! IN: field name */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_ssize_t);
|
||||
H5_CORE_API_ENTER2 (h5_err_t,
|
||||
"f=%p field_name=\"%s\"",
|
||||
f,
|
||||
field_name);
|
||||
|
||||
TRY (h5bpriv_open_field_group(f, field_name));
|
||||
|
||||
@@ -67,7 +88,20 @@ h5b_get_field_attrib_info (
|
||||
h5_int64_t *attrib_type, /*!< OUT: attribute type */
|
||||
h5_size_t *attrib_nelem /*!< OUT: number of elements */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER7 (h5_err_t,
|
||||
"f=%p, "
|
||||
"field_name=\"%s\", "
|
||||
"attrib_idx=%llu, "
|
||||
"attrib_name=0x%p, len_attrib_name=%llu, "
|
||||
"attrib_type=0x%p, "
|
||||
"attrib_nelem=0x%p",
|
||||
f,
|
||||
field_name,
|
||||
(long long unsigned)attrib_idx,
|
||||
attrib_name, (long long unsigned)len_attrib_name,
|
||||
attrib_type,
|
||||
attrib_nelem);
|
||||
|
||||
TRY (h5bpriv_open_field_group(f, field_name));
|
||||
|
||||
H5_CORE_API_RETURN (
|
||||
|
||||
@@ -7,9 +7,4 @@
|
||||
H5_ERR_LAYOUT, \
|
||||
"No view has been defined!")
|
||||
|
||||
#define HANDLE_H5_LAYOUT_ERR( f ) \
|
||||
h5_error( \
|
||||
H5_ERR_LAYOUT, \
|
||||
"Bad view!");
|
||||
|
||||
#endif
|
||||
|
||||
+83
-24
@@ -400,7 +400,7 @@ h5_err_t
|
||||
h5bpriv_release_hyperslab (
|
||||
h5_file_t *const f /*!< IN: file handle */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
if (f->b->shape > 0) {
|
||||
TRY (hdf5_close_dataspace (f->b->shape));
|
||||
f->b->shape = -1;
|
||||
@@ -413,31 +413,31 @@ h5bpriv_release_hyperslab (
|
||||
TRY (hdf5_close_dataspace(f->b->memshape));
|
||||
f->b->memshape = -1;
|
||||
}
|
||||
H5_CORE_API_RETURN (H5_SUCCESS);
|
||||
H5_PRIV_API_RETURN (H5_SUCCESS);
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
h5bpriv_open_block_group (
|
||||
h5_file_t *const f /*!< IN: file handle */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
h5b_fdata_t *b = f->b;
|
||||
|
||||
TRY (hdf5_close_group (b->block_gid));
|
||||
b->block_gid = hdf5_open_group (f->step_gid, H5_BLOCKNAME);
|
||||
if (f->b->block_gid < 0)
|
||||
return h5_error(
|
||||
H5_PRIV_API_LEAVE (h5_error(
|
||||
H5_ERR_INVAL,
|
||||
"Time step does not contain H5Block data!");
|
||||
"Time step does not contain H5Block data!"));
|
||||
|
||||
H5_CORE_API_RETURN (H5_SUCCESS);
|
||||
H5_PRIV_API_RETURN (H5_SUCCESS);
|
||||
}
|
||||
|
||||
static h5_err_t
|
||||
_create_block_group (
|
||||
h5_file_t *const f /*!< IN: file handle */
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
h5_err_t exists;
|
||||
TRY (exists = hdf5_link_exists (f->step_gid, H5_BLOCKNAME));
|
||||
|
||||
@@ -456,12 +456,12 @@ h5bpriv_have_field_group (
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *name
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER2 (h5_err_t, "f=0x%p, name=\"%s\"", f, name);
|
||||
char name2[H5_DATANAME_LEN];
|
||||
h5_normalize_dataset_name (name, name2);
|
||||
|
||||
TRY( h5bpriv_open_block_group(f) );
|
||||
H5_CORE_API_RETURN (hdf5_link_exists(f->b->block_gid, name2));
|
||||
H5_PRIV_API_RETURN (hdf5_link_exists(f->b->block_gid, name2));
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
@@ -469,7 +469,7 @@ h5bpriv_open_field_group (
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *name
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER2 (h5_err_t, "f=0x%p, name=\"%s\"", f, name);
|
||||
char name2[H5_DATANAME_LEN];
|
||||
h5_normalize_dataset_name (name, name2);
|
||||
|
||||
@@ -481,7 +481,7 @@ h5bpriv_open_field_group (
|
||||
H5_ERR_INVAL,
|
||||
"Field '%s' does not exist!", name2);
|
||||
|
||||
H5_CORE_API_RETURN (H5_SUCCESS);
|
||||
H5_PRIV_API_RETURN (H5_SUCCESS);
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
@@ -489,7 +489,7 @@ h5bpriv_create_field_group (
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
const char *name /*!< IN: name of field group to create */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER2 (h5_err_t, "f=0x%p, name=\"%s\"", f, name);
|
||||
h5b_fdata_t *b = f->b;
|
||||
|
||||
TRY( _create_block_group(f) );
|
||||
@@ -527,7 +527,15 @@ h5b_3d_set_view (
|
||||
const h5_size_t k_start, /*!< IN: start index of \c k */
|
||||
const h5_size_t k_end /*!< IN: end index of \c k */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER7 (h5_err_t,
|
||||
"f=0X%p, "
|
||||
"i_start=%llu, i_end=%llu, "
|
||||
"j_start=%llu, j_end=%llu, "
|
||||
"k_start=%llu, k_end=%llu",
|
||||
f,
|
||||
(long long unsigned)i_start, (long long unsigned)i_end,
|
||||
(long long unsigned)j_start, (long long unsigned)j_end,
|
||||
(long long unsigned)k_start, (long long unsigned)k_end);
|
||||
h5b_partition_t *p = f->b->user_layout;
|
||||
p->i_start = i_start;
|
||||
p->i_end = i_end;
|
||||
@@ -594,7 +602,15 @@ h5b_3d_get_view (
|
||||
h5_size_t *const k_start, /*!< OUT: start index of \c k */
|
||||
h5_size_t *const k_end /*!< OUT: end index of \c k */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER7 (h5_err_t,
|
||||
"f=0X%p, "
|
||||
"i_start=0x%p, i_end=0x%p, "
|
||||
"j_start=0x%p, j_end=0x%p, "
|
||||
"k_start=0x%p, k_end=0x%p",
|
||||
f,
|
||||
i_start, i_end,
|
||||
j_start, j_end,
|
||||
k_start, k_end);
|
||||
h5b_partition_t *p = f->b->user_layout;
|
||||
|
||||
*i_start = p->i_start;
|
||||
@@ -617,7 +633,15 @@ h5b_3d_get_reduced_view (
|
||||
h5_size_t *const k_start, /*!< OUT: start index of \c k */
|
||||
h5_size_t *const k_end /*!< OUT: end index of \c k */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER7 (h5_err_t,
|
||||
"f=0X%p, "
|
||||
"i_start=0x%p, i_end=0x%p, "
|
||||
"j_start=0x%p, j_end=0x%p, "
|
||||
"k_start=0x%p, k_end=0x%p",
|
||||
f,
|
||||
i_start, i_end,
|
||||
j_start, j_end,
|
||||
k_start, k_end);
|
||||
h5b_partition_t *p = f->b->write_layout;
|
||||
|
||||
*i_start = p->i_start;
|
||||
@@ -637,7 +661,12 @@ h5b_3d_set_chunk (
|
||||
const h5_size_t j, /*!< IN: size of \c j */
|
||||
const h5_size_t k /*!< IN: size of \c k */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER4 (h5_err_t,
|
||||
"f=0x%p, i=%llu, j=%llu, k=%llu",
|
||||
f,
|
||||
(long long unsigned)i,
|
||||
(long long unsigned)j,
|
||||
(long long unsigned)k);
|
||||
if ( i == 0 || j == 0 || k == 0 )
|
||||
{
|
||||
h5_info ("Disabling chunking" );
|
||||
@@ -661,7 +690,9 @@ h5b_3d_get_chunk (
|
||||
h5_size_t *const j, /*!< OUT: size of \c j */
|
||||
h5_size_t *const k /*!< OUT: size of \c k */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER4 (h5_err_t,
|
||||
"f=0x%p, i=0x%p, j=0x%p, k=0x%p",
|
||||
f, i, j, k);
|
||||
CHECK_TIMEGROUP ( f );
|
||||
|
||||
h5b_fdata_t *b = f->b;
|
||||
@@ -698,7 +729,12 @@ h5b_3d_set_grid (
|
||||
const h5_size_t j, /*!< IN: dimension in \c j */
|
||||
const h5_size_t k /*!< IN: dimension in \c k */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER4 (h5_err_t,
|
||||
"f=0x%p, i=%llu, j=%llu, k=%llu",
|
||||
f,
|
||||
(long long unsigned)i,
|
||||
(long long unsigned)j,
|
||||
(long long unsigned)k);
|
||||
if (i*j*k != f->nprocs) {
|
||||
H5_CORE_API_LEAVE (
|
||||
h5_error(H5_ERR_INVAL,
|
||||
@@ -732,7 +768,9 @@ h5b_3d_get_grid_coords (
|
||||
h5_int64_t *j, /*!< OUT: index in \c j */
|
||||
h5_int64_t *k /*!< OUT: index in \c k */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER5 (h5_err_t,
|
||||
"f=0x%p, proc=%d, i=0x%p, j=0x%p, k=0x%p",
|
||||
f, proc, i, j, k);
|
||||
if ( ! f->b->have_grid )
|
||||
H5_CORE_API_LEAVE (
|
||||
h5_error(H5_ERR_INVAL,
|
||||
@@ -753,7 +791,12 @@ h5b_3d_set_dims (
|
||||
const h5_size_t j, /*!< IN: dimension in \c j */
|
||||
const h5_size_t k /*!< IN: dimension in \c k */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER4 (h5_err_t,
|
||||
"f=0x%p, i=%llu, j=%llu, k=%llu",
|
||||
f,
|
||||
(long long unsigned)i,
|
||||
(long long unsigned)j,
|
||||
(long long unsigned)k);
|
||||
if ( ! f->b->have_grid )
|
||||
H5_CORE_API_LEAVE (
|
||||
h5_error(H5_ERR_INVAL,
|
||||
@@ -813,7 +856,13 @@ h5b_3d_set_halo (
|
||||
const h5_size_t j, /*!< IN: radius in \c j */
|
||||
const h5_size_t k /*!< IN: radius in \c k */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER4 (h5_err_t,
|
||||
"f=0x%p, i=%llu, j=%llu, k=%llu",
|
||||
f,
|
||||
(long long unsigned)i,
|
||||
(long long unsigned)j,
|
||||
(long long unsigned)k);
|
||||
|
||||
if ( ! f->b->have_grid ) {
|
||||
H5_CORE_API_LEAVE (
|
||||
h5_error(H5_ERR_INVAL,
|
||||
@@ -839,7 +888,7 @@ h5_ssize_t
|
||||
h5b_get_num_fields (
|
||||
h5_file_t *const f /*!< IN: File handle */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_ssize_t);
|
||||
H5_CORE_API_ENTER1 (h5_ssize_t, "f=0x%p", f);
|
||||
CHECK_TIMEGROUP( f );
|
||||
|
||||
TRY (h5bpriv_open_block_group(f));
|
||||
@@ -855,7 +904,10 @@ h5b_get_field_info_by_name (
|
||||
h5_size_t *elem_rank, /*!< OUT: element rank */
|
||||
h5_int64_t *type /*!< OUT: datatype */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER6 (h5_err_t,
|
||||
"f=0x%p, name=\"%s\", "
|
||||
"field_rank=0x%p, field_dims=0x%p, elem_rank=0x%p, type=0x%p",
|
||||
f, name, field_rank, field_dims, elem_rank, type);
|
||||
CHECK_TIMEGROUP( f );
|
||||
|
||||
hsize_t dims[16]; /* give it plenty of space even though we don't expect rank > 3 */
|
||||
@@ -904,7 +956,14 @@ h5b_get_field_info (
|
||||
h5_size_t *elem_rank, /*!< OUT: element rank */
|
||||
h5_int64_t *type /*!< OUT: datatype */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER8 (h5_err_t,
|
||||
"f=0x%p, idx=%llu, "
|
||||
"name=0x%p, len_name=%llu, "
|
||||
"field_rank=0x%p, field_dims=0x%p, elem_rank=0x%p, type=0x%p",
|
||||
f,
|
||||
(long long unsigned)idx,
|
||||
name, (long long unsigned)len_name,
|
||||
field_rank, field_dims, elem_rank, type);
|
||||
CHECK_TIMEGROUP( f );
|
||||
|
||||
TRY (h5bpriv_open_block_group(f));
|
||||
|
||||
@@ -159,7 +159,9 @@ h5b_write_scalar_data (
|
||||
const void *data, /*!< IN: data to write */
|
||||
const hid_t type /*!< IN: data type */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER4 (h5_err_t,
|
||||
"f=0x%p, field_name=\"%s\", data=0x%p, type=%d",
|
||||
f, field_name, data, type);
|
||||
CHECK_TIMEGROUP( f );
|
||||
CHECK_WRITABLE_MODE( f );
|
||||
CHECK_LAYOUT( f );
|
||||
@@ -178,7 +180,13 @@ h5b_write_vector3d_data (
|
||||
const void *zdata, /*!< IN: z data to write */
|
||||
const hid_t type /*!< IN: data type */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER6 (h5_err_t,
|
||||
"f=0x%p, field_name=\"%s\", "
|
||||
"xdata=0x%p, "
|
||||
"ydata=0x%p, "
|
||||
"zdata=0x%p, "
|
||||
"type=%d",
|
||||
f, field_name, xdata, ydata, zdata, type);
|
||||
CHECK_TIMEGROUP( f );
|
||||
CHECK_WRITABLE_MODE( f );
|
||||
CHECK_LAYOUT( f );
|
||||
@@ -306,7 +314,9 @@ h5b_read_scalar_data (
|
||||
void *data, /*!< OUT: read bufer */
|
||||
const hid_t type /*!< IN: data type */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER4 (h5_err_t,
|
||||
"f=0x%p, field_name=\"%s\", data=0x%p, type=%d",
|
||||
f, field_name, data, type);
|
||||
CHECK_TIMEGROUP( f );
|
||||
CHECK_LAYOUT( f );
|
||||
TRY( h5bpriv_open_field_group(f, field_name) );
|
||||
@@ -323,7 +333,13 @@ h5b_read_vector3d_data (
|
||||
void *zdata, /*!< IN: z data to write */
|
||||
const hid_t type /*!< IN: data type */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER6 (h5_err_t,
|
||||
"f=0x%p, field_name=\"%s\", "
|
||||
"xdata=0x%p, "
|
||||
"ydata=0x%p, "
|
||||
"zdata=0x%p, "
|
||||
"type=%d",
|
||||
f, field_name, xdata, ydata, zdata, type);
|
||||
CHECK_TIMEGROUP( f );
|
||||
CHECK_LAYOUT( f );
|
||||
TRY( h5bpriv_open_field_group(f, field_name) );
|
||||
|
||||
@@ -23,7 +23,9 @@ h5t_get_adjacencies (
|
||||
const h5_int32_t dim,
|
||||
h5_loc_idlist_t** list
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER4 (h5_err_t,
|
||||
"f=0x%p, entity_id=%llu, dim=%d, list=0x%p",
|
||||
f, (long long unsigned)entity_id, dim, list);
|
||||
H5_CORE_API_RETURN (h5tpriv_get_adjacencies (f, entity_id, dim, list));
|
||||
}
|
||||
|
||||
@@ -32,8 +34,10 @@ h5t_release_list_of_adjacencies (
|
||||
h5_file_t* const f,
|
||||
h5_loc_idlist_t** list
|
||||
) {
|
||||
H5_CORE_API_ENTER2 (h5_err_t,
|
||||
"f=0x%p, list=0x%p",
|
||||
f, list);
|
||||
UNUSED_ARGUMENT (f);
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_RETURN (h5priv_free_idlist (list));
|
||||
}
|
||||
|
||||
@@ -44,6 +48,11 @@ h5t_find_te2 (
|
||||
h5_loc_idx_t elem_idx,
|
||||
h5_loc_idlist_t** retval
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER4 (h5_err_t,
|
||||
"f=0x%p, face_idx=%lld, elem_idx=%lld, retval=0x%p",
|
||||
f,
|
||||
(long long)face_idx,
|
||||
(long long)elem_idx,
|
||||
retval);
|
||||
H5_CORE_API_RETURN (h5tpriv_find_te2 (f,face_idx,elem_idx,retval));
|
||||
}
|
||||
|
||||
@@ -19,7 +19,9 @@ h5tpriv_get_adjacencies (
|
||||
const h5_int32_t dim,
|
||||
h5_loc_idlist_t** list
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER4 (h5_err_t,
|
||||
"f=0x%p, entity_id=%lld, dim=%d, list=0x%p",
|
||||
f, (long long)entity_id, dim, list);
|
||||
if (f->t->methods.adjacency == NULL) {
|
||||
H5_PRIV_API_LEAVE (h5_error_internal ());
|
||||
}
|
||||
@@ -31,11 +33,11 @@ static inline h5_err_t
|
||||
h5tpriv_release_adjacency_structs (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
h5_debug ("%s ()", __func__);
|
||||
H5_PRIV_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
if (f->t->methods.adjacency == NULL) {
|
||||
return 0;
|
||||
H5_PRIV_API_LEAVE (H5_OK);
|
||||
}
|
||||
return (*f->t->methods.adjacency->release_internal_structs)(f);
|
||||
H5_PRIV_API_RETURN (f->t->methods.adjacency->release_internal_structs(f));
|
||||
}
|
||||
|
||||
static inline h5_err_t
|
||||
@@ -43,8 +45,11 @@ h5tpriv_update_adjacency_structs (
|
||||
h5_file_t* const f,
|
||||
const h5t_lvl_idx_t level_id
|
||||
) {
|
||||
h5_debug ("%s (%lld)", __func__, (long long)level_id);
|
||||
return (*f->t->methods.adjacency->update_internal_structs)(f, level_id);
|
||||
H5_PRIV_API_ENTER2 (h5_err_t, "f=0x%p, level_id=%d", f, level_id);
|
||||
if (f->t->methods.adjacency == NULL) {
|
||||
H5_PRIV_API_LEAVE (H5_OK);
|
||||
}
|
||||
H5_PRIV_API_RETURN (f->t->methods.adjacency->update_internal_structs(f, level_id));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -26,7 +26,9 @@ alloc_tv (
|
||||
h5_file_t* const f,
|
||||
const h5t_lvl_idx_t from_lvl
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER2 (h5_err_t,
|
||||
"f=0x%p, from_lvl=%u",
|
||||
f, (unsigned)from_lvl);
|
||||
h5t_fdata_t* t = f->t;
|
||||
h5_loc_idx_t num_vertices = t->num_vertices[t->num_leaf_levels-1];
|
||||
|
||||
@@ -47,7 +49,7 @@ static inline h5_err_t
|
||||
release_tv (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
h5t_fdata_t* t = f->t;
|
||||
h5t_adjacencies_t* adj = &t->adjacencies;
|
||||
if (adj->tv.v == NULL)
|
||||
@@ -71,7 +73,9 @@ compute_elems_of_vertices (
|
||||
h5_file_t* const f,
|
||||
const h5t_lvl_idx_t from_lvl
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER2 (h5_err_t,
|
||||
"f=0x%p, from_lvl=%u",
|
||||
f, (unsigned)from_lvl);
|
||||
/* expand structure */
|
||||
TRY( alloc_tv (f, from_lvl) );
|
||||
|
||||
@@ -97,7 +101,9 @@ compute_elems_of_edges (
|
||||
h5_file_t* const f,
|
||||
const h5t_lvl_idx_t from_lvl
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER2 (h5_err_t,
|
||||
"f=0x%p, from_lvl=%u",
|
||||
f, (unsigned)from_lvl);
|
||||
h5t_fdata_t* t = f->t;
|
||||
h5_loc_idx_t elem_idx = (from_lvl <= 0) ? 0 : t->num_elems[from_lvl-1];
|
||||
h5_loc_idx_t num_elems = t->num_elems[t->num_leaf_levels-1];
|
||||
@@ -120,7 +126,9 @@ compute_elems_of_triangles (
|
||||
h5_file_t* const f,
|
||||
const h5t_lvl_idx_t from_lvl
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER2 (h5_err_t,
|
||||
"f=0x%p, from_lvl=%u",
|
||||
f, (unsigned)from_lvl);
|
||||
h5t_fdata_t* t = f->t;
|
||||
h5_loc_idx_t elem_idx = (from_lvl <= 0) ? 0 : t->num_elems[from_lvl-1];
|
||||
h5_loc_idx_t num_elems = t->num_elems[t->num_leaf_levels-1];
|
||||
@@ -144,7 +152,11 @@ compute_children_of_edge (
|
||||
h5_loc_id_t entity_id,
|
||||
h5_loc_idlist_t** children
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER3 (h5_err_t,
|
||||
"f=0x%p, entity_id=%llu, children=0x%p",
|
||||
f,
|
||||
(long long unsigned)entity_id,
|
||||
children);
|
||||
h5_loc_idlist_t* te;
|
||||
TRY( h5tpriv_find_te (f, entity_id, &te ) );
|
||||
h5_loc_id_t* edge_idp = te->items;
|
||||
@@ -178,7 +190,11 @@ compute_sections_of_edge (
|
||||
h5_loc_id_t entity_id,
|
||||
h5_loc_idlist_t** children
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER3 (h5_err_t,
|
||||
"f=0x%p, entity_id=%llu, children=0x%p",
|
||||
f,
|
||||
(long long unsigned)entity_id,
|
||||
children);
|
||||
h5_loc_idlist_t* te;
|
||||
TRY( h5tpriv_find_te (f, entity_id, &te) );
|
||||
h5_loc_id_t* edge_idp = te->items;
|
||||
@@ -244,7 +260,13 @@ compute_direct_children_of_triangle (
|
||||
h5_loc_idx_t elem_idx, // in
|
||||
h5_loc_id_t* children // out
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER4 (h5_err_t,
|
||||
"f=0x%p, face_idx=%llu, elem_idx=%llu, children=0x%p",
|
||||
f,
|
||||
(long long unsigned)face_idx,
|
||||
(long long unsigned)elem_idx,
|
||||
children);
|
||||
|
||||
h5_loc_idx_t map[4][4][2] = {
|
||||
{{0,0},{0,1},{0,2},{0,5}},
|
||||
{{1,0},{1,1},{1,3},{2,4}},
|
||||
@@ -272,7 +294,11 @@ compute_children_of_triangle (
|
||||
h5_loc_id_t entity_id,
|
||||
h5_loc_idlist_t** children
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER3 (h5_err_t,
|
||||
"f=0x%p, entity_id=%llu, children=0x%p",
|
||||
f,
|
||||
(long long unsigned)entity_id,
|
||||
children);
|
||||
h5_loc_idlist_t* td;
|
||||
TRY( h5tpriv_find_td (f, entity_id, &td) );
|
||||
h5_loc_id_t* triangle_idp = td->items;
|
||||
@@ -305,7 +331,11 @@ compute_sections_of_triangle (
|
||||
h5_loc_id_t entity_id,
|
||||
h5_loc_idlist_t** children
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER3 (h5_err_t,
|
||||
"f=0x%p, entity_id=%llu, children=0x%p",
|
||||
f,
|
||||
(long long unsigned)entity_id,
|
||||
children);
|
||||
h5_loc_idlist_t* td;
|
||||
TRY( h5tpriv_find_td (f, entity_id, &td) );
|
||||
h5_loc_id_t* triangle_idp = td->items;
|
||||
@@ -345,7 +375,11 @@ add_vertex2 (
|
||||
h5_loc_idx_t face_idx, // in
|
||||
h5_loc_idx_t elem_idx // in
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER4 (h5_err_t,
|
||||
"f=0x%p, list=0x%p, face_idx=%llu, elem_idx=%llu",
|
||||
f, list,
|
||||
(long long unsigned)face_idx,
|
||||
(long long unsigned)elem_idx);
|
||||
h5_loc_idlist_t* tv;
|
||||
TRY( h5tpriv_find_tv2 (f, face_idx, elem_idx, &tv) );
|
||||
TRY( h5priv_search_idlist (list, tv->items[0]) );
|
||||
@@ -361,7 +395,10 @@ add_edge (
|
||||
h5_loc_idlist_t** list, // out
|
||||
h5_loc_id_t entity_id // in
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER3 (h5_err_t,
|
||||
"f=0x%p, list=0x%p, entity_id=%llu",
|
||||
f, list,
|
||||
(long long unsigned)entity_id);
|
||||
h5_loc_idlist_t* te;
|
||||
TRY( h5tpriv_find_te (f, entity_id, &te) );
|
||||
TRY( h5priv_search_idlist (list, te->items[0]) );
|
||||
@@ -375,7 +412,11 @@ add_edge2 (
|
||||
h5_loc_idx_t face_idx, // in
|
||||
h5_loc_idx_t elem_idx // in
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER4 (h5_err_t,
|
||||
"f=0x%p, list=0x%p, face_idx=%llu, elem_idx=%llu",
|
||||
f, list,
|
||||
(long long unsigned)face_idx,
|
||||
(long long unsigned)elem_idx);
|
||||
h5_loc_idlist_t* te;
|
||||
TRY( h5tpriv_find_te2 (f, face_idx, elem_idx, &te) );
|
||||
TRY( h5priv_search_idlist (list, te->items[0]) );
|
||||
@@ -391,7 +432,10 @@ add_triangle (
|
||||
h5_loc_idlist_t** list, // out
|
||||
h5_loc_idx_t entity_id // in
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER3 (h5_err_t,
|
||||
"f=0x%p, list=0x%p, entity_id=%llu",
|
||||
f, list,
|
||||
(long long unsigned)entity_id);
|
||||
h5_loc_idlist_t* td;
|
||||
TRY( h5tpriv_find_td (f, entity_id, &td) );
|
||||
TRY( h5priv_search_idlist (list, td->items[0]) );
|
||||
@@ -406,7 +450,11 @@ add_triangle2 (
|
||||
h5_loc_idx_t face_idx, // in
|
||||
h5_loc_idx_t elem_idx // in
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER4 (h5_err_t,
|
||||
"f=0x%p, list=0x%p, face_idx=%llu, elem_idx=%llu",
|
||||
f, list,
|
||||
(long long unsigned)face_idx,
|
||||
(long long unsigned)elem_idx);
|
||||
h5_loc_idlist_t* td;
|
||||
TRY( h5tpriv_find_td2 (f, face_idx, elem_idx, &td) );
|
||||
TRY( h5priv_search_idlist (list, td->items[0]) );
|
||||
@@ -419,7 +467,10 @@ add_elem2 (
|
||||
h5_loc_idlist_t** list, // out
|
||||
h5_loc_idx_t elem_idx // in
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER2 (h5_err_t,
|
||||
"list=0x%p, elem_idx=%llu",
|
||||
list,
|
||||
(long long unsigned)elem_idx);
|
||||
h5_loc_id_t elem_id = h5tpriv_build_tet_id (0, elem_idx);
|
||||
TRY( h5priv_search_idlist (list, elem_id) );
|
||||
|
||||
@@ -435,7 +486,9 @@ get_edges_uadj_to_vertex (
|
||||
const h5_loc_id_t entity_id,
|
||||
h5_loc_idlist_t** list
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER3 (h5_err_t,
|
||||
"f=0x%p, entity_id=%llu, list=0x%p",
|
||||
f, (long long unsigned)entity_id, list);
|
||||
h5_loc_idx_t vertex_idx;
|
||||
TRY( h5t_get_vertex_index_of_vertex (f, entity_id, &vertex_idx) );
|
||||
h5_loc_idlist_t* tv = f->t->adjacencies.tv.v[vertex_idx];
|
||||
@@ -473,7 +526,9 @@ get_triangles_uadj_to_vertex (
|
||||
const h5_loc_id_t entity_id,
|
||||
h5_loc_idlist_t** list
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER3 (h5_err_t,
|
||||
"f=0x%p, entity_id=%llu, list=0x%p",
|
||||
f, (long long unsigned)entity_id, list);
|
||||
/* get list of all tetrahedra connected to given vertex
|
||||
Note: this list may include tetrahedra which are not in
|
||||
the (current) leaf grid */
|
||||
@@ -514,7 +569,9 @@ get_tets_uadj_to_vertex (
|
||||
const h5_loc_id_t entity_id,
|
||||
h5_loc_idlist_t** list
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER3 (h5_err_t,
|
||||
"f=0x%p, entity_id=%llu, list=0x%p",
|
||||
f, (long long unsigned)entity_id, list);
|
||||
h5_loc_idx_t vertex_idx;
|
||||
TRY( h5t_get_vertex_index_of_vertex (f, entity_id, &vertex_idx) );
|
||||
h5_loc_idlist_t* tv = f->t->adjacencies.tv.v[vertex_idx];
|
||||
@@ -539,7 +596,9 @@ get_triangles_uadj_to_edge (
|
||||
const h5_loc_id_t entity_id,
|
||||
h5_loc_idlist_t** list
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER3 (h5_err_t,
|
||||
"f=0x%p, entity_id=%llu, list=0x%p",
|
||||
f, (long long unsigned)entity_id, list);
|
||||
h5_loc_idlist_t* children;
|
||||
TRY( h5priv_alloc_idlist (&children, 8) );
|
||||
TRY( compute_children_of_edge (f, entity_id, &children) );
|
||||
@@ -569,7 +628,9 @@ get_tets_uadj_to_edge (
|
||||
const h5_loc_id_t entity_id,
|
||||
h5_loc_idlist_t** list
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER3 (h5_err_t,
|
||||
"f=0x%p, entity_id=%llu, list=0x%p",
|
||||
f, (long long unsigned)entity_id, list);
|
||||
h5_loc_idlist_t* children;
|
||||
TRY( h5priv_alloc_idlist (&children, 8) );
|
||||
TRY( compute_children_of_edge (f, entity_id, &children) );
|
||||
@@ -589,7 +650,9 @@ get_tets_uadj_to_triangle (
|
||||
const h5_loc_id_t entity_id,
|
||||
h5_loc_idlist_t** list
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER3 (h5_err_t,
|
||||
"f=0x%p, entity_id=%llu, list=0x%p",
|
||||
f, (long long unsigned)entity_id, list);
|
||||
h5_loc_idlist_t* children;
|
||||
TRY( h5priv_alloc_idlist (&children, 8) );
|
||||
TRY( compute_children_of_triangle (f, entity_id, &children) );
|
||||
@@ -609,7 +672,9 @@ get_vertices_dadj_to_edge (
|
||||
const h5_loc_id_t entity_id,
|
||||
h5_loc_idlist_t** list
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER3 (h5_err_t,
|
||||
"f=0x%p, entity_id=%llu, list=0x%p",
|
||||
f, (long long unsigned)entity_id, list);
|
||||
h5_loc_idlist_t* children;
|
||||
TRY( h5priv_alloc_idlist (&children, 8) );
|
||||
TRY( compute_sections_of_edge (f, entity_id, &children) );
|
||||
@@ -643,7 +708,9 @@ get_vertices_dadj_to_triangle (
|
||||
const h5_loc_id_t entity_id,
|
||||
h5_loc_idlist_t** list
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER3 (h5_err_t,
|
||||
"f=0x%p, entity_id=%llu, list=0x%p",
|
||||
f, (long long unsigned)entity_id, list);
|
||||
h5_loc_idlist_t* children;
|
||||
TRY( h5priv_alloc_idlist (&children, 8) );
|
||||
h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (entity_id);
|
||||
@@ -688,7 +755,9 @@ get_vertices_dadj_to_tet (
|
||||
const h5_loc_id_t entity_id,
|
||||
h5_loc_idlist_t** list
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER3 (h5_err_t,
|
||||
"f=0x%p, entity_id=%llu, list=0x%p",
|
||||
f, (long long unsigned)entity_id, list);
|
||||
h5_loc_idlist_t* children;
|
||||
h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (entity_id);
|
||||
TRY( h5priv_alloc_idlist (&children, 8) );
|
||||
@@ -727,7 +796,9 @@ get_edges_dadj_to_triangle (
|
||||
const h5_loc_id_t entity_id,
|
||||
h5_loc_idlist_t** list
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER3 (h5_err_t,
|
||||
"f=0x%p, entity_id=%llu, list=0x%p",
|
||||
f, (long long unsigned)entity_id, list);
|
||||
h5_loc_idlist_t* children;
|
||||
TRY( h5priv_alloc_idlist (&children, 8) );
|
||||
h5_loc_idx_t face_idx = h5tpriv_get_face_idx (entity_id);
|
||||
@@ -760,7 +831,9 @@ get_edges_dadj_to_tet (
|
||||
const h5_loc_id_t elem_id,
|
||||
h5_loc_idlist_t** list
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER3 (h5_err_t,
|
||||
"f=0x%p, elem_id=%llu, list=0x%p",
|
||||
f, (long long unsigned)elem_id, list);
|
||||
h5_loc_idlist_t* children;
|
||||
TRY( h5priv_alloc_idlist (&children, 8) );
|
||||
h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (elem_id);
|
||||
@@ -790,7 +863,9 @@ get_triangles_dadj_to_tet (
|
||||
const h5_loc_id_t entity_id,
|
||||
h5_loc_idlist_t** list
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER3 (h5_err_t,
|
||||
"f=0x%p, entity_id=%llu, list=0x%p",
|
||||
f, (long long unsigned)entity_id, list);
|
||||
h5_loc_idlist_t* children;
|
||||
TRY( h5priv_alloc_idlist (&children, 8) );
|
||||
h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (entity_id);
|
||||
@@ -926,7 +1001,9 @@ update_internal_structs (
|
||||
h5_file_t* const f,
|
||||
const h5t_lvl_idx_t from_lvl
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER2 (h5_err_t,
|
||||
"f=0x%p, from_lvl=%u",
|
||||
f, (unsigned)from_lvl);
|
||||
clock_t t1 = clock();
|
||||
TRY( compute_elems_of_vertices (f, from_lvl) );
|
||||
clock_t t2 = clock();
|
||||
@@ -950,7 +1027,7 @@ static h5_err_t
|
||||
release_internal_structs (
|
||||
h5_file_t * const f
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
h5t_fdata_t* t = f->t;
|
||||
TRY( release_tv (f) );
|
||||
TRY( h5priv_hdestroy (&t->adjacencies.te_hash) );
|
||||
|
||||
@@ -22,7 +22,9 @@ alloc_tv (
|
||||
h5_file_t* const f,
|
||||
const h5t_lvl_idx_t from_lvl
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER2 (h5_err_t,
|
||||
"f=0x%p, from_lvl=%u",
|
||||
f, (unsigned)from_lvl);
|
||||
h5t_fdata_t* t = f->t;
|
||||
h5_loc_idx_t num_vertices = t->num_vertices[t->num_leaf_levels-1];
|
||||
|
||||
@@ -40,7 +42,7 @@ static inline h5_err_t
|
||||
release_tv (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
h5t_fdata_t* t = f->t;
|
||||
h5t_adjacencies_t* adj = &t->adjacencies;
|
||||
if (adj->tv.v == NULL)
|
||||
@@ -64,7 +66,10 @@ compute_elems_of_vertices (
|
||||
h5_file_t* const f,
|
||||
const h5t_lvl_idx_t from_lvl
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER2 (h5_err_t,
|
||||
"f=0x%p, from_lvl=%u",
|
||||
f, (unsigned)from_lvl);
|
||||
|
||||
/* expand structure */
|
||||
TRY( alloc_tv (f, from_lvl) );
|
||||
|
||||
@@ -90,7 +95,9 @@ compute_elems_of_edges (
|
||||
h5_file_t* const f,
|
||||
const h5t_lvl_idx_t from_lvl
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER2 (h5_err_t,
|
||||
"f=0x%p, from_lvl=%u",
|
||||
f, (unsigned)from_lvl);
|
||||
h5t_fdata_t *t = f->t;
|
||||
h5_loc_idx_t elem_idx = (from_lvl <= 0) ? 0 : t->num_elems[from_lvl-1];
|
||||
h5_loc_idx_t num_elems = t->num_elems[t->num_leaf_levels-1];
|
||||
@@ -114,7 +121,11 @@ compute_children_of_edge (
|
||||
h5_loc_id_t entity_id,
|
||||
h5_loc_idlist_t** children
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER3 (h5_err_t,
|
||||
"f=0x%p, entity_id=%llu, children=0x%p",
|
||||
f,
|
||||
(long long unsigned)entity_id,
|
||||
children);
|
||||
h5_loc_idlist_t* te;
|
||||
TRY( h5tpriv_find_te (f, entity_id, &te ) );
|
||||
h5_loc_id_t* edge_idp = te->items;
|
||||
@@ -149,7 +160,11 @@ compute_sections_of_edge (
|
||||
h5_loc_id_t entity_id,
|
||||
h5_loc_idlist_t** children
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER3 (h5_err_t,
|
||||
"f=0x%p, entity_id=%llu, children=0x%p",
|
||||
f,
|
||||
(long long unsigned)entity_id,
|
||||
children);
|
||||
h5_loc_idlist_t* te;
|
||||
TRY( h5tpriv_find_te (f, entity_id, &te) );
|
||||
h5_loc_id_t* edge_idp = te->items;
|
||||
@@ -187,7 +202,11 @@ add_vertex2 (
|
||||
h5_loc_idx_t face_idx, // in
|
||||
h5_loc_idx_t elem_idx // in
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER4 (h5_err_t,
|
||||
"f=0x%p, list=0x%p, face_idx=%llu, elem_idx=%llu",
|
||||
f, list,
|
||||
(long long unsigned)face_idx,
|
||||
(long long unsigned)elem_idx);
|
||||
h5_loc_idlist_t* tv;
|
||||
TRY( h5tpriv_find_tv2 (f, face_idx, elem_idx, &tv) );
|
||||
TRY( h5priv_search_idlist (list, tv->items[0]) );
|
||||
@@ -203,7 +222,10 @@ add_edge (
|
||||
h5_loc_idlist_t** list, // out
|
||||
h5_loc_id_t entity_id // in
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER3 (h5_err_t,
|
||||
"f=0x%p, list=0x%p, entity_id=%llu",
|
||||
f, list,
|
||||
(long long unsigned)entity_id);
|
||||
h5_loc_idlist_t* te;
|
||||
TRY( h5tpriv_find_te (f, entity_id, &te) );
|
||||
TRY( h5priv_search_idlist (list, te->items[0]) );
|
||||
@@ -217,7 +239,11 @@ add_edge2 (
|
||||
h5_loc_idx_t face_idx,
|
||||
h5_loc_idx_t elem_idx
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER4 (h5_err_t,
|
||||
"f=0x%p, list=0x%p, face_idx=%llu, elem_idx=%llu",
|
||||
f, list,
|
||||
(long long unsigned)face_idx,
|
||||
(long long unsigned)elem_idx);
|
||||
h5_loc_idlist_t *te;
|
||||
TRY( h5tpriv_find_te2 (f, face_idx, elem_idx, &te) );
|
||||
TRY( h5priv_search_idlist (list, te->items[0]) );
|
||||
@@ -229,7 +255,10 @@ add_elem2 (
|
||||
h5_loc_idlist_t** list, // out
|
||||
h5_loc_idx_t elem_idx // in
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER2 (h5_err_t,
|
||||
"list=0x%p, elem_idx=%llu",
|
||||
list,
|
||||
(long long unsigned)elem_idx);
|
||||
h5_loc_id_t elem_id = h5tpriv_build_triangle_id (0, elem_idx);
|
||||
TRY( h5priv_search_idlist (list, elem_id) );
|
||||
|
||||
@@ -245,7 +274,9 @@ get_edges_uadj_to_vertex (
|
||||
const h5_loc_id_t entity_id,
|
||||
h5_loc_idlist_t** list
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER3 (h5_err_t,
|
||||
"f=0x%p, entity_id=%llu, list=0x%p",
|
||||
f, (long long unsigned)entity_id, list);
|
||||
h5_loc_idx_t vertex_idx;
|
||||
TRY( h5t_get_vertex_index_of_vertex (f, entity_id, &vertex_idx) );
|
||||
h5_loc_idlist_t* tv = f->t->adjacencies.tv.v[vertex_idx];
|
||||
@@ -279,7 +310,9 @@ get_triangles_uadj_to_vertex (
|
||||
const h5_loc_id_t entity_id,
|
||||
h5_loc_idlist_t** list
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER3 (h5_err_t,
|
||||
"f=0x%p, entity_id=%llu, list=0x%p",
|
||||
f, (long long unsigned)entity_id, list);
|
||||
h5_loc_idx_t vertex_idx;
|
||||
TRY( h5t_get_vertex_index_of_vertex (f, entity_id, &vertex_idx) );
|
||||
h5_loc_idlist_t* tv = f->t->adjacencies.tv.v[vertex_idx];
|
||||
@@ -305,7 +338,9 @@ get_triangles_uadj_to_edge (
|
||||
const h5_loc_id_t entity_id,
|
||||
h5_loc_idlist_t** list
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER3 (h5_err_t,
|
||||
"f=0x%p, entity_id=%llu, list=0x%p",
|
||||
f, (long long unsigned)entity_id, list);
|
||||
h5_loc_idlist_t* children;
|
||||
TRY( h5priv_alloc_idlist (&children, 8) );
|
||||
TRY( compute_children_of_edge (f, entity_id, &children) );
|
||||
@@ -327,7 +362,10 @@ get_edges_adj_to_edge (
|
||||
const h5_loc_id_t entity_id,
|
||||
h5_loc_idlist_t** list
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER3 (h5_err_t,
|
||||
"f=0x%p, entity_id=%llu, list=0x%p",
|
||||
f, (long long unsigned)entity_id, list);
|
||||
|
||||
TRY( h5priv_alloc_idlist (list, 8) );
|
||||
h5_loc_idlist_t* children;
|
||||
TRY( h5priv_alloc_idlist (&children, 8) );
|
||||
@@ -348,7 +386,9 @@ get_vertices_dadj_to_edge (
|
||||
const h5_loc_id_t entity_id,
|
||||
h5_loc_idlist_t** list
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER3 (h5_err_t,
|
||||
"f=0x%p, entity_id=%llu, list=0x%p",
|
||||
f, (long long unsigned)entity_id, list);
|
||||
h5_loc_idlist_t* children;
|
||||
TRY( h5priv_alloc_idlist (&children, 8) );
|
||||
TRY( compute_sections_of_edge (f, entity_id, &children) );
|
||||
@@ -381,7 +421,9 @@ get_vertices_dadj_to_triangle (
|
||||
const h5_loc_id_t entity_id,
|
||||
h5_loc_idlist_t** list
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER3 (h5_err_t,
|
||||
"f=0x%p, entity_id=%llu, list=0x%p",
|
||||
f, (long long unsigned)entity_id, list);
|
||||
h5_loc_idlist_t* children;
|
||||
TRY (h5priv_alloc_idlist (&children, 8));
|
||||
|
||||
@@ -421,7 +463,9 @@ get_edges_dadj_to_triangle (
|
||||
const h5_loc_id_t entity_id,
|
||||
h5_loc_idlist_t** list
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER3 (h5_err_t,
|
||||
"f=0x%p, entity_id=%llu, list=0x%p",
|
||||
f, (long long unsigned)entity_id, list);
|
||||
h5_loc_idlist_t* children;
|
||||
TRY (h5priv_alloc_idlist (&children, 8));
|
||||
h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (entity_id);
|
||||
@@ -531,7 +575,9 @@ update_internal_structs (
|
||||
h5_file_t* const f,
|
||||
const h5t_lvl_idx_t from_lvl
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER2 (h5_err_t,
|
||||
"f=0x%p, from_lvl=%u",
|
||||
f, (unsigned)from_lvl);
|
||||
h5_debug ("%s (%lld)", __func__, (long long)from_lvl);
|
||||
clock_t t1 = clock();
|
||||
TRY( compute_elems_of_vertices (f, from_lvl) );
|
||||
@@ -551,7 +597,7 @@ static inline h5_err_t
|
||||
release_internal_structs (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
h5t_fdata_t *t = f->t;
|
||||
TRY( release_tv (f) );
|
||||
TRY( h5priv_hdestroy (&t->adjacencies.te_hash) );
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
#include "h5core/h5_core.h"
|
||||
#include "h5_core_private.h"
|
||||
|
||||
const char*
|
||||
h5tpriv_oid_names[] = {
|
||||
"N.N.",
|
||||
"vertex",
|
||||
"edge",
|
||||
"triangle",
|
||||
"tetrahedron"
|
||||
};
|
||||
|
||||
const char*
|
||||
h5tpriv_meshes_grpnames[] = {
|
||||
"N.N.",
|
||||
"N.N.",
|
||||
"N.N.",
|
||||
"TriangleMeshes",
|
||||
"TetMeshes"
|
||||
};
|
||||
|
||||
const char*
|
||||
h5tpriv_map_oid2str (
|
||||
h5_oid_t oid
|
||||
) {
|
||||
if ((oid < 0) || (oid >= sizeof (h5tpriv_oid_names) / sizeof (char*))) {
|
||||
return "[invalid oid]";
|
||||
}
|
||||
return h5tpriv_oid_names[oid];
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
#ifndef __H5T_CONSTS_PRIVATE_H
|
||||
#define __H5T_CONSTS_PRIVATE_H
|
||||
|
||||
extern const char * h5tpriv_oid_names[];
|
||||
extern const char * h5tpriv_meshes_grpnames[];
|
||||
|
||||
const char *h5tpriv_map_oid2str ( h5_oid_t oid );
|
||||
|
||||
#endif
|
||||
@@ -2,6 +2,8 @@
|
||||
#define __H5T_CORE_PRIVATE_H
|
||||
|
||||
#define H5T_CONTAINER_GRPNAME "Topo"
|
||||
#define TETRAHEDRAL_MESHES_GRPNAME "TetMeshes"
|
||||
#define TRIANGLE_MESHES_GRPNAME "TriangleMeshes"
|
||||
|
||||
#include "h5t_tags_private.h"
|
||||
|
||||
@@ -9,10 +11,9 @@
|
||||
|
||||
#include "h5t_access_private.h"
|
||||
#include "h5t_adjacencies_private.h"
|
||||
#include "h5t_consts_private.h"
|
||||
#include "h5t_hsearch_private.h"
|
||||
#include "h5t_map_private.h"
|
||||
#include "h5t_openclose_private.h"
|
||||
#include "h5t_model_private.h"
|
||||
#include "h5t_ref_elements_private.h"
|
||||
#include "h5t_readwrite_private.h"
|
||||
#include "h5t_retrieve_private.h"
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h> /* va_arg - System dependent ?! */
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include "h5core/h5_core.h"
|
||||
#include "h5_core_private.h"
|
||||
+26
-10
@@ -11,7 +11,9 @@ h5tpriv_search_tv2 (
|
||||
h5_loc_idx_t elem_idx, // in
|
||||
h5_loc_idlist_t** idlist // out
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER4 (h5_err_t,
|
||||
"f=0x%p, face_idx=%lld, elem_idx=%lld, idlist=0x%p",
|
||||
f, (long long)face_idx, (long long)elem_idx, idlist);
|
||||
h5t_fdata_t* t = f->t;
|
||||
|
||||
h5_loc_idx_t vertex_idx;
|
||||
@@ -75,7 +77,7 @@ h5tpriv_resize_te_htab (
|
||||
h5_file_t* const f,
|
||||
size_t nel
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER2 (h5_err_t, "f=0x%p, nel=%lld", f, (long long)nel);
|
||||
h5t_adjacencies_t* a = &f->t->adjacencies;
|
||||
if ( a->te_hash.size == 0 ) {
|
||||
TRY (h5priv_hcreate (
|
||||
@@ -97,7 +99,9 @@ h5tpriv_search_te2 (
|
||||
h5_loc_idx_t elem_idx,
|
||||
h5_loc_idlist_t** idlist
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER4 (h5_err_t,
|
||||
"f=0x%p, face_idx=%lld, elem_idx=%lld, idlist=0x%p",
|
||||
f, (long long)face_idx, (long long)elem_idx, idlist);
|
||||
h5t_fdata_t* t = f->t;
|
||||
h5t_adjacencies_t* a = &t->adjacencies;
|
||||
void* __retval;
|
||||
@@ -183,7 +187,9 @@ h5tpriv_find_te (
|
||||
h5_loc_idx_t edge_id, // in
|
||||
h5_loc_idlist_t** idlist // out
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER3 (h5_err_t,
|
||||
"f=0x%p, edge_id=%lld, idlist=0x%p",
|
||||
f, (long long)edge_id, idlist);
|
||||
h5t_te_entry_t item;
|
||||
TRY (h5t_get_vertex_indices_of_edge (
|
||||
f,
|
||||
@@ -200,7 +206,9 @@ h5tpriv_find_te2 (
|
||||
h5_loc_idx_t elem_idx, // in
|
||||
h5_loc_idlist_t** idlist // out
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER4 (h5_err_t,
|
||||
"f=0x%p, face_idx=%lld, elem_idx=%lld, idlist=0x%p",
|
||||
f, (long long)face_idx, (long long)elem_idx, idlist);
|
||||
h5t_te_entry_t item;
|
||||
TRY (h5t_get_vertex_indices_of_edge2 (
|
||||
f,
|
||||
@@ -257,7 +265,7 @@ h5tpriv_resize_td_htab (
|
||||
h5_file_t* const f,
|
||||
size_t nel
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER2 (h5_err_t, "f=0x%p, nel=%lld", f, (long long)nel);
|
||||
h5t_adjacencies_t* a = &f->t->adjacencies;
|
||||
if (a->td_hash.size == 0) {
|
||||
TRY (h5priv_hcreate (
|
||||
@@ -279,7 +287,9 @@ h5tpriv_search_td2 (
|
||||
h5_loc_idx_t elem_idx,
|
||||
h5_loc_idlist_t** idlist // out
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER4 (h5_err_t,
|
||||
"f=0x%p, face_idx=%lld, elem_idx=%lld, idlist=0x%p",
|
||||
f, (long long)face_idx, (long long)elem_idx, idlist);
|
||||
h5t_fdata_t* t = f->t;
|
||||
h5t_adjacencies_t* a = &f->t->adjacencies;
|
||||
void* __retval;
|
||||
@@ -343,7 +353,9 @@ h5tpriv_find_td (
|
||||
h5_loc_idx_t triangle_id,
|
||||
h5_loc_idlist_t** idlist
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER3 (h5_err_t,
|
||||
"f=0x%p, triangle_id=%lld, idlist=0x%p",
|
||||
f, (long long)triangle_id, idlist);
|
||||
h5t_td_entry_t item;
|
||||
TRY (h5t_get_vertex_indices_of_triangle (
|
||||
f,
|
||||
@@ -360,7 +372,9 @@ h5tpriv_find_td2 (
|
||||
h5_loc_idx_t elem_idx,
|
||||
h5_loc_idlist_t** idlist
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER4 (h5_err_t,
|
||||
"f=0x%p, face_idx=%lld, elem_idx=%lld, idlist=0x%p",
|
||||
f, (long long)face_idx, (long long)elem_idx, idlist);
|
||||
h5t_td_entry_t item;
|
||||
TRY (h5t_get_vertex_indices_of_triangle2 (
|
||||
f,
|
||||
@@ -381,7 +395,9 @@ h5tpriv_find_tv2 (
|
||||
h5_loc_idx_t elem_idx,
|
||||
h5_loc_idlist_t** idlist
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER4 (h5_err_t,
|
||||
"f=0x%p, face_idx=%lld, elem_idx=%lld, idlist=0x%p",
|
||||
f, (long long)face_idx, (long long)elem_idx, idlist);
|
||||
h5_loc_idx_t idx;
|
||||
TRY (idx = h5tpriv_get_loc_elem_vertex_idx (f, elem_idx, face_idx));
|
||||
*idlist = f->t->adjacencies.tv.v[idx];
|
||||
|
||||
+32
-12
@@ -9,25 +9,25 @@
|
||||
|
||||
\return Number of meshes of type \c type_id or error code.
|
||||
*/
|
||||
h5_ssize_t
|
||||
h5t_get_num_meshes (
|
||||
static inline h5_ssize_t
|
||||
get_num_meshes (
|
||||
h5_file_t* const f,
|
||||
const h5_oid_t type_id
|
||||
const char* grpname
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_ssize_t);
|
||||
H5_PRIV_FUNC_ENTER (h5_ssize_t);
|
||||
hid_t topo_gid = -1;
|
||||
hid_t meshes_gid = -1;
|
||||
|
||||
h5_err_t exists;
|
||||
TRY (exists = hdf5_link_exists (f->root_gid, H5T_CONTAINER_GRPNAME));
|
||||
if (!exists) return 0;
|
||||
if (!exists) H5_CORE_API_LEAVE (0);
|
||||
|
||||
TRY (topo_gid = hdf5_open_group (f->root_gid, H5T_CONTAINER_GRPNAME));
|
||||
|
||||
TRY (exists = hdf5_link_exists (topo_gid, h5tpriv_meshes_grpnames[type_id]));
|
||||
if (!exists) return 0;
|
||||
TRY (exists = hdf5_link_exists (topo_gid, grpname));
|
||||
if (!exists) H5_CORE_API_LEAVE (0);
|
||||
|
||||
TRY (meshes_gid = hdf5_open_group (topo_gid, h5tpriv_meshes_grpnames[type_id]));
|
||||
TRY (meshes_gid = hdf5_open_group (topo_gid, grpname));
|
||||
h5_ssize_t num_meshes;
|
||||
TRY (num_meshes = hdf5_get_num_groups (meshes_gid));
|
||||
TRY (hdf5_close_group (meshes_gid) );
|
||||
@@ -36,6 +36,22 @@ h5t_get_num_meshes (
|
||||
H5_CORE_API_RETURN (num_meshes);
|
||||
}
|
||||
|
||||
h5_ssize_t
|
||||
h5t_get_num_tetmeshes (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_CORE_API_ENTER1 (h5_ssize_t, "f=0x%p", f);
|
||||
H5_CORE_API_RETURN (get_num_meshes (f, TETRAHEDRAL_MESHES_GRPNAME));
|
||||
}
|
||||
|
||||
h5_ssize_t
|
||||
h5t_get_num_trimeshes (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_CORE_API_ENTER1 (h5_ssize_t, "f=0x%p", f);
|
||||
H5_CORE_API_RETURN (get_num_meshes (f, TRIANGLE_MESHES_GRPNAME));
|
||||
}
|
||||
|
||||
/*!
|
||||
Get the number of hierarchical mesh levels for the current mesh.
|
||||
|
||||
@@ -47,7 +63,7 @@ h5_ssize_t
|
||||
h5t_get_num_leaf_levels (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_ssize_t);
|
||||
H5_CORE_API_ENTER1 (h5_ssize_t, "f=0x%p", f);
|
||||
if (f->t->cur_mesh < 0) {
|
||||
H5_CORE_API_LEAVE (h5tpriv_error_undef_mesh ());
|
||||
}
|
||||
@@ -65,7 +81,7 @@ h5t_lvl_idx_t
|
||||
h5t_get_level (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5t_lvl_idx_t);
|
||||
H5_CORE_API_ENTER1 (h5t_lvl_idx_t, "f=0x%p", f);
|
||||
H5_CORE_API_RETURN (f->t->leaf_level);
|
||||
}
|
||||
|
||||
@@ -87,7 +103,9 @@ h5t_get_num_elems (
|
||||
h5_file_t* const f,
|
||||
const h5_id_t cnode
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_ssize_t);
|
||||
H5_CORE_API_ENTER2 (h5_ssize_t,
|
||||
"f=0x%p, cnode=%llu",
|
||||
f, (long long unsigned)cnode);
|
||||
UNUSED_ARGUMENT (cnode);
|
||||
|
||||
if (f->t->cur_mesh < 0) {
|
||||
@@ -117,7 +135,9 @@ h5t_get_num_vertices (
|
||||
h5_file_t* const f,
|
||||
h5_id_t cnode
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_ssize_t);
|
||||
H5_CORE_API_ENTER2 (h5_ssize_t,
|
||||
"f=0x%p, cnode=%llu",
|
||||
f, (long long unsigned)cnode);
|
||||
UNUSED_ARGUMENT (cnode);
|
||||
|
||||
if (f->t->cur_mesh < 0) {
|
||||
|
||||
+67
-16
@@ -36,7 +36,9 @@ h5tpriv_sort_local_vertex_indices (
|
||||
h5_loc_idx_t* const indices, /* IN/OUT: local vertex indices */
|
||||
const h5_size_t size /* size of array */
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER3 (h5_err_t,
|
||||
"f=0x%p, indices=0x%p, size=%llu",
|
||||
f, indices, (long long unsigned)size);
|
||||
h5t_fdata_t* t = f->t;
|
||||
|
||||
h5_size_t i;
|
||||
@@ -64,7 +66,9 @@ h5t_map_global_vertex_idx2local (
|
||||
h5_file_t* const f,
|
||||
const h5_glb_idx_t glb_idx
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_loc_idx_t);
|
||||
H5_CORE_API_ENTER2 (h5_loc_idx_t,
|
||||
"f=0x%p, glb_idx=%lld",
|
||||
f, (long long)glb_idx);
|
||||
if (glb_idx < 0) return -1;
|
||||
|
||||
h5_loc_idx_t loc_idx = h5priv_search_idxmap (&f->t->map_vertex_g2l, glb_idx);
|
||||
@@ -81,7 +85,9 @@ h5t_map_global_vertex_indices2local (
|
||||
const h5_size_t size,
|
||||
h5_loc_idx_t* const loc_indices
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER4 (h5_err_t,
|
||||
"f=0x%p, glb_indices=0x%p, size=%llu, loc_indices=0x%p",
|
||||
f, glb_indices, (long long unsigned)size, loc_indices);
|
||||
h5_size_t i;
|
||||
for (i = 0; i < size; i++) {
|
||||
TRY (loc_indices[i] =
|
||||
@@ -103,7 +109,9 @@ h5t_map_glb_elem_idx2loc (
|
||||
h5_file_t* const f,
|
||||
const h5_glb_idx_t glb_idx
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_loc_idx_t);
|
||||
H5_CORE_API_ENTER2 (h5_loc_idx_t,
|
||||
"f=0x%p, glb_idx=%lld",
|
||||
f, (long long)glb_idx);
|
||||
if (glb_idx < 0) H5_CORE_API_LEAVE (-1);
|
||||
|
||||
h5_loc_idx_t loc_idx = h5priv_search_idxmap (&f->t->map_elem_g2l, glb_idx);
|
||||
@@ -119,7 +127,9 @@ h5t_map_glb_elem_indices2loc (
|
||||
const h5_size_t size,
|
||||
h5_loc_idx_t* loc_indices
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER4 (h5_err_t,
|
||||
"f=0x%p, glb_indices=0x%p, size=%llu, loc_indices=0x%p",
|
||||
f, glb_indices, (long long unsigned)size, loc_indices);
|
||||
const h5_glb_idx_t* end = glb_indices+size;
|
||||
|
||||
while (glb_indices < end) {
|
||||
@@ -139,7 +149,7 @@ h5_err_t
|
||||
h5tpriv_rebuild_vertex_indices_mapping (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER1 (h5_loc_idx_t, "f=0x%p", f);
|
||||
h5t_fdata_t* t = f->t;
|
||||
if (t->num_leaf_levels <= 0) H5_PRIV_API_LEAVE (H5_SUCCESS);
|
||||
|
||||
@@ -163,7 +173,7 @@ h5_err_t
|
||||
h5tpriv_rebuild_elem_indices_mapping (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER1 (h5_loc_idx_t, "f=0x%p", f);
|
||||
h5t_fdata_t* t = f->t;
|
||||
if (t->num_leaf_levels <= 0) H5_PRIV_API_LEAVE (H5_SUCCESS);
|
||||
|
||||
@@ -189,7 +199,11 @@ h5t_get_vertex_indices_of_entity (
|
||||
const h5_loc_id_t entity_id, // in
|
||||
h5_loc_idx_t* vertex_indices // out
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER3 (h5_loc_idx_t,
|
||||
"f=0x%p, entity_id=%llu, vertex_indices=0x%p",
|
||||
f,
|
||||
(long long unsigned)entity_id,
|
||||
vertex_indices);
|
||||
h5_loc_idx_t type = h5tpriv_get_entity_type (entity_id);
|
||||
h5_loc_idx_t face_idx = h5tpriv_get_face_idx (entity_id);
|
||||
h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (entity_id);
|
||||
@@ -216,7 +230,12 @@ h5t_get_vertex_indices_of_entity2 (
|
||||
const h5_loc_idx_t elem_idx, // [in] local element index
|
||||
h5_loc_idx_t* vertex_indices // [out]
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER5 (h5_err_t,
|
||||
"f=0x%p, dim=%d, face_idx=%llu, elem_idx=%llu, vertex_indices=0x%p",
|
||||
f, dim,
|
||||
(long long unsigned)face_idx,
|
||||
(long long unsigned)elem_idx,
|
||||
vertex_indices);
|
||||
h5_loc_idx_t* indices = h5tpriv_get_loc_elem_vertex_indices (f, elem_idx);
|
||||
const h5t_ref_elem_t* ref_elem = f->t->ref_elem;
|
||||
int num_vertices = ref_elem->num_vertices_of_face[dim][face_idx];
|
||||
@@ -234,7 +253,11 @@ h5t_get_vertex_index_of_vertex (
|
||||
const h5_loc_id_t entity_id,
|
||||
h5_loc_idx_t* vertex_index
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER3 (h5_loc_idx_t,
|
||||
"f=0x%p, entity_id=%llu, vertex_index=%llu",
|
||||
f,
|
||||
(long long unsigned)entity_id,
|
||||
(long long unsigned)*vertex_index);
|
||||
h5_loc_idx_t face_idx = h5tpriv_get_face_idx (entity_id);
|
||||
h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (entity_id);
|
||||
H5_CORE_API_RETURN (h5t_get_vertex_index_of_vertex2 (
|
||||
@@ -248,7 +271,12 @@ h5t_get_vertex_index_of_vertex2 (
|
||||
const h5_loc_idx_t elem_idx, // local element index
|
||||
h5_loc_idx_t* vertex_indices // OUT: vertex ID's
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER4 (h5_err_t,
|
||||
"f=0x%p, face_idx=%llu, elem_idx=%llu, vertex_indices=0x%p",
|
||||
f,
|
||||
(long long unsigned)face_idx,
|
||||
(long long unsigned)elem_idx,
|
||||
vertex_indices);
|
||||
vertex_indices[0] = h5tpriv_get_loc_elem_vertex_idx (f, elem_idx, face_idx);
|
||||
H5_CORE_API_RETURN (H5_SUCCESS);
|
||||
}
|
||||
@@ -262,7 +290,11 @@ h5t_get_vertex_indices_of_edge (
|
||||
const h5_loc_id_t entity_id,
|
||||
h5_loc_idx_t* vertex_indices
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER3 (h5_loc_idx_t,
|
||||
"f=0x%p, entity_id=%llu, vertex_indices=0x%p",
|
||||
f,
|
||||
(long long unsigned)entity_id,
|
||||
vertex_indices);
|
||||
h5_loc_idx_t face_idx = h5tpriv_get_face_idx (entity_id);
|
||||
h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (entity_id);
|
||||
H5_CORE_API_RETURN (h5t_get_vertex_indices_of_edge2 (
|
||||
@@ -283,7 +315,12 @@ h5t_get_vertex_indices_of_edge2 (
|
||||
const h5_loc_idx_t elem_idx, // local element index
|
||||
h5_loc_idx_t* vertex_indices // OUT: vertex indices
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER4 (h5_err_t,
|
||||
"f=0x%p, face_idx=%llu, elem_idx=%llu, vertex_indices=0x%p",
|
||||
f,
|
||||
(long long unsigned)face_idx,
|
||||
(long long unsigned)elem_idx,
|
||||
vertex_indices);
|
||||
const h5_loc_idx_t* indices = h5tpriv_get_loc_elem_vertex_indices (f, elem_idx);
|
||||
|
||||
h5_loc_idx_t idx;
|
||||
@@ -300,7 +337,11 @@ h5t_get_vertex_indices_of_triangle (
|
||||
const h5_loc_id_t entity_id,
|
||||
h5_loc_idx_t* vertex_indices
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER3 (h5_loc_idx_t,
|
||||
"f=0x%p, entity_id=%llu, vertex_indices=0x%p",
|
||||
f,
|
||||
(long long unsigned)entity_id,
|
||||
vertex_indices);
|
||||
h5_loc_idx_t face_idx = h5tpriv_get_face_idx (entity_id);
|
||||
h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (entity_id);
|
||||
H5_CORE_API_RETURN (h5t_get_vertex_indices_of_triangle2 (
|
||||
@@ -314,7 +355,12 @@ h5t_get_vertex_indices_of_triangle2 (
|
||||
const h5_loc_idx_t elem_idx,
|
||||
h5_loc_idx_t* vertex_indices
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER4 (h5_err_t,
|
||||
"f=0x%p, face_idx=%llu, elem_idx=%llu, vertex_indices=0x%p",
|
||||
f,
|
||||
(long long unsigned)face_idx,
|
||||
(long long unsigned)elem_idx,
|
||||
vertex_indices);
|
||||
const h5_loc_idx_t* indices = h5tpriv_get_loc_elem_vertex_indices (f, elem_idx);
|
||||
|
||||
h5_loc_idx_t idx;
|
||||
@@ -333,7 +379,12 @@ h5t_get_vertex_indices_of_tet (
|
||||
const h5_loc_id_t entity_id,
|
||||
h5_loc_idx_t* vertex_indices
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER3 (h5_loc_idx_t,
|
||||
"f=0x%p, entity_id=%llu, vertex_indices=0x%p",
|
||||
f,
|
||||
(long long unsigned)entity_id,
|
||||
vertex_indices);
|
||||
|
||||
const h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (entity_id);
|
||||
const h5_loc_idx_t* indices = h5tpriv_get_loc_elem_vertex_indices (
|
||||
f, elem_idx);
|
||||
|
||||
@@ -3,22 +3,6 @@
|
||||
#include "h5core/h5_core.h"
|
||||
#include "h5_core_private.h"
|
||||
|
||||
static struct h5t_methods tet_funcs = {
|
||||
&h5tpriv_read_tetm_methods,
|
||||
&h5tpriv_tetm_store_methods,
|
||||
&h5tpriv_tetm_retrieve_methods,
|
||||
&h5tpriv_access_tetm_methods,
|
||||
&h5tpriv_tetm_adjacency_methods
|
||||
};
|
||||
|
||||
static struct h5t_methods tri_funcs = {
|
||||
&h5tpriv_read_trim_methods,
|
||||
&h5tpriv_trim_store_methods,
|
||||
&h5tpriv_trim_retrieve_methods,
|
||||
&h5tpriv_access_trim_methods,
|
||||
&h5tpriv_trim_adjacency_methods
|
||||
};
|
||||
|
||||
/*
|
||||
create several HDF5 types
|
||||
*/
|
||||
@@ -206,7 +190,6 @@ init_fdata (
|
||||
h5t_fdata_t* t = f->t;
|
||||
|
||||
memset (t->mesh_name, 0, sizeof (t->mesh_name));
|
||||
memset (t->mesh_label, 0, sizeof (t->mesh_label));
|
||||
t->mesh_type = 0;
|
||||
t->ref_elem = NULL;
|
||||
t->cur_mesh = -1;
|
||||
@@ -322,7 +305,7 @@ h5_err_t
|
||||
h5tpriv_open_file (
|
||||
h5_file_t* const f /*!< IN: file handle */
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
TRY (f->t = h5_calloc (1, sizeof (*f->t)));
|
||||
h5t_fdata_t* t = f->t;
|
||||
|
||||
@@ -343,7 +326,7 @@ h5_err_t
|
||||
h5tpriv_init_step (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
UNUSED_ARGUMENT (f);
|
||||
H5_PRIV_API_RETURN (H5_SUCCESS);
|
||||
}
|
||||
@@ -357,129 +340,20 @@ h5_err_t
|
||||
h5tpriv_close_step (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
UNUSED_ARGUMENT (f);
|
||||
H5_PRIV_API_RETURN (H5_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
h5_err_t
|
||||
h5tpriv_open_topo_group (
|
||||
h5_file_t * const f
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
h5t_fdata_t* t = f->t;
|
||||
if (t->topo_gid == 0 || t->topo_gid == -1) {
|
||||
TRY (t->topo_gid = h5priv_open_group (f, f->root_gid, H5T_CONTAINER_GRPNAME));
|
||||
}
|
||||
H5_PRIV_API_RETURN (t->topo_gid);
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
h5tpriv_open_meshes_group (
|
||||
h5_file_t* const f,
|
||||
const h5_oid_t type_id
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
h5t_fdata_t* t = f->t;
|
||||
|
||||
if (t->topo_gid < 0) {
|
||||
TRY (h5tpriv_open_topo_group (f));
|
||||
}
|
||||
TRY (t->meshes_gid = h5priv_open_group (
|
||||
f,
|
||||
t->topo_gid,
|
||||
h5tpriv_meshes_grpnames[type_id]));
|
||||
t->mesh_type = type_id;
|
||||
|
||||
H5_PRIV_API_RETURN (H5_SUCCESS);
|
||||
}
|
||||
|
||||
/*
|
||||
Open HDF5 group with specific mesh
|
||||
*/
|
||||
|
||||
h5_err_t
|
||||
h5tpriv_open_mesh_group (
|
||||
h5_file_t* const f,
|
||||
const h5_oid_t type_id,
|
||||
const h5_id_t id
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
h5t_fdata_t* t = f->t;
|
||||
|
||||
if (t->meshes_gid < 0) {
|
||||
TRY (h5tpriv_open_meshes_group (f, type_id));
|
||||
}
|
||||
snprintf (t->mesh_name, sizeof (t->mesh_name), "%lld", (long long)id);
|
||||
|
||||
TRY (t->mesh_gid = h5priv_open_group (
|
||||
f,
|
||||
t->meshes_gid,
|
||||
t->mesh_name));
|
||||
t->cur_mesh = id;
|
||||
H5_PRIV_API_RETURN (H5_SUCCESS);
|
||||
}
|
||||
|
||||
/*
|
||||
If the value of parameter \c id is \c -1, a new mesh will be appended.
|
||||
*/
|
||||
h5_err_t
|
||||
h5t_open_mesh (
|
||||
h5_file_t* const f,
|
||||
h5_id_t id,
|
||||
const h5_oid_t type_id
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
h5t_fdata_t* t = f->t;
|
||||
|
||||
TRY (h5t_close_mesh (f));
|
||||
|
||||
if (t->num_meshes < 0) {
|
||||
h5_size_t result = h5t_get_num_meshes (f, type_id);
|
||||
t->num_meshes = (result > 0 ? result : 0);
|
||||
}
|
||||
if ((id < -1) || (id >= t->num_meshes)) {
|
||||
H5_CORE_API_LEAVE (HANDLE_H5_OUT_OF_RANGE_ERR ("mesh", id));
|
||||
}
|
||||
if (id == -1) { /* append new mesh */
|
||||
id = t->num_meshes;
|
||||
}
|
||||
switch (type_id) {
|
||||
case H5_OID_TETRAHEDRON:
|
||||
t->dsinfo_elems.type_id = t->dtypes.h5_tet_t;
|
||||
t->methods = tet_funcs;
|
||||
t->ref_elem = &h5t_tet_ref_elem;
|
||||
break;
|
||||
case H5_OID_TRIANGLE:
|
||||
t->dsinfo_elems.type_id = t->dtypes.h5_triangle_t;
|
||||
t->methods = tri_funcs;
|
||||
t->ref_elem = &h5t_tri_ref_elem;
|
||||
break;
|
||||
default:
|
||||
H5_CORE_API_LEAVE (
|
||||
h5_error_internal ());
|
||||
}
|
||||
|
||||
TRY (h5tpriv_open_mesh_group (f, type_id, id));
|
||||
|
||||
if (id != t->num_meshes) { /* open existing */
|
||||
TRY (h5tpriv_read_mesh (f));
|
||||
|
||||
} else { /* append new */
|
||||
t->num_meshes++;
|
||||
t->mesh_changed = id;
|
||||
t->num_leaf_levels = 0;
|
||||
}
|
||||
|
||||
H5_CORE_API_RETURN (H5_SUCCESS);
|
||||
}
|
||||
|
||||
static h5_err_t
|
||||
release_elems (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
h5t_fdata_t* t = f->t;
|
||||
TRY( h5_free (t->loc_elems.data) );
|
||||
t->loc_elems.data = NULL;
|
||||
@@ -497,7 +371,7 @@ static h5_err_t
|
||||
release_vertices (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
h5t_fdata_t* t = f->t;
|
||||
TRY( h5_free (t->vertices) );
|
||||
t->vertices = NULL;
|
||||
@@ -513,7 +387,7 @@ static h5_err_t
|
||||
release_memory (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
TRY( h5tpriv_release_tags (f) );
|
||||
TRY( h5tpriv_release_adjacency_structs (f) );
|
||||
TRY( release_elems (f) );
|
||||
@@ -525,7 +399,7 @@ h5_err_t
|
||||
h5t_close_mesh (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
if (!(f->mode & H5_O_RDONLY)) {
|
||||
TRY (h5tpriv_write_mesh (f));
|
||||
}
|
||||
@@ -543,7 +417,7 @@ h5t_set_level (
|
||||
h5_file_t* const f,
|
||||
const h5t_lvl_idx_t level_id
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER2 (h5_err_t, "f=0x%p, level_id=%d", f, level_id);
|
||||
h5t_fdata_t* t = f->t;
|
||||
|
||||
if ((level_id < 0) || (level_id >= t->num_leaf_levels))
|
||||
@@ -566,12 +440,15 @@ h5tpriv_alloc_num_vertices (
|
||||
h5_file_t* const f,
|
||||
const h5_size_t num
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER2 (h5_err_t,
|
||||
"f=0x%p, num=%llu",
|
||||
f,
|
||||
(long long unsigned)num);
|
||||
h5t_fdata_t* t = f->t;
|
||||
ssize_t size = num * sizeof (t->vertices[0]);
|
||||
TRY (t->vertices = h5_alloc (t->vertices, size));
|
||||
TRY (h5priv_alloc_idxmap (&t->map_vertex_g2l, num));
|
||||
H5_CORE_API_RETURN (H5_SUCCESS);
|
||||
H5_PRIV_API_RETURN (H5_SUCCESS);
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -588,8 +465,8 @@ h5_err_t
|
||||
h5tpriv_close_file (
|
||||
h5_file_t* const f /*!< IN: file handle */
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
TRY (h5t_close_mesh (f));
|
||||
TRY (hdf5_close_group (f->t->meshes_gid));
|
||||
H5_CORE_API_RETURN (H5_SUCCESS);
|
||||
H5_PRIV_API_RETURN (H5_SUCCESS);
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef __H5T_OPENCLOSE_PRIVATE_H
|
||||
#define __H5T_OPENCLOSE_PRIVATE_H
|
||||
#ifndef __H5T_MODEL_PRIVATE_H
|
||||
#define __H5T_MODEL_PRIVATE_H
|
||||
|
||||
h5_err_t
|
||||
h5tpriv_open_file (
|
||||
@@ -10,21 +10,6 @@ h5tpriv_close_file (
|
||||
h5_file_t * const f
|
||||
);
|
||||
h5_err_t
|
||||
h5tpriv_open_topo_group (
|
||||
h5_file_t * const f
|
||||
);
|
||||
h5_err_t
|
||||
h5tpriv_open_meshes_group (
|
||||
h5_file_t * const f,
|
||||
const h5_oid_t
|
||||
);
|
||||
h5_err_t
|
||||
h5tpriv_open_mesh_group (
|
||||
h5_file_t * const f,
|
||||
const h5_oid_t,
|
||||
const h5_id_t
|
||||
);
|
||||
h5_err_t
|
||||
h5tpriv_close_step (
|
||||
h5_file_t * const f
|
||||
);
|
||||
@@ -0,0 +1,107 @@
|
||||
#include "h5core/h5_core.h"
|
||||
#include "h5_core_private.h"
|
||||
|
||||
static struct h5t_methods tet_funcs = {
|
||||
&h5tpriv_read_tetm_methods,
|
||||
&h5tpriv_tetm_store_methods,
|
||||
&h5tpriv_tetm_retrieve_methods,
|
||||
&h5tpriv_access_tetm_methods,
|
||||
&h5tpriv_tetm_adjacency_methods
|
||||
};
|
||||
|
||||
static inline h5_err_t
|
||||
open_tetmeshes_group (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
h5t_fdata_t* t = f->t;
|
||||
|
||||
if (t->topo_gid == 0 || t->topo_gid == -1) {
|
||||
TRY (t->topo_gid = h5priv_open_group (
|
||||
f, f->root_gid, H5T_CONTAINER_GRPNAME));
|
||||
}
|
||||
TRY (t->meshes_gid = h5priv_open_group (
|
||||
f,
|
||||
t->topo_gid,
|
||||
TETRAHEDRAL_MESHES_GRPNAME));
|
||||
t->mesh_type = H5_OID_TETRAHEDRON;
|
||||
H5_PRIV_FUNC_RETURN (H5_SUCCESS);
|
||||
}
|
||||
|
||||
static inline h5_err_t
|
||||
open_tetmesh_group (
|
||||
h5_file_t* const f,
|
||||
const h5_id_t id
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
h5t_fdata_t* t = f->t;
|
||||
|
||||
if (t->meshes_gid < 0) {
|
||||
TRY (open_tetmeshes_group (f));
|
||||
}
|
||||
snprintf (t->mesh_name, sizeof (t->mesh_name), "%lld", (long long)id);
|
||||
|
||||
TRY (t->mesh_gid = h5priv_open_group (
|
||||
f,
|
||||
t->meshes_gid,
|
||||
t->mesh_name));
|
||||
t->cur_mesh = id;
|
||||
H5_PRIV_API_RETURN (H5_SUCCESS);
|
||||
}
|
||||
|
||||
/*
|
||||
If the value of parameter \c id is \c -1, a new mesh will be appended.
|
||||
*/
|
||||
h5_err_t
|
||||
h5t_open_tetrahedral_mesh (
|
||||
h5_file_t* const f,
|
||||
h5_id_t id
|
||||
) {
|
||||
H5_CORE_API_ENTER2 (h5_err_t, "f=0x%p, id=%lld", f, (long long)id);
|
||||
h5t_fdata_t* t = f->t;
|
||||
|
||||
TRY (h5t_close_mesh (f));
|
||||
|
||||
if (t->num_meshes < 0) {
|
||||
h5_size_t result = h5t_get_num_tetmeshes (f);
|
||||
t->num_meshes = (result > 0 ? result : 0);
|
||||
}
|
||||
if ((id < -1) || (id >= t->num_meshes)) {
|
||||
H5_CORE_API_LEAVE (HANDLE_H5_OUT_OF_RANGE_ERR ("mesh", id));
|
||||
}
|
||||
t->dsinfo_elems.type_id = t->dtypes.h5_tet_t;
|
||||
t->methods = tet_funcs;
|
||||
t->ref_elem = &h5t_tet_ref_elem;
|
||||
|
||||
if (id == -1) { // add new
|
||||
id = 0;
|
||||
t->num_meshes = 1;
|
||||
t->cur_mesh = 0;
|
||||
t->mesh_changed = 0;
|
||||
t->leaf_level = 0;
|
||||
t->num_leaf_levels = 0;
|
||||
TRY (open_tetmesh_group (f, id));
|
||||
} else { // read existing
|
||||
TRY (open_tetmesh_group (f, id));
|
||||
TRY (h5tpriv_read_mesh (f));
|
||||
t->leaf_level = 0;
|
||||
}
|
||||
H5_CORE_API_RETURN (H5_SUCCESS);
|
||||
}
|
||||
|
||||
/*!
|
||||
Add new mesh
|
||||
|
||||
\return mesh id
|
||||
*/
|
||||
h5_id_t
|
||||
h5t_add_tetrahedral_mesh (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_CORE_API_ENTER1 (h5_id_t, "f=0x%p", f);
|
||||
h5_id_t mesh_id = 0;
|
||||
TRY (mesh_id = h5t_open_tetrahedral_mesh (f, -1));
|
||||
TRY (h5t_add_level (f));
|
||||
f->t->mesh_changed = 1;
|
||||
H5_CORE_API_RETURN (mesh_id);
|
||||
}
|
||||
@@ -0,0 +1,167 @@
|
||||
#include "h5core/h5_core.h"
|
||||
#include "h5_core_private.h"
|
||||
|
||||
static struct h5t_methods tri_funcs = {
|
||||
&h5tpriv_read_trim_methods,
|
||||
&h5tpriv_trim_store_methods,
|
||||
&h5tpriv_trim_retrieve_methods,
|
||||
&h5tpriv_access_trim_methods,
|
||||
&h5tpriv_trim_adjacency_methods
|
||||
};
|
||||
|
||||
/*
|
||||
Open container of triangle meshes
|
||||
*/
|
||||
static inline h5_err_t
|
||||
open_trimeshes_group (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
h5t_fdata_t* t = f->t;
|
||||
|
||||
if (t->topo_gid == 0 || t->topo_gid == -1) {
|
||||
TRY (t->topo_gid = h5priv_open_group (
|
||||
f, f->root_gid, H5T_CONTAINER_GRPNAME));
|
||||
}
|
||||
TRY (t->meshes_gid = h5priv_open_group (
|
||||
f,
|
||||
t->topo_gid,
|
||||
TRIANGLE_MESHES_GRPNAME));
|
||||
t->mesh_type = H5_OID_TRIANGLE;
|
||||
H5_PRIV_FUNC_RETURN (H5_SUCCESS);
|
||||
}
|
||||
|
||||
/*
|
||||
Open container of specific triangle mesh
|
||||
*/
|
||||
static inline h5_err_t
|
||||
open_trimesh_group (
|
||||
h5_file_t* const f,
|
||||
const h5_id_t id
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
h5t_fdata_t* t = f->t;
|
||||
|
||||
if (t->meshes_gid < 0) {
|
||||
TRY (open_trimeshes_group (f));
|
||||
}
|
||||
snprintf (t->mesh_name, sizeof (t->mesh_name), "%lld", (long long)id);
|
||||
|
||||
TRY (t->mesh_gid = h5priv_open_group (
|
||||
f,
|
||||
t->meshes_gid,
|
||||
t->mesh_name));
|
||||
t->cur_mesh = id;
|
||||
H5_PRIV_API_RETURN (H5_SUCCESS);
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
h5t_open_triangle_mesh (
|
||||
h5_file_t* const f,
|
||||
h5_id_t id
|
||||
) {
|
||||
H5_CORE_API_ENTER2 (h5_err_t, "f=0x%p, id=%lld", f, (long long)id);
|
||||
h5t_fdata_t* t = f->t;
|
||||
|
||||
TRY (h5t_close_mesh (f));
|
||||
|
||||
if (t->num_meshes < 0) {
|
||||
h5_size_t result = h5t_get_num_trimeshes (f);
|
||||
t->num_meshes = (result > 0 ? result : 0);
|
||||
}
|
||||
if ((id < -1) || (id >= t->num_meshes)) {
|
||||
H5_CORE_API_LEAVE (HANDLE_H5_OUT_OF_RANGE_ERR ("mesh", id));
|
||||
}
|
||||
t->dsinfo_elems.type_id = t->dtypes.h5_triangle_t;
|
||||
t->methods = tri_funcs;
|
||||
t->ref_elem = &h5t_tri_ref_elem;
|
||||
|
||||
if (id == -1) { // add new
|
||||
id = 0;
|
||||
t->num_meshes = 1;
|
||||
t->cur_mesh = 0;
|
||||
t->mesh_changed = 0;
|
||||
t->leaf_level = 0;
|
||||
t->num_leaf_levels = 0;
|
||||
TRY (open_trimesh_group (f, 0));
|
||||
} else { // read existing
|
||||
TRY (open_trimesh_group (f, 0));
|
||||
TRY (h5tpriv_read_mesh (f));
|
||||
t->leaf_level = 0;
|
||||
}
|
||||
H5_CORE_API_RETURN (H5_SUCCESS);
|
||||
}
|
||||
|
||||
#if 0
|
||||
/*
|
||||
open HDF5 group with data of specific mesh.
|
||||
*/
|
||||
static inline h5_err_t
|
||||
open_trimesh_group_by_name (
|
||||
h5_file_t* const f,
|
||||
const char* mesh_name
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
h5t_fdata_t* t = f->t;
|
||||
|
||||
if (t->meshes_gid < 0) {
|
||||
TRY (open_trimeshes_group (f));
|
||||
}
|
||||
strncpy (t->mesh_name, mesh_name, sizeof (t->mesh_name));
|
||||
|
||||
TRY (t->mesh_gid = h5priv_open_group (
|
||||
f,
|
||||
t->meshes_gid,
|
||||
t->mesh_name));
|
||||
t->cur_mesh = id;
|
||||
H5_PRIV_API_RETURN (H5_SUCCESS);
|
||||
}
|
||||
|
||||
/*
|
||||
open existing triangle mesh given by \c name.
|
||||
*/
|
||||
h5_err_t
|
||||
h5t_open_triangle_mesh_by_name (
|
||||
h5_file_t* const f,
|
||||
const* char name
|
||||
) {
|
||||
H5_CORE_API_ENTER2 (h5_err_t, "f=0x%p, name=%s", f, name);
|
||||
h5t_fdata_t* t = f->t;
|
||||
|
||||
TRY (h5t_close_mesh (f));
|
||||
|
||||
|
||||
|
||||
t->dsinfo_elems.type_id = t->dtypes.h5_triangle_t;
|
||||
t->methods = tri_funcs;
|
||||
t->ref_elem = &h5t_tri_ref_elem;
|
||||
TRY (open_trimesh_group (f, id));
|
||||
|
||||
if (id == -1) { // add new
|
||||
id = t->num_meshes;
|
||||
t->num_meshes++;
|
||||
t->mesh_changed = id;
|
||||
t->num_leaf_levels = 0;
|
||||
} else { // read existing
|
||||
TRY (h5tpriv_read_mesh (f));
|
||||
}
|
||||
H5_CORE_API_RETURN (H5_SUCCESS);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*!
|
||||
Add new mesh
|
||||
|
||||
\return mesh id
|
||||
*/
|
||||
h5_id_t
|
||||
h5t_add_triangle_mesh (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_CORE_API_ENTER1 (h5_id_t, "f=0x%p", f);
|
||||
h5_id_t mesh_id = 0;
|
||||
TRY (mesh_id = h5t_open_triangle_mesh (f, -1));
|
||||
TRY (h5t_add_level (f));
|
||||
f->t->mesh_changed = 1;
|
||||
H5_CORE_API_RETURN (mesh_id);
|
||||
}
|
||||
@@ -94,7 +94,7 @@ h5_err_t
|
||||
h5tpriv_write_mesh (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
h5t_fdata_t* t = f->t;
|
||||
if (t->mesh_changed) {
|
||||
TRY (write_vertices (f));
|
||||
@@ -108,7 +108,7 @@ h5tpriv_write_mesh (
|
||||
}
|
||||
|
||||
static h5_ssize_t
|
||||
read_num_leaf_levels (
|
||||
get_num_leaf_levels (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
h5t_fdata_t* t = f->t;
|
||||
@@ -116,14 +116,15 @@ read_num_leaf_levels (
|
||||
hid_t diskspace_id;
|
||||
hssize_t size;
|
||||
|
||||
H5_PRIV_FUNC_ENTER (h5_ssize_t);
|
||||
H5_PRIV_FUNC_ENTER1 (h5_ssize_t, "f=0x%p", f);
|
||||
if (t->cur_mesh < 0) {
|
||||
return h5tpriv_error_undef_mesh ();
|
||||
H5_PRIV_FUNC_LEAVE (h5tpriv_error_undef_mesh ());
|
||||
}
|
||||
TRY (dataset_id = hdf5_open_dataset (t->mesh_gid, "NumVertices") );
|
||||
TRY (diskspace_id = hdf5_get_dataset_space (dataset_id) );
|
||||
TRY (size = hdf5_get_npoints_of_dataspace (diskspace_id) );
|
||||
TRY (hdf5_close_dataspace (diskspace_id) );
|
||||
TRY (hdf5_close_dataset (dataset_id));
|
||||
|
||||
t->num_leaf_levels = size;
|
||||
H5_PRIV_FUNC_RETURN (size);
|
||||
@@ -272,12 +273,12 @@ h5_err_t
|
||||
h5tpriv_read_mesh (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
h5t_fdata_t* t = f->t;
|
||||
if (t->mesh_gid < 0) {
|
||||
H5_PRIV_API_LEAVE (h5_error_internal ());
|
||||
}
|
||||
TRY (read_num_leaf_levels (f));
|
||||
TRY (get_num_leaf_levels (f));
|
||||
TRY (read_num_vertices (f));
|
||||
|
||||
TRY (read_vertices (f));
|
||||
|
||||
@@ -199,7 +199,9 @@ h5t_init_leaf_iterator (
|
||||
h5t_iterator_t* iter,
|
||||
int codim
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER3 (h5_err_t,
|
||||
"f=0x%p, iter=0x%p, codim=%d",
|
||||
f, iter, codim);
|
||||
h5t_leaf_iterator_t* it = (h5t_leaf_iterator_t*)&iter->leaf;
|
||||
it->face_idx = 999;
|
||||
it->elem_idx = -1;
|
||||
@@ -222,7 +224,9 @@ h5t_init_boundary_face_iterator (
|
||||
h5t_iterator_t* iter,
|
||||
int codim
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER3 (h5_err_t,
|
||||
"f=0x%p, iter=0x%p, codim=%d",
|
||||
f, iter, codim);
|
||||
h5t_leaf_iterator_t* it = (h5t_leaf_iterator_t*)iter;
|
||||
it->face_idx = 999; // something > max number of faces
|
||||
it->elem_idx = -1;
|
||||
@@ -247,7 +251,9 @@ h5t_init_mtag_iterator (
|
||||
h5t_iterator_t* iter,
|
||||
const char* name
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER3 (h5_err_t,
|
||||
"f=0x%p, iter=0x%p, name=\"%s\"",
|
||||
f, iter, name);
|
||||
h5t_tag_iterator_t* it = (h5t_tag_iterator_t*)iter;
|
||||
TRY (h5t_open_mtagset (f, name, &it->tagset));
|
||||
it->elem_idx = -1;
|
||||
@@ -263,7 +269,7 @@ h5t_release_entity_iterator (
|
||||
h5t_iterator_t* iter
|
||||
) {
|
||||
UNUSED_ARGUMENT (f);
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
H5_CORE_API_RETURN (h5_free (iter));
|
||||
}
|
||||
|
||||
@@ -272,7 +278,7 @@ h5t_iterate_entities (
|
||||
h5_file_t* const f,
|
||||
h5t_iterator_t* iter
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_loc_id_t);
|
||||
H5_CORE_API_ENTER2 (h5_err_t, "f=0x%p, iter=0x%p", f, iter);
|
||||
h5t_generic_iterator_t* it = (h5t_generic_iterator_t*)iter;
|
||||
H5_CORE_API_RETURN (it->iter (f, iter));
|
||||
}
|
||||
@@ -283,7 +289,7 @@ h5t_end_iterate_entities (
|
||||
h5t_iterator_t* iter
|
||||
) {
|
||||
UNUSED_ARGUMENT (f);
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER2 (h5_err_t, "f=0x%p, iter=0x%p", f, iter);
|
||||
memset (iter, 0, sizeof(*iter));
|
||||
h5t_leaf_iterator_t* it = (h5t_leaf_iterator_t*)iter;
|
||||
it->face_idx = -1;
|
||||
@@ -298,7 +304,11 @@ h5t_get_vertex_coords_by_index (
|
||||
h5_loc_idx_t vertex_index,
|
||||
h5_float64_t P[3]
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER3 (h5_err_t,
|
||||
"f=0x%p, vertex_index=%llu, P=0x%p",
|
||||
f,
|
||||
(long long unsigned)vertex_index,
|
||||
P);
|
||||
h5_loc_vertex_t *vertex = &f->t->vertices[vertex_index];
|
||||
memcpy ( P, &vertex->P, sizeof ( vertex->P ) );
|
||||
H5_CORE_API_RETURN (H5_SUCCESS);
|
||||
@@ -310,7 +320,11 @@ h5t_get_vertex_coords_by_id (
|
||||
h5_loc_id_t vertex_id,
|
||||
h5_float64_t P[3]
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER3 (h5_err_t,
|
||||
"f=0x%p, vertex_id=%llu, P=0x%p",
|
||||
f,
|
||||
(long long unsigned)vertex_id,
|
||||
P);
|
||||
h5_loc_idx_t vertex_index;
|
||||
TRY (h5t_get_vertex_index_of_vertex (f, vertex_id, &vertex_index));
|
||||
TRY (h5t_get_vertex_coords_by_index (f, vertex_index, P));
|
||||
|
||||
+35
-84
@@ -3,27 +3,8 @@
|
||||
#include "h5core/h5_core.h"
|
||||
#include "h5_core_private.h"
|
||||
|
||||
/*!
|
||||
Add new mesh
|
||||
|
||||
\return mesh id
|
||||
*/
|
||||
h5_id_t
|
||||
h5t_add_mesh (
|
||||
h5_file_t* const f,
|
||||
const h5_oid_t mesh_type
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_id_t);
|
||||
h5_id_t mesh_id = 0;
|
||||
TRY (mesh_id = h5t_open_mesh (f, -1, mesh_type));
|
||||
TRY (h5t_add_level (f));
|
||||
f->t->mesh_changed = 1;
|
||||
H5_CORE_API_RETURN (mesh_id);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
* Assign unique global indices to vertices.
|
||||
Assign unique global indices to vertices.
|
||||
*/
|
||||
static h5_err_t
|
||||
assign_global_vertex_indices (
|
||||
@@ -76,7 +57,7 @@ h5t_lvl_idx_t
|
||||
h5t_add_level (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5t_lvl_idx_t);
|
||||
H5_CORE_API_ENTER1 (h5t_lvl_idx_t, "f=0x%p", f);
|
||||
h5t_fdata_t* const t = f->t;
|
||||
|
||||
if (f->mode == H5_O_RDONLY) {
|
||||
@@ -120,7 +101,9 @@ h5t_begin_store_vertices (
|
||||
h5_file_t* const f,
|
||||
const h5_size_t num
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER2 (h5_err_t,
|
||||
"f=0x%p, num=%llu",
|
||||
f, (long long unsigned)num);
|
||||
h5t_fdata_t* const t = f->t;
|
||||
|
||||
if (t->leaf_level < 0) {
|
||||
@@ -139,7 +122,11 @@ h5t_store_vertex (
|
||||
const h5_glb_idx_t glb_id, /*!< global vertex id from mesher or -1 */
|
||||
const h5_float64_t P[3] /*!< coordinates */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_loc_idx_t);
|
||||
H5_CORE_API_ENTER3 (h5_loc_idx_t,
|
||||
"f=0x%p, glb=id=%lld, P=0x%p",
|
||||
f,
|
||||
(long long)glb_id,
|
||||
P);
|
||||
h5t_fdata_t* const t = f->t;
|
||||
|
||||
/*
|
||||
@@ -147,7 +134,7 @@ h5t_store_vertex (
|
||||
*/
|
||||
if (t->last_stored_vid+1 >= t->num_vertices[t->leaf_level])
|
||||
H5_CORE_API_LEAVE (HANDLE_H5_OVERFLOW_ERR(
|
||||
"vertex", t->num_vertices[t->leaf_level]));
|
||||
t->num_vertices[t->leaf_level]));
|
||||
|
||||
/*
|
||||
missing call to add the first level
|
||||
@@ -166,7 +153,7 @@ h5_err_t
|
||||
h5t_end_store_vertices (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
h5t_fdata_t* const t = f->t;
|
||||
|
||||
t->num_vertices[t->leaf_level] = t->last_stored_vid+1;
|
||||
@@ -186,7 +173,9 @@ h5t_begin_store_elems (
|
||||
h5_file_t* const f,
|
||||
const h5_size_t num
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER2 (h5_err_t,
|
||||
"f=0x%p, num=%llu",
|
||||
f, (long long unsigned)num);
|
||||
h5t_fdata_t* const t = f->t;
|
||||
|
||||
size_t cur = t->leaf_level > 0 ? t->num_elems[t->leaf_level-1] : 0;
|
||||
@@ -221,7 +210,11 @@ h5t_store_elem (
|
||||
const h5_loc_idx_t parent_idx,
|
||||
const h5_loc_idx_t* vertex_indices
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_loc_idx_t);
|
||||
H5_CORE_API_ENTER3 (h5_loc_idx_t,
|
||||
"f=0x%p, parent_idx=%lld, vertex_indices=0x%p",
|
||||
f,
|
||||
(long long)parent_idx,
|
||||
vertex_indices);
|
||||
h5t_fdata_t* t = f->t;
|
||||
|
||||
/* level set? */
|
||||
@@ -232,9 +225,7 @@ h5t_store_elem (
|
||||
/* more than allocated? */
|
||||
if ( t->last_stored_eid+1 >= t->num_elems[t->leaf_level] )
|
||||
H5_CORE_API_LEAVE (
|
||||
HANDLE_H5_OVERFLOW_ERR(
|
||||
h5tpriv_map_oid2str(t->mesh_type),
|
||||
t->num_elems[t->leaf_level]));
|
||||
HANDLE_H5_OVERFLOW_ERR (t->num_elems[t->leaf_level]));
|
||||
|
||||
/* check parent id */
|
||||
if ((t->leaf_level == 0 && parent_idx != -1) ||
|
||||
@@ -243,8 +234,7 @@ h5t_store_elem (
|
||||
&& parent_idx >= t->num_elems[t->leaf_level-1])
|
||||
) {
|
||||
H5_CORE_API_LEAVE (
|
||||
HANDLE_H5_PARENT_ID_ERR (
|
||||
h5tpriv_map_oid2str (t->mesh_type), parent_idx));
|
||||
HANDLE_H5_PARENT_ID_ERR (parent_idx));
|
||||
}
|
||||
|
||||
/* store elem data (but neighbors) */
|
||||
@@ -275,7 +265,7 @@ h5_err_t
|
||||
h5t_end_store_elems (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
h5t_fdata_t* const t = f->t;
|
||||
|
||||
t->num_elems[t->leaf_level] = t->last_stored_eid+1;
|
||||
@@ -300,58 +290,18 @@ h5t_mark_entity (
|
||||
h5_file_t* const f,
|
||||
const h5_loc_id_t entity_id
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER2 (h5_err_t, "f=0x%p, entity_id=%llu",
|
||||
f, (long long unsigned)entity_id);
|
||||
h5t_fdata_t* const t = f->t;
|
||||
H5_CORE_API_RETURN (h5priv_insert_idlist (&t->marked_entities, entity_id, -1));
|
||||
}
|
||||
|
||||
/*
|
||||
When calling this function, we know the number of elements to refine. But
|
||||
we don't now the number of new vertices we will get. We have to compute
|
||||
this number or just to guess it.
|
||||
|
||||
Let n be the number of elements to refine and l the number of disconnected
|
||||
areas to be refined.
|
||||
|
||||
For triangle grids the upper limit of new vertices is 3n and the lower limit
|
||||
2n + 1. The exact number is 2n + l.
|
||||
|
||||
For tetrahedral grids the upper limit is 6n and the lower limit is 3n+3.
|
||||
The exact number is 3n + 3l.
|
||||
|
||||
To get the real number of vertices to add, we either have to compute the
|
||||
number of disconnected areas (which is quiet expensive), try to guess it
|
||||
(which is impossible) or just set a limit. In most cases the number of
|
||||
disconnected areas will be "small".
|
||||
|
||||
For the time being we set the maximum number of disconnected areas to 64.
|
||||
*/
|
||||
h5_err_t
|
||||
h5t_pre_refine (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
h5t_fdata_t* const t = f->t;
|
||||
unsigned int num_elems_to_refine = t->marked_entities->num_items;
|
||||
unsigned int num_elems_to_add = 0;
|
||||
unsigned int num_vertices_to_add = 0;
|
||||
|
||||
switch (t->mesh_type) {
|
||||
case H5_OID_TETRAHEDRON:
|
||||
num_vertices_to_add = num_elems_to_refine*3 + 192;
|
||||
num_elems_to_add = num_elems_to_refine*8;
|
||||
break;
|
||||
case H5_OID_TRIANGLE:
|
||||
num_vertices_to_add = num_elems_to_refine*2 + 64;
|
||||
num_elems_to_add = num_elems_to_refine*4;
|
||||
break;
|
||||
default:
|
||||
H5_CORE_API_LEAVE (h5_error_internal ());
|
||||
}
|
||||
TRY (h5t_begin_store_vertices (f, num_vertices_to_add));
|
||||
TRY (h5t_begin_store_elems (f, num_elems_to_add));
|
||||
|
||||
H5_CORE_API_RETURN (H5_SUCCESS);
|
||||
H5_CORE_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
H5_CORE_API_RETURN (f->t->methods.store->pre_refine (f));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -361,7 +311,7 @@ h5_err_t
|
||||
h5t_refine_marked_elems (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
h5t_fdata_t* const t = f->t;
|
||||
int i;
|
||||
for (i = 0; i < t->marked_entities->num_items; i++) {
|
||||
@@ -374,19 +324,18 @@ h5_err_t
|
||||
h5t_post_refine (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
h5t_fdata_t* const t = f->t;
|
||||
TRY (h5t_end_store_vertices (f));
|
||||
TRY (h5t_end_store_elems (f));
|
||||
H5_CORE_API_RETURN (h5priv_free_idlist (&t->marked_entities));
|
||||
}
|
||||
|
||||
|
||||
h5_err_t
|
||||
h5t_begin_refine_elems (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
h5t_fdata_t* const t = f->t;
|
||||
|
||||
/*
|
||||
@@ -397,23 +346,24 @@ h5t_begin_refine_elems (
|
||||
H5_CORE_API_RETURN (H5_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
h5_err_t
|
||||
h5t_end_refine_elems (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
TRY (h5t_pre_refine (f));
|
||||
TRY (h5t_refine_marked_elems (f));
|
||||
TRY (h5t_post_refine (f));
|
||||
H5_CORE_API_RETURN (H5_SUCCESS);
|
||||
}
|
||||
|
||||
#if 0
|
||||
// index set for DUNE
|
||||
h5_err_t
|
||||
h5t_create_index_set (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
int codim;
|
||||
int dim = h5tpriv_ref_elem_get_dim (f->t);
|
||||
// todo: check tagset already exist
|
||||
@@ -430,3 +380,4 @@ h5t_create_index_set (
|
||||
}
|
||||
H5_CORE_API_RETURN (H5_SUCCESS);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
struct h5t_store_methods {
|
||||
h5_err_t (*alloc_elems)(h5_file_t* const, const size_t, const size_t);
|
||||
h5_err_t (*pre_refine)(h5_file_t* const);
|
||||
h5_loc_idx_t (*refine_elem)(h5_file_t* const, const h5_loc_idx_t);
|
||||
h5_err_t (*end_store_elems)(h5_file_t* const);
|
||||
h5_err_t (*get_direct_children_of_edge)(
|
||||
|
||||
@@ -127,6 +127,38 @@ bisect_edge (
|
||||
H5_PRIV_FUNC_RETURN (h5t_store_vertex (f, -1, P)); // return idx of new vertex
|
||||
}
|
||||
|
||||
/*
|
||||
When calling this function, we know the number of elements to refine. But
|
||||
we don't now the number of new vertices we will get. We have to compute
|
||||
this number or just to guess it.
|
||||
|
||||
Let n be the number of elements to refine and l the number of disconnected
|
||||
areas to be refined.
|
||||
|
||||
For triangle grids the upper limit of new vertices is 3n and the lower limit
|
||||
2n + 1. The exact number is 2n + l.
|
||||
|
||||
For tetrahedral grids the upper limit is 6n and the lower limit is 3n+3.
|
||||
The exact number is 3n + 3l.
|
||||
|
||||
To get the real number of vertices to add, we either have to compute the
|
||||
number of disconnected areas (which is quiet expensive), try to guess it
|
||||
(which is impossible) or just set a limit. In most cases the number of
|
||||
disconnected areas will be "small".
|
||||
|
||||
For the time being we set the maximum number of disconnected areas to 64.
|
||||
*/
|
||||
static h5_err_t
|
||||
pre_refine_tet (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_CORE_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
unsigned int num_elems_to_refine = f->t->marked_entities->num_items;
|
||||
TRY (h5t_begin_store_vertices (f, num_elems_to_refine*3 + 192));
|
||||
TRY (h5t_begin_store_elems (f, num_elems_to_refine*8));
|
||||
H5_CORE_API_RETURN (H5_SUCCESS);
|
||||
}
|
||||
|
||||
/*!
|
||||
Refine tetrahedron \c elem_idx
|
||||
|
||||
@@ -311,6 +343,7 @@ end_store_elems (
|
||||
|
||||
struct h5t_store_methods h5tpriv_tetm_store_methods = {
|
||||
alloc_tets,
|
||||
pre_refine_tet,
|
||||
refine_tet,
|
||||
end_store_elems,
|
||||
get_direct_children_of_edge
|
||||
|
||||
@@ -120,6 +120,21 @@ bisect_edge (
|
||||
H5_PRIV_FUNC_RETURN (h5t_store_vertex (f, -1, P));
|
||||
}
|
||||
|
||||
/*
|
||||
Please read note about number of new vertices in tetrahedral
|
||||
mesh implementation.
|
||||
*/
|
||||
static h5_err_t
|
||||
pre_refine_triangle (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_CORE_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
unsigned int num_elems_to_refine = f->t->marked_entities->num_items;
|
||||
TRY (h5t_begin_store_vertices (f, num_elems_to_refine*2 + 64));
|
||||
TRY (h5t_begin_store_elems (f, num_elems_to_refine*4));
|
||||
H5_CORE_API_RETURN (H5_SUCCESS);
|
||||
}
|
||||
|
||||
/*!
|
||||
Refine triangle \c local_eid
|
||||
|
||||
@@ -271,6 +286,7 @@ end_store_elems (
|
||||
|
||||
struct h5t_store_methods h5tpriv_trim_store_methods = {
|
||||
alloc_triangles,
|
||||
pre_refine_triangle,
|
||||
refine_triangle,
|
||||
end_store_elems,
|
||||
get_direct_children_of_edge
|
||||
|
||||
+66
-18
@@ -82,7 +82,7 @@ h5_err_t
|
||||
h5tpriv_release_tags (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
h5t_fdata_t* t = f->t;
|
||||
TRY (release_container (&t->mtags));
|
||||
H5_PRIV_API_RETURN (H5_SUCCESS);
|
||||
@@ -105,7 +105,9 @@ h5t_mtagset_exists (
|
||||
h5t_tagcontainer_t* ctn,
|
||||
char* name
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER3 (h5_err_t,
|
||||
"f=0x%p, ctn=0x%p, name=\"%s\"",
|
||||
f, ctn, name);
|
||||
H5_CORE_API_RETURN (tagset_exists (&f->t->mtags, name));
|
||||
}
|
||||
|
||||
@@ -127,7 +129,11 @@ add_tagset (
|
||||
h5_id_t type,
|
||||
h5t_tagset_t** rtagset
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t);
|
||||
H5_PRIV_FUNC_ENTER5 (h5_err_t,
|
||||
"f=0x%p, ctn=0x%p, name=\"%s\", type=%llu, rtagset=0x%p",
|
||||
f, ctn, name,
|
||||
(long long unsigned)type,
|
||||
rtagset);
|
||||
h5t_fdata_t* t = f->t;
|
||||
|
||||
// Initialize data structure for m-tagsets, if not already done.
|
||||
@@ -187,7 +193,10 @@ h5t_add_mtagset (
|
||||
char* name,
|
||||
h5_id_t type
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER3 (h5_err_t,
|
||||
"f=0x%p, name=\"%s\", type=%llu",
|
||||
f, name,
|
||||
(long long unsigned)type);
|
||||
h5t_fdata_t* t = f->t;
|
||||
H5_CORE_API_RETURN (add_tagset (f, &t->mtags, name, type, NULL));
|
||||
}
|
||||
@@ -242,7 +251,9 @@ h5t_remove_mtagset (
|
||||
h5_file_t* const f,
|
||||
const char name[]
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER2 (h5_err_t,
|
||||
"f=0x%p, name=\"%s\"",
|
||||
f, name);
|
||||
h5t_fdata_t* t = f->t;
|
||||
TRY (t->mtags.group_id = h5priv_open_group (f, t->mesh_gid, "Tags"));
|
||||
TRY (remove_tagset (f, &t->mtags, name));
|
||||
@@ -254,7 +265,7 @@ h5_ssize_t
|
||||
h5t_get_num_mtagsets (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_ssize_t);
|
||||
H5_CORE_API_ENTER1 (h5_ssize_t, "f=0x%p", f);
|
||||
h5t_fdata_t* t = f->t;
|
||||
H5_CORE_API_RETURN (t->mtags.num_sets);
|
||||
}
|
||||
@@ -272,7 +283,7 @@ h5t_get_mtagsets (
|
||||
h5_file_t* const f,
|
||||
char** names[]
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_ssize_t);
|
||||
H5_CORE_API_ENTER2 (h5_ssize_t, "f=0x%p, names=0x%p", f, names);
|
||||
h5t_fdata_t* t = f->t;
|
||||
*names = t->mtags.names;
|
||||
H5_CORE_API_RETURN (t->mtags.num_sets);
|
||||
@@ -284,7 +295,9 @@ h5t_open_mtagset (
|
||||
const char* name,
|
||||
h5t_tagset_t** retval
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER3 (h5_ssize_t,
|
||||
"f=0x%p, name=\"%s\", retval=0x%p",
|
||||
f, name, retval);
|
||||
h5t_fdata_t* t = f->t;
|
||||
void* __retval = NULL;
|
||||
TRY (h5priv_hsearch (&name, H5_FIND, &__retval, &t->mtags.sets));
|
||||
@@ -305,7 +318,9 @@ h5t_get_mtagset_type_by_name (
|
||||
h5_file_t* const f,
|
||||
char* name
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_id_t);
|
||||
H5_CORE_API_ENTER2 (h5_ssize_t,
|
||||
"f=0x%p, name=\"%s\"",
|
||||
f, name);
|
||||
h5t_tagset_t* tagset;
|
||||
TRY (h5t_open_mtagset (f, name, &tagset));
|
||||
H5_CORE_API_RETURN (tagset->type);
|
||||
@@ -326,7 +341,9 @@ h5t_get_mtagset_info (
|
||||
char** name,
|
||||
h5_id_t* type
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_ssize_t);
|
||||
H5_CORE_API_ENTER4 (h5_ssize_t,
|
||||
"f=0x%p, idx=%lld, name=0x%p, type=0x%p",
|
||||
f, (long long)idx, name, type);
|
||||
h5t_fdata_t* t = f->t;
|
||||
*name = t->mtags.names[idx];
|
||||
void* __retval = NULL;
|
||||
@@ -655,7 +672,13 @@ h5t_set_mtag_by_name (
|
||||
const size_t dim,
|
||||
void* val
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER5 (h5_err_t,
|
||||
"f=0x%p, name=\"%s\", entity_id=%lld, dim=%llu, val=0x%p",
|
||||
f,
|
||||
name,
|
||||
(long long)entity_id,
|
||||
(long long unsigned)dim,
|
||||
val);
|
||||
h5t_tagset_t* tagset;
|
||||
TRY (h5t_open_mtagset (f, name, &tagset));
|
||||
h5_loc_idx_t face_id = h5tpriv_get_face_id (entity_id);
|
||||
@@ -681,7 +704,13 @@ h5t_get_tag (
|
||||
size_t* const dim,
|
||||
void* const vals
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_ssize_t);
|
||||
H5_CORE_API_ENTER5 (h5_err_t,
|
||||
"f=0x%p, tagset=0x%p, entity_id=%lld, dim=0x%p, val=0x%p",
|
||||
f,
|
||||
tagset,
|
||||
(long long)entity_id,
|
||||
dim,
|
||||
vals);
|
||||
h5_loc_idx_t face_id = h5tpriv_get_face_id (entity_id);
|
||||
h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (entity_id);
|
||||
H5_CORE_API_RETURN (get_tag (f, tagset, face_id, elem_idx, dim, vals));
|
||||
@@ -706,7 +735,13 @@ h5t_get_mtag_by_name (
|
||||
size_t* dim,
|
||||
void* vals
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_ssize_t);
|
||||
H5_CORE_API_ENTER5 (h5_err_t,
|
||||
"f=0x%p, name=\"%s\", entity_id=%lld, dim=0x%p, val=0x%p",
|
||||
f,
|
||||
name,
|
||||
(long long)entity_id,
|
||||
dim,
|
||||
vals);
|
||||
h5t_tagset_t* tagset;
|
||||
TRY (h5t_open_mtagset (f, name, &tagset));
|
||||
h5_loc_idx_t face_id = h5tpriv_get_face_id (entity_id);
|
||||
@@ -728,7 +763,11 @@ h5t_remove_mtag (
|
||||
const h5_loc_id_t entity_id
|
||||
) {
|
||||
UNUSED_ARGUMENT (f);
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER3 (h5_err_t,
|
||||
"f=0x%p, tagset=0x%p, entity_id=%lld",
|
||||
f,
|
||||
tagset,
|
||||
(long long)entity_id);
|
||||
h5_loc_idx_t face_id = h5tpriv_get_face_id (entity_id);
|
||||
h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (entity_id);
|
||||
H5_CORE_API_RETURN (remove_tag (tagset, face_id, elem_idx));
|
||||
@@ -747,7 +786,11 @@ h5t_remove_mtag_by_name (
|
||||
const char name[],
|
||||
const h5_loc_id_t entity_id
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER3 (h5_err_t,
|
||||
"f=0x%p, name=\"%s\", entity_id=%lld",
|
||||
f,
|
||||
name,
|
||||
(long long)entity_id);
|
||||
h5t_tagset_t* tagset;
|
||||
TRY (h5t_open_mtagset (f, name, &tagset));
|
||||
h5_loc_idx_t face_id = h5tpriv_get_face_id (entity_id);
|
||||
@@ -930,7 +973,7 @@ h5_err_t
|
||||
h5tpriv_write_mtags (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
h5t_fdata_t* t = f->t;
|
||||
TRY (t->mtags.group_id = h5priv_open_group (f, t->mesh_gid, "Tags"));
|
||||
TRY (write_container (f, &f->t->mtags));
|
||||
@@ -1043,7 +1086,7 @@ h5tpriv_read_tag_container (
|
||||
h5_file_t* const f,
|
||||
h5t_tagcontainer_t* ctn
|
||||
) {
|
||||
H5_PRIV_API_ENTER (h5_err_t);
|
||||
H5_PRIV_API_ENTER2 (h5_err_t, "f=0x%p, ctn=0x%p", f, ctn);
|
||||
size_t num_sets;
|
||||
TRY (num_sets = hdf5_get_num_objs_in_group (ctn->group_id));
|
||||
hsize_t idx;
|
||||
@@ -1118,7 +1161,12 @@ h5t_get_mtagset_names_of_entity (
|
||||
char* names[],
|
||||
const h5_size_t dim
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_ssize_t);
|
||||
H5_CORE_API_ENTER4 (h5_err_t,
|
||||
"f=0x%p, entity_id=%lld, names=0x%p, dim=%llu",
|
||||
f,
|
||||
(long long)entity_id,
|
||||
names,
|
||||
(long long unsigned)dim);
|
||||
H5_CORE_API_RETURN (
|
||||
get_tagset_names_of_entity (&f->t->mtags, entity_id, names, dim));
|
||||
}
|
||||
|
||||
@@ -118,8 +118,7 @@ typedef struct h5t_methods {
|
||||
|
||||
typedef struct h5t_fdata {
|
||||
/*** book-keeping ***/
|
||||
char mesh_name[16];
|
||||
char mesh_label[256];
|
||||
char mesh_name[256];
|
||||
h5_oid_t mesh_type; /* object id of element type */
|
||||
const h5t_ref_elem_t* ref_elem;
|
||||
h5_id_t cur_mesh; /* id of current mesh */
|
||||
|
||||
+41
-22
@@ -5,7 +5,7 @@ h5_ssize_t
|
||||
h5u_get_num_particles (
|
||||
h5_file_t *const f /*!< [in] Handle to open file */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_ssize_t);
|
||||
H5_CORE_API_ENTER1 (h5_ssize_t, "f=0x%p", f);
|
||||
h5_int64_t nparticles;
|
||||
|
||||
/* if a view exists, use its size as the number of particles */
|
||||
@@ -58,9 +58,11 @@ h5u_set_num_particles (
|
||||
const h5_size_t nparticles, /*!< [in] Number of particles */
|
||||
const h5_size_t stride /*!< [in] Stride of particles in memory */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER3 (h5_ssize_t,
|
||||
"f=0x%p, nparticles=%llu, stride=%llu",
|
||||
f, (long long unsigned)nparticles,
|
||||
(long long unsigned)stride);
|
||||
struct h5u_fdata *u = f->u;
|
||||
|
||||
hsize_t hstride;
|
||||
hsize_t count;
|
||||
hsize_t start;
|
||||
@@ -170,15 +172,15 @@ h5_err_t
|
||||
h5u_has_view (
|
||||
const h5_file_t *const f
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER1 (h5_ssize_t, "f=0x%p", f);
|
||||
H5_CORE_API_RETURN (f->u->viewindexed || (f->u->viewstart >= 0 && f->u->viewend >= 0));
|
||||
}
|
||||
|
||||
h5_err_t
|
||||
h5u_reset_view (
|
||||
h5_file_t *const f
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
) {
|
||||
H5_CORE_API_ENTER1 (h5_ssize_t, "f=0x%p", f);
|
||||
struct h5u_fdata *u = f->u;
|
||||
|
||||
u->viewstart = -1;
|
||||
@@ -198,7 +200,9 @@ h5u_set_view (
|
||||
h5_int64_t start, /*!< [in] Start particle */
|
||||
h5_int64_t end /*!< [in] End particle */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER3 (h5_ssize_t,
|
||||
"f=0x%p, start=%lld, end=%lld",
|
||||
f, (long long)start, (long long)end);
|
||||
hsize_t total;
|
||||
hsize_t stride = 1;
|
||||
hsize_t hstart;
|
||||
@@ -272,10 +276,12 @@ h5u_set_view (
|
||||
h5_err_t
|
||||
h5u_set_view_indices (
|
||||
h5_file_t *const f, /*!< [in] Handle to open file */
|
||||
const h5_id_t *const indices, /*!< [in] List of indices */
|
||||
const h5_size_t nelems /*!< [in] Size of list */
|
||||
const h5_size_t *const indices, /*!< [in] List of indices */
|
||||
h5_size_t nelems /*!< [in] Size of list */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER3 (h5_err_t,
|
||||
"f=0x%p, indices=0x%p, nelems=%llu",
|
||||
f, indices, (long long unsigned)nelems);
|
||||
hsize_t total;
|
||||
hsize_t dmax = H5S_UNLIMITED;
|
||||
struct h5u_fdata *u = f->u;
|
||||
@@ -294,7 +300,7 @@ h5u_set_view_indices (
|
||||
For now, we interpret start=-1 to mean 0 and
|
||||
end==-1 to mean end of file
|
||||
*/
|
||||
TRY ( total = (hsize_t) h5u_get_num_particles ( f ) );
|
||||
TRY ( total = h5u_get_num_particles ( f ) );
|
||||
if ( total == 0 ) {
|
||||
/* No datasets have been created yet and no veiws are set.
|
||||
* We have to leave the view empty because we don't know how
|
||||
@@ -304,19 +310,19 @@ h5u_set_view_indices (
|
||||
|
||||
if ( total == 0 ) return H5_SUCCESS;
|
||||
|
||||
u->nparticles = (hsize_t) nelems;
|
||||
u->nparticles = nelems;
|
||||
h5_debug ("This view selected %lld particles.", (long long)u->nparticles );
|
||||
|
||||
/* declare overall data size but then will select a subset */
|
||||
TRY (u->diskshape = hdf5_create_dataspace (1, &total, NULL));
|
||||
|
||||
/* declare local memory datasize */
|
||||
total = (size_t)u->nparticles;
|
||||
total = u->nparticles;
|
||||
TRY (u->memshape = hdf5_create_dataspace (1, &total, &dmax));
|
||||
TRY (hdf5_select_elements_of_dataspace (
|
||||
u->diskshape,
|
||||
H5S_SELECT_SET,
|
||||
nelems, (hsize_t*)indices ) );
|
||||
u->diskshape,
|
||||
H5S_SELECT_SET,
|
||||
(hsize_t)nelems, (hsize_t*)indices ) );
|
||||
|
||||
u->viewindexed = 1;
|
||||
|
||||
@@ -329,7 +335,9 @@ h5u_get_view (
|
||||
h5_int64_t *start,
|
||||
h5_int64_t *end
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER3 (h5_err_t,
|
||||
"f=0x%p, start=0x%p, end=0x%p",
|
||||
f, start, end);
|
||||
struct h5u_fdata *u = f->u;
|
||||
|
||||
if ( u->viewindexed ) {
|
||||
@@ -363,7 +371,7 @@ h5_int64_t
|
||||
h5u_set_canonical_view (
|
||||
h5_file_t *const f
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_int64_t);
|
||||
H5_CORE_API_ENTER1 (h5_int64_t, "f=0x%p", f);
|
||||
TRY( h5u_reset_view ( f ) );
|
||||
|
||||
h5_int64_t start = 0;
|
||||
@@ -402,7 +410,7 @@ h5_ssize_t
|
||||
h5u_get_num_datasets (
|
||||
h5_file_t *const f /*!< [in] Handle to open file */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_ssize_t);
|
||||
H5_CORE_API_ENTER1 (h5_int64_t, "f=0x%p", f);
|
||||
H5_CORE_API_RETURN (hdf5_get_num_datasets (f->step_gid));
|
||||
}
|
||||
|
||||
@@ -419,7 +427,16 @@ h5u_get_dataset_info (
|
||||
h5_int64_t *type, /*!< [out] Type of data in dataset */
|
||||
h5_size_t *nelem /*!< [out] Number of elements. */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER6 (h5_err_t,
|
||||
"f=0x%p, "
|
||||
"idx=%lld, "
|
||||
"dataset_name=\"%s\", len_dataset_name=%llu, "
|
||||
"type=0x%p, nelem=0x%p",
|
||||
f,
|
||||
(long long)idx,
|
||||
dataset_name,
|
||||
(long long unsigned)len_dataset_name,
|
||||
type, nelem);
|
||||
TRY (hdf5_get_name_of_dataset_by_idx (
|
||||
f->step_gid,
|
||||
idx,
|
||||
@@ -447,7 +464,7 @@ h5u_set_chunk (
|
||||
h5_file_t *const f,
|
||||
const h5_size_t size
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER2 (h5_int64_t, "f=0x%p, size=%llu", f, (long long unsigned)size);
|
||||
if ( size == 0 )
|
||||
{
|
||||
h5_info ("Disabling chunking" );
|
||||
@@ -468,7 +485,9 @@ h5u_get_chunk (
|
||||
const char *name, /*!< IN: name of dataset */
|
||||
h5_size_t *size /*!< OUT: chunk size in particles */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER3 (h5_int64_t,
|
||||
"f=0x%p, name=\"%s\", size=0x%p",
|
||||
f, name, size);
|
||||
hid_t dataset_id;
|
||||
hid_t plist_id;
|
||||
hsize_t hsize;
|
||||
|
||||
@@ -8,7 +8,9 @@ h5u_read_data (
|
||||
void *data, /*!< [out] Array of data */
|
||||
const hid_t type
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER4 (h5_err_t,
|
||||
"f=0x%p, name=\"%s\", data=0x%p, type=%d",
|
||||
f, name, data, type);
|
||||
CHECK_TIMEGROUP (f);
|
||||
|
||||
struct h5u_fdata *u = f->u;
|
||||
@@ -106,7 +108,9 @@ h5u_write_data (
|
||||
const void *data, /*!< IN: Array to commit to disk */
|
||||
const hid_t type /*!< IN: Type of data */
|
||||
) {
|
||||
H5_CORE_API_ENTER (h5_err_t);
|
||||
H5_CORE_API_ENTER4 (h5_err_t,
|
||||
"f=0x%p, name=\"%s\", data=0x%p, type=%d",
|
||||
f, name, data, type);
|
||||
CHECK_TIMEGROUP( f );
|
||||
CHECK_WRITABLE_MODE( f );
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ H5Block3dSetHalo (
|
||||
const h5_size_t k /*!< IN: radius in \c k */
|
||||
);
|
||||
|
||||
h5_size_t
|
||||
h5_ssize_t
|
||||
H5BlockGetNumFields (
|
||||
h5_file_t *const f /*!< IN: file handle */
|
||||
);
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
#ifndef __H5BLOCK_READWRITE_H
|
||||
#define __H5BLOCK_READWRITE_H
|
||||
|
||||
@@ -8,144 +7,144 @@ extern "C" {
|
||||
|
||||
h5_err_t
|
||||
H5Block3dWriteScalarFieldFloat64 (
|
||||
h5_file_t *f,
|
||||
h5_file_t *const f,
|
||||
const char *name,
|
||||
const h5_float64_t *data
|
||||
const h5_float64_t *buffer
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5Block3dReadScalarFieldFloat64 (
|
||||
h5_file_t *f,
|
||||
h5_file_t *const f,
|
||||
const char *name,
|
||||
h5_float64_t *data
|
||||
h5_float64_t *buffer
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5Block3dWriteVector3dFieldFloat64 (
|
||||
h5_file_t *f,
|
||||
h5_file_t *const f,
|
||||
const char *name,
|
||||
const h5_float64_t *x_data,
|
||||
const h5_float64_t *y_data,
|
||||
const h5_float64_t *z_data
|
||||
const h5_float64_t *x_buf,
|
||||
const h5_float64_t *y_buf,
|
||||
const h5_float64_t *z_buf
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5Block3dReadVector3dFieldFloat64 (
|
||||
h5_file_t *f,
|
||||
h5_file_t *const f,
|
||||
const char *name,
|
||||
h5_float64_t *x_data,
|
||||
h5_float64_t *y_data,
|
||||
h5_float64_t *z_data
|
||||
h5_float64_t *x_buf,
|
||||
h5_float64_t *y_buf,
|
||||
h5_float64_t *z_buf
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5Block3dWriteScalarFieldFloat32 (
|
||||
h5_file_t *f,
|
||||
h5_file_t *const f,
|
||||
const char *name,
|
||||
const h5_float32_t *data
|
||||
const h5_float32_t *buffer
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5Block3dReadScalarFieldFloat32 (
|
||||
h5_file_t *f,
|
||||
h5_file_t *const f,
|
||||
const char *name,
|
||||
h5_float32_t *data
|
||||
h5_float32_t *buffer
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5Block3dWriteVector3dFieldFloat32 (
|
||||
h5_file_t *f,
|
||||
h5_file_t *const f,
|
||||
const char *name,
|
||||
const h5_float32_t *x_data,
|
||||
const h5_float32_t *y_data,
|
||||
const h5_float32_t *z_data
|
||||
const h5_float32_t *x_buf,
|
||||
const h5_float32_t *y_buf,
|
||||
const h5_float32_t *z_buf
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5Block3dReadVector3dFieldFloat32 (
|
||||
h5_file_t *f,
|
||||
h5_file_t *const f,
|
||||
const char *name,
|
||||
h5_float32_t *x_data,
|
||||
h5_float32_t *y_data,
|
||||
h5_float32_t *z_data
|
||||
h5_float32_t *x_buf,
|
||||
h5_float32_t *y_buf,
|
||||
h5_float32_t *z_buf
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5Block3dWriteScalarFieldInt64 (
|
||||
h5_file_t *f,
|
||||
h5_file_t *const f,
|
||||
const char *name,
|
||||
const h5_int64_t *data
|
||||
const h5_int64_t *buffer
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5Block3dReadScalarFieldInt64 (
|
||||
h5_file_t *f,
|
||||
h5_file_t *const f,
|
||||
const char *name,
|
||||
h5_int64_t *data
|
||||
h5_int64_t *buffer
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5Block3dWriteVector3dFieldInt64 (
|
||||
h5_file_t *f,
|
||||
h5_file_t *const f,
|
||||
const char *name,
|
||||
const h5_int64_t *x_data,
|
||||
const h5_int64_t *y_data,
|
||||
const h5_int64_t *z_data
|
||||
const h5_int64_t *x_buf,
|
||||
const h5_int64_t *y_buf,
|
||||
const h5_int64_t *z_buf
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5Block3dReadVector3dFieldInt64 (
|
||||
h5_file_t *f,
|
||||
h5_file_t *const f,
|
||||
const char *name,
|
||||
h5_int64_t *x_data,
|
||||
h5_int64_t *y_data,
|
||||
h5_int64_t *z_data
|
||||
h5_int64_t *x_buf,
|
||||
h5_int64_t *y_buf,
|
||||
h5_int64_t *z_buf
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5Block3dWriteScalarFieldInt32 (
|
||||
h5_file_t *f,
|
||||
h5_file_t *const f,
|
||||
const char *name,
|
||||
const h5_int32_t *data
|
||||
const h5_int32_t *buffer
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5Block3dReadScalarFieldInt32 (
|
||||
h5_file_t *f,
|
||||
h5_file_t *const f,
|
||||
const char *name,
|
||||
h5_int32_t *data
|
||||
h5_int32_t *buffer
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5Block3dWriteVector3dFieldInt32 (
|
||||
h5_file_t *f,
|
||||
h5_file_t *const f,
|
||||
const char *name,
|
||||
const h5_int32_t *x_data,
|
||||
const h5_int32_t *y_data,
|
||||
const h5_int32_t *z_data
|
||||
const h5_int32_t *x_buf,
|
||||
const h5_int32_t *y_buf,
|
||||
const h5_int32_t *z_buf
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5Block3dReadVector3dFieldInt32 (
|
||||
h5_file_t *f,
|
||||
h5_file_t *const f,
|
||||
const char *name,
|
||||
h5_int32_t *x_data,
|
||||
h5_int32_t *y_data,
|
||||
h5_int32_t *z_data
|
||||
h5_int32_t *x_buf,
|
||||
h5_int32_t *y_buf,
|
||||
h5_int32_t *z_buf
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5BlockWriteFieldAttribFloat64 (
|
||||
h5_file_t *f,
|
||||
h5_file_t *const f,
|
||||
const char *field_name,
|
||||
const char *attrib_name,
|
||||
const h5_float64_t *values,
|
||||
const h5_size_t nvalues
|
||||
const h5_float64_t *buffer,
|
||||
const h5_size_t nelems
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5BlockReadFieldAttribFloat64 (
|
||||
h5_file_t *f,
|
||||
h5_file_t *const f,
|
||||
const char *field_name,
|
||||
const char *attrib_name,
|
||||
h5_float64_t *buffer
|
||||
@@ -153,16 +152,16 @@ H5BlockReadFieldAttribFloat64 (
|
||||
|
||||
h5_err_t
|
||||
H5BlockWriteFieldAttribFloat32 (
|
||||
h5_file_t *f,
|
||||
h5_file_t *const f,
|
||||
const char *field_name,
|
||||
const char *attrib_name,
|
||||
const h5_float32_t *values,
|
||||
const h5_size_t nvalues
|
||||
const h5_float32_t *buffer,
|
||||
const h5_size_t nelems
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5BlockReadFieldAttribFloat32 (
|
||||
h5_file_t *f,
|
||||
h5_file_t *const f,
|
||||
const char *field_name,
|
||||
const char *attrib_name,
|
||||
h5_float32_t *buffer
|
||||
@@ -170,16 +169,16 @@ H5BlockReadFieldAttribFloat32 (
|
||||
|
||||
h5_err_t
|
||||
H5BlockWriteFieldAttribInt64 (
|
||||
h5_file_t *f,
|
||||
h5_file_t *const f,
|
||||
const char *field_name,
|
||||
const char *attrib_name,
|
||||
const h5_int64_t *values,
|
||||
const h5_size_t nvalues
|
||||
const h5_int64_t *buffer,
|
||||
const h5_size_t nelems
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5BlockReadFieldAttribInt64 (
|
||||
h5_file_t *f,
|
||||
h5_file_t *const f,
|
||||
const char *field_name,
|
||||
const char *attrib_name,
|
||||
h5_int64_t *buffer
|
||||
@@ -187,16 +186,16 @@ H5BlockReadFieldAttribInt64 (
|
||||
|
||||
h5_err_t
|
||||
H5BlockWriteFieldAttribInt32 (
|
||||
h5_file_t *f,
|
||||
h5_file_t *const f,
|
||||
const char *field_name,
|
||||
const char *attrib_name,
|
||||
const h5_int32_t *values,
|
||||
const h5_size_t nvalues
|
||||
const h5_int32_t *buffer,
|
||||
const h5_size_t nelems
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5BlockReadFieldAttribInt32 (
|
||||
h5_file_t *f,
|
||||
h5_file_t *const f,
|
||||
const char *field_name,
|
||||
const char *attrib_name,
|
||||
h5_int32_t *buffer
|
||||
|
||||
+42
-22
@@ -31,29 +31,49 @@ extern "C" {
|
||||
|
||||
/****** General routines *****************************************************/
|
||||
|
||||
h5_err_t
|
||||
H5FedOpenMesh (
|
||||
h5_file_t * const f,
|
||||
const h5_id_t mesh_id,
|
||||
const h5_oid_t mesh_type_id
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5FedCloseMesh (
|
||||
h5_file_t * const f
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5FedSetLevel (
|
||||
h5_file_t * f,
|
||||
const h5t_lvl_idx_t level_id
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5FedLinkMeshToStep (
|
||||
h5_file_t * f,
|
||||
static inline h5_err_t
|
||||
H5FedOpenTetrahedralMesh (
|
||||
h5_file_t* const f,
|
||||
const h5_id_t mesh_id
|
||||
);
|
||||
) {
|
||||
H5_API_ENTER2 (h5_err_t, "f=0x%p, mesh_id=%lld", f, (long long)mesh_id);
|
||||
H5_API_RETURN (h5t_open_tetrahedral_mesh (f, mesh_id));
|
||||
}
|
||||
|
||||
static inline h5_err_t
|
||||
H5FedOpenTriangleMesh (
|
||||
h5_file_t* const f,
|
||||
const h5_id_t mesh_id
|
||||
) {
|
||||
H5_API_ENTER2 (h5_err_t, "f=0x%p, mesh_id=%lld", f, (long long)mesh_id);
|
||||
H5_API_RETURN (h5t_open_triangle_mesh (f, mesh_id));
|
||||
}
|
||||
|
||||
static inline h5_err_t
|
||||
H5FedCloseMesh (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
H5_API_RETURN (h5t_close_mesh (f));
|
||||
}
|
||||
|
||||
static inline h5_err_t
|
||||
H5FedSetLevel (
|
||||
h5_file_t* const f,
|
||||
const h5t_lvl_idx_t level_id
|
||||
) {
|
||||
H5_API_ENTER2 (h5_err_t, "f=0x%p, level_id=%d", f, level_id);
|
||||
H5_API_RETURN (h5t_set_level (f, level_id));
|
||||
}
|
||||
|
||||
static inline h5_err_t
|
||||
H5FedLinkMeshToStep (
|
||||
h5_file_t* const f,
|
||||
const h5_id_t mesh_id
|
||||
) {
|
||||
H5_API_ENTER2 (h5_err_t, "f=0x%p, mesh_id=%lld", f, (long long)mesh_id);
|
||||
H5_API_RETURN (h5_error_not_implemented ());
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -22,14 +22,37 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
h5_ssize_t H5FedGetNumMeshes ( h5_file_t * const f, const h5_oid_t type_id );
|
||||
/*!
|
||||
Get number of meshes of given type.
|
||||
|
||||
\param[in] f File handle
|
||||
\param[in] type_id Type of mesh we want the number of.
|
||||
|
||||
\return Number of meshes of type \c type_id or error code.
|
||||
*/
|
||||
static inline h5_ssize_t
|
||||
H5FedGetNumTetrahedralMeshes (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
H5_API_RETURN (h5t_get_num_tetmeshes (f));
|
||||
}
|
||||
|
||||
static inline h5_ssize_t
|
||||
H5FedGetNumTriangleMeshes (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_API_ENTER1 (h5_err_t, "f=0x%p", f);
|
||||
H5_API_RETURN (h5t_get_num_trimeshes (f));
|
||||
}
|
||||
|
||||
h5_ssize_t H5FedGetNumLevels ( h5_file_t * const f );
|
||||
h5t_lvl_idx_t H5FedGetLevel ( h5_file_t * const f );
|
||||
h5_ssize_t H5FedGetNumVertices ( h5_file_t * const f );
|
||||
h5_ssize_t H5FedGetNumVerticesCnode ( h5_file_t * const f, const h5_id_t cnode );
|
||||
h5_ssize_t H5FedGetNumVerticesCnode ( h5_file_t * const f, const int cnode );
|
||||
h5_ssize_t H5FedGetNumVerticesTotal ( h5_file_t * const f );
|
||||
h5_ssize_t H5FedGetNumElements ( h5_file_t * const f );
|
||||
h5_ssize_t H5FedGetNumElementsCnode ( h5_file_t * const f, const h5_id_t cnode );
|
||||
h5_ssize_t H5FedGetNumElementsCnode ( h5_file_t * const f, const int cnode );
|
||||
h5_ssize_t H5FedGetNumElementsTotal ( h5_file_t * const f );
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -23,11 +23,21 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
h5_id_t
|
||||
H5FedAddMesh (
|
||||
h5_file_t * const f,
|
||||
const h5_oid_t mesh_type_id
|
||||
);
|
||||
static inline h5_id_t
|
||||
H5FedAddTetrahedralMesh (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_API_ENTER1 (h5_id_t, "f=0x%p", f);
|
||||
H5_API_RETURN (h5t_add_tetrahedral_mesh (f));
|
||||
}
|
||||
|
||||
static inline h5_id_t
|
||||
H5FedAddTriangleMesh (
|
||||
h5_file_t* const f
|
||||
) {
|
||||
H5_API_ENTER1 (h5_id_t, "f=0x%p", f);
|
||||
H5_API_RETURN (h5t_add_triangle_mesh (f));
|
||||
}
|
||||
|
||||
h5t_lvl_idx_t
|
||||
H5FedAddLevel (
|
||||
|
||||
@@ -129,7 +129,7 @@ H5PartSetView (
|
||||
h5_err_t
|
||||
H5PartSetViewIndices (
|
||||
h5_file_t *f, /*!< [in] Handle to open file */
|
||||
const h5_id_t *indices, /*!< [in] List of indices */
|
||||
const h5_size_t *indices, /*!< [in] List of indices */
|
||||
h5_size_t nelems /*!< [in] Size of list */
|
||||
);
|
||||
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef __H5_ATTACH_H
|
||||
#define __H5_ATTACH_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
h5_err_t
|
||||
h5_add_attachment (
|
||||
h5_file_t* const f,
|
||||
@@ -39,5 +43,8 @@ h5_delete_attachment (
|
||||
h5_file_t* const f,
|
||||
const char* const name
|
||||
);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef __H5CORE_ATTRIBS_H
|
||||
#define __H5CORE_ATTRIBS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define H5_ATTRIB_FILE 0
|
||||
#define H5_ATTRIB_STEP 1
|
||||
#define H5_ATTRIB_FIELD 2
|
||||
@@ -41,4 +45,8 @@ h5_get_num_attribs (
|
||||
const char mode
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef __H5_CORE_H
|
||||
#define __H5_CORE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define UNUSED_ARGUMENT(x) (void)x
|
||||
|
||||
#define H5_DEBUG_USER (1<<2)
|
||||
@@ -48,6 +52,21 @@ extern char* h5_rfmts[];
|
||||
h5_debug ("(" fmt ")", a1, a2, a3, a4, a5); \
|
||||
}
|
||||
|
||||
#define __FUNC_ARGS6(fmt, a1, a2, a3, a4, a5, a6, mask) \
|
||||
if (h5_debug_level & mask ) { \
|
||||
h5_debug ("(" fmt ")", a1, a2, a3, a4, a5, a6); \
|
||||
}
|
||||
|
||||
#define __FUNC_ARGS7(fmt, a1, a2, a3, a4, a5, a6, a7, mask) \
|
||||
if (h5_debug_level & mask ) { \
|
||||
h5_debug ("(" fmt ")", a1, a2, a3, a4, a5, a6, a7); \
|
||||
}
|
||||
|
||||
#define __FUNC_ARGS8(fmt, a1, a2, a3, a4, a5, a6, a7, a8, mask) \
|
||||
if (h5_debug_level & mask ) { \
|
||||
h5_debug ("(" fmt ")", a1, a2, a3, a4, a5, a6, a7, a8); \
|
||||
}
|
||||
|
||||
#define __FUNC_ENTER0(type, mask) \
|
||||
__FUNC_ENTER(type); \
|
||||
__FUNC_ARGS0(mask);
|
||||
@@ -72,6 +91,18 @@ extern char* h5_rfmts[];
|
||||
__FUNC_ENTER(type); \
|
||||
__FUNC_ARGS5(fmt, a1, a2, a3, a4, a5, mask);
|
||||
|
||||
#define __FUNC_ENTER6(type, fmt, a1, a2, a3, a4, a5, a6, mask) \
|
||||
__FUNC_ENTER(type); \
|
||||
__FUNC_ARGS6(fmt, a1, a2, a3, a4, a5, a6, mask);
|
||||
|
||||
#define __FUNC_ENTER7(type, fmt, a1, a2, a3, a4, a5, a6, a7, mask) \
|
||||
__FUNC_ENTER(type); \
|
||||
__FUNC_ARGS7(fmt, a1, a2, a3, a4, a5, a6, a7, mask);
|
||||
|
||||
#define __FUNC_ENTER8(type, fmt, a1, a2, a3, a4, a5, a6, a7, a8, mask) \
|
||||
__FUNC_ENTER(type); \
|
||||
__FUNC_ARGS8(fmt, a1, a2, a3, a4, a5, a6, a7, a8, mask);
|
||||
|
||||
#define __FUNC_LEAVE(expr) { \
|
||||
ret_value = expr; \
|
||||
goto done; \
|
||||
@@ -91,32 +122,48 @@ done: \
|
||||
return ret_value;
|
||||
|
||||
|
||||
#define H5_API_ENTER(type) \
|
||||
#define H5_API_ENTER_(type) \
|
||||
if (!h5_initialized) { \
|
||||
h5_initialize(); \
|
||||
} \
|
||||
__FUNC_ENTER(type);
|
||||
|
||||
#define H5_API_ENTER0(type) \
|
||||
H5_API_ENTER_(type); \
|
||||
__FUNC_ARGS0(H5_DEBUG_API)
|
||||
|
||||
#define H5_API_ENTER1(type, fmt, a1) \
|
||||
H5_API_ENTER(type); \
|
||||
H5_API_ENTER_(type); \
|
||||
__FUNC_ARGS1(fmt, a1, H5_DEBUG_API)
|
||||
|
||||
#define H5_API_ENTER2(type, fmt, a1, a2) \
|
||||
H5_API_ENTER(type); \
|
||||
H5_API_ENTER_(type); \
|
||||
__FUNC_ARGS2(fmt, a1,a2, H5_DEBUG_API)
|
||||
|
||||
#define H5_API_ENTER3(type, fmt, a1, a2, a3) \
|
||||
H5_API_ENTER(type); \
|
||||
H5_API_ENTER_(type); \
|
||||
__FUNC_ARGS3(fmt, a1,a2,a3, H5_DEBUG_API)
|
||||
|
||||
#define H5_API_ENTER4(type, fmt, a1, a2, a3, a4) \
|
||||
H5_API_ENTER(type); \
|
||||
H5_API_ENTER_(type); \
|
||||
__FUNC_ARGS4(fmt, a1,a2,a3, a4, H5_DEBUG_API)
|
||||
|
||||
#define H5_API_ENTER5(type, fmt, a1, a2, a3, a4, a5) \
|
||||
H5_API_ENTER(type); \
|
||||
H5_API_ENTER_(type); \
|
||||
__FUNC_ARGS5(fmt, a1,a2,a3, a4, a5, H5_DEBUG_API)
|
||||
|
||||
#define H5_API_ENTER6(type, fmt, a1, a2, a3, a4, a5, a6) \
|
||||
H5_API_ENTER_(type); \
|
||||
__FUNC_ARGS6(fmt, a1,a2,a3, a4, a5, a6, H5_DEBUG_API)
|
||||
|
||||
#define H5_API_ENTER7(type, fmt, a1, a2, a3, a4, a5, a6, a7) \
|
||||
H5_API_ENTER_(type); \
|
||||
__FUNC_ARGS7(fmt, a1,a2,a3, a4, a5, a6, a7, H5_DEBUG_API)
|
||||
|
||||
#define H5_API_ENTER8(type, fmt, a1, a2, a3, a4, a5, a6, a7, a8) \
|
||||
H5_API_ENTER_(type); \
|
||||
__FUNC_ARGS8(fmt, a1,a2,a3, a4, a5, a6, a7, a8, H5_DEBUG_API)
|
||||
|
||||
#define H5_API_LEAVE(expr) __FUNC_LEAVE(expr)
|
||||
#define H5_API_RETURN(expr) __FUNC_RETURN(expr, H5_DEBUG_API);
|
||||
|
||||
@@ -140,6 +187,14 @@ done: \
|
||||
}
|
||||
#define ON_ERROR
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(PARALLEL_IO)
|
||||
#include <mpi.h>
|
||||
#endif
|
||||
|
||||
#include "h5_types.h"
|
||||
#include "h5_errno.h"
|
||||
|
||||
|
||||
@@ -11,13 +11,15 @@
|
||||
#define H5_ERR_BADFD -77
|
||||
|
||||
#define H5_ERR_LAYOUT -100
|
||||
#define H5_ERR_NOENT -101
|
||||
|
||||
#define H5_ERR_INIT -200
|
||||
#define H5_ERR_NOENTRY -201
|
||||
#define H5_ERR_NOENTRY -101
|
||||
|
||||
#define H5_ERR_MPI -201
|
||||
#define H5_ERR_HDF5 -202
|
||||
#define H5_ERR_H5 -203
|
||||
#define H5_ERR_H5PART -204
|
||||
#define H5_ERR_H5BLOCK -205
|
||||
#define H5_ERR_H5FED -206
|
||||
|
||||
#define H5_ERR_INTERNAL -253
|
||||
#define H5_ERR_NOT_IMPLEMENTED -254
|
||||
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum h5_rtypes {
|
||||
e_int = 0,
|
||||
e_ssize_t,
|
||||
@@ -287,9 +291,9 @@ h5_debug (
|
||||
...
|
||||
) {
|
||||
if (h5_debug_level >= 4) {
|
||||
char prefix[256];
|
||||
snprintf (prefix, sizeof(prefix), "(%d) %s",
|
||||
h5_call_stack_get_level(),
|
||||
char prefix[1024];
|
||||
snprintf (prefix, sizeof(prefix), "%*s %s",
|
||||
h5_call_stack_get_level(), "",
|
||||
h5_call_stack_get_name());
|
||||
va_list ap;
|
||||
va_start (ap, fmt);
|
||||
@@ -298,5 +302,8 @@ h5_debug (
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef __H5_HDF5_H
|
||||
#define __H5_HDF5_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
ssize_t
|
||||
hdf5_get_num_groups (
|
||||
const hid_t loc_id
|
||||
@@ -38,4 +42,8 @@ hdf5_get_objname (
|
||||
hid_t id
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef __H5_OPENCLOSE_H
|
||||
#define __H5_OPENCLOSE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
h5_file_t *
|
||||
h5_open_file (
|
||||
const char *filename,
|
||||
@@ -48,7 +52,7 @@ h5_get_hdf5_file(
|
||||
h5_file_t* const f
|
||||
);
|
||||
|
||||
h5_size_t
|
||||
h5_ssize_t
|
||||
h5_get_num_steps (
|
||||
h5_file_t* const f
|
||||
);
|
||||
@@ -85,5 +89,14 @@ h5_strc2for (
|
||||
char * const str,
|
||||
const ssize_t l_str
|
||||
);
|
||||
|
||||
|
||||
h5_file_t *
|
||||
h5_filehandlefor2c (
|
||||
const h5_int64_t *ptr
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef __H5_READWRITE_H
|
||||
#define __H5_READWRITE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
h5_int64_t
|
||||
h5_set_step (
|
||||
h5_file_t * const f,
|
||||
@@ -46,4 +50,8 @@ h5_end_throttle (
|
||||
h5_file_t *f
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef __H5_SYSCALL_H
|
||||
#define __H5_SYSCALL_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void*
|
||||
h5_alloc (
|
||||
void* ptr,
|
||||
@@ -17,4 +21,9 @@ h5_err_t
|
||||
h5_free (
|
||||
void* ptr
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
#include <hdf5.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
file modes:
|
||||
H5_O_RDONLY: only reading allowed
|
||||
@@ -99,4 +103,8 @@ typedef enum h5_oid h5_oid_t;
|
||||
#define H5_TRIANGLE_MESH (H5_OID_TRIANGLE)
|
||||
#define H5_TETRAHEDRAL_MESH (H5_OID_TETRAHEDRON)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef __H5B_ATTRIBS_H
|
||||
#define __H5B_ATTRIBS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
h5_err_t
|
||||
h5_write_field_attrib (
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
@@ -37,4 +41,8 @@ h5b_get_field_attrib_info (
|
||||
h5_size_t *attrib_nelem /*!< OUT: number of elements */
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef __H5B_MODEL_H
|
||||
#define __H5B_MODEL_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
h5_err_t
|
||||
h5bpriv_release_hyperslab (
|
||||
h5_file_t *const f /*!< IN: file handle */
|
||||
@@ -146,5 +150,8 @@ h5b_get_field_info (
|
||||
h5_int64_t *const type /*!< OUT: datatype */
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef __H5B_READWRITE_H
|
||||
#define __H5B_READWRITE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
h5_err_t
|
||||
h5b_write_scalar_data (
|
||||
h5_file_t *const f, /*!< IN: file handle */
|
||||
@@ -37,4 +41,8 @@ h5b_read_vector3d_data (
|
||||
const hid_t type /*!< IN: data type */
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef __H5T_ADJACENCIES_H
|
||||
#define __H5T_ADJACENCIES_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
h5_err_t
|
||||
h5t_get_adjacencies (
|
||||
h5_file_t * const f,
|
||||
@@ -23,4 +27,8 @@ h5t_find_te2 (
|
||||
h5_loc_idlist_t** retval
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "h5t_adjacencies.h"
|
||||
#include "h5t_inquiry.h"
|
||||
#include "h5t_map.h"
|
||||
#include "h5t_openclose.h"
|
||||
#include "h5t_model.h"
|
||||
#include "h5t_readwrite.h"
|
||||
#include "h5t_ref_elements.h"
|
||||
#include "h5t_retrieve.h"
|
||||
|
||||
@@ -1,10 +1,18 @@
|
||||
#ifndef __H5T_INQUIRY_H
|
||||
#define __H5T_INQUIRY_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
h5_ssize_t
|
||||
h5t_get_num_meshes (
|
||||
h5_file_t * const f,
|
||||
const enum h5_oid type
|
||||
h5t_get_num_tetmeshes (
|
||||
h5_file_t * const f
|
||||
);
|
||||
|
||||
h5_ssize_t
|
||||
h5t_get_num_trimeshes (
|
||||
h5_file_t * const f
|
||||
);
|
||||
|
||||
h5_ssize_t
|
||||
@@ -28,4 +36,9 @@ h5t_lvl_idx_t
|
||||
h5t_get_level (
|
||||
h5_file_t * const f
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef __H5T_MAP_H
|
||||
#define __H5T_MAP_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
h5_loc_idx_t
|
||||
h5t_map_global_vertex_idx2local (
|
||||
h5_file_t* const f,
|
||||
@@ -97,4 +101,8 @@ h5t_get_vertex_indices_of_entity2 (
|
||||
h5_loc_idx_t* vertex_indices
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
#ifndef __H5T_MODEL_H
|
||||
#define __H5T_MODEL_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
h5_err_t h5t_open_tetrahedral_mesh (
|
||||
h5_file_t * const f,
|
||||
const h5_id_t id
|
||||
);
|
||||
|
||||
h5_err_t h5t_open_triangle_mesh (
|
||||
h5_file_t * const f,
|
||||
const h5_id_t id
|
||||
);
|
||||
|
||||
h5_id_t
|
||||
h5t_add_tetrahedral_mesh (
|
||||
h5_file_t * const f
|
||||
);
|
||||
|
||||
h5_id_t
|
||||
h5t_add_triangle_mesh (
|
||||
h5_file_t * const f
|
||||
);
|
||||
|
||||
h5_err_t h5t_set_level (
|
||||
h5_file_t * const f,
|
||||
const h5t_lvl_idx_t id
|
||||
);
|
||||
h5_err_t h5t_close_mesh (
|
||||
h5_file_t * const f
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,17 +0,0 @@
|
||||
#ifndef __H5T_OPENCLOSE_H
|
||||
#define __H5T_OPENCLOSE_H
|
||||
|
||||
h5_err_t h5t_open_mesh (
|
||||
h5_file_t * const f,
|
||||
const h5_id_t id,
|
||||
const h5_oid_t type
|
||||
);
|
||||
h5_err_t h5t_set_level (
|
||||
h5_file_t * const f,
|
||||
const h5t_lvl_idx_t id
|
||||
);
|
||||
h5_err_t h5t_close_mesh (
|
||||
h5_file_t * const f
|
||||
);
|
||||
|
||||
#endif
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef __H5T_REFERENCE_ELEMENTS_H
|
||||
#define __H5T_REFERENCE_ELEMENTS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define H5T_MAX_DIM 3
|
||||
#define H5T_MAX_FACES 6 // edges in tetrahedron
|
||||
#define H5T_MAX_VERTICES 4 // tetrahedron
|
||||
@@ -18,4 +22,8 @@ typedef struct {
|
||||
extern const h5t_ref_elem_t h5t_tet_ref_elem;
|
||||
extern const h5t_ref_elem_t h5t_tri_ref_elem;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef __H5T_RETRIEVE_H
|
||||
#define __H5T_RETRIEVE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct h5t_tagset;
|
||||
union h5t_iterator;
|
||||
|
||||
@@ -100,4 +104,9 @@ h5t_get_vertex_coords_by_id (
|
||||
h5_loc_id_t vertex_id,
|
||||
h5_float64_t P[3]
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
#ifndef __H5T_STOREMESH_H
|
||||
#define __H5T_STOREMESH_H
|
||||
|
||||
h5_id_t
|
||||
h5t_add_mesh (
|
||||
h5_file_t * const f,
|
||||
const h5_oid_t mesh_type
|
||||
);
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
h5t_lvl_idx_t
|
||||
h5t_add_level (
|
||||
@@ -83,4 +81,9 @@ h5_err_t
|
||||
h5t_post_refine (
|
||||
h5_file_t* const f
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef __H5T_TAGS_H
|
||||
#define __H5T_TAGS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct h5t_tagset h5t_tagset_t;
|
||||
typedef struct h5t_tagcontainer h5t_tagcontainer_t;
|
||||
|
||||
@@ -97,4 +101,8 @@ h5t_get_mtagset_names_of_entity (
|
||||
const h5_size_t dim
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef __H5U_MODEL_H
|
||||
#define __H5U_MODEL_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
h5_ssize_t
|
||||
h5u_get_num_particles (
|
||||
h5_file_t *const f
|
||||
@@ -33,8 +37,8 @@ h5u_set_view (
|
||||
h5_err_t
|
||||
h5u_set_view_indices (
|
||||
h5_file_t *const f,
|
||||
const h5_id_t *const indices,
|
||||
const h5_size_t nelems
|
||||
const h5_size_t *const indices,
|
||||
h5_size_t nelems
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
@@ -77,5 +81,9 @@ h5u_get_chunk (
|
||||
h5_size_t *size
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef __H5U_READWRITE_H
|
||||
#define __H5U_READWRITE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
h5_int64_t
|
||||
h5u_read_data (
|
||||
h5_file_t *f,
|
||||
@@ -17,5 +21,9 @@ h5u_write_data (
|
||||
const hid_t type
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
+1
-12
@@ -2,15 +2,6 @@
|
||||
|
||||
OBJEXT = o
|
||||
|
||||
# COMPILER SETTING
|
||||
CC = @CC@
|
||||
CXX = @CXX@
|
||||
FC = @FC@
|
||||
|
||||
# COMPILER FLAG SETTING
|
||||
AM_CFLAGS = @CFLAGS@
|
||||
FFLAGS = @FFLAGS@
|
||||
|
||||
AM_LDFLAGS = -L../../src/lib @LDFLAGS@
|
||||
LIBS = -lH5hutC -lH5hut @LIBS@
|
||||
INCLUDES = -I../../src/include @INCLUDES@
|
||||
@@ -35,7 +26,7 @@ EXTRA_DIST = \
|
||||
tetmesh_adjacencies.c \
|
||||
tetmesh_read.c \
|
||||
tetmesh_read_tags.c \
|
||||
g tetmesh_write.c \
|
||||
tetmesh_write.c \
|
||||
tetmesh_write2.c \
|
||||
tetmesh_write_tags.c \
|
||||
trimesh_adjacencies.c \
|
||||
@@ -47,8 +38,6 @@ g tetmesh_write.c \
|
||||
# map_triangle2globalid.c \
|
||||
# $(bin_SCRIPTS)
|
||||
|
||||
all: $(noinst_PROGRAMS)
|
||||
|
||||
clean: clean-am
|
||||
rm -f *.h5
|
||||
|
||||
|
||||
@@ -433,7 +433,7 @@ traverse_mesh (
|
||||
) {
|
||||
/* open mesh and get number of levels */
|
||||
printf (" Opening mesh with id %lld\n", mesh_id);
|
||||
H5FedOpenMesh (f, mesh_id, mesh_type);
|
||||
H5FedOpenTetrahedralMesh (f, mesh_id);
|
||||
h5_size_t num_levels = H5FedGetNumLevels (f);
|
||||
printf (" Number of levels in mesh: %lld\n", (long long)num_levels);
|
||||
|
||||
@@ -459,7 +459,7 @@ main (
|
||||
|
||||
/* open file and get number of meshes */
|
||||
h5_file_t *f = H5OpenFile (FNAME, H5_O_RDONLY, 0);
|
||||
h5_size_t num_meshes = H5FedGetNumMeshes (f, MESH_TYPE);
|
||||
h5_size_t num_meshes = H5FedGetNumTetrahedralMeshes (f);
|
||||
printf (" Number of meshes: %lld\n", (long long)num_meshes);
|
||||
|
||||
/* loop over all meshes */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user