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.Int

Description

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

Synopsis

Documentation

type CTensor = CIntTensor Source #

type alias of CIntTensor

type CReal = CInt Source #

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

type CAccReal = CLong Source #

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

type HsReal = Int32 Source #

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

type HsAccReal = Int64 Source #

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

real2acc :: HsReal -> HsAccReal Source #

convert a real to its accumulating representation

acc2real :: HsAccReal -> HsReal Source #

convert an accumulating value to its base rperesentation

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 = IntStorage Source #

type alias to IntStorage

cstorage :: IntStorage -> ForeignPtr CIntStorage Source #

get the C-level representation of a IntStorage out of intStorageState

storageStateRef :: IntStorage -> ForeignPtr CState Source #

get the C-level representation of the CState from a IntStorage out of intStorageState

type Dynamic = IntDynamic Source #

type alias to IntDynamic

ctensor :: IntDynamic -> ForeignPtr CIntTensor Source #

get the C-level representation of a IntDynamic out of intDynamicState

dynamicStateRef :: IntDynamic -> ForeignPtr CState Source #

get the C-level representation of the CState from a IntDynamic out of intDynamicState

type Tensor = IntTensor Source #

type alias to IntTensor