synthesizer-llvm-0.8.1.2: Efficient signal processing using runtime compilation

Safe HaskellNone

Synthesizer.LLVM.Simple.Value

Synopsis

Documentation

data T a Source

Instances

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

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.

max :: Real a => T a -> T a -> T aSource

min :: Real a => T a -> T a -> T aSource

limit :: Real a => (T a, T a) -> T a -> T aSource

fraction :: Fraction a => T a -> T aSource

(%==) :: CmpRet a => T (Value a) -> T (Value a) -> T (Value (CmpResult a))Source

(%/=) :: CmpRet a => T (Value a) -> T (Value a) -> T (Value (CmpResult a))Source

(%<) :: CmpRet a => T (Value a) -> T (Value a) -> T (Value (CmpResult a))Source

(%<=) :: CmpRet a => T (Value a) -> T (Value a) -> T (Value (CmpResult a))Source

(%>) :: CmpRet a => T (Value a) -> T (Value a) -> T (Value (CmpResult a))Source

(%>=) :: CmpRet a => T (Value a) -> T (Value a) -> T (Value (CmpResult a))Source

(%&&) :: T (Value Bool) -> T (Value Bool) -> T (Value Bool)Source

Lazy AND

(%||) :: T (Value Bool) -> T (Value Bool) -> T (Value Bool)Source

Lazy OR

(?) :: (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

lift2 :: (forall r. a -> b -> CodeGenFunction r c) -> T a -> T b -> T cSource

lift3 :: (forall r. a -> b -> c -> CodeGenFunction r d) -> T a -> T b -> T c -> T dSource

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

constant :: IsConst a => a -> T (Value a)Source

class Flatten value whereSource

Associated Types

type Registers value :: *Source

Methods

flattenCode :: value -> Compute r (Registers value)Source

unfoldCode :: T (Registers value) -> valueSource

Instances

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

unfold :: Flatten value => Registers value -> valueSource

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