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

Safe HaskellNone
LanguageHaskell2010

Futhark.Tools

Contents

Synopsis

Documentation

nonuniqueParams :: (MonadFreshNames m, Bindable lore, HasScope lore m, BinderOps lore) => [LParam lore] -> m ([LParam lore], Stms lore) Source #

redomapToMapAndReduce :: (MonadFreshNames m, Bindable lore, ExpAttr lore ~ (), Op lore ~ SOAC lore) => Pattern lore -> (SubExp, Commutativity, LambdaT lore, LambdaT lore, [SubExp], [VName]) -> m (Stm lore, Stm lore) Source #

Turns a binding of a redomap into two seperate bindings, a map binding and a reduce binding (returned in that order).

Reuses the original pattern for the reduce, and creates a new pattern with new Idents for the result of the map.

Only handles a PatternT with an empty patternContextElements

scanomapToMapAndScan :: (MonadFreshNames m, Bindable lore, ExpAttr lore ~ (), Op lore ~ SOAC lore) => Pattern lore -> (SubExp, LambdaT lore, LambdaT lore, [SubExp], [VName]) -> m (Stm lore, Stm lore) Source #

Like redomapToMapAndReduce, but for Scanomap.

dissectScrema :: (MonadBinder m, Op (Lore m) ~ SOAC (Lore m), Bindable (Lore m)) => Pattern (Lore m) -> SubExp -> ScremaForm (Lore m) -> [VName] -> m () Source #

Turn a Screma into simpler Scremas that are all simple scans, reduces, and maps. This is used to handle Scremas that are so complicated that we cannot directly generate efficient parallel code for them. In essense, what happens is the opposite of horisontal fusion.

partitionChunkedFoldParameters :: Int -> [Param attr] -> (Param attr, [Param attr], [Param attr]) Source #

partitionChunkedKernelFoldParameters :: Int -> [Param attr] -> (VName, Param attr, [Param attr], [Param attr]) Source #

Primitive expressions