| Copyright | (c) Sam Stites 2017 |
|---|---|
| License | BSD3 |
| Maintainer | sam@stites.io |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Torch.Indef.Types
Description
Synopsis
- module Torch.Sig.Types.Global
- module Torch.Sig.Types
- module Torch.Sig.State
- newtype DimVal = DimVal Int32
- newtype Step = Step CLong
- newtype Stride = Stride CLLong
- newtype StorageOffset = Offset CPtrdiff
- newtype Size = Size CLLong
- newtype KeepDim = KeepDim {}
- fromKeepDim :: Integral i => Maybe KeepDim -> i
- keep :: KeepDim
- ignore :: KeepDim
- data SortOrder
- data TopKOrder
- newtype AllocatorContext = AllocatorContext (Ptr ())
- (.:) :: (b -> c) -> (a0 -> a1 -> b) -> a0 -> a1 -> c
- managedState :: Managed (Ptr CState)
- managedStorage :: Storage -> Managed (Ptr CStorage)
- managedTensor :: Dynamic -> Managed (Ptr CTensor)
- managedGen :: Generator -> Managed (Ptr CGenerator)
- withLift :: Managed (IO x) -> IO x
- withDynamic :: Managed (IO (Ptr CTensor)) -> IO Dynamic
- withStorage :: Managed (IO (Ptr CStorage)) -> IO Storage
- with2DynamicState :: Dynamic -> Dynamic -> (Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO x) -> IO x
- with3DynamicState :: Dynamic -> Dynamic -> Dynamic -> (Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO x) -> IO x
- mkDynamic :: Ptr CTensor -> IO Dynamic
- mkStorage :: Ptr CStorage -> IO Storage
Documentation
module Torch.Sig.Types.Global
module Torch.Sig.Types
module Torch.Sig.State
Deprecated: Use dimensions package's Idx instead
term-level representation of an index.
Instances
| Bounded DimVal Source # | |
| Enum DimVal Source # | |
Defined in Torch.Indef.Types | |
| Eq DimVal Source # | |
| Integral DimVal Source # | |
Defined in Torch.Indef.Types | |
| Num DimVal Source # | |
| Ord DimVal Source # | |
| Read DimVal Source # | |
| Real DimVal Source # | |
Defined in Torch.Indef.Types Methods toRational :: DimVal -> Rational # | |
| Show DimVal Source # | |
newtype wrapper around the C-level representation of a step size
newtype wrapper around the C-level representation of a tensor's internal
Storage stride for each dimension.
Instances
| Bounded Stride Source # | |
| Enum Stride Source # | |
Defined in Torch.Indef.Types | |
| Eq Stride Source # | |
| Integral Stride Source # | |
Defined in Torch.Indef.Types | |
| Num Stride Source # | |
| Ord Stride Source # | |
| Read Stride Source # | |
| Real Stride Source # | |
Defined in Torch.Indef.Types Methods toRational :: Stride -> Rational # | |
| Show Stride Source # | |
newtype StorageOffset Source #
newtype wrapper around the C-level representation of a storage offset
Instances
newtype wrapper around the C-level representation of a dimension's size
haskell representation of a CInt which determines whether or not to return dimensions
Instances
| Bounded KeepDim Source # | |
| Enum KeepDim Source # | |
| Eq KeepDim Source # | |
| Ord KeepDim Source # | |
| Read KeepDim Source # | |
| Show KeepDim Source # | |
fromKeepDim :: Integral i => Maybe KeepDim -> i Source #
cast a KeepDim to a numerical representation.
NOTE: don't bind the i in case there are some differences between THC and TH
smart constructors for keepdim since we don't get inference for free like Num
smart constructors for keepdim since we don't get inference for free like Num
Simple datatype to represent sort order arguments which torch provides to us.
Constructors
| Ascending | |
| Descending |
Instances
| Bounded SortOrder Source # | |
| Enum SortOrder Source # | |
Defined in Torch.Indef.Types Methods succ :: SortOrder -> SortOrder # pred :: SortOrder -> SortOrder # fromEnum :: SortOrder -> Int # enumFrom :: SortOrder -> [SortOrder] # enumFromThen :: SortOrder -> SortOrder -> [SortOrder] # enumFromTo :: SortOrder -> SortOrder -> [SortOrder] # enumFromThenTo :: SortOrder -> SortOrder -> SortOrder -> [SortOrder] # | |
| Eq SortOrder Source # | |
| Ord SortOrder Source # | |
| Show SortOrder Source # | |
Simple datatype to represent arguments for a topk function.
Constructors
| KAscending | |
| KNone | |
| KDescending |
Instances
| Bounded TopKOrder Source # | |
| Enum TopKOrder Source # | |
Defined in Torch.Indef.Types Methods succ :: TopKOrder -> TopKOrder # pred :: TopKOrder -> TopKOrder # fromEnum :: TopKOrder -> Int # enumFrom :: TopKOrder -> [TopKOrder] # enumFromThen :: TopKOrder -> TopKOrder -> [TopKOrder] # enumFromTo :: TopKOrder -> TopKOrder -> [TopKOrder] # enumFromThenTo :: TopKOrder -> TopKOrder -> TopKOrder -> [TopKOrder] # | |
| Eq TopKOrder Source # | |
| Ord TopKOrder Source # | |
| Show TopKOrder Source # | |
newtype AllocatorContext Source #
Warning: this should not be used or referenced -- we are still figuring out what to do with this.
this is supposed to represent the AllocatorContext, but it should not be exposed to a user.
Constructors
| AllocatorContext (Ptr ()) | Warning: this should not be used or referenced -- we are still figuring out what to do with this. |
(.:) :: (b -> c) -> (a0 -> a1 -> b) -> a0 -> a1 -> c infixl 5 Source #
The blackbird combinator.
(stites): This happens often enough that I'm pulling in the blackbird
FIXME(stites): remove this
managedState :: Managed (Ptr CState) Source #
run a function with a managed state's raw internal pointer.
managedGen :: Generator -> Managed (Ptr CGenerator) Source #
withDynamic :: Managed (IO (Ptr CTensor)) -> IO Dynamic Source #
smart constructor for a Managed Dynamic tensor
withStorage :: Managed (IO (Ptr CStorage)) -> IO Storage Source #
smart constructor for a Managed Storage tensor
with2DynamicState :: Dynamic -> Dynamic -> (Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO x) -> IO x Source #
run a function with two tensors with reference to the first tensor's underlying state.