hasktorch-indef-0.0.1.0: Core Hasktorch abstractions wrapping FFI bindings

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

Torch.Indef.Dynamic.Tensor.Random.THC

Description

GPU-backed random functions. The difference between this package and TH is that these functions do not get passed an explicit Generator argument.

Synopsis

Documentation

_random :: Dynamic -> IO () Source #

CUDA version of _random

_cappedRandom :: Dynamic -> Integer -> IO () Source #

CUDA version of _cappedRandom

_bernoulli :: Dynamic -> HsAccReal -> IO () Source #

CUDA version of _bernoulli

_geometric :: Dynamic -> HsAccReal -> IO () Source #

CUDA version of _geometric

_uniform :: Dynamic -> Ord2Tuple HsAccReal -> IO () Source #

CUDA version of _uniform

_normal :: Dynamic -> HsAccReal -> Positive HsAccReal -> IO () Source #

CUDA version of _normal

_logNormal :: Dynamic -> HsAccReal -> Positive HsAccReal -> IO () Source #

call C-level logNormal | CUDA version of _logNormal

_exponential :: Dynamic -> HsAccReal -> IO () Source #

CUDA version of _exponential

_cauchy :: Dynamic -> HsAccReal -> HsAccReal -> IO () Source #

CUDA version of _cauchy

_multinomial :: IndexDynamic -> Dynamic -> Int -> Int -> IO () Source #

CUDA version of _multinomial

_rand :: Dynamic -> LongStorage -> IO () Source #

CUDA version of _rand

_randn :: Dynamic -> LongStorage -> IO () Source #

CUDA version of _randn

data OpenUnit x #

Datatype to represent the open unit interval: 0 < x < 1. Any OpenUnit inhabitant must satisfy being in the interval.

FIXME: replace with numhask.

Instances
Eq x => Eq (OpenUnit x) 
Instance details

Defined in Torch.Types.Numeric

Methods

(==) :: OpenUnit x -> OpenUnit x -> Bool #

(/=) :: OpenUnit x -> OpenUnit x -> Bool #

Ord x => Ord (OpenUnit x) 
Instance details

Defined in Torch.Types.Numeric

Methods

compare :: OpenUnit x -> OpenUnit x -> Ordering #

(<) :: OpenUnit x -> OpenUnit x -> Bool #

(<=) :: OpenUnit x -> OpenUnit x -> Bool #

(>) :: OpenUnit x -> OpenUnit x -> Bool #

(>=) :: OpenUnit x -> OpenUnit x -> Bool #

max :: OpenUnit x -> OpenUnit x -> OpenUnit x #

min :: OpenUnit x -> OpenUnit x -> OpenUnit x #

Show x => Show (OpenUnit x) 
Instance details

Defined in Torch.Types.Numeric

Methods

showsPrec :: Int -> OpenUnit x -> ShowS #

show :: OpenUnit x -> String #

showList :: [OpenUnit x] -> ShowS #

openUnit :: (Ord x, Num x) => x -> Maybe (OpenUnit x) #

smart constructor to place a number in the open unit interval.

openUnitValue :: OpenUnit x -> x #

Get a value from the open unit interval.

data ClosedUnit x #

Datatype to represent the closed unit interval: 0 =< x =< 1. Any ClosedUnit inhabitant must satisfy being in the interval.

FIXME: replace with numhask.

Instances
Eq x => Eq (ClosedUnit x) 
Instance details

Defined in Torch.Types.Numeric

Methods

(==) :: ClosedUnit x -> ClosedUnit x -> Bool #

(/=) :: ClosedUnit x -> ClosedUnit x -> Bool #

Ord x => Ord (ClosedUnit x) 
Instance details

Defined in Torch.Types.Numeric

Show x => Show (ClosedUnit x) 
Instance details

Defined in Torch.Types.Numeric

closedUnit :: (Ord x, Num x) => x -> Maybe (ClosedUnit x) #

smart constructor to place a number in the closed unit interval.

closedUnitValue :: ClosedUnit x -> x #

Get a value from the closed unit interval.

data Positive x #

Datatype to represent a generic positive number: 0 =< x.

FIXME: replace with numhask.

Instances
Eq x => Eq (Positive x) 
Instance details

Defined in Torch.Types.Numeric

Methods

(==) :: Positive x -> Positive x -> Bool #

(/=) :: Positive x -> Positive x -> Bool #

Ord x => Ord (Positive x) 
Instance details

Defined in Torch.Types.Numeric

Methods

compare :: Positive x -> Positive x -> Ordering #

(<) :: Positive x -> Positive x -> Bool #

(<=) :: Positive x -> Positive x -> Bool #

(>) :: Positive x -> Positive x -> Bool #

(>=) :: Positive x -> Positive x -> Bool #

max :: Positive x -> Positive x -> Positive x #

min :: Positive x -> Positive x -> Positive x #

Show x => Show (Positive x) 
Instance details

Defined in Torch.Types.Numeric

Methods

showsPrec :: Int -> Positive x -> ShowS #

show :: Positive x -> String #

showList :: [Positive x] -> ShowS #

positive :: (Ord x, Num x) => x -> Maybe (Positive x) #

smart constructor to place a number in a positive bound.

positiveValue :: Positive x -> x #

Get a value from the positive bound.

data Ord2Tuple x #

Datatype to represent an ordered pair of numbers, (a, b), where a <= b.

FIXME: replace with numhask.

Instances
Eq x => Eq (Ord2Tuple x) 
Instance details

Defined in Torch.Types.Numeric

Methods

(==) :: Ord2Tuple x -> Ord2Tuple x -> Bool #

(/=) :: Ord2Tuple x -> Ord2Tuple x -> Bool #

Show x => Show (Ord2Tuple x) 
Instance details

Defined in Torch.Types.Numeric

ord2Tuple :: (Ord x, Num x) => (x, x) -> Maybe (Ord2Tuple x) #

smart constructor to place two values in an ordered tuple.

ord2TupleValue :: Ord2Tuple x -> (x, x) #

Get the values of an ordered tuple.