Safe Haskell | None |
---|---|
Language | Haskell2010 |
An index function represents a mapping from an array index space to a flat byte offset.
Synopsis
- data IxFun num
- index :: (Pretty num, IntegralExp num) => IxFun num -> Indices num -> num -> num
- iota :: Shape num -> IxFun num
- offsetIndex :: (Eq num, IntegralExp num) => IxFun num -> num -> IxFun num
- strideIndex :: (Eq num, IntegralExp num) => IxFun num -> num -> IxFun num
- permute :: IntegralExp num => IxFun num -> Permutation -> IxFun num
- rotate :: IntegralExp num => IxFun num -> Indices num -> IxFun num
- reshape :: (Eq num, IntegralExp num) => IxFun num -> ShapeChange num -> IxFun num
- slice :: (Eq num, IntegralExp num) => IxFun num -> Slice num -> IxFun num
- base :: IxFun num -> Shape num
- rebase :: (Eq num, IntegralExp num) => IxFun num -> IxFun num -> IxFun num
- repeat :: IxFun num -> [Shape num] -> Shape num -> IxFun num
- shape :: IntegralExp num => IxFun num -> Shape num
- rank :: IntegralExp num => IxFun num -> Int
- linearWithOffset :: (Eq num, IntegralExp num) => IxFun num -> num -> Maybe num
- rearrangeWithOffset :: (Eq num, IntegralExp num) => IxFun num -> num -> Maybe (num, [(Int, num)])
- isLinear :: (Eq num, IntegralExp num) => IxFun num -> Bool
- isDirect :: IxFun num -> Bool
- substituteInIxFun :: Ord a => Map a (PrimExp a) -> IxFun (PrimExp a) -> IxFun (PrimExp a)
- getInfoMaxUnification :: IxFn -> Maybe (IxFn, Slice (PrimExp VName), VName)
- subsInIndexIxFun :: IxFn -> VName -> VName -> IxFn
- ixFunsCompatibleRaw :: Eq num => IxFun num -> IxFun num -> Bool
- ixFunHasIndex :: IxFun num -> Bool
- offsetIndexDWIM :: Int -> IxFn -> PrimExp VName -> IxFn
Documentation
Instances
Functor IxFun Source # | |
Foldable IxFun Source # | |
Defined in Futhark.Representation.ExplicitMemory.IndexFunction 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 # elem :: Eq a => a -> IxFun a -> Bool # maximum :: Ord a => IxFun a -> a # minimum :: Ord a => IxFun a -> a # | |
Traversable IxFun Source # | |
Eq num => Eq (IxFun num) Source # | |
Show num => Show (IxFun num) Source # | |
Pretty num => Pretty (IxFun num) Source # | |
FreeIn num => FreeIn (IxFun num) Source # | |
Substitute num => Substitute (IxFun num) Source # | |
Substitute num => Rename (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 #
reshape :: (Eq num, IntegralExp num) => IxFun num -> ShapeChange num -> IxFun num Source #
shape :: IntegralExp num => IxFun num -> Shape num 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 #
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 #
ixFunHasIndex :: IxFun num -> Bool Source #