Safe Haskell | None |
---|
A special vector type that represents a time-sequence of samples. This way we can distinguish safely between LLVM vectors used for parallel signals and pipelines and those used for chunky processing of scalar signals. For the chunky processing this data type allows us to derive the factor from the type that time constants have to be multiplied with.
- newtype T v = Cons v
- type Plain n a = T (Vector n a)
- type Value n a = T (Value (Vector n a))
- plain :: Vector n a -> Plain n a
- value :: Value (Vector n a) -> Value n a
- constant :: PositiveT n => a -> T (Constant n a)
- class (PositiveT (Size v), Sized v, Phi (ReadIt v), Undefined (ReadIt v), Phi v, Undefined v) => Read v where
- type Element v :: *
- type ReadIt v :: *
- extract :: Value Word32 -> v -> CodeGenFunction r (Element v)
- extractAll :: v -> CodeGenFunction r [Element v]
- readStart :: v -> CodeGenFunction r (ReadIterator (ReadIt v) v)
- readNext :: ReadIterator (ReadIt v) v -> CodeGenFunction r (Element v, ReadIterator (ReadIt v) v)
- class (Read v, Phi (WriteIt v), Undefined (WriteIt v)) => C v where
- type WriteIt v :: *
- insert :: Value Word32 -> Element v -> v -> CodeGenFunction r v
- assemble :: [Element v] -> CodeGenFunction r v
- writeStart :: CodeGenFunction r (WriteIterator (WriteIt v) v)
- writeNext :: Element v -> WriteIterator (WriteIt v) v -> CodeGenFunction r (WriteIterator (WriteIt v) v)
- writeStop :: WriteIterator (WriteIt v) v -> CodeGenFunction r v
- class (C v, Phi (WriteIt v), Zero (WriteIt v)) => Zero v where
- writeZero :: CodeGenFunction r (WriteIterator (WriteIt v) v)
- newtype Iterator mode it v = Iterator it
- type ReadIterator = Iterator ReadMode
- type WriteIterator = Iterator WriteMode
- data ReadMode
- data WriteMode
- class PositiveT (Size valueTuple) => Sized valueTuple where
- type Size valueTuple :: *
- size :: Sized v => v -> Int
- sizeOfIterator :: Sized v => Iterator mode it v -> Int
- withSize :: Sized v => (Int -> m v) -> m v
- insertTraversable :: (C v, Traversable f, Applicative f) => Value Word32 -> f (Element v) -> f v -> CodeGenFunction r (f v)
- extractTraversable :: (Read v, Traversable f) => Value Word32 -> f v -> CodeGenFunction r (f (Element v))
- readStartTraversable :: (Traversable f, Applicative f, Read v) => f v -> CodeGenFunction r (ReadIterator (f (ReadIt v)) (f v))
- readNextTraversable :: (Traversable f, Applicative f, Read v) => ReadIterator (f (ReadIt v)) (f v) -> CodeGenFunction r (f (Element v), ReadIterator (f (ReadIt v)) (f v))
- writeStartTraversable :: (Traversable f, Applicative f, C v) => CodeGenFunction r (WriteIterator (f (WriteIt v)) (f v))
- writeNextTraversable :: (Traversable f, Applicative f, C v) => f (Element v) -> WriteIterator (f (WriteIt v)) (f v) -> CodeGenFunction r (WriteIterator (f (WriteIt v)) (f v))
- writeStopTraversable :: (Traversable f, Applicative f, C v) => WriteIterator (f (WriteIt v)) (f v) -> CodeGenFunction r (f v)
- writeZeroTraversable :: (Traversable f, Applicative f, Zero v) => CodeGenFunction r (WriteIterator (f (WriteIt v)) (f v))
- modify :: C v => Value Word32 -> (Element v -> CodeGenFunction r (Element v)) -> v -> CodeGenFunction r v
- upsample :: C v => Element v -> CodeGenFunction r v
- subsample :: Read v => v -> CodeGenFunction r (Element v)
- cumulate :: (Arithmetic a, PositiveT n) => Value a -> Value n a -> CodeGenFunction r (Value a, Value n a)
- iterate :: C v => (Element v -> CodeGenFunction r (Element v)) -> Element v -> CodeGenFunction r v
- reverse :: C v => v -> CodeGenFunction r v
- shiftUp :: C v => Element v -> v -> CodeGenFunction r (Element v, v)
- shiftUpMultiZero :: (C v, Additive (Element v)) => Int -> v -> CodeGenFunction r v
- shiftDownMultiZero :: (C v, Additive (Element v)) => Int -> v -> CodeGenFunction r v
- replicate :: PositiveT n => a -> Plain n a
- replicateOf :: (PositiveT n, IsPrimitive a, IsConst a) => a -> Value n a
- fromList :: PositiveT n => [a] -> Plain n a
- mapV :: Functor m => (Value (Vector n a) -> m (Value (Vector n b))) -> Value n a -> m (Value n b)
- zipV :: Functor m => (c -> d) -> (Value (Vector n a) -> Value (Vector n b) -> m c) -> Value n a -> Value n b -> m d
Documentation
Cons v |
Eq v => Eq (T v) | |
Num v => Num (T v) | |
Storable v => Storable (T v) | |
Additive v => Additive (T v) | |
PseudoRing v => PseudoRing (T v) | |
PseudoModule v => PseudoModule (T v) | |
IntegerConstant v => IntegerConstant (T v) | |
Field v => Field (T v) | |
RationalConstant v => RationalConstant (T v) | |
Real v => Real (T v) | |
Fraction v => Fraction (T v) | |
Algebraic v => Algebraic (T v) | |
Transcendental v => Transcendental (T v) | |
C v => C (T v) | |
Undefined v => Undefined (T v) | |
Zero v => Zero (T v) | |
MakeValueTuple v => MakeValueTuple (T v) | |
Phi v => Phi (T v) | |
MakeArguments (T v) | |
Simple v => Sized (T v) | |
(C v, Zero v) => Zero (T v) | |
C v => C (T v) | |
Simple v => Read (T v) | This instance also allows to wrap tuples of vectors, but you cannot reasonably use them, because it would mean to serialize vectors with different element types. |
class (PositiveT (Size v), Sized v, Phi (ReadIt v), Undefined (ReadIt v), Phi v, Undefined v) => Read v whereSource
extract :: Value Word32 -> v -> CodeGenFunction r (Element v)Source
extractAll :: v -> CodeGenFunction r [Element v]Source
readStart :: v -> CodeGenFunction r (ReadIterator (ReadIt v) v)Source
readNext :: ReadIterator (ReadIt v) v -> CodeGenFunction r (Element v, ReadIterator (ReadIt v) v)Source
Read v => Read (T v) | |
Read v => Read (Result v) | |
Simple v => Read (T v) | This instance also allows to wrap tuples of vectors, but you cannot reasonably use them, because it would mean to serialize vectors with different element types. |
Read v => Read (Nodes13 v) | |
Read v => Read (Nodes02 v) | |
(Read va, Read vb, ~ * (Size va) (Size vb)) => Read (va, vb) | |
(PositiveT n, IsPrimitive a, IsFirstClass a) => Read (Value n a) | The implementation of |
(Read va, Read vb, Read vc, ~ * (Size va) (Size vb), ~ * (Size vb) (Size vc)) => Read (va, vb, vc) |
class (Read v, Phi (WriteIt v), Undefined (WriteIt v)) => C v whereSource
insert :: Value Word32 -> Element v -> v -> CodeGenFunction r vSource
assemble :: [Element v] -> CodeGenFunction r vSource
writeStart :: CodeGenFunction r (WriteIterator (WriteIt v) v)Source
writeNext :: Element v -> WriteIterator (WriteIt v) v -> CodeGenFunction r (WriteIterator (WriteIt v) v)Source
writeStop :: WriteIterator (WriteIt v) v -> CodeGenFunction r vSource
C v => C (T v) | |
C v => C (Result v) | |
C v => C (T v) | |
C v => C (Nodes13 v) | |
C v => C (Nodes02 v) | |
(C va, C vb, ~ * (Size va) (Size vb)) => C (va, vb) | |
(PositiveT n, IsPrimitive a, IsFirstClass a) => C (Value n a) | The implementation of |
(C va, C vb, C vc, ~ * (Size va) (Size vb), ~ * (Size vb) (Size vc)) => C (va, vb, vc) |
class (C v, Phi (WriteIt v), Zero (WriteIt v)) => Zero v whereSource
writeZero :: CodeGenFunction r (WriteIterator (WriteIt v) v)Source
type ReadIterator = Iterator ReadModeSource
type WriteIterator = Iterator WriteModeSource
class PositiveT (Size valueTuple) => Sized valueTuple Source
The type parameter value
shall be a virtual LLVM register
or a wrapper around one or more virtual LLVM registers.
Sized (Value a) | Basic LLVM types are all counted as scalar values, even LLVM Vectors. This means that an LLVM Vector can be used for parallel handling of data. |
Sized value => Sized (T value) | |
Sized v => Sized (Result v) | |
Simple v => Sized (T v) | |
Sized value => Sized (Nodes13 value) | |
Sized value => Sized (Nodes02 value) | |
(Sized value0, Sized value1, ~ * (Size value0) (Size value1)) => Sized (value0, value1) | |
PositiveT n => Sized (Value n a) | |
(Sized value0, Sized value1, Sized value2, ~ * (Size value0) (Size value1), ~ * (Size value1) (Size value2)) => Sized (value0, value1, value2) |
sizeOfIterator :: Sized v => Iterator mode it v -> IntSource
insertTraversable :: (C v, Traversable f, Applicative f) => Value Word32 -> f (Element v) -> f v -> CodeGenFunction r (f v)Source
extractTraversable :: (Read v, Traversable f) => Value Word32 -> f v -> CodeGenFunction r (f (Element v))Source
readStartTraversable :: (Traversable f, Applicative f, Read v) => f v -> CodeGenFunction r (ReadIterator (f (ReadIt v)) (f v))Source
readNextTraversable :: (Traversable f, Applicative f, Read v) => ReadIterator (f (ReadIt v)) (f v) -> CodeGenFunction r (f (Element v), ReadIterator (f (ReadIt v)) (f v))Source
writeStartTraversable :: (Traversable f, Applicative f, C v) => CodeGenFunction r (WriteIterator (f (WriteIt v)) (f v))Source
writeNextTraversable :: (Traversable f, Applicative f, C v) => f (Element v) -> WriteIterator (f (WriteIt v)) (f v) -> CodeGenFunction r (WriteIterator (f (WriteIt v)) (f v))Source
writeStopTraversable :: (Traversable f, Applicative f, C v) => WriteIterator (f (WriteIt v)) (f v) -> CodeGenFunction r (f v)Source
writeZeroTraversable :: (Traversable f, Applicative f, Zero v) => CodeGenFunction r (WriteIterator (f (WriteIt v)) (f v))Source
modify :: C v => Value Word32 -> (Element v -> CodeGenFunction r (Element v)) -> v -> CodeGenFunction r vSource
upsample :: C v => Element v -> CodeGenFunction r vSource
subsample :: Read v => v -> CodeGenFunction r (Element v)Source
cumulate :: (Arithmetic a, PositiveT n) => Value a -> Value n a -> CodeGenFunction r (Value a, Value n a)Source
iterate :: C v => (Element v -> CodeGenFunction r (Element v)) -> Element v -> CodeGenFunction r vSource
reverse :: C v => v -> CodeGenFunction r vSource
shiftUpMultiZero :: (C v, Additive (Element v)) => Int -> v -> CodeGenFunction r vSource
shiftDownMultiZero :: (C v, Additive (Element v)) => Int -> v -> CodeGenFunction r vSource
replicateOf :: (PositiveT n, IsPrimitive a, IsConst a) => a -> Value n aSource