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

Futhark.IR.MC.Op

Description

Definitions for multicore operations.

Most of the interesting stuff is in Futhark.IR.SegOp, which is also re-exported from here.

Synopsis

Documentation

data MCOp op rep Source #

An operation for the multicore representation. Feel free to extend this on an ad hoc basis as needed. Parameterised with some other operation.

Constructors

ParOp (Maybe (SegOp () rep)) (SegOp () rep)

The first SegOp (if it exists) contains nested parallelism, while the second one has a fully sequential body. They are semantically fully equivalent.

OtherOp (op rep)

Something else (in practice often a SOAC).

Instances

Instances details
CanBeAliased op => CanBeAliased (MCOp op) Source # 
Instance details

Defined in Futhark.IR.MC.Op

Methods

addOpAliases :: AliasableRep rep => AliasTable -> MCOp op rep -> MCOp op (Aliases rep) Source #

RephraseOp op => RephraseOp (MCOp op) Source # 
Instance details

Defined in Futhark.IR.MC.Op

Methods

rephraseInOp :: Monad m => Rephraser m from to -> MCOp op from -> m (MCOp op to) Source #

CanBeWise op => CanBeWise (MCOp op) Source # 
Instance details

Defined in Futhark.IR.MC.Op

Methods

addOpWisdom :: Informing rep => MCOp op rep -> MCOp op (Wise rep) Source #

(RepTypes rep, Show (op rep)) => Show (MCOp op rep) Source # 
Instance details

Defined in Futhark.IR.MC.Op

Methods

showsPrec :: Int -> MCOp op rep -> ShowS #

show :: MCOp op rep -> String #

showList :: [MCOp op rep] -> ShowS #

(OpMetrics (Op rep), OpMetrics (op rep)) => OpMetrics (MCOp op rep) Source # 
Instance details

Defined in Futhark.IR.MC.Op

Methods

opMetrics :: MCOp op rep -> MetricsM () Source #

(ASTRep rep, IndexOp (op rep)) => IndexOp (MCOp op rep) Source # 
Instance details

Defined in Futhark.IR.MC.Op

Methods

indexOp :: (ASTRep rep0, IndexOp (Op rep0)) => SymbolTable rep0 -> Int -> MCOp op rep -> [TPrimExp Int64 VName] -> Maybe Indexed Source #

OpReturns (MCOp (NoOp :: Type -> Type) (Aliases MCMem)) Source # 
Instance details

Defined in Futhark.IR.MCMem

Methods

opReturns :: forall rep (inner :: Type -> Type) m. (Mem rep inner, Monad m, HasScope rep m) => MCOp NoOp (Aliases MCMem) -> m [ExpReturns] Source #

OpReturns (MCOp (NoOp :: Type -> Type) MCMem) Source # 
Instance details

Defined in Futhark.IR.MCMem

Methods

opReturns :: forall rep (inner :: Type -> Type) m. (Mem rep inner, Monad m, HasScope rep m) => MCOp NoOp MCMem -> m [ExpReturns] Source #

OpReturns (MCOp (NoOp :: Type -> Type) (Wise MCMem)) Source # 
Instance details

Defined in Futhark.IR.MCMem

Methods

opReturns :: forall rep (inner :: Type -> Type) m. (Mem rep inner, Monad m, HasScope rep m) => MCOp NoOp (Wise MCMem) -> m [ExpReturns] Source #

(ASTRep rep, IsOp (op rep)) => IsOp (MCOp op rep) Source # 
Instance details

Defined in Futhark.IR.MC.Op

Methods

safeOp :: MCOp op rep -> Bool Source #

cheapOp :: MCOp op rep -> Bool Source #

(Aliased rep, AliasedOp (op rep)) => AliasedOp (MCOp op rep) Source # 
Instance details

Defined in Futhark.IR.MC.Op

Methods

opAliases :: MCOp op rep -> [Names] Source #

consumedInOp :: MCOp op rep -> Names Source #

(ASTRep rep, FreeIn (op rep)) => FreeIn (MCOp op rep) Source # 
Instance details

Defined in Futhark.IR.MC.Op

Methods

freeIn' :: MCOp op rep -> FV Source #

TypedOp (op rep) => TypedOp (MCOp op rep) Source # 
Instance details

Defined in Futhark.IR.MC.Op

Methods

opType :: HasScope t m => MCOp op rep -> m [ExtType] Source #

TopDownHelper (inner (Aliases MCMem)) => TopDownHelper (MCOp inner (Aliases MCMem)) Source # 
Instance details

Defined in Futhark.Optimise.ArrayShortCircuiting.TopdownAnalysis

(Aliased rep, CSEInOp (Op rep), CSEInOp (op rep)) => CSEInOp (MCOp op rep) Source # 
Instance details

Defined in Futhark.Optimise.CSE

Methods

cseInOp :: MCOp op rep -> CSEM rep0 (MCOp op rep)

SizeSubst (MCOp rep op) Source # 
Instance details

Defined in Futhark.Pass.ExplicitAllocations.MC

Methods

opIsConst :: MCOp rep op -> Bool Source #

(ASTRep rep, Rename (op rep)) => Rename (MCOp op rep) Source # 
Instance details

Defined in Futhark.IR.MC.Op

Methods

rename :: MCOp op rep -> RenameM (MCOp op rep) Source #

(ASTRep rep, Substitute (op rep)) => Substitute (MCOp op rep) Source # 
Instance details

Defined in Futhark.IR.MC.Op

Methods

substituteNames :: Map VName VName -> MCOp op rep -> MCOp op rep Source #

(RepTypes rep, Eq (op rep)) => Eq (MCOp op rep) Source # 
Instance details

Defined in Futhark.IR.MC.Op

Methods

(==) :: MCOp op rep -> MCOp op rep -> Bool #

(/=) :: MCOp op rep -> MCOp op rep -> Bool #

(RepTypes rep, Ord (op rep)) => Ord (MCOp op rep) Source # 
Instance details

Defined in Futhark.IR.MC.Op

Methods

compare :: MCOp op rep -> MCOp op rep -> Ordering #

(<) :: MCOp op rep -> MCOp op rep -> Bool #

(<=) :: MCOp op rep -> MCOp op rep -> Bool #

(>) :: MCOp op rep -> MCOp op rep -> Bool #

(>=) :: MCOp op rep -> MCOp op rep -> Bool #

max :: MCOp op rep -> MCOp op rep -> MCOp op rep #

min :: MCOp op rep -> MCOp op rep -> MCOp op rep #

(PrettyRep rep, Pretty (op rep)) => Pretty (MCOp op rep) Source # 
Instance details

Defined in Futhark.IR.MC.Op

Methods

pretty :: MCOp op rep -> Doc ann #

prettyList :: [MCOp op rep] -> Doc ann #

traverseMCOpStms :: Monad m => OpStmsTraverser m (op rep) rep -> OpStmsTraverser m (MCOp op rep) rep Source #

typeCheckMCOp :: Checkable rep => (op (Aliases rep) -> TypeM rep ()) -> MCOp op (Aliases rep) -> TypeM rep () Source #

simplifyMCOp :: (SimplifiableRep rep, BodyDec rep ~ ()) => SimplifyOp rep (op (Wise rep)) -> MCOp op (Wise rep) -> SimpleM rep (MCOp op (Wise rep), Stms (Wise rep)) Source #