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

Safe Haskell | Safe-Inferred
Language | GHC2021

Futhark.CodeGen.ImpGen.GPU.Block

Contents

- Precomputation

Description

Generation of kernels with block-level bodies.

Synopsis

- sKernelBlock :: String -> VName -> KernelAttrs -> InKernelGen () -> CallKernelGen ()
- compileBlockResult :: SegSpace -> PatElem LetDecMem -> KernelResult -> InKernelGen ()
- blockOperations :: Operations GPUMem KernelEnv KernelOp
- data Precomputed
- precomputeConstants :: Count BlockSize (TExp Int64) -> Stms GPUMem -> CallKernelGen Precomputed
- precomputedConstants :: Precomputed -> InKernelGen a -> InKernelGen a
- atomicUpdateLocking :: AtomicBinOp -> Lambda GPUMem -> AtomicUpdate GPUMem KernelEnv

# Documentation

sKernelBlock :: String -> VName -> KernelAttrs -> InKernelGen () -> CallKernelGen () Source #

Create a kernel with GPU operations at the block level.

compileBlockResult :: SegSpace -> PatElem LetDecMem -> KernelResult -> InKernelGen () Source #

Generate code for writing this result of a block-level kernel. The `PatElem` and `KernelResult` must be matched as in the original segop.

blockOperations :: Operations GPUMem KernelEnv KernelOp Source #

The operations for block-level kernels.

# Precomputation

data Precomputed Source #

Various useful precomputed information for block-level SegOps.

precomputeConstants :: Count BlockSize (TExp Int64) -> Stms GPUMem -> CallKernelGen Precomputed Source #

Precompute various constants and useful information.

precomputedConstants :: Precomputed -> InKernelGen a -> InKernelGen a Source #

Make use of various precomputed constants.

atomicUpdateLocking :: AtomicBinOp -> Lambda GPUMem -> AtomicUpdate GPUMem KernelEnv Source #

Do an atomic update corresponding to a binary operator lambda.