{-# LINE 1 "src/MXNet/NNVM/Internal/Types/Raw.chs" #-}
{-# LANGUAGE Safe #-}
{-# LANGUAGE ForeignFunctionInterface #-}
module MXNet.NNVM.Internal.Types.Raw where
import qualified Foreign.Ptr as C2HSImp
import Foreign.C.Types
import Foreign.Marshal.Alloc
import Foreign.Marshal.Array
import Foreign.Marshal.Utils ( with )
import Foreign.Ptr
import Foreign.Storable
type NNUInt = CUInt
newtype OpHandle = OpHandle (C2HSImp.Ptr (OpHandle))
{-# LINE 37 "src/MXNet/NNVM/Internal/Types/Raw.chs" #-}
instance Storable OpHandle where
sizeOf (OpHandle t) = sizeOf t
alignment (OpHandle t) = alignment t
peek p = fmap OpHandle (peek (castPtr p))
poke p (OpHandle t) = poke (castPtr p) t
newtype SymbolHandle = SymbolHandle (C2HSImp.Ptr (SymbolHandle))
{-# LINE 46 "src/MXNet/NNVM/Internal/Types/Raw.chs" #-}
instance Storable SymbolHandle where
sizeOf (SymbolHandle t) = sizeOf t
alignment (SymbolHandle t) = alignment t
peek p = fmap SymbolHandle (peek (castPtr p))
poke p (SymbolHandle t) = poke (castPtr p) t
newtype GraphHandle = GraphHandle (C2HSImp.Ptr (GraphHandle))
{-# LINE 55 "src/MXNet/NNVM/Internal/Types/Raw.chs" #-}
instance Storable GraphHandle where
sizeOf (GraphHandle t) = sizeOf t
alignment (GraphHandle t) = alignment t
peek p = fmap GraphHandle (peek (castPtr p))
poke p (GraphHandle t) = poke (castPtr p) t