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 where

Redefinition of the standard Bits class for Feldspar

Methods

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

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

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

complement :: Data a -> Data a

bit :: Data Index -> Data a

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

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

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

testBit :: Data a -> Data Index -> Data Bool

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

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

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

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

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

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

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

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

reverseBits :: Data a -> Data a

bitScan :: Data a -> Data Index

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

bitCount :: Data a -> Data Index

bitSize :: Data a -> Data Index

isSigned :: Data a -> Data Bool

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

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

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

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

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

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

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

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

isAllOnes :: Bits a => a -> Bool

allOnes :: Bits a => a

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

evalBitScan :: Bits b => b -> Word

evalBitCount :: Bits b => b -> Word

evalReverseBits :: Bits b => b -> b