Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- blockedReduction :: (MonadFreshNames m, HasScope Kernels m) => Pattern Kernels -> SubExp -> Commutativity -> Lambda InKernel -> Lambda InKernel -> [(VName, SubExp)] -> [SubExp] -> [VName] -> m (Stms Kernels)
- blockedReductionStream :: (MonadFreshNames m, HasScope Kernels m) => Pattern Kernels -> SubExp -> Commutativity -> Lambda InKernel -> Lambda InKernel -> [(VName, SubExp)] -> [SubExp] -> [VName] -> m (Stms Kernels)
- blockedGenReduce :: (MonadFreshNames m, HasScope Kernels m) => SubExp -> [(VName, SubExp)] -> [KernelInput] -> [GenReduceOp InKernel] -> Lambda InKernel -> [VName] -> m ([VName], Stms Kernels)
- blockedMap :: (MonadFreshNames m, HasScope Kernels m) => Pattern Kernels -> SubExp -> StreamOrd -> Lambda InKernel -> [SubExp] -> [VName] -> m (Stm Kernels, Stms Kernels)
- blockedScan :: (MonadBinder m, Lore m ~ Kernels) => Pattern Kernels -> SubExp -> Scan InKernel -> Reduce InKernel -> Lambda InKernel -> SubExp -> [(VName, SubExp)] -> [KernelInput] -> [VName] -> m [VName]
- segRed :: (MonadFreshNames m, HasScope Kernels m) => Pattern Kernels -> SubExp -> SubExp -> Commutativity -> Lambda InKernel -> Lambda InKernel -> [SubExp] -> [VName] -> [(VName, SubExp)] -> [KernelInput] -> m (Stms Kernels)
- nonSegRed :: (MonadFreshNames m, HasScope Kernels m) => Pattern Kernels -> SubExp -> Commutativity -> Lambda InKernel -> Lambda InKernel -> [SubExp] -> [VName] -> m (Stms Kernels)
- mapKernel :: (HasScope Kernels m, MonadFreshNames m) => SubExp -> SpaceStructure -> [KernelInput] -> [Type] -> KernelBody InKernel -> m (Stms Kernels, Kernel InKernel)
- mapKernelFromBody :: (HasScope Kernels m, MonadFreshNames m) => SubExp -> SpaceStructure -> [KernelInput] -> [Type] -> Body InKernel -> m (Stms Kernels, Kernel InKernel)
- data KernelInput = KernelInput {}
- readKernelInput :: (HasScope scope m, Monad m) => KernelInput -> m (Stm InKernel)
- kerneliseLambda :: MonadFreshNames m => [SubExp] -> Lambda InKernel -> m (Lambda InKernel)
- newKernelSpace :: MonadFreshNames m => (SubExp, SubExp, SubExp) -> SpaceStructure -> m KernelSpace
- chunkLambda :: (MonadFreshNames m, HasScope Kernels m) => Pattern Kernels -> [SubExp] -> Lambda InKernel -> m (Lambda InKernel)
- splitArrays :: (MonadBinder m, Lore m ~ InKernel) => VName -> [VName] -> SplitOrdering -> SubExp -> SubExp -> SubExp -> [VName] -> m ()
- getSize :: (MonadBinder m, Op (Lore m) ~ Kernel innerlore) => String -> SizeClass -> m SubExp
Documentation
blockedReduction :: (MonadFreshNames m, HasScope Kernels m) => Pattern Kernels -> SubExp -> Commutativity -> Lambda InKernel -> Lambda InKernel -> [(VName, SubExp)] -> [SubExp] -> [VName] -> m (Stms Kernels) Source #
blockedReductionStream :: (MonadFreshNames m, HasScope Kernels m) => Pattern Kernels -> SubExp -> Commutativity -> Lambda InKernel -> Lambda InKernel -> [(VName, SubExp)] -> [SubExp] -> [VName] -> m (Stms Kernels) Source #
:: (MonadFreshNames m, HasScope Kernels m) | |
=> SubExp | |
-> [(VName, SubExp)] | Segment indexes and sizes. |
-> [KernelInput] | |
-> [GenReduceOp InKernel] | |
-> Lambda InKernel | |
-> [VName] | |
-> m ([VName], Stms Kernels) |
blockedMap :: (MonadFreshNames m, HasScope Kernels m) => Pattern Kernels -> SubExp -> StreamOrd -> Lambda InKernel -> [SubExp] -> [VName] -> m (Stm Kernels, Stms Kernels) Source #
blockedScan :: (MonadBinder m, Lore m ~ Kernels) => Pattern Kernels -> SubExp -> Scan InKernel -> Reduce InKernel -> Lambda InKernel -> SubExp -> [(VName, SubExp)] -> [KernelInput] -> [VName] -> m [VName] Source #
The VName
s returned are the names of variables bound to the
carry-out of the last thread. You can ignore them if you don't
need them.
segRed :: (MonadFreshNames m, HasScope Kernels m) => Pattern Kernels -> SubExp -> SubExp -> Commutativity -> Lambda InKernel -> Lambda InKernel -> [SubExp] -> [VName] -> [(VName, SubExp)] -> [KernelInput] -> m (Stms Kernels) Source #
nonSegRed :: (MonadFreshNames m, HasScope Kernels m) => Pattern Kernels -> SubExp -> Commutativity -> Lambda InKernel -> Lambda InKernel -> [SubExp] -> [VName] -> m (Stms Kernels) Source #
mapKernel :: (HasScope Kernels m, MonadFreshNames m) => SubExp -> SpaceStructure -> [KernelInput] -> [Type] -> KernelBody InKernel -> m (Stms Kernels, Kernel InKernel) Source #
mapKernelFromBody :: (HasScope Kernels m, MonadFreshNames m) => SubExp -> SpaceStructure -> [KernelInput] -> [Type] -> Body InKernel -> m (Stms Kernels, Kernel InKernel) Source #
data KernelInput Source #
KernelInput | |
|
Instances
Show KernelInput Source # | |
Defined in Futhark.Pass.ExtractKernels.BlockedKernel showsPrec :: Int -> KernelInput -> ShowS # show :: KernelInput -> String # showList :: [KernelInput] -> ShowS # |
readKernelInput :: (HasScope scope m, Monad m) => KernelInput -> m (Stm InKernel) Source #
kerneliseLambda :: MonadFreshNames m => [SubExp] -> Lambda InKernel -> m (Lambda InKernel) Source #
Given a chunked fold lambda that takes its initial accumulator value as parameters, bind those parameters to the neutral element instead.
newKernelSpace :: MonadFreshNames m => (SubExp, SubExp, SubExp) -> SpaceStructure -> m KernelSpace Source #
chunkLambda :: (MonadFreshNames m, HasScope Kernels m) => Pattern Kernels -> [SubExp] -> Lambda InKernel -> m (Lambda InKernel) Source #
Requires a fold lambda that includes accumulator parameters.
splitArrays :: (MonadBinder m, Lore m ~ InKernel) => VName -> [VName] -> SplitOrdering -> SubExp -> SubExp -> SubExp -> [VName] -> m () Source #