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

Safe HaskellNone

Synthesizer.LLVM.Causal.ProcessPacked

Synopsis

Documentation

pack :: (C process, Read va, n ~ Size va, a ~ Element va, C vb, n ~ Size vb, b ~ Element vb) => process a b -> process 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 :: (C process, Read va, n ~ Size va, a ~ Element va, C vb, n ~ Size vb, b ~ Element vb) => process a b -> process 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 :: (C process, Zero va, n ~ Size va, a ~ Element va, Read vb, n ~ Size vb, b ~ Element vb, C va, C ita, ita ~ WriteIt va, C vb, C itb, itb ~ ReadIt vb) => process va vb -> process 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.

osciCore :: (C process, FirstClass t, Stored t ~ tm, IsSized tm, Real t, Fraction t, IsFloating t, Positive n) => process (Value n t, Value n t) (Value n t)Source

osci :: (C process, FirstClass t, Stored t ~ tm, IsSized tm, Real t, Fraction t, IsFloating t, Positive n) => (forall r. Value n t -> CodeGenFunction r y) -> process (Value n t, Value n t) ySource

shapeModOsci :: (C process, FirstClass t, Stored t ~ tm, IsSized tm, Real t, Fraction t, IsFloating t, Positive n) => (forall r. c -> Value n t -> CodeGenFunction r y) -> process (c, (Value n t, Value n t)) ySource

arrayElement :: (C process, IsFirstClass a, Value a ~ Element v, C v, Natural index, Natural dim, index :<: dim) => Proxy index -> process (Value (Array dim a)) vSource