libtorch-ffi-1.11.0.0: test out alternative options for ffi interface to libtorch 1.x
Safe HaskellSafe-Inferred
LanguageHaskell2010

Torch.Internal.Managed.Cast

Orphan instances

Castable Int (ForeignPtr IntArray) Source # 
Instance details

Methods

cast :: Int -> (ForeignPtr IntArray -> IO r) -> IO r Source #

uncast :: ForeignPtr IntArray -> (Int -> IO r) -> IO r Source #

Castable [CBool] (ForeignPtr (C10List CBool)) Source # 
Instance details

Methods

cast :: [CBool] -> (ForeignPtr (C10List CBool) -> IO r) -> IO r Source #

uncast :: ForeignPtr (C10List CBool) -> ([CBool] -> IO r) -> IO r Source #

Castable [CDouble] (ForeignPtr (C10List CDouble)) Source # 
Instance details

Methods

cast :: [CDouble] -> (ForeignPtr (C10List CDouble) -> IO r) -> IO r Source #

uncast :: ForeignPtr (C10List CDouble) -> ([CDouble] -> IO r) -> IO r Source #

Castable [ForeignPtr IValue] (ForeignPtr (C10List IValue)) Source # 
Instance details

Castable [ForeignPtr IValue] (ForeignPtr (C10Ptr IVTuple)) Source # 
Instance details

Castable [ForeignPtr IValue] (ForeignPtr IValueList) Source # 
Instance details

Castable [ForeignPtr Tensor] (ForeignPtr (C10List (C10Optional Tensor))) Source # 
Instance details

Castable [ForeignPtr Tensor] (ForeignPtr (C10List Tensor)) Source # 
Instance details

Castable [ForeignPtr Tensor] (ForeignPtr TensorList) Source # 
Instance details

Castable [Int64] (ForeignPtr (C10List Int64)) Source # 
Instance details

Methods

cast :: [Int64] -> (ForeignPtr (C10List Int64) -> IO r) -> IO r Source #

uncast :: ForeignPtr (C10List Int64) -> ([Int64] -> IO r) -> IO r Source #

Castable [(ForeignPtr IValue, ForeignPtr IValue)] (ForeignPtr (C10Dict '(IValue, IValue))) Source # 
Instance details

Castable [Double] (ForeignPtr (StdVector CDouble)) Source # 
Instance details

Methods

cast :: [Double] -> (ForeignPtr (StdVector CDouble) -> IO r) -> IO r Source #

uncast :: ForeignPtr (StdVector CDouble) -> ([Double] -> IO r) -> IO r Source #

Castable [Int] (ForeignPtr IntArray) Source # 
Instance details

Methods

cast :: [Int] -> (ForeignPtr IntArray -> IO r) -> IO r Source #

uncast :: ForeignPtr IntArray -> ([Int] -> IO r) -> IO r Source #