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

(Positive n, IsPrimitive a, Storable a) => Storable (T n a) | |

(Positive n, IsPrimitive a, IsConst a) => MakeValueTuple (T n a) |

(Positive n, FirstClass a, ~ * (Stored a) am, IsPrimitive a, IsSized a, Positive (:*: n (SizeOf a)), IsPrimitive am, IsSized am, Positive (:*: n (SizeOf am))) => C (Value n a) | |

(Positive n, IsPrimitive a, IsArithmetic a) => Additive (Value n a) | This instance allows to run |

(Positive n, IsPrimitive a) => Undefined (Value n a) | |

(Positive n, IsPrimitive a) => Zero (Value n a) | |

(Positive n, IsPrimitive a) => Phi (Value n a) | |

Positive n => Sized (Value n a) | |

(Positive n, IsPrimitive a, IsFirstClass a) => C (Value n a) | The implementation of |

(Positive n, IsPrimitive a, IsFirstClass a) => Read (Value n a) | The implementation of |

MakeArguments (Value n a) |

interleave :: (IsPrimitive a, Positive n) => T (Value n a) -> CodeGenFunction r (Value n a)Source

deinterleave :: (IsPrimitive a, Positive n) => Value n a -> CodeGenFunction r (T (Value n a))Source

fromMono :: (IsPrimitive a, Positive n) => Value n a -> CodeGenFunction r (Value n a)Source

assemble :: (IsPrimitive a, Positive n) => [T (Value a)] -> CodeGenFunction r (Value n a)Source

extractAll :: (IsPrimitive a, Positive n) => Value n a -> CodeGenFunction r [T (Value a)]Source

amplify :: (Positive n, IsPrimitive a, IsArithmetic a, IsConst a) => a -> Value n a -> CodeGenFunction r (Value n a)Source

envelope :: (Positive n, IsPrimitive a, IsArithmetic a, IsConst a) => Value n a -> Value n a -> CodeGenFunction r (Value n a)Source