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

Safe HaskellNone

Synthesizer.LLVM.CausalParameterized.ProcessPacked

Synopsis

Documentation

pack :: (Read va, n ~ Size va, a ~ Element va, C vb, n ~ Size vb, b ~ Element vb) => T p a b -> T p va vbSource

Run a scalar process on packed data. If the signal length is not divisible by the chunk size, then the last chunk is dropped.

packSmall :: (Read va, n ~ Size va, a ~ Element va, C vb, n ~ Size vb, b ~ Element vb) => T p a b -> T p va vbSource

Like pack but duplicates the code for the scalar process. That is, for vectors of size n, the code for the scalar causal process will be written n times. This is efficient only for simple input processes.

unpack :: (Zero va, n ~ Size va, a ~ Element va, Read vb, n ~ Size vb, b ~ Element vb, C (WriteIt va), C (ReadIt vb), C va, C vb) => T p va vb -> T p a bSource

Run a packed process on scalar data. If the signal length is not divisible by the chunk size, then the last chunk is dropped. In order to stay causal, we have to delay the output by n samples.

raise :: (Storable a, IsArithmetic a, IsConst a, MakeValueTuple a, ValueTuple a ~ Value a, FirstClass a, Stored a ~ am, IsPrimitive a, IsSized a, SizeOf a ~ as, IsPrimitive am, IsSized am, SizeOf am ~ amsize, PositiveT (n :*: as), PositiveT (n :*: amsize), PositiveT n) => T p a -> T p (Value n a) (Value n a)Source

amplify :: (Storable a, IsArithmetic a, IsConst a, MakeValueTuple a, ValueTuple a ~ Value a, FirstClass a, Stored a ~ am, IsPrimitive a, IsSized a, SizeOf a ~ as, IsPrimitive am, IsSized am, SizeOf am ~ amsize, PositiveT (n :*: as), PositiveT (n :*: amsize), PositiveT n) => T p a -> T p (Value n a) (Value n a)Source

amplifyStereo :: (Storable a, IsArithmetic a, IsConst a, MakeValueTuple a, ValueTuple a ~ Value a, FirstClass a, Stored a ~ am, IsPrimitive a, IsSized a, SizeOf a ~ as, IsPrimitive am, IsSized am, SizeOf am ~ amsize, PositiveT (n :*: as), PositiveT (n :*: amsize), PositiveT n) => T p a -> T p (T (Value n a)) (T (Value n a))Source

osciCore :: (FirstClass t, Stored t ~ tm, IsSized t, IsSized tm, Fraction t, IsConst t, Real t, IsPrimitive t, PositiveT n, C t) => T p (Value n t, Value n t) (Value n t)Source

osciSimple :: (FirstClass t, Stored t ~ tm, IsSized t, IsSized tm, Fraction t, IsConst t, Real t, IsPrimitive t, PositiveT n, C t) => (forall r. Value n t -> CodeGenFunction r y) -> T p (Value n t, Value n t) ySource

shapeModOsci :: (FirstClass t, Stored t ~ tm, IsSized t, IsSized tm, Fraction t, IsConst t, Real t, IsPrimitive t, PositiveT n, C t) => (forall r. c -> Value n t -> CodeGenFunction r y) -> T p (c, (Value n t, Value n t)) ySource

delay1 :: (C va, n ~ Size va, al ~ Element va, Storable a, MakeValueTuple a, ValueTuple a ~ al, C al) => T p a -> T p va vaSource

differentiate :: (C va, n ~ Size va, al ~ Element va, Additive va, Storable a, MakeValueTuple a, ValueTuple a ~ al, C al) => T p a -> T p va vaSource

arrayElement :: (IsFirstClass a, Value a ~ Element v, C v, GetValue (Array dim a) index, ValueType (Array dim a) index ~ a, NaturalT index, NaturalT dim, (index :<: dim) ~ True) => index -> T p (Value (Array dim a)) vSource