Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data KernelConstants = KernelConstants {
- kernelGlobalThreadId :: Exp
- kernelLocalThreadId :: Exp
- kernelGroupId :: Exp
- kernelGlobalThreadIdVar :: VName
- kernelLocalThreadIdVar :: VName
- kernelGroupIdVar :: VName
- kernelGroupSize :: Exp
- kernelNumGroups :: Exp
- kernelNumThreads :: Exp
- kernelWaveSize :: Exp
- kernelDimensions :: [(VName, Exp)]
- kernelThreadActive :: Exp
- kernelStreamed :: [(VName, DimSize)]
- inKernelOperations :: KernelConstants -> Operations InKernel KernelOp
- computeKernelUses :: FreeIn a => a -> [VName] -> CallKernelGen ([KernelUse], [LocalMemoryUse])
- keyWithEntryPoint :: Name -> Name -> Name
- type CallKernelGen = ImpM ExplicitMemory HostOp
- type InKernelGen = ImpM InKernel KernelOp
- computeThreadChunkSize :: SplitOrdering -> Exp -> Count Elements -> Count Elements -> VName -> ImpM lore op ()
- kernelInitialisation :: KernelSpace -> ImpM lore op (KernelConstants, ImpM InKernel KernelOp ())
- kernelInitialisationSetSpace :: KernelSpace -> InKernelGen () -> ImpM lore op (KernelConstants, ImpM InKernel KernelOp ())
- setSpaceIndices :: Exp -> KernelSpace -> InKernelGen ()
- makeAllMemoryGlobal :: CallKernelGen a -> CallKernelGen a
- allThreads :: KernelConstants -> InKernelGen () -> InKernelGen ()
- compileKernelStms :: KernelConstants -> [Stm InKernel] -> InKernelGen a -> InKernelGen a
- groupReduce :: ExplicitMemorish lore => KernelConstants -> Exp -> Lambda lore -> [VName] -> ImpM lore KernelOp ()
- groupScan :: KernelConstants -> Maybe (Exp -> Exp -> Exp) -> Exp -> Lambda InKernel -> [VName] -> ImpM InKernel KernelOp ()
- isActive :: [(VName, SubExp)] -> Exp
- sKernel :: KernelConstants -> String -> ImpM InKernel KernelOp a -> CallKernelGen ()
Documentation
data KernelConstants Source #
KernelConstants | |
|
computeKernelUses :: FreeIn a => a -> [VName] -> CallKernelGen ([KernelUse], [LocalMemoryUse]) Source #
type CallKernelGen = ImpM ExplicitMemory HostOp Source #
computeThreadChunkSize :: SplitOrdering -> Exp -> Count Elements -> Count Elements -> VName -> ImpM lore op () Source #
kernelInitialisation :: KernelSpace -> ImpM lore op (KernelConstants, ImpM InKernel KernelOp ()) Source #
kernelInitialisationSetSpace :: KernelSpace -> InKernelGen () -> ImpM lore op (KernelConstants, ImpM InKernel KernelOp ()) Source #
setSpaceIndices :: Exp -> KernelSpace -> InKernelGen () Source #
makeAllMemoryGlobal :: CallKernelGen a -> CallKernelGen a Source #
Change every memory block to be in the global address space, except those who are in the local memory space. This only affects generated code - we still need to make sure that the memory is actually present on the device (and dared as variables in the kernel).
allThreads :: KernelConstants -> InKernelGen () -> InKernelGen () Source #
compileKernelStms :: KernelConstants -> [Stm InKernel] -> InKernelGen a -> InKernelGen a Source #
groupReduce :: ExplicitMemorish lore => KernelConstants -> Exp -> Lambda lore -> [VName] -> ImpM lore KernelOp () Source #
groupScan :: KernelConstants -> Maybe (Exp -> Exp -> Exp) -> Exp -> Lambda InKernel -> [VName] -> ImpM InKernel KernelOp () Source #
sKernel :: KernelConstants -> String -> ImpM InKernel KernelOp a -> CallKernelGen () Source #