futhark-0.21.7: An optimising compiler for a functional, array-oriented language.
Safe HaskellNone
LanguageHaskell2010

Futhark.CodeGen.ImpCode.Multicore

Description

Multicore imperative code.

Synopsis

Documentation

type Program = Functions Multicore Source #

An imperative multicore program.

data Multicore Source #

A multicore operation.

Constructors

SegOp String [Param] ParallelTask (Maybe ParallelTask) [Param] SchedulerInfo 
ParLoop String (Code Multicore) [Param] 
GetLoopBounds VName VName

Retrieve inclusive start and exclusive end indexes of the chunk we are supposed to be executing. Only valid immediately inside a ParLoop construct!

GetTaskId VName

Retrieve the task ID that is currently executing. Only valid immediately inside a ParLoop construct!

GetNumTasks VName

Retrieve the number of subtasks to execute. Only valid immediately inside a SegOp or ParLoop construct!

Atomic AtomicOp 

Instances

Instances details
Pretty Multicore Source # 
Instance details

Defined in Futhark.CodeGen.ImpCode.Multicore

Methods

ppr :: Multicore -> Doc #

pprPrec :: Int -> Multicore -> Doc #

pprList :: [Multicore] -> Doc #

FreeIn Multicore Source # 
Instance details

Defined in Futhark.CodeGen.ImpCode.Multicore

Methods

freeIn' :: Multicore -> FV Source #

type MCCode = Code Multicore Source #

Multicore code.

data Scheduling Source #

Whether the Scheduler should schedule the tasks as Dynamic or it is restainted to Static

Constructors

Dynamic 
Static 

Instances

Instances details
Pretty Scheduling Source # 
Instance details

Defined in Futhark.CodeGen.ImpCode.Multicore

data SchedulerInfo Source #

Information about parallel work that is do be done. This is passed to the scheduler to help it make scheduling decisions.

Constructors

SchedulerInfo 

Fields

Instances

Instances details
Pretty SchedulerInfo Source # 
Instance details

Defined in Futhark.CodeGen.ImpCode.Multicore

FreeIn SchedulerInfo Source # 
Instance details

Defined in Futhark.CodeGen.ImpCode.Multicore

data AtomicOp Source #

Atomic operations return the value stored before the update. This old value is stored in the first VName. The second VName is the memory block to update. The Exp is the new value.

Instances

Instances details
Show AtomicOp Source # 
Instance details

Defined in Futhark.CodeGen.ImpCode.Multicore

FreeIn AtomicOp Source # 
Instance details

Defined in Futhark.CodeGen.ImpCode.Multicore

Methods

freeIn' :: AtomicOp -> FV Source #

newtype ParallelTask Source #

A task for a SegOp.

Constructors

ParallelTask (Code Multicore) 

Instances

Instances details
Pretty ParallelTask Source # 
Instance details

Defined in Futhark.CodeGen.ImpCode.Multicore

FreeIn ParallelTask Source # 
Instance details

Defined in Futhark.CodeGen.ImpCode.Multicore