| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Futhark.CodeGen.ImpCode.Kernels
Description
Common definitions for imperative code augmented with the ability to launch kernels.
Synopsis
- type KernelName = Name
- data KernelArg
- type HostCode = Code HostOp
- data HostOp
- = LaunchKernel KernelSafety KernelName (Count Bytes (TExp Int64)) [KernelArg] [Exp] [BlockDim]
- | GetSize VName Name
- | CmpSizeLe VName Name Exp
- | GetSizeMax VName SizeClass
- data KernelSafety
- numFailureParams :: KernelSafety -> Int
- data FailureMsg = FailureMsg {}
- type BlockDim = Either Exp KernelConstExp
- data KernelConst
- type KernelConstExp = PrimExp KernelConst
- module Futhark.CodeGen.ImpCode
- module Futhark.IR.GPU.Sizes
Documentation
type KernelName = Name Source #
The name of a kernel.
An argument to be passed to a kernel.
Host-level kernel operation.
Constructors
| LaunchKernel KernelSafety KernelName (Count Bytes (TExp Int64)) [KernelArg] [Exp] [BlockDim] | |
| GetSize VName Name | |
| CmpSizeLe VName Name Exp | |
| GetSizeMax VName SizeClass |
data KernelSafety Source #
Information about bounds checks and how sensitive it is to errors. Ordered by least demanding to most.
Constructors
| SafetyNone | Does not need to know if we are in a failing state, and also cannot fail. |
| SafetyCheap | Needs to be told if there's a global failure, and that's it, and cannot fail. |
| SafetyFull | Needs all parameters, may fail itself. |
Instances
| Show KernelSafety Source # | |
Defined in Futhark.CodeGen.ImpCode.Kernels Methods showsPrec :: Int -> KernelSafety -> ShowS # show :: KernelSafety -> String # showList :: [KernelSafety] -> ShowS # | |
| Eq KernelSafety Source # | |
Defined in Futhark.CodeGen.ImpCode.Kernels | |
| Ord KernelSafety Source # | |
Defined in Futhark.CodeGen.ImpCode.Kernels Methods compare :: KernelSafety -> KernelSafety -> Ordering # (<) :: KernelSafety -> KernelSafety -> Bool # (<=) :: KernelSafety -> KernelSafety -> Bool # (>) :: KernelSafety -> KernelSafety -> Bool # (>=) :: KernelSafety -> KernelSafety -> Bool # max :: KernelSafety -> KernelSafety -> KernelSafety # min :: KernelSafety -> KernelSafety -> KernelSafety # | |
numFailureParams :: KernelSafety -> Int Source #
How many leading failure arguments we must pass when launching a kernel with these safety characteristics.
data FailureMsg Source #
Something that can go wrong in a kernel. Part of the machinery for reporting error messages from within kernels.
Constructors
| FailureMsg | |
Fields | |
data KernelConst Source #
A run-time constant related to kernels.
Constructors
| SizeConst Name SizeClass | |
| SizeMaxConst SizeClass | |
| SizeUserParam Name KernelConstExp |
Instances
| FreeIn KernelConst Source # | |
Defined in Futhark.CodeGen.ImpCode.GPU Methods freeIn' :: KernelConst -> FV Source # | |
| Show KernelConst Source # | |
Defined in Futhark.CodeGen.ImpCode.GPU Methods showsPrec :: Int -> KernelConst -> ShowS # show :: KernelConst -> String # showList :: [KernelConst] -> ShowS # | |
| Eq KernelConst Source # | |
Defined in Futhark.CodeGen.ImpCode.GPU | |
| Ord KernelConst Source # | |
Defined in Futhark.CodeGen.ImpCode.GPU Methods compare :: KernelConst -> KernelConst -> Ordering # (<) :: KernelConst -> KernelConst -> Bool # (<=) :: KernelConst -> KernelConst -> Bool # (>) :: KernelConst -> KernelConst -> Bool # (>=) :: KernelConst -> KernelConst -> Bool # max :: KernelConst -> KernelConst -> KernelConst # min :: KernelConst -> KernelConst -> KernelConst # | |
| Pretty KernelConst Source # | |
Defined in Futhark.CodeGen.ImpCode.GPU | |
type KernelConstExp = PrimExp KernelConst Source #
An expression whose variables are kernel constants.
module Futhark.CodeGen.ImpCode
module Futhark.IR.GPU.Sizes