Safe Haskell | None |
---|---|
Language | Haskell2010 |
Variation of Futhark.CodeGen.ImpCode that contains the notion of a kernel invocation.
Synopsis
- type Program = Definitions HostOp
- type HostCode = Code HostOp
- type KernelCode = Code KernelOp
- newtype KernelConst = SizeConst Name
- type KernelConstExp = PrimExp KernelConst
- data HostOp
- data KernelOp
- data Fence
- data AtomicOp
- = AtomicAdd IntType VName VName (Count Elements (TExp Int64)) Exp
- | AtomicFAdd FloatType VName VName (Count Elements (TExp Int64)) Exp
- | AtomicSMax IntType VName VName (Count Elements (TExp Int64)) Exp
- | AtomicSMin IntType VName VName (Count Elements (TExp Int64)) Exp
- | AtomicUMax IntType VName VName (Count Elements (TExp Int64)) Exp
- | AtomicUMin IntType VName VName (Count Elements (TExp Int64)) Exp
- | AtomicAnd IntType VName VName (Count Elements (TExp Int64)) Exp
- | AtomicOr IntType VName VName (Count Elements (TExp Int64)) Exp
- | AtomicXor IntType VName VName (Count Elements (TExp Int64)) Exp
- | AtomicCmpXchg PrimType VName VName (Count Elements (TExp Int64)) Exp Exp
- | AtomicXchg PrimType VName VName (Count Elements (TExp Int64)) Exp
- data Kernel = Kernel {}
- data KernelUse
- module Futhark.CodeGen.ImpCode
- module Futhark.IR.GPU.Sizes
Documentation
type Program = Definitions HostOp Source #
A program that calls kernels.
type KernelCode = Code KernelOp Source #
Code inside a kernel.
newtype KernelConst Source #
A run-time constant related to kernels.
Instances
Eq KernelConst Source # | |
Defined in Futhark.CodeGen.ImpCode.GPU (==) :: KernelConst -> KernelConst -> Bool # (/=) :: KernelConst -> KernelConst -> Bool # | |
Ord KernelConst Source # | |
Defined in Futhark.CodeGen.ImpCode.GPU compare :: KernelConst -> KernelConst -> Ordering # (<) :: KernelConst -> KernelConst -> Bool # (<=) :: KernelConst -> KernelConst -> Bool # (>) :: KernelConst -> KernelConst -> Bool # (>=) :: KernelConst -> KernelConst -> Bool # max :: KernelConst -> KernelConst -> KernelConst # min :: KernelConst -> KernelConst -> KernelConst # | |
Show KernelConst Source # | |
Defined in Futhark.CodeGen.ImpCode.GPU showsPrec :: Int -> KernelConst -> ShowS # show :: KernelConst -> String # showList :: [KernelConst] -> ShowS # | |
Pretty KernelConst Source # | |
Defined in Futhark.CodeGen.ImpCode.GPU |
type KernelConstExp = PrimExp KernelConst Source #
An expression whose variables are kernel constants.
An operation that runs on the host (CPU).
CallKernel Kernel | |
GetSize VName Name SizeClass | |
CmpSizeLe VName Name SizeClass Exp | |
GetSizeMax VName SizeClass |
An operation that occurs within a kernel body.
GetGroupId VName Int | |
GetLocalId VName Int | |
GetLocalSize VName Int | |
GetGlobalSize VName Int | |
GetGlobalId VName Int | |
GetLockstepWidth VName | |
Atomic Space AtomicOp | |
Barrier Fence | |
MemFence Fence | |
LocalAlloc VName (Count Bytes (TExp Int64)) | |
ErrorSync Fence | Perform a barrier and also check whether any
threads have failed an assertion. Make sure all
threads would reach all |
When we do a barrier or fence, is it at the local or global
level? By the Ord
instance, global is greater than local.
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.
A generic kernel containing arbitrary kernel code.
Kernel | |
|
Information about a host-level variable that is used inside this kernel. When generating the actual kernel code, this is used to deduce which parameters are needed.
module Futhark.CodeGen.ImpCode
module Futhark.IR.GPU.Sizes