futhark-0.9.1: An optimising compiler for a functional, array-oriented language.

Safe HaskellNone
LanguageHaskell2010

Futhark.Representation.ExplicitMemory.IndexFunction

Description

An index function represents a mapping from an array index space to a flat byte offset.

Synopsis

Documentation

data IxFun num Source #

Instances
Functor IxFun Source # 
Instance details

Defined in Futhark.Representation.ExplicitMemory.IndexFunction

Methods

fmap :: (a -> b) -> IxFun a -> IxFun b #

(<$) :: a -> IxFun b -> IxFun a #

Foldable IxFun Source # 
Instance details

Defined in Futhark.Representation.ExplicitMemory.IndexFunction

Methods

fold :: Monoid m => IxFun m -> m #

foldMap :: Monoid m => (a -> m) -> IxFun a -> m #

foldr :: (a -> b -> b) -> b -> IxFun a -> b #

foldr' :: (a -> b -> b) -> b -> IxFun a -> b #

foldl :: (b -> a -> b) -> b -> IxFun a -> b #

foldl' :: (b -> a -> b) -> b -> IxFun a -> b #

foldr1 :: (a -> a -> a) -> IxFun a -> a #

foldl1 :: (a -> a -> a) -> IxFun a -> a #

toList :: IxFun a -> [a] #

null :: IxFun a -> Bool #

length :: IxFun a -> Int #

elem :: Eq a => a -> IxFun a -> Bool #

maximum :: Ord a => IxFun a -> a #

minimum :: Ord a => IxFun a -> a #

sum :: Num a => IxFun a -> a #

product :: Num a => IxFun a -> a #

Traversable IxFun Source # 
Instance details

Defined in Futhark.Representation.ExplicitMemory.IndexFunction

Methods

traverse :: Applicative f => (a -> f b) -> IxFun a -> f (IxFun b) #

sequenceA :: Applicative f => IxFun (f a) -> f (IxFun a) #

mapM :: Monad m => (a -> m b) -> IxFun a -> m (IxFun b) #

sequence :: Monad m => IxFun (m a) -> m (IxFun a) #

Eq num => Eq (IxFun num) Source # 
Instance details

Defined in Futhark.Representation.ExplicitMemory.IndexFunction

Methods

(==) :: IxFun num -> IxFun num -> Bool #

(/=) :: IxFun num -> IxFun num -> Bool #

Show num => Show (IxFun num) Source # 
Instance details

Defined in Futhark.Representation.ExplicitMemory.IndexFunction

Methods

showsPrec :: Int -> IxFun num -> ShowS #

show :: IxFun num -> String #

showList :: [IxFun num] -> ShowS #

Pretty num => Pretty (IxFun num) Source # 
Instance details

Defined in Futhark.Representation.ExplicitMemory.IndexFunction

Methods

ppr :: IxFun num -> Doc #

pprPrec :: Int -> IxFun num -> Doc #

pprList :: [IxFun num] -> Doc #

FreeIn num => FreeIn (IxFun num) Source # 
Instance details

Defined in Futhark.Representation.ExplicitMemory.IndexFunction

Methods

freeIn :: IxFun num -> Names Source #

Substitute num => Substitute (IxFun num) Source # 
Instance details

Defined in Futhark.Representation.ExplicitMemory.IndexFunction

Methods

substituteNames :: Map VName VName -> IxFun num -> IxFun num Source #

Substitute num => Rename (IxFun num) Source # 
Instance details

Defined in Futhark.Representation.ExplicitMemory.IndexFunction

Methods

rename :: IxFun num -> RenameM (IxFun num) Source #

index :: (Pretty num, IntegralExp num) => IxFun num -> Indices num -> num -> num Source #

iota :: Shape num -> IxFun num Source #

offsetIndex :: (Eq num, IntegralExp num) => IxFun num -> num -> IxFun num Source #

strideIndex :: (Eq num, IntegralExp num) => IxFun num -> num -> IxFun num Source #

permute :: IntegralExp num => IxFun num -> Permutation -> IxFun num Source #

rotate :: IntegralExp num => IxFun num -> Indices num -> IxFun num Source #

reshape :: (Eq num, IntegralExp num) => IxFun num -> ShapeChange num -> IxFun num Source #

slice :: (Eq num, IntegralExp num) => IxFun num -> Slice num -> IxFun num Source #

base :: IxFun num -> Shape num Source #

rebase :: (Eq num, IntegralExp num) => IxFun num -> IxFun num -> IxFun num Source #

repeat :: IxFun num -> [Shape num] -> Shape num -> IxFun num Source #

shape :: IntegralExp num => IxFun num -> Shape num Source #

rank :: IntegralExp num => IxFun num -> Int Source #

linearWithOffset :: (Eq num, IntegralExp num) => IxFun num -> num -> Maybe num Source #

rearrangeWithOffset :: (Eq num, IntegralExp num) => IxFun num -> num -> Maybe (num, [(Int, num)]) Source #

isLinear :: (Eq num, IntegralExp num) => IxFun num -> Bool Source #

substituteInIxFun :: Ord a => Map a (PrimExp a) -> IxFun (PrimExp a) -> IxFun (PrimExp a) Source #

Substituting a name with a PrimExp in an index function.

subsInIndexIxFun :: IxFn -> VName -> VName -> IxFn Source #

ixFunsCompatibleRaw :: Eq num => IxFun num -> IxFun num -> Bool Source #

offsetIndexDWIM :: Int -> IxFn -> PrimExp VName -> IxFn Source #