futhark-0.20.0: 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 lore 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 () lore)) (SegOp () lore)

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
(Decorations lore, Eq op) => Eq (MCOp lore op) Source # 
Instance details

Defined in Futhark.IR.MC.Op

Methods

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

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

(Decorations lore, Ord op) => Ord (MCOp lore op) Source # 
Instance details

Defined in Futhark.IR.MC.Op

Methods

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

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

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

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

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

max :: MCOp lore op -> MCOp lore op -> MCOp lore op #

min :: MCOp lore op -> MCOp lore op -> MCOp lore op #

(Decorations lore, Show op) => Show (MCOp lore op) Source # 
Instance details

Defined in Futhark.IR.MC.Op

Methods

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

show :: MCOp lore op -> String #

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

(PrettyLore lore, Pretty op) => Pretty (MCOp lore op) Source # 
Instance details

Defined in Futhark.IR.MC.Op

Methods

ppr :: MCOp lore op -> Doc #

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

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

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

Defined in Futhark.IR.MC.Op

Methods

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

(ASTLore lore, FreeIn op) => FreeIn (MCOp lore op) Source # 
Instance details

Defined in Futhark.IR.MC.Op

Methods

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

(ASTLore lore, Substitute op) => Substitute (MCOp lore op) Source # 
Instance details

Defined in Futhark.IR.MC.Op

Methods

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

(ASTLore lore, Rename op) => Rename (MCOp lore op) Source # 
Instance details

Defined in Futhark.IR.MC.Op

Methods

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

(ASTLore lore, IsOp op) => IsOp (MCOp lore op) Source # 
Instance details

Defined in Futhark.IR.MC.Op

Methods

safeOp :: MCOp lore op -> Bool Source #

cheapOp :: MCOp lore op -> Bool Source #

(CanBeAliased (Op lore), CanBeAliased op, ASTLore lore) => CanBeAliased (MCOp lore op) Source # 
Instance details

Defined in Futhark.IR.MC.Op

Associated Types

type OpWithAliases (MCOp lore op) Source #

Methods

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

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

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

Defined in Futhark.IR.MC.Op

Methods

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

consumedInOp :: MCOp lore op -> Names Source #

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

Defined in Futhark.IR.MC.Op

Methods

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

(CanBeWise (Op lore), CanBeWise op, ASTLore lore) => CanBeWise (MCOp lore op) Source # 
Instance details

Defined in Futhark.IR.MC.Op

Associated Types

type OpWithWisdom (MCOp lore op) Source #

Methods

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

(ASTLore lore, IndexOp op) => IndexOp (MCOp lore op) Source # 
Instance details

Defined in Futhark.IR.MC.Op

Methods

indexOp :: (ASTLore lore0, IndexOp (Op lore0)) => SymbolTable lore0 -> Int -> MCOp lore op -> [TPrimExp Int64 VName] -> Maybe Indexed Source #

SizeSubst (MCOp lore op) Source # 
Instance details

Defined in Futhark.Pass.ExplicitAllocations.MC

Methods

opSizeSubst :: PatternT dec -> MCOp lore op -> ChunkMap Source #

opIsConst :: MCOp lore op -> Bool Source #

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

Defined in Futhark.Optimise.CSE

Methods

cseInOp :: MCOp lore op -> CSEM lore0 (MCOp lore op)

type OpWithAliases (MCOp lore op) Source # 
Instance details

Defined in Futhark.IR.MC.Op

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

Defined in Futhark.IR.MC.Op

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

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

simplifyMCOp :: (SimplifiableLore lore, BodyDec lore ~ ()) => SimplifyOp lore op -> MCOp lore op -> SimpleM lore (MCOp (Wise lore) (OpWithWisdom op), Stms (Wise lore)) Source #