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

Safe HaskellNone
LanguageHaskell98

Synthesizer.LLVM.Generator.SignalPacked

Description

Signal generators that generate the signal in chunks that can be processed natively by the processor. Some of the functions for plain signals can be re-used without modification. E.g. rendering a signal and reading from and to signals work because the vector type as element type warrents correct alignment. We can convert between atomic and chunked signals.

The article http://perilsofparallel.blogspot.com/2008/09/larrabee-vs-nvidia-mimd-vs-simd.html explains the difference between Vector and SIMD computing. According to that the SSE extensions in Intel processors must be called Vector computing. But since we use the term Vector already in the mathematical sense, I like to use the term "packed" that is used in Intel mnemonics like mulps.

Synopsis

Documentation

pack :: (Write v, a ~ Element v) => T a -> T v Source #

Convert a signal of scalar values into one using processor vectors. If the signal length is not divisible by the chunk size, then the last chunk is dropped.

packRotate :: (Write v, a ~ Element v) => T a -> T v Source #

Convert a signal of scalar values into one using processor vectors. If the signal length is not divisible by the chunk size, then the last chunk is dropped.

packSmall :: (Write v, a ~ Element v) => T a -> T v Source #

Like pack but duplicates the code for creating elements. That is, for vectors of size n, the code of the input signal will be emitted n times. This is efficient only for simple input generators.

unpack :: (Read v, a ~ Element v, ReadIt v ~ itv, C itv) => T v -> T a Source #

unpackRotate :: (Read v, a ~ Element v, ReadIt v ~ itv, C itv) => T v -> T a Source #

constant :: Vector n a => Exp a -> T (Serial n a) Source #

exponential2 :: (Vector n a, Transcendental a, RationalConstant a) => Exp a -> Exp a -> T (Serial n a) Source #

exponentialBounded2 :: (Vector n a, Transcendental a, RationalConstant a, IntegerConstant a, Real a) => Exp a -> Exp a -> Exp a -> T (Serial n a) Source #

osciCore :: (Vector n t, PseudoRing t, Fraction t, IntegerConstant t) => Exp t -> Exp t -> T (Serial n t) Source #

osci :: (Vector n t, PseudoRing t, Fraction t, IntegerConstant t) => (forall r. Serial n t -> CodeGenFunction r y) -> Exp t -> Exp t -> T y Source #

parabolaFadeInInf :: (Vector n a, Field a, IntegerConstant a, RationalConstant a) => Exp a -> T (Serial n a) Source #

parabolaFadeOutInf :: (Vector n a, Field a, IntegerConstant a, RationalConstant a) => Exp a -> T (Serial n a) Source #

rampInf :: (Vector n a, Field a, IntegerConstant a, RationalConstant a) => Exp a -> T (Serial n a) Source #

rampSlope :: (Vector n a, Field a, IntegerConstant a, RationalConstant a) => Exp a -> T (Serial n a) Source #

noise :: NativeFloating n a ar => (PseudoRing a, IntegerConstant a) => (Algebraic a, RationalConstant a) => (Positive n, Positive (n :*: D32)) => Exp Word32 -> Exp a -> T (Serial n a) Source #

For the mysterious rate parameter see noise.

noiseCore :: (Positive n, Positive (n :*: D32)) => Exp Word32 -> T (Serial n Word32) Source #

noiseCoreAlt :: (Positive n, Positive (n :*: D32)) => Exp Word32 -> T (Serial n Word32) Source #