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

Safe Haskell | Safe-Inferred
Language | GHC2021

Futhark.Pass.ExtractKernels.DistributeNests

# Documentation

data MapLoop Source #

Constructors

MapLoop (Pat Type) (StmAux ()) SubExp (Lambda SOACS) [VName] |

mapLoopStm :: MapLoop -> Stm SOACS Source #

bodyContainsParallelism :: Body SOACS -> Bool Source #

lambdaContainsParallelism :: Lambda SOACS -> Bool Source #

determineReduceOp :: MonadBuilder m => Lambda SOACS -> [SubExp] -> m (Lambda SOACS, [SubExp], Shape) Source #

histKernel :: (MonadBuilder m, DistRep (Rep m)) => (Lambda SOACS -> m (Lambda (Rep m))) -> SegOpLevel (Rep m) -> Pat Type -> [(VName, SubExp)] -> [KernelInput] -> Certs -> SubExp -> [HistOp SOACS] -> Lambda (Rep m) -> [VName] -> m (Stms (Rep m)) Source #

data DistEnv rep m Source #

Constructors

DistEnv |

Fields

- distNest :: Nestings
- distScope :: Scope rep
- distOnTopLevelStms :: Stms SOACS -> DistNestT rep m (Stms rep)
- distOnInnerMap :: MapLoop -> DistAcc rep -> DistNestT rep m (DistAcc rep)
- distOnSOACSStms :: Stm SOACS -> Builder rep (Stms rep)
- distOnSOACSLambda :: Lambda SOACS -> Builder rep (Lambda rep)
- distSegLevel :: MkSegLevel rep m

#### Instances

Instances details

Monad m => MonadReader (DistEnv rep m) (DistNestT rep m) Source # |
Instance details Defined in Futhark.Pass.ExtractKernels.DistributeNests Methods ask :: DistNestT rep m (DistEnv rep m) Source # local :: (DistEnv rep m -> DistEnv rep m) -> DistNestT rep m a -> DistNestT rep m a Source # reader :: (DistEnv rep m -> a) -> DistNestT rep m a Source #

data DistAcc rep Source #

Constructors

DistAcc |

Fields

- distTargets :: Targets
- distStms :: Stms rep

runDistNestT :: (MonadLogger m, DistRep rep) => DistEnv rep m -> DistNestT rep m (DistAcc rep) -> m (Stms rep) Source #

data DistNestT rep m a Source #

#### Instances

Instances details

(Monad m, ASTRep rep) => HasScope rep (DistNestT rep m) Source # |
Instance details Defined in Futhark.Pass.ExtractKernels.DistributeNests Methods lookupType :: VName -> DistNestT rep m Type Source # lookupInfo :: VName -> DistNestT rep m (NameInfo rep) Source # askScope :: DistNestT rep m (Scope rep) Source # asksScope :: (Scope rep -> a) -> DistNestT rep m a Source #
(Monad m, ASTRep rep) => LocalScope rep (DistNestT rep m) Source # |
Instance details Defined in Futhark.Pass.ExtractKernels.DistributeNests Methods localScope :: Scope rep -> DistNestT rep m a -> DistNestT rep m a Source #
Applicative m => Applicative (DistNestT rep m) Source # |

Instance details

Defined in Futhark.Pass.ExtractKernels.DistributeNests

Methods

pure :: a -> DistNestT rep m a Source #

(<*>) :: DistNestT rep m (a -> b) -> DistNestT rep m a -> DistNestT rep m b Source #

liftA2 :: (a -> b -> c) -> DistNestT rep m a -> DistNestT rep m b -> DistNestT rep m c Source #

(*>) :: DistNestT rep m a -> DistNestT rep m b -> DistNestT rep m b Source #

(<*) :: DistNestT rep m a -> DistNestT rep m b -> DistNestT rep m a Source #

Functor m => Functor (DistNestT rep m) Source # |
Instance details Defined in Futhark.Pass.ExtractKernels.DistributeNests Methods fmap :: (a -> b) -> DistNestT rep m a -> DistNestT rep m b Source # (<$) :: a -> DistNestT rep m b -> DistNestT rep m a Source #
Monad m => Monad (DistNestT rep m) Source # |
Instance details Defined in Futhark.Pass.ExtractKernels.DistributeNests Methods (>>=) :: DistNestT rep m a -> (a -> DistNestT rep m b) -> DistNestT rep m b Source # (>>) :: DistNestT rep m a -> DistNestT rep m b -> DistNestT rep m b Source # return :: a -> DistNestT rep m a Source #
MonadFreshNames m => MonadFreshNames (DistNestT rep m) Source # |
Instance details Defined in Futhark.Pass.ExtractKernels.DistributeNests Methods getNameSource :: DistNestT rep m VNameSource Source # putNameSource :: VNameSource -> DistNestT rep m () Source #
Monad m => MonadLogger (DistNestT rep m) Source # |
Instance details Defined in Futhark.Pass.ExtractKernels.DistributeNests Methods logMsg :: ToLog a => a -> DistNestT rep m () Source # addLog :: Log -> DistNestT rep m () Source #
Monad m => MonadReader (DistEnv rep m) (DistNestT rep m) Source # |
Instance details Defined in Futhark.Pass.ExtractKernels.DistributeNests Methods ask :: DistNestT rep m (DistEnv rep m) Source # local :: (DistEnv rep m -> DistEnv rep m) -> DistNestT rep m a -> DistNestT rep m a Source # reader :: (DistEnv rep m -> a) -> DistNestT rep m a Source #

liftInner :: (LocalScope rep m, DistRep rep) => m a -> DistNestT rep m a Source #

distributeMap :: (MonadFreshNames m, LocalScope rep m, DistRep rep) => MapLoop -> DistAcc rep -> DistNestT rep m (DistAcc rep) Source #

distribute :: (MonadFreshNames m, LocalScope rep m, DistRep rep) => DistAcc rep -> DistNestT rep m (DistAcc rep) Source #

distributeSingleStm :: (MonadFreshNames m, LocalScope rep m, DistRep rep) => DistAcc rep -> Stm SOACS -> DistNestT rep m (Maybe (PostStms rep, Result, KernelNest, DistAcc rep)) Source #

distributeMapBodyStms :: (MonadFreshNames m, LocalScope rep m, DistRep rep) => DistAcc rep -> Stms SOACS -> DistNestT rep m (DistAcc rep) Source #

addStmsToAcc :: Stms rep -> DistAcc rep -> DistAcc rep Source #

addStmToAcc :: (MonadFreshNames m, DistRep rep) => Stm SOACS -> DistAcc rep -> DistNestT rep m (DistAcc rep) Source #

permutationAndMissing :: Pat Type -> Result -> Maybe ([Int], [PatElem Type]) Source #

addPostStms :: Monad m => PostStms rep -> DistNestT rep m () Source #

postStm :: Monad m => Stms rep -> DistNestT rep m () Source #

inNesting :: (Monad m, DistRep rep) => KernelNest -> DistNestT rep m a -> DistNestT rep m a Source #