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

Safe HaskellNone
LanguageHaskell2010

Futhark.CodeGen.ImpGen.Kernels.Base

Synopsis

Documentation

makeAllMemoryGlobal :: CallKernelGen a -> CallKernelGen a Source #

Change every memory block to be in the global address space, except those who are in the local memory space. This only affects generated code - we still need to make sure that the memory is actually present on the device (and dared as variables in the kernel).

sReplicate :: VName -> Shape -> SubExp -> CallKernelGen () Source #

Perform a Replicate with a kernel.

sIota :: VName -> Exp -> Exp -> Exp -> IntType -> CallKernelGen () Source #

Perform an Iota with a kernel.

atomicUpdate :: ExplicitMemorish lore => Space -> [VName] -> [Exp] -> Lambda lore -> Locking -> ImpM lore KernelOp () Source #

atomicUpdateLocking :: ExplicitMemorish lore => Lambda lore -> Either (AtomicUpdate lore) (Locking -> AtomicUpdate lore) Source #

atomicUpdate, but where it is explicitly visible whether a locking strategy is necessary.

data Locking Source #

Locking strategy used for an atomic update.

Constructors

Locking 

Fields

type AtomicUpdate lore = Space -> [VName] -> [Exp] -> ImpM lore KernelOp () Source #

A function for generating code for an atomic update. Assumes that the bucket is in-bounds.