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

Safe Haskell | Safe-Inferred
Language | GHC2021

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

- data MCOp op rep
  - = ParOp (Maybe (SegOp () rep)) (SegOp () rep)
  - | OtherOp (op rep)
- traverseMCOpStms :: Monad m => OpStmsTraverser m (op rep) rep -> OpStmsTraverser m (MCOp op rep) rep
- typeCheckMCOp :: Checkable rep => (op (Aliases rep) -> TypeM rep ()) -> MCOp op (Aliases rep) -> TypeM rep ()
- simplifyMCOp :: (SimplifiableRep rep, BodyDec rep ~ ()) => SimplifyOp rep (op (Wise rep)) -> MCOp op (Wise rep) -> SimpleM rep (MCOp op (Wise rep), Stms (Wise rep))
- module Futhark.IR.SegOp

# 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 #
OpReturns (MCOp (NoOp :: Type -> Type)) Source # |
Instance details Defined in Futhark.IR.MC.Op Methods opReturns :: forall rep (inner :: Type -> Type) m. (Mem rep inner, Monad m, HasScope rep m) => MCOp NoOp rep -> m [ExpReturns] Source #
IsOp op => IsOp (MCOp op) Source # |
Instance details Defined in Futhark.IR.MC.Op Methods safeOp :: ASTRep rep => MCOp op rep -> Bool Source # cheapOp :: ASTRep rep => MCOp op rep -> Bool Source # opDependencies :: ASTRep rep => MCOp op rep -> [Names] Source #
AliasedOp op => AliasedOp (MCOp op) Source # |
Instance details Defined in Futhark.IR.MC.Op Methods opAliases :: Aliased rep => MCOp op rep -> [Names] Source # consumedInOp :: Aliased rep => MCOp op rep -> Names Source #
TypedOp op => TypedOp (MCOp op) Source # |
Instance details Defined in Futhark.IR.MC.Op Methods opType :: HasScope rep m => MCOp op rep -> m [ExtType] 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 Source # show :: MCOp op rep -> String Source # showList :: [MCOp op rep] -> ShowS Source #
(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 #
(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 #
TopDownHelper (inner (Aliases MCMem)) => TopDownHelper (MCOp inner (Aliases MCMem)) Source # |
Instance details Defined in Futhark.Optimise.ArrayShortCircuiting.TopdownAnalysis Methods innerNonNegatives :: [VName] -> MCOp inner (Aliases MCMem) -> Names innerKnownLessThan :: MCOp inner (Aliases MCMem) -> [(VName, PrimExp VName)] scopeHelper :: MCOp inner (Aliases MCMem) -> Scope rep
(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 Source # (/=) :: MCOp op rep -> MCOp op rep -> Bool Source #
(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 Source #

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

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

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

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

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

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

(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 Source # prettyList :: [MCOp op rep] -> Doc ann Source #

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 #

module Futhark.IR.SegOp