diff options
Diffstat (limited to 'fortran/src')
-rw-r--r-- | fortran/src/H5Pf.c | 51 | ||||
-rw-r--r-- | fortran/src/H5Pff.f90 | 103 | ||||
-rw-r--r-- | fortran/src/H5f90proto.h | 6 |
3 files changed, 160 insertions, 0 deletions
diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c index 438b07d..0e08e28 100644 --- a/fortran/src/H5Pf.c +++ b/fortran/src/H5Pf.c @@ -1886,3 +1886,54 @@ nh5pset_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree) ret_value = 0; return ret_value; } + +/*---------------------------------------------------------------------------- + * Name: h5pset_buffer_c + * Purpose: Call H5Pset_buffer to set size of conversion buffer + * Inputs: prp_id - t`dataset trasfer property list identifier + * size - size of the buffer + * Outputs: NONE + * Returns: 0 on success, -1 on failure + * Programmer: Elena Pourmal + * Wednesday, October 2, 2002 + * Modifications: + *---------------------------------------------------------------------------*/ + +int_f +nh5pset_buffer_c ( hid_t_f *prp_id , hsize_t_f *size) +{ + int ret_value = 0; + hid_t c_prp_id; + hsize_t c_size; + + c_prp_id = (hid_t)*prp_id; + c_size = (hsize_t)*size; + if ( H5Pset_buffer(c_prp_id, c_size, NULL, NULL) < 0 ) ret_value = -1; + return ret_value; +} + +/*---------------------------------------------------------------------------- + * Name: h5pget_buffer_c + * Purpose: Call H5Pget_buffer to get size of conversion buffer + * Inputs: prp_id - t`dataset trasfer property list identifier + * Outputs: size - size of conversion buffer + * Returns: 0 on success, -1 on failure + * Programmer: Elena Pourmal + * Wednesday, October 2, 2002 + * Modifications: + *---------------------------------------------------------------------------*/ + +int_f +nh5pget_buffer_c ( hid_t_f *prp_id , hsize_t_f *size) +{ + int ret_value = -1; + hid_t c_prp_id; + hsize_t c_size; + + c_prp_id = (hid_t)*prp_id; + c_size = H5Pget_buffer(c_prp_id, NULL, NULL); + if ( c_size < 0 ) return ret_value; + *size = (hsize_t)c_size; + ret_value = 0; + return ret_value; +} diff --git a/fortran/src/H5Pff.f90 b/fortran/src/H5Pff.f90 index b2eed09..f360660 100644 --- a/fortran/src/H5Pff.f90 +++ b/fortran/src/H5Pff.f90 @@ -3327,4 +3327,107 @@ if (c_flag .GT. 0) flag = .TRUE. END SUBROUTINE h5pequal_f +!---------------------------------------------------------------------- +! Name: h5pset_buffer_f +! +! Purpose: Sets sixe for conversion buffer +! +! Inputs: +! plist_id - data transfer property list identifier +! size - buffer size +! Outputs: +! hdferr: - error code +! Success: 0 +! Failure: -1 +! Optional parameters: +! NONE +! +! Programmer: Elena Pourmal +! October 2, 2002 +! +! Modifications: +! +! Comment: +!---------------------------------------------------------------------- + + SUBROUTINE h5pset_buffer_f(plist_id, size, hdferr) +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_DLL) +!DEC$attributes dllexport :: h5pset_buffer_f +!DEC$endif +! + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Data transfer property list identifier + INTEGER(HSIZE_T), INTENT(IN) :: size ! Buffer size in bytes; + ! buffer is allocated and freed by + ! the library. + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTERFACE + INTEGER FUNCTION h5pset_buffer_c(plist_id, size) + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !MS$ATTRIBUTES C,reference,alias:'_H5PSET_BUFFER_C'::h5pset_buffer_c + !DEC$ ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HSIZE_T), INTENT(IN) :: size + END FUNCTION h5pset_buffer_c + END INTERFACE + + hdferr = h5pset_buffer_c(plist_id, size) + END SUBROUTINE h5pset_buffer_f + +!---------------------------------------------------------------------- +! Name: h5pget_buffer_f +! +! Purpose: Gets size for conversion buffer +! +! Inputs: +! plist_id - data transfer property list identifier +! Outputs: +! size - buffer size +! hdferr: - error code +! Success: 0 +! Failure: -1 +! Optional parameters: +! NONE +! +! Programmer: Elena Pourmal +! October 2, 2002 +! +! Modifications: +! +! Comment: +!---------------------------------------------------------------------- + + SUBROUTINE h5pget_buffer_f(plist_id, size, hdferr) +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_DLL) +!DEC$attributes dllexport :: h5pget_buffer_f +!DEC$endif +! + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Data transfer property list identifier + INTEGER(HSIZE_T), INTENT(OUT) :: size ! Buffer size in bytes; + ! buffer is allocated and freed by + ! the library. + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTERFACE + INTEGER FUNCTION h5pget_buffer_c(plist_id, size) + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !MS$ATTRIBUTES C,reference,alias:'_H5PGET_BUFFER_C'::h5pget_buffer_c + !DEC$ ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HSIZE_T), INTENT(OUT) :: size + END FUNCTION h5pget_buffer_c + END INTERFACE + + hdferr = h5pget_buffer_c(plist_id, size) + END SUBROUTINE h5pget_buffer_f + + END MODULE H5P diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index b87f898..129c7a5 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -657,6 +657,8 @@ nh5tget_super_c ( hid_t_f *type_id , hid_t_f *base_type_id); # define nh5pget_dxpl_mpio_c FNAME(H5PGET_DXPL_MPIO_C) # define nh5pget_fclose_degree_c FNAME(H5PGET_FCLOSE_DEGREE_C) # define nh5pset_fclose_degree_c FNAME(H5PSET_FCLOSE_DEGREE_C) +# define nh5pset_buffer_c FNAME(H5PSET_BUFFER_C) +# define nh5pget_buffer_c FNAME(H5PGET_BUFFER_C) #else # define nh5pcreate_c FNAME(h5pcreate_c) @@ -717,6 +719,8 @@ nh5tget_super_c ( hid_t_f *type_id , hid_t_f *base_type_id); # define nh5pget_dxpl_mpio_c FNAME(h5pget_dxpl_mpio_c) # define nh5pget_fclose_degree_c FNAME(h5pget_fclose_degree_c) # define nh5pset_fclose_degree_c FNAME(h5pset_fclose_degree_c) +# define nh5pset_buffer_c FNAME(h5pset_buffer_c) +# define nh5pget_buffer_c FNAME(h5pget_buffer_c) #endif @@ -841,6 +845,8 @@ H5_DLL int_f nh5pset_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode); H5_DLL int_f nh5pset_fclose_degree_c(hid_t_f *fapl, int_f *degree); H5_DLL int_f nh5pget_fclose_degree_c(hid_t_f *fapl, int_f *degree); +H5_DLL int_f nh5pget_buffer_c(hid_t_f *plist, hsize_t_f *size); +H5_DLL int_f nh5pset_buffer_c(hid_t_f *plist, hsize_t_f *size); /* * Functions frome H5Rf.c */ |