| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Futhark.CodeGen.ImpCode.OpenCL
Description
Imperative code with an OpenCL component.
Apart from ordinary imperative code, this also carries around an OpenCL program as a string, as well as a list of kernels defined by the OpenCL program.
The imperative code has been augmented with a LaunchKernel
operation that allows one to execute an OpenCL kernel.
Synopsis
- data Program = Program {}
- type KernelName = Name
- data KernelArg
- type CLCode = Code OpenCL
- data OpenCL
- data KernelSafety
- numFailureParams :: KernelSafety -> Int
- data KernelTarget
- data FailureMsg = FailureMsg {}
- type GroupDim = Either Exp KernelConst
- data KernelConst
- module Futhark.CodeGen.ImpCode
- module Futhark.IR.GPU.Sizes
Documentation
An program calling OpenCL kernels.
Constructors
| Program | |
Fields
| |
type KernelName = Name Source #
The name of a kernel.
An argument to be passed to a kernel.
Host-level OpenCL operation.
Constructors
| LaunchKernel KernelSafety KernelName [KernelArg] [Exp] [GroupDim] | |
| 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.OpenCL Methods showsPrec :: Int -> KernelSafety -> ShowS # show :: KernelSafety -> String # showList :: [KernelSafety] -> ShowS # | |
| Eq KernelSafety Source # | |
Defined in Futhark.CodeGen.ImpCode.OpenCL | |
| Ord KernelSafety Source # | |
Defined in Futhark.CodeGen.ImpCode.OpenCL 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 KernelTarget Source #
The target platform when compiling imperative code to a Program
Constructors
| TargetOpenCL | |
| TargetCUDA |
Instances
| Eq KernelTarget Source # | |
Defined in Futhark.CodeGen.ImpCode.OpenCL | |
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 | |
| SizeMaxConst SizeClass |
Instances
| Show KernelConst Source # | |
Defined in Futhark.CodeGen.ImpCode.GPU Methods showsPrec :: Int -> KernelConst -> ShowS # show :: KernelConst -> String # showList :: [KernelConst] -> ShowS # | |
| FreeIn KernelConst Source # | |
Defined in Futhark.CodeGen.ImpCode.GPU Methods freeIn' :: KernelConst -> FV Source # | |
| 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 | |
module Futhark.CodeGen.ImpCode
module Futhark.IR.GPU.Sizes