futhark-0.25.5: An optimising compiler for a functional, array-oriented language.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Futhark.Pass.ExtractKernels.BlockedKernel

Synopsis

Documentation

type DistRep rep = (Buildable rep, HasSegOp rep, BuilderOps rep, LetDec rep ~ Type, ExpDec rep ~ (), BodyDec rep ~ (), AliasableRep rep) Source #

Constraints pertinent to performing distribution/flattening.

segRed :: (MonadFreshNames m, DistRep rep, HasScope rep m) => SegOpLevel rep -> Pat (LetDec rep) -> Certs -> SubExp -> [SegBinOp rep] -> Lambda rep -> [VName] -> [(VName, SubExp)] -> [KernelInput] -> m (Stms rep) Source #

nonSegRed :: (MonadFreshNames m, DistRep rep, HasScope rep m) => SegOpLevel rep -> Pat Type -> SubExp -> [SegBinOp rep] -> Lambda rep -> [VName] -> m (Stms rep) Source #

segScan :: (MonadFreshNames m, DistRep rep, HasScope rep m) => SegOpLevel rep -> Pat (LetDec rep) -> Certs -> SubExp -> [SegBinOp rep] -> Lambda rep -> [VName] -> [(VName, SubExp)] -> [KernelInput] -> m (Stms rep) Source #

segHist Source #

Arguments

:: (DistRep rep, MonadFreshNames m, HasScope rep m) 
=> SegOpLevel rep 
-> Pat Type 
-> SubExp 
-> [(VName, SubExp)]

Segment indexes and sizes.

-> [KernelInput] 
-> [HistOp rep] 
-> Lambda rep 
-> [VName] 
-> m (Stms rep) 

segMap :: (MonadFreshNames m, DistRep rep, HasScope rep m) => SegOpLevel rep -> Pat (LetDec rep) -> SubExp -> Lambda rep -> [VName] -> [(VName, SubExp)] -> [KernelInput] -> m (Stms rep) Source #

mapKernel :: (DistRep rep, HasScope rep m, MonadFreshNames m) => MkSegLevel rep m -> [(VName, SubExp)] -> [KernelInput] -> [Type] -> KernelBody rep -> m (SegOp (SegOpLevel rep) rep, Stms rep) Source #

dummyDim :: MonadBuilder m => Pat Type -> m (Pat Type, [(VName, SubExp)], m ()) Source #