Safe Haskell | None |
---|
Represent a vector of Stereo values in two vectors that store the values in an interleaved way. That is:
vector0[0] = left[0] vector0[1] = right[0] vector0[2] = left[1] vector0[3] = right[1] vector1[0] = left[2] vector1[1] = right[2] vector1[2] = left[3] vector1[3] = right[3]
This representation is not very useful for computation, but necessary as intermediate representation for interfacing with memory. SSE/SSE2 have the instructions UNPACK(L|H)P(S|D) that interleave efficiently.
Documentation
(PositiveT n, IsPrimitive a, Storable a) => Storable (T n a) | |
(PositiveT n, IsPrimitive a, IsConst a) => MakeValueTuple (T n a) |
(PositiveT n, IsPrimitive a, IsArithmetic a) => Additive (Value n a) | This instance allows to run |
(PositiveT n, FirstClass a, ~ * (Stored a) am, IsPrimitive a, IsSized a, PositiveT (:*: n (SizeOf a)), IsPrimitive am, IsSized am, PositiveT (:*: n (SizeOf am))) => C (Value n a) | |
(PositiveT n, IsPrimitive a) => Undefined (Value n a) | |
(PositiveT n, IsPrimitive a) => Zero (Value n a) | |
(PositiveT n, IsPrimitive a) => Phi (Value n a) | |
MakeArguments (Value n a) | |
PositiveT n => Sized (Value n a) | |
(PositiveT n, IsPrimitive a, IsFirstClass a) => C (Value n a) | The implementation of |
(PositiveT n, IsPrimitive a, IsFirstClass a) => Read (Value n a) | The implementation of |
interleave :: (IsPrimitive a, PositiveT n) => T (Value n a) -> CodeGenFunction r (Value n a)Source
deinterleave :: (IsPrimitive a, PositiveT n) => Value n a -> CodeGenFunction r (T (Value n a))Source
fromMono :: (IsPrimitive a, PositiveT n) => Value n a -> CodeGenFunction r (Value n a)Source
assemble :: (IsPrimitive a, IntegerT n, PositiveT n) => [T (Value a)] -> CodeGenFunction r (Value n a)Source
extractAll :: (IsPrimitive a, IntegerT n, PositiveT n) => Value n a -> CodeGenFunction r [T (Value a)]Source
amplify :: (PositiveT n, IsPrimitive a, IsArithmetic a, IsConst a) => a -> Value n a -> CodeGenFunction r (Value n a)Source
envelope :: (PositiveT n, IsPrimitive a, IsArithmetic a, IsConst a) => Value n a -> Value n a -> CodeGenFunction r (Value n a)Source