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

Safe HaskellNone

Synthesizer.LLVM.Parameterized.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 :: (C v, a ~ Element v) => T p a -> T p vSource

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 :: (C v, a ~ Element v) => T p a -> T p vSource

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 :: (C v, a ~ Element v) => T p a -> T p vSource

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, C (ReadIt v)) => T p v -> T p aSource

unpackRotate :: (Read v, a ~ Element v, C (ReadIt v)) => T p v -> T p aSource

withSize :: (n -> T p (Value n a)) -> T p (Value n a)Source

withSizeRing :: (C b, IntegerT n, IsPositive n ~ True) => (b -> T p (Value n a)) -> T p (Value n a)Source

constant :: (Storable a, MakeValueTuple a, ValueTuple a ~ Value a, IsConst 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), IntegerT n, IsPositive n ~ True) => T p a -> T p (Value n a)Source

exponential2 :: (C a, Storable a, MakeValueTuple a, ValueTuple a ~ Value a, IsArithmetic a, IsConst 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), IntegerT n, IsPositive n ~ True) => T p a -> T p a -> T p (Value n a)Source

exponentialBounded2 :: (C a, Storable a, MakeValueTuple a, ValueTuple a ~ Value a, Real a, IsConst 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), IntegerT n, IsPositive n ~ True) => T p a -> T p a -> T p a -> T p (Value n a)Source

osciCore :: (Storable t, MakeValueTuple t, ValueTuple t ~ Value t, FirstClass t, Stored t ~ tm, IsPrimitive t, IsSized t, SizeOf t ~ tsize, IsPrimitive tm, IsSized tm, SizeOf tm ~ tmsize, PositiveT (n :*: tsize), PositiveT (n :*: tmsize), Real t, IsFloating t, C t, IsConst t, IntegerT n, IsPositive n ~ True) => T p t -> T p t -> T p (Value n t)Source

osci :: (Storable t, MakeValueTuple t, ValueTuple t ~ Value t, Storable c, MakeValueTuple c, ValueTuple c ~ cl, FirstClass t, Stored t ~ tm, IsPrimitive t, IsSized t, SizeOf t ~ tsize, IsPrimitive tm, IsSized tm, SizeOf tm ~ tmsize, PositiveT (n :*: tsize), PositiveT (n :*: tmsize), C cl, Real t, IsFloating t, C t, IsConst t, IntegerT n, IsPositive n ~ True) => (forall r. cl -> Value n t -> CodeGenFunction r y) -> T p c -> T p t -> T p t -> T p ySource

osciSimple :: (Storable t, MakeValueTuple t, ValueTuple t ~ Value t, FirstClass t, Stored t ~ tm, IsPrimitive t, IsSized t, SizeOf t ~ tsize, IsPrimitive tm, IsSized tm, SizeOf tm ~ tmsize, PositiveT (n :*: tsize), PositiveT (n :*: tmsize), Real t, IsFloating t, C t, IsConst t, IntegerT n, IsPositive n ~ True) => (forall r. Value n t -> CodeGenFunction r y) -> T p t -> T p t -> T p ySource

rampInf :: (C a, Storable 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), IsArithmetic a, IntegerConstant a, IntegerT n, IsPositive n ~ True) => T p a -> T p (Value n a)Source

parabolaFadeOutInf :: (C a, Storable 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), IsArithmetic a, IntegerConstant a, IntegerT n, IsPositive n ~ True) => T p a -> T p (Value n a)Source

parabolaFadeInInf :: (C a, Storable 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), IsArithmetic a, IntegerConstant a, IntegerT n, IsPositive n ~ True) => T p a -> T p (Value n a)Source

rampSlope :: (C a, Storable 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), IsArithmetic a, IntegerConstant a, IntegerT n, IsPositive n ~ True) => T p a -> T p (Value n a)Source

noise :: (C a, IsFloating a, IntegerConstant a, IntegerT n, IsPositive n ~ True, PositiveT (n :*: D32), 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), MakeValueTuple a, ValueTuple a ~ Value a, Storable a) => T p Word32 -> T p a -> T p (Value n a)Source

For the mysterious rate parameter see noise.