Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Kernel lore
- = GetSize Name SizeClass
- | GetSizeMax SizeClass
- | CmpSizeLe Name SizeClass SubExp
- | Kernel KernelDebugHints KernelSpace [Type] (KernelBody lore)
- | SegRed KernelSpace Commutativity (Lambda lore) [SubExp] [Type] (Body lore)
- kernelType :: Kernel lore -> [Type]
- data KernelDebugHints = KernelDebugHints {
- kernelName :: String
- kernelHints :: [(String, SubExp)]
- data KernelBody lore = KernelBody {
- kernelBodyLore :: BodyAttr lore
- kernelBodyStms :: Stms lore
- kernelBodyResult :: [KernelResult]
- data KernelSpace = KernelSpace {}
- spaceDimensions :: KernelSpace -> [(VName, SubExp)]
- data SpaceStructure
- = FlatThreadSpace [(VName, SubExp)]
- | NestedThreadSpace [(VName, SubExp, VName, SubExp)]
- scopeOfKernelSpace :: KernelSpace -> Scope lore
- data WhichThreads
- data KernelResult
- kernelResultSubExp :: KernelResult -> SubExp
- type KernelPath = [(Name, Bool)]
- chunkedKernelNonconcatOutputs :: Lambda lore -> Int
- typeCheckKernel :: Checkable lore => Kernel (Aliases lore) -> TypeM lore ()
- data KernelMapper flore tlore m = KernelMapper {
- mapOnKernelSubExp :: SubExp -> m SubExp
- mapOnKernelLambda :: Lambda flore -> m (Lambda tlore)
- mapOnKernelBody :: Body flore -> m (Body tlore)
- mapOnKernelVName :: VName -> m VName
- mapOnKernelLParam :: LParam flore -> m (LParam tlore)
- mapOnKernelKernelBody :: KernelBody flore -> m (KernelBody tlore)
- identityKernelMapper :: Monad m => KernelMapper lore lore m
- mapKernelM :: (Applicative m, Monad m) => KernelMapper flore tlore m -> Kernel flore -> m (Kernel tlore)
- data KernelWalker lore m = KernelWalker {
- walkOnKernelSubExp :: SubExp -> m ()
- walkOnKernelLambda :: Lambda lore -> m ()
- walkOnKernelBody :: Body lore -> m ()
- walkOnKernelVName :: VName -> m ()
- walkOnKernelLParam :: LParam lore -> m ()
- walkOnKernelKernelBody :: KernelBody lore -> m ()
- identityKernelWalker :: Monad m => KernelWalker lore m
- walkKernelM :: Monad m => KernelWalker lore m -> Kernel lore -> m ()
Documentation
GetSize Name SizeClass | Produce some runtime-configurable size. |
GetSizeMax SizeClass | The maximum size of some class. |
CmpSizeLe Name SizeClass SubExp | Compare size (likely a threshold) with some Int32 value. |
Kernel KernelDebugHints KernelSpace [Type] (KernelBody lore) | |
SegRed KernelSpace Commutativity (Lambda lore) [SubExp] [Type] (Body lore) | The KernelSpace must always have at least two dimensions, implying that the result of a SegRed is always an array. |
Instances
kernelType :: Kernel lore -> [Type] Source #
data KernelDebugHints Source #
Some information about what goes into a kernel, and where it came from. Has no semantic meaning; only used for debugging generated code.
KernelDebugHints | |
|
Instances
Eq KernelDebugHints Source # | |
Defined in Futhark.Representation.Kernels.Kernel (==) :: KernelDebugHints -> KernelDebugHints -> Bool # (/=) :: KernelDebugHints -> KernelDebugHints -> Bool # | |
Ord KernelDebugHints Source # | |
Defined in Futhark.Representation.Kernels.Kernel compare :: KernelDebugHints -> KernelDebugHints -> Ordering # (<) :: KernelDebugHints -> KernelDebugHints -> Bool # (<=) :: KernelDebugHints -> KernelDebugHints -> Bool # (>) :: KernelDebugHints -> KernelDebugHints -> Bool # (>=) :: KernelDebugHints -> KernelDebugHints -> Bool # max :: KernelDebugHints -> KernelDebugHints -> KernelDebugHints # min :: KernelDebugHints -> KernelDebugHints -> KernelDebugHints # | |
Show KernelDebugHints Source # | |
Defined in Futhark.Representation.Kernels.Kernel showsPrec :: Int -> KernelDebugHints -> ShowS # show :: KernelDebugHints -> String # showList :: [KernelDebugHints] -> ShowS # |
data KernelBody lore Source #
The body of a Kernel
.
KernelBody | |
|
Instances
data KernelSpace Source #
first three bound in the kernel, the rest are params to kernel
Instances
spaceDimensions :: KernelSpace -> [(VName, SubExp)] Source #
Global thread IDs and their upper bound.
data SpaceStructure Source #
Indices computed for each thread (or group) inside the kernel. This is an arbitrary-dimensional space that is generated from the flat GPU thread space.
FlatThreadSpace [(VName, SubExp)] | |
NestedThreadSpace [(VName, SubExp, VName, SubExp)] |
Instances
scopeOfKernelSpace :: KernelSpace -> Scope lore Source #
data WhichThreads Source #
Instances
data KernelResult Source #
ThreadsReturn WhichThreads SubExp | |
WriteReturn [SubExp] VName [([SubExp], SubExp)] | |
ConcatReturns SplitOrdering SubExp SubExp (Maybe SubExp) VName | |
KernelInPlaceReturn VName |
Instances
type KernelPath = [(Name, Bool)] Source #
An indication of which comparisons have been performed to get to this point, as well as the result of each comparison.
chunkedKernelNonconcatOutputs :: Lambda lore -> Int Source #
Generic traversal
data KernelMapper flore tlore m Source #
KernelMapper | |
|
identityKernelMapper :: Monad m => KernelMapper lore lore m Source #
A mapper that simply returns the Kernel
verbatim.
mapKernelM :: (Applicative m, Monad m) => KernelMapper flore tlore m -> Kernel flore -> m (Kernel tlore) Source #
Map a monadic action across the immediate children of a Kernel. The mapping does not descend recursively into subexpressions and is done left-to-right.
data KernelWalker lore m Source #
KernelWalker | |
|
identityKernelWalker :: Monad m => KernelWalker lore m Source #
A no-op traversal.
walkKernelM :: Monad m => KernelWalker lore m -> Kernel lore -> m () Source #
As mapKernelM
, but ignoring the results.