futhark-0.21.8: An optimising compiler for a functional, array-oriented language.
Safe HaskellNone
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 rep op 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

Something else (in practice often a SOAC).

Instances

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

Defined in Futhark.IR.MC.Op

Methods

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

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

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

Defined in Futhark.IR.MC.Op

Methods

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

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

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

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

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

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

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

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

Defined in Futhark.IR.MC.Op

Methods

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

show :: MCOp rep op -> String #

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

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

Defined in Futhark.IR.MC.Op

Methods

ppr :: MCOp rep op -> Doc #

pprPrec :: Int -> MCOp rep op -> Doc #

pprList :: [MCOp rep op] -> Doc #

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

Defined in Futhark.IR.MC.Op

Methods

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

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

Defined in Futhark.IR.MC.Op

Methods

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

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

Defined in Futhark.IR.MC.Op

Methods

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

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

Defined in Futhark.IR.MC.Op

Methods

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

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

Defined in Futhark.IR.MC.Op

Methods

safeOp :: MCOp rep op -> Bool Source #

cheapOp :: MCOp rep op -> Bool Source #

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

Defined in Futhark.IR.MC.Op

Associated Types

type OpWithAliases (MCOp rep op) Source #

Methods

removeOpAliases :: OpWithAliases (MCOp rep op) -> MCOp rep op Source #

addOpAliases :: AliasTable -> MCOp rep op -> OpWithAliases (MCOp rep op) Source #

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

Defined in Futhark.IR.MC.Op

Methods

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

consumedInOp :: MCOp rep op -> Names Source #

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

Defined in Futhark.IR.MC.Op

Methods

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

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

Defined in Futhark.IR.MC.Op

Associated Types

type OpWithWisdom (MCOp rep op) Source #

Methods

removeOpWisdom :: OpWithWisdom (MCOp rep op) -> MCOp rep op Source #

addOpWisdom :: MCOp rep op -> OpWithWisdom (MCOp rep op) Source #

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

Defined in Futhark.IR.MC.Op

Methods

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

OpReturns (MCOp (Wise MCMem) ()) Source # 
Instance details

Defined in Futhark.IR.MCMem

Methods

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

OpReturns (MCOp MCMem ()) Source # 
Instance details

Defined in Futhark.IR.MCMem

Methods

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

SizeSubst (MCOp rep op) Source # 
Instance details

Defined in Futhark.Pass.ExplicitAllocations.MC

Methods

opSizeSubst :: Pat dec -> MCOp rep op -> ChunkMap Source #

opIsConst :: MCOp rep op -> Bool Source #

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

Defined in Futhark.Optimise.CSE

Methods

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

type OpWithAliases (MCOp rep op) Source # 
Instance details

Defined in Futhark.IR.MC.Op

type OpWithAliases (MCOp rep op) = MCOp (Aliases rep) (OpWithAliases op)
type OpWithWisdom (MCOp rep op) Source # 
Instance details

Defined in Futhark.IR.MC.Op

type OpWithWisdom (MCOp rep op) = MCOp (Wise rep) (OpWithWisdom op)

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

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