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

Futhark.CodeGen.ImpGen.Multicore.Base

Synopsis

Documentation

extractAllocations :: Code -> (Code, Code) Source #

Try to extract invariant allocations. If we assume that the given Code is the body of a SegOp, then it is always safe to move the immediate allocations to the prebody.

data Locks Source #

Information about the locks available for accumulators.

Constructors

Locks 

type AtomicBinOp = BinOp -> Maybe (VName -> VName -> Count Elements (TExp Int32) -> Exp -> AtomicOp) Source #

Is there an atomic BinOp corresponding to this BinOp?

groupResultArrays :: String -> SubExp -> [SegBinOp MCMem] -> MulticoreGen [[VName]] Source #

Arrays for storing group results shared between threads

data AtomicUpdate rep r Source #

The mechanism that will be used for performing the atomic update. Approximates how efficient it will be. Ordered from most to least efficient.

Constructors

AtomicPrim (DoAtomicUpdate rep r) 
AtomicCAS (DoAtomicUpdate rep r)

Can be done by efficient swaps.

AtomicLocking (Locking -> DoAtomicUpdate rep r)

Requires explicit locking.

data Locking Source #

Locking strategy used for an atomic update.

Constructors

Locking 

Fields