Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- module Futhark.Construct
- nonuniqueParams :: (MonadFreshNames m, Bindable lore, HasScope lore m, BinderOps lore) => [LParam lore] -> m ([LParam lore], Stms lore)
- 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)
- 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)
- dissectScrema :: (MonadBinder m, Op (Lore m) ~ SOAC (Lore m), Bindable (Lore m)) => Pattern (Lore m) -> SubExp -> ScremaForm (Lore m) -> [VName] -> m ()
- sequentialStreamWholeArray :: (MonadBinder m, Bindable (Lore m)) => Pattern (Lore m) -> SubExp -> [SubExp] -> LambdaT (Lore m) -> [VName] -> m ()
- partitionChunkedFoldParameters :: Int -> [Param attr] -> (Param attr, [Param attr], [Param attr])
- partitionChunkedKernelLambdaParameters :: [Param attr] -> (VName, Param attr, [Param attr])
- partitionChunkedKernelFoldParameters :: Int -> [Param attr] -> (VName, Param attr, [Param attr], [Param attr])
- module Futhark.Analysis.PrimExp.Convert
Documentation
module Futhark.Construct
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 Ident
s 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.
sequentialStreamWholeArray :: (MonadBinder m, Bindable (Lore m)) => Pattern (Lore m) -> SubExp -> [SubExp] -> LambdaT (Lore m) -> [VName] -> m () Source #
partitionChunkedFoldParameters :: Int -> [Param attr] -> (Param attr, [Param attr], [Param attr]) Source #
partitionChunkedKernelLambdaParameters :: [Param attr] -> (VName, Param attr, [Param attr]) Source #
partitionChunkedKernelFoldParameters :: Int -> [Param attr] -> (VName, Param attr, [Param attr], [Param attr]) Source #