hasktorch-types-th-0.0.1.0: C-types for Torch

Copyright(c) Sam Stites 2017
LicenseBSD3
Maintainersam@stites.io
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Torch.Types.TH.Byte

Description

A package of type aliases to satisfy a backpack Torch.Sig.Types signature.

Synopsis

Documentation

type CTensor = CByteTensor Source #

type alias of CByteTensor

type CReal = CUChar Source #

C-level representation of a torch "real" -- the inhabitant of a CTensor. Alias to CUChar.

type CAccReal = CLong Source #

C-level representation of a torch "accreal" -- the accumulating type of a CTensor. Alias to CLong.

type HsReal = Word8 Source #

Hask-level representation of a torch "real" -- the accumulating type of a Tensor. Alias to Word32.

type HsAccReal = Word64 Source #

Hask-level representation of a torch "accreal" -- the accumulating type of a Tensor. Alias to Word64.

hs2cReal :: HsReal -> CReal Source #

convert an HsReal to its C-level representation

hs2cAccReal :: HsAccReal -> CAccReal Source #

convert an HsAccReal to its C-level representation

c2hsReal :: CReal -> HsReal Source #

convert a CReal to its Hask-level representation

c2hsAccReal :: CAccReal -> HsAccReal Source #

convert a CAccReal to its Hask-level representation

i2hsReal :: Integral i => i -> HsReal Source #

convert an integral type to its hask-level representation

type Storage = ByteStorage Source #

type alias to ByteStorage

cstorage :: ByteStorage -> ForeignPtr CByteStorage Source #

get the C-level representation of a ByteStorage out of byteStorageState

storageStateRef :: ByteStorage -> ForeignPtr CState Source #

get the C-level representation of the CState from a ByteStorage out of byteStorageState

type Dynamic = ByteDynamic Source #

type alias to ByteDynamic

ctensor :: ByteDynamic -> ForeignPtr CByteTensor Source #

get the C-level representation of a ByteDynamic out of byteDynamicState

dynamicStateRef :: ByteDynamic -> ForeignPtr CState Source #

get the C-level representation of the CState from a ByteDynamic out of byteDynamicState

type Tensor = ByteTensor Source #

type alias to ByteTensor