Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data SOAC lore
- data StreamForm lore
- = Parallel StreamOrd Commutativity (LambdaT lore) [SubExp]
- | Sequential [SubExp]
- data ScremaForm lore = ScremaForm (Scan lore) (Reduce lore) (LambdaT lore)
- data GenReduceOp lore = GenReduceOp {
- genReduceWidth :: SubExp
- genReduceDest :: [VName]
- genReduceNeutral :: [SubExp]
- genReduceOp :: LambdaT lore
- type Scan lore = (LambdaT lore, [SubExp])
- type Reduce lore = (Commutativity, LambdaT lore, [SubExp])
- getStreamOrder :: StreamForm lore -> StreamOrd
- getStreamAccums :: StreamForm lore -> [SubExp]
- scremaType :: SubExp -> ScremaForm lore -> [Type]
- soacType :: SOAC lore -> [Type]
- typeCheckSOAC :: Checkable lore => SOAC (Aliases lore) -> TypeM lore ()
- mkIdentityLambda :: (Bindable lore, MonadFreshNames m) => [Type] -> m (Lambda lore)
- isIdentityLambda :: Lambda lore -> Bool
- composeLambda :: (Bindable lore, BinderOps lore, MonadFreshNames m, HasScope somelore m, SameScope somelore lore) => Lambda lore -> Lambda lore -> Lambda lore -> m (Lambda lore)
- nilFn :: Bindable lore => LambdaT lore
- scanomapSOAC :: Bindable lore => Lambda lore -> [SubExp] -> Lambda lore -> ScremaForm lore
- redomapSOAC :: Bindable lore => Commutativity -> Lambda lore -> [SubExp] -> Lambda lore -> ScremaForm lore
- scanSOAC :: (Bindable lore, MonadFreshNames m) => Lambda lore -> [SubExp] -> m (ScremaForm lore)
- reduceSOAC :: (Bindable lore, MonadFreshNames m) => Commutativity -> Lambda lore -> [SubExp] -> m (ScremaForm lore)
- mapSOAC :: Bindable lore => Lambda lore -> ScremaForm lore
- isScanomapSOAC :: ScremaForm lore -> Maybe (Lambda lore, [SubExp], Lambda lore)
- isRedomapSOAC :: ScremaForm lore -> Maybe (Commutativity, Lambda lore, [SubExp], Lambda lore)
- isScanSOAC :: ScremaForm lore -> Maybe (Lambda lore, [SubExp])
- isReduceSOAC :: ScremaForm lore -> Maybe (Commutativity, Lambda lore, [SubExp])
- isMapSOAC :: ScremaForm lore -> Maybe (Lambda lore)
- ppScrema :: (PrettyLore lore, Pretty inp) => SubExp -> ScremaForm lore -> [inp] -> Doc
- ppGenReduce :: (PrettyLore lore, Pretty inp) => SubExp -> [GenReduceOp lore] -> Lambda lore -> [inp] -> Doc
- data SOACMapper flore tlore m = SOACMapper {
- mapOnSOACSubExp :: SubExp -> m SubExp
- mapOnSOACLambda :: Lambda flore -> m (Lambda tlore)
- mapOnSOACVName :: VName -> m VName
- identitySOACMapper :: Monad m => SOACMapper lore lore m
- mapSOACM :: (Applicative m, Monad m) => SOACMapper flore tlore m -> SOAC flore -> m (SOAC tlore)
Documentation
Stream SubExp (StreamForm lore) (LambdaT lore) [VName] | |
Scatter SubExp (LambdaT lore) [VName] [(SubExp, Int, VName)] | |
GenReduce SubExp [GenReduceOp lore] (LambdaT lore) [VName] | |
Screma SubExp (ScremaForm lore) [VName] | A combination of scan, reduction, and map. The first
|
CmpThreshold SubExp String |
Instances
data StreamForm lore Source #
Parallel StreamOrd Commutativity (LambdaT lore) [SubExp] | |
Sequential [SubExp] |
Instances
Annotations lore => Eq (StreamForm lore) Source # | |
Defined in Futhark.Representation.SOACS.SOAC (==) :: StreamForm lore -> StreamForm lore -> Bool # (/=) :: StreamForm lore -> StreamForm lore -> Bool # | |
Annotations lore => Ord (StreamForm lore) Source # | |
Defined in Futhark.Representation.SOACS.SOAC compare :: StreamForm lore -> StreamForm lore -> Ordering # (<) :: StreamForm lore -> StreamForm lore -> Bool # (<=) :: StreamForm lore -> StreamForm lore -> Bool # (>) :: StreamForm lore -> StreamForm lore -> Bool # (>=) :: StreamForm lore -> StreamForm lore -> Bool # max :: StreamForm lore -> StreamForm lore -> StreamForm lore # min :: StreamForm lore -> StreamForm lore -> StreamForm lore # | |
Annotations lore => Show (StreamForm lore) Source # | |
Defined in Futhark.Representation.SOACS.SOAC showsPrec :: Int -> StreamForm lore -> ShowS # show :: StreamForm lore -> String # showList :: [StreamForm lore] -> ShowS # |
data ScremaForm lore Source #
The essential parts of a Screma
factored out (everything
except the input arrays).
ScremaForm (Scan lore) (Reduce lore) (LambdaT lore) |
Instances
Annotations lore => Eq (ScremaForm lore) Source # | |
Defined in Futhark.Representation.SOACS.SOAC (==) :: ScremaForm lore -> ScremaForm lore -> Bool # (/=) :: ScremaForm lore -> ScremaForm lore -> Bool # | |
Annotations lore => Ord (ScremaForm lore) Source # | |
Defined in Futhark.Representation.SOACS.SOAC compare :: ScremaForm lore -> ScremaForm lore -> Ordering # (<) :: ScremaForm lore -> ScremaForm lore -> Bool # (<=) :: ScremaForm lore -> ScremaForm lore -> Bool # (>) :: ScremaForm lore -> ScremaForm lore -> Bool # (>=) :: ScremaForm lore -> ScremaForm lore -> Bool # max :: ScremaForm lore -> ScremaForm lore -> ScremaForm lore # min :: ScremaForm lore -> ScremaForm lore -> ScremaForm lore # | |
Annotations lore => Show (ScremaForm lore) Source # | |
Defined in Futhark.Representation.SOACS.SOAC showsPrec :: Int -> ScremaForm lore -> ShowS # show :: ScremaForm lore -> String # showList :: [ScremaForm lore] -> ShowS # |
data GenReduceOp lore Source #
GenReduceOp | |
|
Instances
Annotations lore => Eq (GenReduceOp lore) Source # | |
Defined in Futhark.Representation.SOACS.SOAC (==) :: GenReduceOp lore -> GenReduceOp lore -> Bool # (/=) :: GenReduceOp lore -> GenReduceOp lore -> Bool # | |
Annotations lore => Ord (GenReduceOp lore) Source # | |
Defined in Futhark.Representation.SOACS.SOAC compare :: GenReduceOp lore -> GenReduceOp lore -> Ordering # (<) :: GenReduceOp lore -> GenReduceOp lore -> Bool # (<=) :: GenReduceOp lore -> GenReduceOp lore -> Bool # (>) :: GenReduceOp lore -> GenReduceOp lore -> Bool # (>=) :: GenReduceOp lore -> GenReduceOp lore -> Bool # max :: GenReduceOp lore -> GenReduceOp lore -> GenReduceOp lore # min :: GenReduceOp lore -> GenReduceOp lore -> GenReduceOp lore # | |
Annotations lore => Show (GenReduceOp lore) Source # | |
Defined in Futhark.Representation.SOACS.SOAC showsPrec :: Int -> GenReduceOp lore -> ShowS # show :: GenReduceOp lore -> String # showList :: [GenReduceOp lore] -> ShowS # |
Utility
getStreamOrder :: StreamForm lore -> StreamOrd Source #
getStreamAccums :: StreamForm lore -> [SubExp] Source #
Get Stream's accumulators as a sub-expression list
scremaType :: SubExp -> ScremaForm lore -> [Type] Source #
mkIdentityLambda :: (Bindable lore, MonadFreshNames m) => [Type] -> m (Lambda lore) Source #
Construct a lambda that takes parameters of the given types and simply returns them unchanged.
isIdentityLambda :: Lambda lore -> Bool Source #
Is the given lambda an identity lambda?
composeLambda :: (Bindable lore, BinderOps lore, MonadFreshNames m, HasScope somelore m, SameScope somelore lore) => Lambda lore -> Lambda lore -> Lambda lore -> m (Lambda lore) Source #
scanomapSOAC :: Bindable lore => Lambda lore -> [SubExp] -> Lambda lore -> ScremaForm lore Source #
redomapSOAC :: Bindable lore => Commutativity -> Lambda lore -> [SubExp] -> Lambda lore -> ScremaForm lore Source #
scanSOAC :: (Bindable lore, MonadFreshNames m) => Lambda lore -> [SubExp] -> m (ScremaForm lore) Source #
reduceSOAC :: (Bindable lore, MonadFreshNames m) => Commutativity -> Lambda lore -> [SubExp] -> m (ScremaForm lore) Source #
isScanomapSOAC :: ScremaForm lore -> Maybe (Lambda lore, [SubExp], Lambda lore) Source #
isRedomapSOAC :: ScremaForm lore -> Maybe (Commutativity, Lambda lore, [SubExp], Lambda lore) Source #
isScanSOAC :: ScremaForm lore -> Maybe (Lambda lore, [SubExp]) Source #
isReduceSOAC :: ScremaForm lore -> Maybe (Commutativity, Lambda lore, [SubExp]) Source #
ppScrema :: (PrettyLore lore, Pretty inp) => SubExp -> ScremaForm lore -> [inp] -> Doc Source #
ppGenReduce :: (PrettyLore lore, Pretty inp) => SubExp -> [GenReduceOp lore] -> Lambda lore -> [inp] -> Doc Source #
Generic traversal
data SOACMapper flore tlore m Source #
SOACMapper | |
|
identitySOACMapper :: Monad m => SOACMapper lore lore m Source #
A mapper that simply returns the SOAC verbatim.
mapSOACM :: (Applicative m, Monad m) => SOACMapper flore tlore m -> SOAC flore -> m (SOAC tlore) Source #
Map a monadic action across the immediate children of a SOAC. The mapping does not descend recursively into subexpressions and is done left-to-right.