packages feed

hdf5 1.8.12 → 1.8.13

raw patch · 7 files changed

+290/−220 lines, 7 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Bindings.HDF5.Raw.H5S: h5s_encode2 :: HId_t -> OutArray CChar -> InOut CSize -> IO HErr_t
- Bindings.HDF5.Raw.H5S: p_H5Sencode2 :: FunPtr (HId_t -> OutArray CChar -> InOut CSize -> IO HErr_t)
+ Bindings.HDF5.Raw.H5F: h5f_MPIO_DEBUG_KEY :: String
+ Bindings.HDF5.Raw.H5F: h5f_get_mpi_atomicity :: HId_t -> Out HBool_t -> IO HErr_t
+ Bindings.HDF5.Raw.H5F: h5f_set_mpi_atomicity :: HId_t -> HBool_t -> IO HErr_t
+ Bindings.HDF5.Raw.H5F: p_H5Fget_mpi_atomicity :: FunPtr (HId_t -> Out HBool_t -> IO HErr_t)
+ Bindings.HDF5.Raw.H5F: p_H5Fset_mpi_atomicity :: FunPtr (HId_t -> HBool_t -> IO HErr_t)
+ Bindings.HDF5.Raw.H5P: h5p_get_all_coll_metadata_ops :: HId_t -> Out HBool_t -> IO HErr_t
+ Bindings.HDF5.Raw.H5P: h5p_get_coll_metadata_write :: HId_t -> Out HBool_t -> IO HErr_t
+ Bindings.HDF5.Raw.H5P: h5p_get_mpio_actual_chunk_opt_mode :: HId_t -> Out H5D_mpio_actual_chunk_opt_mode_t -> IO HErr_t
+ Bindings.HDF5.Raw.H5P: h5p_get_mpio_actual_io_mode :: HId_t -> Out H5D_mpio_actual_io_mode_t -> IO HErr_t
+ Bindings.HDF5.Raw.H5P: h5p_get_mpio_no_collective_cause :: HId_t -> Out Word32 -> Out Word32 -> IO HErr_t
+ Bindings.HDF5.Raw.H5P: h5p_set_all_coll_metadata_ops :: HId_t -> HBool_t -> IO HErr_t
+ Bindings.HDF5.Raw.H5P: h5p_set_coll_metadata_write :: HId_t -> HBool_t -> IO HErr_t
+ Bindings.HDF5.Raw.H5P: p_H5Pget_all_coll_metadata_ops :: FunPtr (HId_t -> Out HBool_t -> IO HErr_t)
+ Bindings.HDF5.Raw.H5P: p_H5Pget_coll_metadata_write :: FunPtr (HId_t -> Out HBool_t -> IO HErr_t)
+ Bindings.HDF5.Raw.H5P: p_H5Pget_mpio_actual_chunk_opt_mode :: FunPtr (HId_t -> Out H5D_mpio_actual_chunk_opt_mode_t -> IO HErr_t)
+ Bindings.HDF5.Raw.H5P: p_H5Pget_mpio_actual_io_mode :: FunPtr (HId_t -> Out H5D_mpio_actual_io_mode_t -> IO HErr_t)
+ Bindings.HDF5.Raw.H5P: p_H5Pget_mpio_no_collective_cause :: FunPtr (HId_t -> Out Word32 -> Out Word32 -> IO HErr_t)
+ Bindings.HDF5.Raw.H5P: p_H5Pset_all_coll_metadata_ops :: FunPtr (HId_t -> HBool_t -> IO HErr_t)
+ Bindings.HDF5.Raw.H5P: p_H5Pset_coll_metadata_write :: FunPtr (HId_t -> HBool_t -> IO HErr_t)
+ Bindings.HDF5.Raw.H5S: p_H5Sencode :: FunPtr (HId_t -> OutArray CChar -> InOut CSize -> IO HErr_t)

Files

− Changelog
@@ -1,21 +0,0 @@-1.8.12 [2024-08-02]--* Add flag "use-hdf5-serial" to switch between "hdf5" and "hdf5-serial" as a pkgconfig dependency-* Add pipeline ensuring the project compiles and the tests run with ghcup and ghc 9.0, 9.2, 9.4 and 9.6.-* Fixes to support different versions of hdf5 simultaneously-* Add upper version bounds to conform wiht the Haskell PVP document--1.8.11 [2023-10-10]---------* Fix compilation with ghc > 9.0.1--1.8.10 [2022-09-27]---------* Removed the embeded libffi code.--1.8.9 [2022-09-26]--------* Initial hackage release
+ Changelog.md view
@@ -0,0 +1,27 @@+1.8.13 [2024-09-18]+------++* Fix compilation with hdf5 1.10++1.8.12 [2024-08-02]+------++* Add flag "use-hdf5-serial" to switch between "hdf5" and "hdf5-serial" as a pkgconfig dependency+* Add pipeline ensuring the project compiles and the tests run with ghcup and ghc 9.0, 9.2, 9.4 and 9.6.+* Fixes to support different versions of hdf5 simultaneously+* Add upper version bounds to conform wiht the Haskell PVP document++1.8.11 [2023-10-10]+------++* Fix compilation with ghc > 9.0.1++1.8.10 [2022-09-27]+------++* Removed the embeded libffi code.++1.8.9 [2022-09-26]+-----++* Initial hackage release
hdf5.cabal view
@@ -1,5 +1,5 @@ name:                   hdf5-version:                1.8.12+version:                1.8.13 stability:              provisional  cabal-version:          >= 1.10@@ -14,7 +14,7 @@ synopsis:               Haskell interface to the HDF5 scientific data storage library. description:            This is a low-level but typesafe Haskell interface to the HDF5 library.  No pointers necessary. -extra-source-files: Changelog+extra-source-files: Changelog.md                     include/bindings.h                     include/mangle.h                     include/util.h
src/Bindings/HDF5/Dataspace.hsc view
@@ -1,7 +1,9 @@+{-# LANGUAGE CPP                        #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+ #include <bindings.h> #include <H5version.h>-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE CPP #-}+ module Bindings.HDF5.Dataspace     ( Dataspace     , DataspaceClass(..)@@ -56,23 +58,23 @@     , getSelectionType     ) where -import Bindings.HDF5.Core-import Bindings.HDF5.Error-import Bindings.HDF5.Object-import Bindings.HDF5.Raw.H5I-import Bindings.HDF5.Raw.H5S-import Control.Exception (assert)-import Control.Monad-import qualified Data.ByteString as BS-import qualified Data.ByteString.Unsafe as BS-import Data.List-import Data.Maybe-import Data.Tagged-import qualified Data.Vector as V-import qualified Data.Vector.Storable as SV-import Foreign(nullPtr)-import Foreign.C-import Foreign.Ptr.Conventions+import           Bindings.HDF5.Core+import           Bindings.HDF5.Error+import           Bindings.HDF5.Object+import           Bindings.HDF5.Raw.H5I+import           Bindings.HDF5.Raw.H5S+import           Control.Exception       (assert)+import           Control.Monad+import qualified Data.ByteString         as BS+import qualified Data.ByteString.Unsafe  as BS+import           Data.List+import           Data.Maybe+import           Data.Tagged+import qualified Data.Vector             as V+import qualified Data.Vector.Storable    as SV+import           Foreign                 (nullPtr)+import           Foreign.C+import           Foreign.Ptr.Conventions  newtype Dataspace = Dataspace HId_t     deriving (Eq, HId, FromHId, HDFResultType)@@ -139,7 +141,7 @@     withOutByteString $ \buf bufSz ->         withInOut_ bufSz $ \ioBufSz ->             withErrorCheck_ $-                h5s_encode space_id buf ioBufSz+            h5s_encode space_id buf ioBufSz  decodeDataspace :: BS.ByteString -> IO Dataspace decodeDataspace bs = BS.unsafeUseAsCString bs $ \buf ->
src/Bindings/HDF5/Link.hsc view
@@ -165,7 +165,105 @@     , linkValSize     :: CSize     } deriving (Eq, Ord, Read, Show) -#if H5Fget_info_vers == 1+#if H5_VERSION_GE(1,12,0)++readLinkInfo :: H5L_info1_t -> LinkInfo+readLinkInfo i  = LinkInfo+    { linkType          = linkTypeFromCode (h5l_info1_t'type i)+    , linkCOrderValid   = hboolToBool (h5l_info1_t'corder_valid i)+    , linkCOrder        = h5l_info1_t'corder i+    , linkCSet          = cSetFromCode (h5l_info1_t'cset i)+    , linkValSize       = h5l_info1_t'u'val_size i+    }++getLinkInfo :: Location loc => loc -> BS.ByteString -> Maybe LAPL -> IO LinkInfo+getLinkInfo loc name lapl =+    fmap readLinkInfo $+        withOut_ $ \info ->+            withErrorCheck_ $+                BS.useAsCString name $ \cname ->+                    h5l_get_info1 (hid loc) cname info (maybe h5p_DEFAULT hid lapl)++getSymLinkVal :: Location loc => loc -> BS.ByteString -> Maybe LAPL -> IO BS.ByteString+getSymLinkVal loc name mb_lapl =+    BS.useAsCString name $ \cname -> do+        let lapl = maybe h5p_DEFAULT hid mb_lapl+        info <- withOut_ $ \info ->+            withErrorCheck_ $+                    h5l_get_info1 (hid loc) cname info lapl+        let n = h5l_info1_t'u'val_size info++        buf <- mallocBytes (fromIntegral n)++        withErrorCheck_ $+            h5l_get_val (hid loc) cname (OutArray buf) n lapl+        -- TODO: this will leak memory if an exception is thrown++        BS.packCStringLen (buf, fromIntegral n)++foreign import ccall "wrapper" wrap_H5L_iterate1_t+    :: (HId_t -> CString -> In H5L_info1_t -> InOut a -> IO HErr_t)+    -> IO (FunPtr (HId_t -> CString -> In H5L_info1_t -> InOut a -> IO HErr_t))++with_iterate1_t :: (Group -> BS.ByteString -> LinkInfo -> IO HErr_t)+     -> (H5L_iterate1_t () -> InOut () -> IO HErr_t)+     -> IO HErr_t+with_iterate1_t op f = do+    exception1 <- newIORef Nothing :: IO (IORef (Maybe SomeException))++    op1 <- wrap_H5L_iterate1_t $ \grp name (In link) _opData -> do+        name1 <- BS.packCString name+        link1 <- peek link+        result <- try (op (uncheckedFromHId grp) name1 (readLinkInfo link1))+        case result of+            Left exc -> do+                writeIORef exception1 (Just exc)+                return maxBound+            Right x -> return x++    result <- f op1 (InOut nullPtr) `finally` freeHaskellFunPtr op1++    if result == maxBound+        then do+            exception2 <- readIORef exception1+            maybe (return result) throwIO exception2++        else return result++-- TODO : It would be nice if we didn't expose HErr_t in these callback functions.+--        Decide whether we want Either or Exceptions.+iterateLinks :: Location t => t -> IndexType -> IterOrder -> Maybe HSize -> (Group -> BS.ByteString -> LinkInfo -> IO HErr_t) -> IO HSize+iterateLinks loc indexType order startIndex op =+    fmap HSize $+        withInOut_ (maybe 0 hSize startIndex) $ \ioStartIndex ->+            withErrorCheck_ $+                with_iterate1_t op $ \iop opData ->+                    h5l_iterate1 (hid loc) (indexTypeCode indexType) (iterOrderCode order) ioStartIndex iop opData++iterateLinksByName :: Location t => t -> BS.ByteString -> IndexType -> IterOrder -> Maybe HSize -> Maybe LAPL -> (Group -> BS.ByteString -> LinkInfo -> IO HErr_t) -> IO HSize+iterateLinksByName loc groupName indexType order startIndex lapl op =+    fmap HSize $+        withInOut_ (maybe 0 hSize startIndex) $ \ioStartIndex ->+            withErrorCheck_ $+                with_iterate1_t op $ \iop opData ->+                    BS.useAsCString groupName $ \cgroupName ->+                        h5l_iterate_by_name1 (hid loc) cgroupName (indexTypeCode indexType) (iterOrderCode order) ioStartIndex iop opData (maybe h5p_DEFAULT hid lapl)++visitLinks :: Location t => t -> IndexType -> IterOrder -> (Group -> BS.ByteString -> LinkInfo -> IO HErr_t) -> IO ()+visitLinks loc indexType order op =+    withErrorCheck_ $+        with_iterate1_t op $ \iop opData ->+            h5l_visit1 (hid loc) (indexTypeCode indexType) (iterOrderCode order) iop opData++visitLinksByName :: Location t => t -> BS.ByteString -> IndexType -> IterOrder -> Maybe LAPL -> (Group -> BS.ByteString -> LinkInfo -> IO HErr_t) -> IO ()+visitLinksByName loc groupName indexType order lapl op =+    withErrorCheck_ $+        with_iterate1_t op $ \iop opData ->+            BS.useAsCString groupName $ \cgroupName ->+                h5l_visit_by_name1 (hid loc) cgroupName (indexTypeCode indexType) (iterOrderCode order) iop opData (maybe h5p_DEFAULT hid lapl)++#else+ readLinkInfo :: H5L_info_t -> LinkInfo readLinkInfo i  = LinkInfo     { linkType          = linkTypeFromCode (h5l_info_t'type i)@@ -174,18 +272,6 @@     , linkCSet          = cSetFromCode (h5l_info_t'cset i)     , linkValSize       = h5l_info_t'u'val_size i     }-#elif H5Fget_info_vers == 2-readLinkInfo :: H5L_info_t -> LinkInfo-readLinkInfo i  = LinkInfo-    { linkType          = linkTypeFromCode (h5l_info2_t'type i)-    , linkCOrderValid   = hboolToBool (h5l_info2_t'corder_valid i)-    , linkCOrder        = h5l_info2_t'corder i-    , linkCSet          = cSetFromCode (h5l_info2_t'cset i)-    , linkValSize       = h5l_info2_t'u'val_size i-    }-#else-#error "unknown info vers"-#endif  getLinkInfo :: Location loc => loc -> BS.ByteString -> Maybe LAPL -> IO LinkInfo getLinkInfo loc name lapl =@@ -193,11 +279,7 @@         withOut_ $ \info ->             withErrorCheck_ $                 BS.useAsCString name $ \cname ->-#if (H5Fget_info_vers == 1)                     h5l_get_info (hid loc) cname info (maybe h5p_DEFAULT hid lapl)-#else-                    h5l_get_info2 (hid loc) cname info (maybe h5p_DEFAULT hid lapl)-#endif  getSymLinkVal :: Location loc => loc -> BS.ByteString -> Maybe LAPL -> IO BS.ByteString getSymLinkVal loc name mb_lapl =@@ -205,17 +287,9 @@         let lapl = maybe h5p_DEFAULT hid mb_lapl         info <- withOut_ $ \info ->             withErrorCheck_ $-#if (H5Fget_info_vers == 1)                     h5l_get_info (hid loc) cname info lapl-#else-                    h5l_get_info2 (hid loc) cname info lapl-#endif -#if (H5Fget_info_vers == 1)         let n = h5l_info_t'u'val_size info-#else-        let n = h5l_info2_t'u'val_size info-#endif          buf <- mallocBytes (fromIntegral n) @@ -263,11 +337,7 @@         withInOut_ (maybe 0 hSize startIndex) $ \ioStartIndex ->             withErrorCheck_ $                 with_iterate_t op $ \iop opData ->-#if (H5Fget_info_vers == 1)                     h5l_iterate (hid loc) (indexTypeCode indexType) (iterOrderCode order) ioStartIndex iop opData-#else-                    h5l_iterate2 (hid loc) (indexTypeCode indexType) (iterOrderCode order) ioStartIndex iop opData-#endif  iterateLinksByName :: Location t => t -> BS.ByteString -> IndexType -> IterOrder -> Maybe HSize -> Maybe LAPL -> (Group -> BS.ByteString -> LinkInfo -> IO HErr_t) -> IO HSize iterateLinksByName loc groupName indexType order startIndex lapl op =@@ -276,29 +346,19 @@             withErrorCheck_ $                 with_iterate_t op $ \iop opData ->                     BS.useAsCString groupName $ \cgroupName ->-#if (H5Fget_info_vers == 1)                         h5l_iterate_by_name (hid loc) cgroupName (indexTypeCode indexType) (iterOrderCode order) ioStartIndex iop opData (maybe h5p_DEFAULT hid lapl)-#else-                        h5l_iterate_by_name2 (hid loc) cgroupName (indexTypeCode indexType) (iterOrderCode order) ioStartIndex iop opData (maybe h5p_DEFAULT hid lapl)-#endif  visitLinks :: Location t => t -> IndexType -> IterOrder -> (Group -> BS.ByteString -> LinkInfo -> IO HErr_t) -> IO () visitLinks loc indexType order op =     withErrorCheck_ $         with_iterate_t op $ \iop opData ->-#if (H5Fget_info_vers == 1)             h5l_visit (hid loc) (indexTypeCode indexType) (iterOrderCode order) iop opData-#else-            h5l_visit2 (hid loc) (indexTypeCode indexType) (iterOrderCode order) iop opData-#endif  visitLinksByName :: Location t => t -> BS.ByteString -> IndexType -> IterOrder -> Maybe LAPL -> (Group -> BS.ByteString -> LinkInfo -> IO HErr_t) -> IO () visitLinksByName loc groupName indexType order lapl op =     withErrorCheck_ $         with_iterate_t op $ \iop opData ->             BS.useAsCString groupName $ \cgroupName ->-#if (H5Fget_info_vers == 1)                 h5l_visit_by_name (hid loc) cgroupName (indexTypeCode indexType) (iterOrderCode order) iop opData (maybe h5p_DEFAULT hid lapl)-#else-                h5l_visit_by_name2 (hid loc) cgroupName (indexTypeCode indexType) (iterOrderCode order) iop opData (maybe h5p_DEFAULT hid lapl)+ #endif
src/Bindings/HDF5/Raw/H5L.hsc view
@@ -17,9 +17,10 @@ import Bindings.HDF5.Raw.H5 import Bindings.HDF5.Raw.H5I import Bindings.HDF5.Raw.H5T-#if H5Fget_info_vers != 1+#if H5_VERSION_GE(1,12,0) import Bindings.HDF5.Raw.H5O #endif+ import Foreign.Ptr.Conventions  -- |Maximum length of a link's name@@ -66,43 +67,153 @@ #newtype_const H5L_type_t, H5L_TYPE_UD_MIN  -- |Information struct for link (for 'h5l_get_info' / 'h5l_get_info_by_idx')-#if H5Fget_info_vers == 1-#starttype H5L_info_t-#elif H5Fget_info_vers == 2-#starttype H5L_info2_t-#else-#error "unknown info vers"-#endif --- |Type of link-#field type,                <H5L_type_t>+#if H5_VERSION_GE(1,12,0) --- |Indicate if creation order is valid+#starttype H5L_info1_t+#field type,                <H5L_type_t> #field corder_valid,        <hbool_t>---- |Creation order #field corder,              Int64---- |Character set of link name #field cset,                <H5T_cset_t>--#if (H5Fget_info_vers == 1)--- |Address hard link points to #union_field u.address,     <haddr_t>-#else+#union_field u.val_size,    <size_t>+#stoptype++#ccall H5Lget_info1, <hid_t> -> CString -> Out <H5L_info1_t> -> <hid_t> -> IO <herr_t>+#ccall H5Lget_info_by_idx1, <hid_t> -> CString -> <H5_index_t> -> <H5_iter_order_t> -> <hsize_t> -> Out <H5L_info1_t> -> <hid_t> -> IO <herr_t>++type H5L_iterate1_t a = FunPtr (HId_t -> CString -> In H5L_info1_t -> InOut a -> IO HErr_t)++#ccall H5Literate1, <hid_t> -> <H5_index_t> -> <H5_iter_order_t> -> InOut <hsize_t> -> H5L_iterate1_t a -> InOut a -> IO <herr_t>+#ccall H5Literate_by_name1, <hid_t> -> CString -> <H5_index_t> -> <H5_iter_order_t> -> InOut <hsize_t> -> H5L_iterate1_t a -> InOut a -> <hid_t> -> IO <herr_t>+#ccall H5Lvisit1, <hid_t> -> <H5_index_t> -> <H5_iter_order_t> -> H5L_iterate1_t a -> InOut a -> IO <herr_t>+#ccall H5Lvisit_by_name1, <hid_t> -> CString -> <H5_index_t> -> <H5_iter_order_t> -> H5L_iterate1_t a -> InOut a -> <hid_t> -> IO <herr_t>++#starttype H5L_info2_t+#field type,                <H5L_type_t>+#field corder_valid,        <hbool_t>+#field corder,              Int64+#field cset,                <H5T_cset_t> #union_field u.token,       <H5O_token_t>-#endif+#union_field u.val_size,    <size_t>+#stoptype +#ccall H5Lget_info2, <hid_t> -> CString -> Out <H5L_info2_t> -> <hid_t> -> IO <herr_t>+#ccall H5Lget_info_by_idx2, <hid_t> -> CString -> <H5_index_t> -> <H5_iter_order_t> -> <hsize_t> -> Out <H5L_info2_t> -> <hid_t> -> IO <herr_t> +type H5L_iterate2_t a = FunPtr (HId_t -> CString -> In H5L_info2_t -> InOut a -> IO HErr_t) --- |Size of a soft link or UD link value+#ccall H5Literate2, <hid_t> -> <H5_index_t> -> <H5_iter_order_t> -> InOut <hsize_t> -> H5L_iterate2_t a -> InOut a -> IO <herr_t>+#ccall H5Literate_by_name2, <hid_t> -> CString -> <H5_index_t> -> <H5_iter_order_t> -> InOut <hsize_t> -> H5L_iterate2_t a -> InOut a -> <hid_t> -> IO <herr_t>+#ccall H5Lvisit2, <hid_t> -> <H5_index_t> -> <H5_iter_order_t> -> H5L_iterate2_t a -> InOut a -> IO <herr_t>+#ccall H5Lvisit_by_name2, <hid_t> -> CString -> <H5_index_t> -> <H5_iter_order_t> -> H5L_iterate2_t a -> InOut a -> <hid_t> -> IO <herr_t>++#else++#starttype H5L_info_t+#field type,                <H5L_type_t>+#field corder_valid,        <hbool_t>+#field corder,              Int64+#field cset,                <H5T_cset_t>+#union_field u.address,     <haddr_t> #union_field u.val_size,    <size_t> #stoptype -#if H5Fget_info_vers == 2-type H5L_info_t = H5L_info2_t+#ccall H5Lget_info, <hid_t> -> CString -> Out <H5L_info_t> -> <hid_t> -> IO <herr_t>++#ccall H5Lget_info_by_idx, <hid_t> -> CString -> <H5_index_t> -> <H5_iter_order_t> -> <hsize_t> -> Out <H5L_info_t> -> <hid_t> -> IO <herr_t>++-- |Prototype for 'h5l_iterate' / 'h5l_iterate_by_name' operator+--+-- > typedef herr_t (*H5L_iterate_t)(hid_t group, const char *name, const H5L_info_t *info,+-- >     void *op_data);++type H5L_iterate_t a = FunPtr (HId_t -> CString -> In H5L_info_t -> InOut a -> IO HErr_t)++-- |Iterates over links in a group, with user callback routine,+-- according to the order within an index.+--+-- Same pattern of behavior as 'h5g_iterate'.+--+-- Returns the return value of the first operator that returns non-zero,+-- or zero if all members were processed with no operator returning non-zero.+--+-- Returns negative if something goes wrong within the library, or the+-- negative value returned by one of the operators.+--+-- > herr_t H5Literate(hid_t grp_id, H5_index_t idx_type,+-- >     H5_iter_order_t order, hsize_t *idx, H5L_iterate_t op, void *op_data);+#ccall H5Literate, <hid_t> -> <H5_index_t> -> <H5_iter_order_t> -> InOut <hsize_t> -> H5L_iterate_t a -> InOut a -> IO <herr_t>++-- |Iterates over links in a group, with user callback routine,+-- according to the order within an index.+--+-- Same pattern of behavior as 'h5g_iterate'.+--+-- Returns the return value of the first operator that returns non-zero,+-- or zero if all members were processed with no operator returning non-zero.+--+-- Returns negative if something goes wrong within the library, or the+-- negative value returned by one of the operators.+--+-- > herr_t H5Literate_by_name(hid_t loc_id, const char *group_name,+-- >     H5_index_t idx_type, H5_iter_order_t order, hsize_t *idx,+-- >     H5L_iterate_t op, void *op_data, hid_t lapl_id);+#ccall H5Literate_by_name, <hid_t> -> CString -> <H5_index_t> -> <H5_iter_order_t> -> InOut <hsize_t> -> H5L_iterate_t a -> InOut a -> <hid_t> -> IO <herr_t>++-- |Recursively visit all the links in a group and all+-- the groups that are linked to from that group.  Links within+-- each group are visited according to the order within the+-- specified index (unless the specified index does not exist for+-- a particular group, then the \"name\" index is used).+--+-- NOTE: Each _link_ reachable from the initial group will only be+-- visited once.  However, because an object may be reached from+-- more than one link, the visitation may call the application's+-- callback with more than one link that points to a particular+-- _object_.+--+-- Returns the return value of the first operator that+-- returns non-zero, or zero if all members were+-- processed with no operator returning non-zero.+--+-- Returns negative if something goes wrong within the+-- library, or the negative value returned by one+-- of the operators.+--+-- > herr_t H5Lvisit(hid_t grp_id, H5_index_t idx_type, H5_iter_order_t order,+-- >     H5L_iterate_t op, void *op_data);+#ccall H5Lvisit, <hid_t> -> <H5_index_t> -> <H5_iter_order_t> -> H5L_iterate_t a -> InOut a -> IO <herr_t>++-- |Recursively visit all the links in a group and all+-- the groups that are linked to from that group.  Links within+-- each group are visited according to the order within the+-- specified index (unless the specified index does not exist for+-- a particular group, then the \"name\" index is used).+--+-- NOTE: Each _link_ reachable from the initial group will only be+-- visited once.  However, because an object may be reached from+-- more than one link, the visitation may call the application's+-- callback with more than one link that points to a particular+-- _object_.+--+-- Returns the return value of the first operator that+-- returns non-zero, or zero if all members were+-- processed with no operator returning non-zero.+--+-- Returns negative if something goes wrong within the+-- library, or the negative value returned by one+-- of the operators.+--+-- > herr_t H5Lvisit_by_name(hid_t loc_id, const char *group_name,+-- >     H5_index_t idx_type, H5_iter_order_t order, H5L_iterate_t op,+-- >     void *op_data, hid_t lapl_id);+#ccall H5Lvisit_by_name, <hid_t> -> CString -> <H5_index_t> -> <H5_iter_order_t> -> H5L_iterate_t a -> InOut a -> <hid_t> -> IO <herr_t>++ #endif + -- /* The H5L_class_t struct can be used to override the behavior of a --  * "user-defined" link class. Users should populate the struct with callback --  * functions defined below.@@ -180,15 +291,6 @@ #stoptype  --- |Prototype for 'h5l_iterate' / 'h5l_iterate_by_name' operator------ > typedef herr_t (*H5L_iterate_t)(hid_t group, const char *name, const H5L_info_t *info,--- >     void *op_data);--- #if (H5Fget_info_vers == 1)-type H5L_iterate_t a = FunPtr (HId_t -> CString -> In H5L_info_t -> InOut a -> IO HErr_t)-#if (H5Fget_info_vers != 1)-type H5L_iterate2_t a = H5L_iterate_t a-#endif  -- |Callback for external link traversal --@@ -309,23 +411,6 @@ -- > htri_t H5Lexists(hid_t loc_id, const char *name, hid_t lapl_id); #ccall H5Lexists, <hid_t> -> CString -> <hid_t> -> IO <htri_t> --- |Gets metadata for a link.------ Returns non-negative on success, negative on failure.------ > herr_t H5Lget_info(hid_t loc_id, const char *name,--- >     H5L_info_t *linfo /*out*/, hid_t lapl_id);-#ccall H5Lget_info, <hid_t> -> CString -> Out <H5L_info_t> -> <hid_t> -> IO <herr_t>---- |Gets metadata for a link, according to the order within an index.------ Returns non-negative on success, negative on failure.------ > herr_t H5Lget_info_by_idx(hid_t loc_id, const char *group_name,--- >     H5_index_t idx_type, H5_iter_order_t order, hsize_t n,--- >     H5L_info_t *linfo /*out*/, hid_t lapl_id);-#ccall H5Lget_info_by_idx, <hid_t> -> CString -> <H5_index_t> -> <H5_iter_order_t> -> <hsize_t> -> Out <H5L_info_t> -> <hid_t> -> IO <herr_t>- -- |Gets name for a link, according to the order within an index. -- -- Same pattern of behavior as 'h5i_get_name'.@@ -339,86 +424,6 @@ -- >     char *name /*out*/, size_t size, hid_t lapl_id); #ccall H5Lget_name_by_idx, <hid_t> -> CString -> <H5_index_t> -> <H5_iter_order_t> -> <hsize_t> -> OutArray CChar -> <ssize_t> -> <hid_t> -> IO <ssize_t> --- |Iterates over links in a group, with user callback routine,--- according to the order within an index.------ Same pattern of behavior as 'h5g_iterate'.------ Returns the return value of the first operator that returns non-zero,--- or zero if all members were processed with no operator returning non-zero.------ Returns negative if something goes wrong within the library, or the--- negative value returned by one of the operators.------ > herr_t H5Literate(hid_t grp_id, H5_index_t idx_type,--- >     H5_iter_order_t order, hsize_t *idx, H5L_iterate_t op, void *op_data);-#ccall H5Literate, <hid_t> -> <H5_index_t> -> <H5_iter_order_t> -> InOut <hsize_t> -> H5L_iterate_t a -> InOut a -> IO <herr_t>---- |Iterates over links in a group, with user callback routine,--- according to the order within an index.------ Same pattern of behavior as 'h5g_iterate'.------ Returns the return value of the first operator that returns non-zero,--- or zero if all members were processed with no operator returning non-zero.------ Returns negative if something goes wrong within the library, or the--- negative value returned by one of the operators.------ > herr_t H5Literate_by_name(hid_t loc_id, const char *group_name,--- >     H5_index_t idx_type, H5_iter_order_t order, hsize_t *idx,--- >     H5L_iterate_t op, void *op_data, hid_t lapl_id);-#ccall H5Literate_by_name, <hid_t> -> CString -> <H5_index_t> -> <H5_iter_order_t> -> InOut <hsize_t> -> H5L_iterate_t a -> InOut a -> <hid_t> -> IO <herr_t>---- |Recursively visit all the links in a group and all--- the groups that are linked to from that group.  Links within--- each group are visited according to the order within the--- specified index (unless the specified index does not exist for--- a particular group, then the \"name\" index is used).------ NOTE: Each _link_ reachable from the initial group will only be--- visited once.  However, because an object may be reached from--- more than one link, the visitation may call the application's--- callback with more than one link that points to a particular--- _object_.------ Returns the return value of the first operator that--- returns non-zero, or zero if all members were--- processed with no operator returning non-zero.------ Returns negative if something goes wrong within the--- library, or the negative value returned by one--- of the operators.------ > herr_t H5Lvisit(hid_t grp_id, H5_index_t idx_type, H5_iter_order_t order,--- >     H5L_iterate_t op, void *op_data);-#ccall H5Lvisit, <hid_t> -> <H5_index_t> -> <H5_iter_order_t> -> H5L_iterate_t a -> InOut a -> IO <herr_t>---- |Recursively visit all the links in a group and all--- the groups that are linked to from that group.  Links within--- each group are visited according to the order within the--- specified index (unless the specified index does not exist for--- a particular group, then the \"name\" index is used).------ NOTE: Each _link_ reachable from the initial group will only be--- visited once.  However, because an object may be reached from--- more than one link, the visitation may call the application's--- callback with more than one link that points to a particular--- _object_.------ Returns the return value of the first operator that--- returns non-zero, or zero if all members were--- processed with no operator returning non-zero.------ Returns negative if something goes wrong within the--- library, or the negative value returned by one--- of the operators.------ > herr_t H5Lvisit_by_name(hid_t loc_id, const char *group_name,--- >     H5_index_t idx_type, H5_iter_order_t order, H5L_iterate_t op,--- >     void *op_data, hid_t lapl_id);-#ccall H5Lvisit_by_name, <hid_t> -> CString -> <H5_index_t> -> <H5_iter_order_t> -> H5L_iterate_t a -> InOut a -> <hid_t> -> IO <herr_t>- -- |Creates a user-defined link of type 'link_type' named 'link_name' -- with user-specified data 'udata'. --@@ -504,4 +509,3 @@ -- > herr_t H5Lcreate_external(const char *file_name, const char *obj_name, -- >     hid_t link_loc_id, const char *link_name, hid_t lcpl_id, hid_t lapl_id); #ccall H5Lcreate_external, CString -> CString -> <hid_t> -> CString -> <hid_t> -> <hid_t> -> IO <herr_t>-
src/Bindings/HDF5/Raw/H5S.hsc view
@@ -171,14 +171,12 @@ -- -- Returns non-negative on success, negative on failure. ----- > herr_t H5Sencode(hid_t obj_id, void *buf, size_t *nalloc);-#if HDF5get_info_vers == 1-#ccall H5Sencode, <hid_t> -> OutArray CChar -> InOut <size_t> -> IO <herr_t>+#if H5_VERSION_GE(1,12,0)+# ccall H5Sencode2, <hid_t> -> OutArray CChar -> InOut <size_t> -> <hid_t> -> IO <herr_t>+# ccall H5Sencode1, <hid_t> -> OutArray CChar -> InOut <size_t> -> IO <herr_t>+h5s_encode = h5s_encode1 #else-#ccall H5Sencode2, <hid_t> -> OutArray CChar -> InOut <size_t> -> IO <herr_t>--h5s_encode :: HId_t -> OutArray CChar -> InOut CSize -> IO HErr_t-h5s_encode = h5s_encode2+# ccall H5Sencode,  <hid_t> -> OutArray CChar -> InOut <size_t> -> IO <herr_t> #endif  -- |Decode a binary object description of dataspace and