feldspar-language-0.4.0.2: A functional embedded language for DSP and parallelism

Feldspar.Core.Functions.Bits

Description

Bit manipulation

Synopsis

Documentation

class (Bits a, Type a, FullProp (Size a)) => Bits a whereSource

Redefinition of the standard Bits class for Feldspar

Methods

(.&.) :: Data a -> Data a -> Data aSource

(.|.) :: Data a -> Data a -> Data aSource

xor :: Data a -> Data a -> Data aSource

complement :: Data a -> Data aSource

bit :: Data Index -> Data aSource

setBit :: Data a -> Data Index -> Data aSource

clearBit :: Data a -> Data Index -> Data aSource

complementBit :: Data a -> Data Index -> Data aSource

testBit :: Data a -> Data Index -> Data BoolSource

shiftLU :: Data a -> Data Index -> Data aSource

shiftRU :: Data a -> Data Index -> Data aSource

shiftL :: Data a -> Data DefaultInt -> Data aSource

shiftR :: Data a -> Data DefaultInt -> Data aSource

rotateLU :: Data a -> Data Index -> Data aSource

rotateRU :: Data a -> Data Index -> Data aSource

rotateL :: Data a -> Data DefaultInt -> Data aSource

rotateR :: Data a -> Data DefaultInt -> Data aSource

reverseBits :: Data a -> Data aSource

bitScan :: Data a -> Data IndexSource

Returns the number of leading zeroes for unsigned types. For signed types it returns the number of unnecessary sign bits

bitCount :: Data a -> Data IndexSource

bitSize :: Data a -> Data IndexSource

isSigned :: Data a -> Data BoolSource

liftIntWord :: (a -> Int -> b) -> a -> DefaultWord -> bSource

liftInt :: (a -> Int -> b) -> a -> DefaultInt -> bSource

(⊕) :: Bits a => Data a -> Data a -> Data aSource

(<<) :: Bits a => Data a -> Data Index -> Data aSource

(>>) :: Bits a => Data a -> Data Index -> Data aSource

optAnd :: Bits a => (Size a -> Size a -> Size a) -> Data a -> Data a -> Data aSource

optOr :: Bits a => (Size a -> Size a -> Size a) -> Data a -> Data a -> Data aSource

optXor :: Bits a => (Size a -> Size a -> Size a) -> Data a -> Data a -> Data aSource

optZero :: (Type n, Num n) => (a -> Data n -> a) -> a -> Data n -> aSource