diff options
author | Elena Pourmal <epourmal@hdfgroup.org> | 2003-03-19 16:13:35 (GMT) |
---|---|---|
committer | Elena Pourmal <epourmal@hdfgroup.org> | 2003-03-19 16:13:35 (GMT) |
commit | 65f5514a4ff647cff51c37e3af30d5e138733d06 (patch) | |
tree | 4d1a0934ee57c44e3703b4388dcb67a0c6c063ad /fortran/src/H5Zff.f90 | |
parent | da4bf69db756aabb448bead90a0d85d7348ff04e (diff) | |
download | hdf5-65f5514a4ff647cff51c37e3af30d5e138733d06.zip hdf5-65f5514a4ff647cff51c37e3af30d5e138733d06.tar.gz hdf5-65f5514a4ff647cff51c37e3af30d5e138733d06.tar.bz2 |
[svn-r6494]
Purpose: Catching up with the C library
Description: Added the follwoing new fortran functions
h5iget_name_f
h5tis_variavle_str_f
h5zunregister_f
h5zfilter_avail_f
h5pset_shuffle_f
h5pset_fletcher32
h5pset_edc_check_f
h5pget_edc_check_f
h5dfill_f
Solution:
Platforms tested: arabica(C and F90), burrwhite (pgcc and pgf90), modi4 (F90 and parallel)
Misc. update:
Diffstat (limited to 'fortran/src/H5Zff.f90')
-rw-r--r-- | fortran/src/H5Zff.f90 | 124 |
1 files changed, 124 insertions, 0 deletions
diff --git a/fortran/src/H5Zff.f90 b/fortran/src/H5Zff.f90 new file mode 100644 index 0000000..2f33b80 --- /dev/null +++ b/fortran/src/H5Zff.f90 @@ -0,0 +1,124 @@ +! +! This file contains FORTRAN90 interfaces for H5I functions +! + MODULE H5Z + + USE H5GLOBAL + + CONTAINS + +!---------------------------------------------------------------------- +! Name: h5zunregister_f +! +! Purpose: Unregisters specified filetr +! +! Inputs: filter - filter; may have one of the following values: +! H5Z_FILTER_DEFLATE_F +! H5Z_FILTER_SHUFFLE_F +! H5Z_FILTER_FLETCHER32_F +! Outputs: +! hdferr: - error code +! Success: 0 +! Failure: -1 +! Optional parameters: +! NONE +! +! Programmer: Elena Pourmal +! March 12, 2003 +! +! Modifications: +! +! Comment: +!---------------------------------------------------------------------- + SUBROUTINE h5zunregister_f(filter, hdferr) +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_DLL) +!DEC$attributes dllexport :: h5zunregister_f +!DEC$endif +! + IMPLICIT NONE + INTEGER, INTENT(IN) :: filter + INTEGER, INTENT(OUT) :: hdferr ! Error code + +! INTEGER, EXTERNAL :: h5zunregister_c +! Interface is needed for MS FORTRAN +! + INTERFACE + INTEGER FUNCTION h5zunregister_c (filter) + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !MS$ATTRIBUTES C,reference,alias:'_H5ZUNREGISTER_C':: h5zunregister_c + !DEC$ ENDIF + INTEGER, INTENT(IN) :: filter + END FUNCTION h5zunregister_c + END INTERFACE + hdferr = h5zunregister_c (filter) + END SUBROUTINE h5zunregister_f +!---------------------------------------------------------------------- +! Name: h5zfilter_avail_f +! +! Purpose: Queries if filter is available +! +! Inputs: +! filter - filter +! Outputs: +! status - status; .TRUE. if filter is available, +! .FALSE. otherwise +! hdferr: - error code +! Success: 0 +! Failure: -1 +! Optional parameters: +! NONE +! +! Programmer: Elena Pourmal +! March 12, 2003 +! +! Modifications: +! +!---------------------------------------------------------------------- + SUBROUTINE h5zfilter_avail_f(filter, status, hdferr) +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_DLL) +!DEC$attributes dllexport :: h5zfilter_avail_f +!DEC$endif +! + + IMPLICIT NONE + INTEGER, INTENT(IN) :: filter ! Filter; may be one of the following: + ! H5Z_FILTER_DEFLATE_F + ! H5Z_FILTER_SHUFFLE_F + ! H5Z_FILTER_FLETCHER32_F + LOGICAL, INTENT(OUT) :: status ! Flag, idicates if filter + ! is availble not ( TRUE or + ! FALSE) + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: flag ! "TRUE/FALSE/ERROR from C" + +! INTEGER, EXTERNAL :: h5zfilter_avail_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5zfilter_avail_c(filter, flag) + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !MS$ATTRIBUTES C,reference,alias:'_H5ZFILTER_AVAIL_C'::h5zfilter_avail_c + !DEC$ ENDIF + INTEGER, INTENT(IN) :: filter + INTEGER :: flag + END FUNCTION h5zfilter_avail_c + END INTERFACE + + hdferr = h5zfilter_avail_c(filter, flag) + status = .TRUE. + if (flag .EQ. 0) status = .FALSE. + + END SUBROUTINE h5zfilter_avail_f + + END MODULE H5Z + + + + + |