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

Feldspar.Core.Functions

Synopsis

Documentation

class Type a => Eq a where

Redefinition of the standard Eq class for Feldspar

Methods

(==) :: Data a -> Data a -> Data Bool

(/=) :: Data a -> Data a -> Data Bool

Instances

Eq Bool 
Eq Float 
Eq Int8 
Eq Int16 
Eq Int32 
Eq Word8 
Eq Word16 
Eq Word32 
Eq () 
Eq DefaultInt 
Eq DefaultWord 
Eq a => Eq [a] 
(Eq a, RealFloat a) => Eq (Complex a) 
(Eq a, Eq b) => Eq (a, b) 
(Eq a, Eq b, Eq c) => Eq (a, b, c) 
(Eq a, Eq b, Eq c, Eq d) => Eq (a, b, c, d) 

class (Eq a, Ord a) => Ord a where

Redefinition of the standard Ord class for Feldspar

Methods

(<) :: Data a -> Data a -> Data Bool

(>) :: Data a -> Data a -> Data Bool

(<=) :: Data a -> Data a -> Data Bool

(>=) :: Data a -> Data a -> Data Bool

min :: Data a -> Data a -> Data a

max :: Data a -> Data a -> Data a

class (Type a, Num a, FullProp (Size a)) => Numeric a

Numeric types. The relation to the standard Num class is

instance Numeric a => Num (Data a)

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

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

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

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

class (Numeric a, BoundedInt a, Bits a, Ord a) => Integral a where

Redefinition of the standard Integral class for Feldspar

Methods

quot :: Data a -> Data a -> Data a

rem :: Data a -> Data a -> Data a

div :: Data a -> Data a -> Data a

mod :: Data a -> Data a -> Data a

(^) :: Data a -> Data a -> Data a

class (Fractional a, Numeric a) => Fractional' a

Fractional types. The relation to the standard Fractional class is

instance Frational' a => Fractional (Data a)

arrayLen :: Type a => Data Length -> [a] -> Data [a]

Constructs an array of the given length and initialization.

getIx :: Type a => Data [a] -> Data Index -> Data a

Look up an index in an array (see also !)

setIx

Arguments

:: Type a 
=> Data [a]

Source array

-> Data Index

Index to replace

-> Data a

New value

-> Data [a] 

Array update

getLength :: Type a => Data [a] -> Data Length

Array length

class RandomAccess a where

Associated Types

type Element a

The type of elements in a random access structure

Methods

(!) :: a -> Data Index -> Element a

Index lookup in a random access structure

Instances