Safe Haskell | None |
---|
- data T a
- decons :: T a -> forall r. CodeGenFunction r a
- twoPi :: (Transcendental a, RationalConstant a) => T a
- square :: PseudoRing a => T a -> T a
- sqrt :: Algebraic a => T a -> T a
- max :: Real a => T a -> T a -> T a
- min :: Real a => T a -> T a -> T a
- limit :: Real a => (T a, T a) -> T a -> T a
- fraction :: Fraction a => T a -> T a
- (%==) :: CmpRet a => T (Value a) -> T (Value a) -> T (Value (CmpResult a))
- (%/=) :: CmpRet a => T (Value a) -> T (Value a) -> T (Value (CmpResult a))
- (%<) :: CmpRet a => T (Value a) -> T (Value a) -> T (Value (CmpResult a))
- (%<=) :: CmpRet a => T (Value a) -> T (Value a) -> T (Value (CmpResult a))
- (%>) :: CmpRet a => T (Value a) -> T (Value a) -> T (Value (CmpResult a))
- (%>=) :: CmpRet a => T (Value a) -> T (Value a) -> T (Value (CmpResult a))
- not :: T (Value Bool) -> T (Value Bool)
- (%&&) :: T (Value Bool) -> T (Value Bool) -> T (Value Bool)
- (%||) :: T (Value Bool) -> T (Value Bool) -> T (Value Bool)
- (?) :: (Flatten value, Registers value ~ a, Phi a) => T (Value Bool) -> (value, value) -> value
- (??) :: (IsFirstClass a, CmpRet a) => T (Value (CmpResult a)) -> (T (Value a), T (Value a)) -> T (Value a)
- lift0 :: (forall r. CodeGenFunction r a) -> T a
- lift1 :: (forall r. a -> CodeGenFunction r b) -> T a -> T b
- lift2 :: (forall r. a -> b -> CodeGenFunction r c) -> T a -> T b -> T c
- lift3 :: (forall r. a -> b -> c -> CodeGenFunction r d) -> T a -> T b -> T c -> T d
- unlift0 :: Flatten value => value -> forall r. CodeGenFunction r (Registers value)
- unlift1 :: Flatten value => (T a -> value) -> forall r. a -> CodeGenFunction r (Registers value)
- unlift2 :: Flatten value => (T a -> T b -> value) -> forall r. a -> b -> CodeGenFunction r (Registers value)
- unlift3 :: Flatten value => (T a -> T b -> T c -> value) -> forall r. a -> b -> c -> CodeGenFunction r (Registers value)
- unlift4 :: Flatten value => (T a -> T b -> T c -> T d -> value) -> forall r. a -> b -> c -> d -> CodeGenFunction r (Registers value)
- unlift5 :: Flatten value => (T a -> T b -> T c -> T d -> T e -> value) -> forall r. a -> b -> c -> d -> e -> CodeGenFunction r (Registers value)
- constantValue :: a -> T a
- constant :: IsConst a => a -> T (Value a)
- fromInteger' :: IntegerConstant a => Integer -> T a
- fromRational' :: RationalConstant a => Rational -> T a
- class Flatten value where
- type Registers value :: *
- flattenCode :: value -> Compute r (Registers value)
- unfoldCode :: T (Registers value) -> value
- flatten :: Flatten value => value -> CodeGenFunction r (Registers value)
- unfold :: Flatten value => Registers value -> value
- flattenCodeTraversable :: (Flatten value, Traversable f) => f value -> Compute r (f (Registers value))
- unfoldCodeTraversable :: (Flatten value, Traversable f, Applicative f) => T (f (Registers value)) -> f value
- flattenFunction :: (Flatten a, Flatten b) => (a -> b) -> Registers a -> CodeGenFunction r (Registers b)
Documentation
Functor T | |
Applicative T | |
(Additive a, IntegerConstant a) => Enum (T a) | |
(Transcendental a, Real a, RationalConstant a) => Floating (T a) | |
(Field a, Real a, RationalConstant a) => Fractional (T a) | |
(PseudoRing a, Real a, IntegerConstant a) => Num (T a) | |
(Transcendental a, RationalConstant a) => C (T a) | |
(Transcendental a, RationalConstant a) => C (T a) | |
(Field a, RationalConstant a) => C (T a) | |
(Real a, PseudoRing a, IntegerConstant a) => C (T a) | |
(PseudoRing a, IntegerConstant a) => C (T a) | |
Additive a => C (T a) | We do not require a numeric prelude superclass, thus also LLVM only types like vectors are instances. |
Flatten (T a) | |
(Real a, IntegerConstant a, ~ * a (Scalar a), PseudoModule a) => C (T a) (T a) | |
(Real a, IntegerConstant a, ~ * a (Scalar a), PseudoModule a) => Sqr (T a) (T a) | |
(Sqr (T a) (T v), RationalConstant a, Algebraic a) => C (T a) (T v) | |
(~ * a (Scalar v), PseudoModule v, IntegerConstant a) => C (T a) (T v) |
decons :: T a -> forall r. CodeGenFunction r aSource
twoPi :: (Transcendental a, RationalConstant a) => T aSource
square :: PseudoRing a => T a -> T aSource
sqrt :: Algebraic a => T a -> T aSource
The same as sqrt
,
but needs only Algebraic constraint, not Transcendental.
(?) :: (Flatten value, Registers value ~ a, Phi a) => T (Value Bool) -> (value, value) -> valueSource
true ? (t,f)
evaluates t
,
false ? (t,f)
evaluates f
.
t
and f
can reuse interim results,
but they cannot contribute shared results,
since only one of them will be run.
Cf. '(??)'
(??) :: (IsFirstClass a, CmpRet a) => T (Value (CmpResult a)) -> (T (Value a), T (Value a)) -> T (Value a)Source
The expression c ?? (t,f)
evaluates both t
and f
and selects components from t
and f
according to c
.
It is useful for vector values and
for sharing t
or f
with other branches of an expression.
lift0 :: (forall r. CodeGenFunction r a) -> T aSource
lift1 :: (forall r. a -> CodeGenFunction r b) -> T a -> T bSource
unlift0 :: Flatten value => value -> forall r. CodeGenFunction r (Registers value)Source
unlift1 :: Flatten value => (T a -> value) -> forall r. a -> CodeGenFunction r (Registers value)Source
unlift2 :: Flatten value => (T a -> T b -> value) -> forall r. a -> b -> CodeGenFunction r (Registers value)Source
unlift3 :: Flatten value => (T a -> T b -> T c -> value) -> forall r. a -> b -> c -> CodeGenFunction r (Registers value)Source
unlift4 :: Flatten value => (T a -> T b -> T c -> T d -> value) -> forall r. a -> b -> c -> d -> CodeGenFunction r (Registers value)Source
unlift5 :: Flatten value => (T a -> T b -> T c -> T d -> T e -> value) -> forall r. a -> b -> c -> d -> e -> CodeGenFunction r (Registers value)Source
constantValue :: a -> T aSource
fromInteger' :: IntegerConstant a => Integer -> T aSource
fromRational' :: RationalConstant a => Rational -> T aSource
class Flatten value whereSource
flattenCode :: value -> Compute r (Registers value)Source
unfoldCode :: T (Registers value) -> valueSource
Flatten () | |
Flatten a => Flatten (T a) | |
Flatten a => Flatten (T a) | |
Flatten a => Flatten (Parameter a) | |
Flatten a => Flatten (Result a) | |
Flatten a => Flatten (Parameter a) | |
Flatten a => Flatten (Result a) | |
Flatten a => Flatten (Parameter a) | |
Flatten a => Flatten (State a) | |
Flatten a => Flatten (Parameter a) | |
(C a, Flatten a) => Flatten (T a) | |
Flatten (T a) | |
Flatten a => Flatten (Parameter a) | |
Flatten a => Flatten (ParameterPacked a) | |
Flatten a => Flatten (Parameter a) | |
(Flatten a, Flatten b) => Flatten (a, b) | |
(Flatten a, Natural n) => Flatten (Parameter n a) | |
Flatten a => Flatten (CascadeParameter n a) | |
(Flatten a, Flatten b, Flatten c) => Flatten (a, b, c) |
flatten :: Flatten value => value -> CodeGenFunction r (Registers value)Source
flattenCodeTraversable :: (Flatten value, Traversable f) => f value -> Compute r (f (Registers value))Source
unfoldCodeTraversable :: (Flatten value, Traversable f, Applicative f) => T (f (Registers value)) -> f valueSource
flattenFunction :: (Flatten a, Flatten b) => (a -> b) -> Registers a -> CodeGenFunction r (Registers b)Source