Safe Haskell | None |
---|
A Vector
interface to packed sequences of bits
- class (Type w, Numeric w, Bits w, Integral w) => Unit w where
- data BitVector w = BitVector {}
- data Segment w = Segment {}
- length :: forall w. Unit w => BitVector w -> Data Length
- numOfUnits :: Unit w => BitVector w -> Data Length
- freezeBitVector :: forall w. Unit w => BitVector w -> Data [w]
- unfreezeBitVector :: forall w. Unit w => Data [w] -> BitVector w
- fromVector :: forall w. (Unit w, Size w ~ Range w) => Vector (Data Bool) -> BitVector w
- toVector :: forall w. (Unit w, Size w ~ Range w) => BitVector w -> Vector (Data Bool)
- fromBits :: forall w. Unit w => [Bool] -> BitVector w
- fromUnits :: Unit w => [w] -> BitVector w
- replUnit :: Unit w => Data Length -> w -> BitVector w
- indexed :: (Unit w, Size w ~ Range w) => Data Length -> (Data Index -> Data Bool) -> BitVector w
- map :: (Unit w, Size w ~ Range w) => (Data Bool -> Data Bool) -> BitVector w -> BitVector w
- takeUnits :: forall w. Unit w => Data Length -> BitVector w -> BitVector w
- dropUnits :: forall w. Unit w => Data Length -> BitVector w -> BitVector w
- (++) :: forall w. Unit w => BitVector w -> BitVector w -> BitVector w
- drop :: forall w. (Unit w, Size w ~ Range w) => Data Length -> Data w -> BitVector w -> BitVector w
- fold :: forall w a. (Syntax a, Unit w, Size w ~ Range w) => (a -> Data Bool -> a) -> a -> BitVector w -> a
- zipWith :: forall w. (Unit w, Size w ~ Range w) => (Data Bool -> Data Bool -> Data Bool) -> BitVector w -> BitVector w -> BitVector w
- head :: (Unit w, Size w ~ Range w) => BitVector w -> Data Bool
- tail :: forall w. (Unit w, Size w ~ Range w) => Data Bool -> BitVector w -> BitVector w
- boolFun1 :: (Syntax t, Unit w, Size w ~ Range w) => (Data Bool -> Data Bool) -> ((Data w -> Data w) -> t) -> t
- boolFun2 :: (Syntax t, Unit w, Size w ~ Range w) => (Data Bool -> Data Bool -> Data Bool) -> ((Data w -> Data w -> Data w) -> t) -> t
- tBV :: Patch w w -> Patch (BitVector w) (BitVector w)
Types and classes
Feldspar integration of BitVector
Operations
freezeBitVector :: forall w. Unit w => BitVector w -> Data [w]Source
unfreezeBitVector :: forall w. Unit w => Data [w] -> BitVector wSource
fromVector :: forall w. (Unit w, Size w ~ Range w) => Vector (Data Bool) -> BitVector wSource
Transforms a bool vector to a bitvector. Length of the vector has to be divisible by the wordlength, otherwise booleans at the end will be dropped.
indexed :: (Unit w, Size w ~ Range w) => Data Length -> (Data Index -> Data Bool) -> BitVector wSource
drop :: forall w. (Unit w, Size w ~ Range w) => Data Length -> Data w -> BitVector w -> BitVector wSource
fold :: forall w a. (Syntax a, Unit w, Size w ~ Range w) => (a -> Data Bool -> a) -> a -> BitVector w -> aSource
zipWith :: forall w. (Unit w, Size w ~ Range w) => (Data Bool -> Data Bool -> Data Bool) -> BitVector w -> BitVector w -> BitVector wSource
Boolean functions extended to words
boolFun1 :: (Syntax t, Unit w, Size w ~ Range w) => (Data Bool -> Data Bool) -> ((Data w -> Data w) -> t) -> tSource
boolFun2 :: (Syntax t, Unit w, Size w ~ Range w) => (Data Bool -> Data Bool -> Data Bool) -> ((Data w -> Data w -> Data w) -> t) -> tSource