Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data SOAC lore
- data StreamForm lore
- = Parallel StreamOrd Commutativity (Lambda lore) [SubExp]
- | Sequential [SubExp]
- data ScremaForm lore = ScremaForm (Scan lore) [Reduce lore] (Lambda lore)
- data GenReduceOp lore = GenReduceOp {
- genReduceWidth :: SubExp
- genReduceDest :: [VName]
- genReduceNeutral :: [SubExp]
- genReduceOp :: Lambda lore
- type Scan lore = (Lambda lore, [SubExp])
- data Reduce lore = Reduce {
- redComm :: Commutativity
- redLambda :: Lambda lore
- redNeutral :: [SubExp]
- redResults :: [Reduce lore] -> Int
- singleReduce :: Bindable lore => [Reduce lore] -> Reduce lore
- 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 => Lambda lore
- scanomapSOAC :: Lambda lore -> [SubExp] -> Lambda lore -> ScremaForm lore
- redomapSOAC :: Bindable lore => [Reduce lore] -> Lambda lore -> ScremaForm lore
- scanSOAC :: (Bindable lore, MonadFreshNames m) => Lambda lore -> [SubExp] -> m (ScremaForm lore)
- reduceSOAC :: (Bindable lore, MonadFreshNames m) => [Reduce lore] -> m (ScremaForm lore)
- mapSOAC :: Bindable lore => Lambda lore -> ScremaForm lore
- isScanomapSOAC :: ScremaForm lore -> Maybe (Lambda lore, [SubExp], Lambda lore)
- isRedomapSOAC :: ScremaForm lore -> Maybe ([Reduce lore], Lambda lore)
- isScanSOAC :: ScremaForm lore -> Maybe (Lambda lore, [SubExp])
- isReduceSOAC :: ScremaForm lore -> Maybe [Reduce lore]
- 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) (Lambda lore) [VName] | |
Scatter SubExp (Lambda lore) [VName] [(SubExp, Int, VName)] | |
GenReduce SubExp [GenReduceOp lore] (Lambda 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 (Lambda 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] (Lambda 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 # |
Reduce | |
|
Instances
Annotations lore => Eq (Reduce lore) Source # | |
Annotations lore => Ord (Reduce lore) Source # | |
Defined in Futhark.Representation.SOACS.SOAC | |
Annotations lore => Show (Reduce lore) Source # | |
PrettyLore lore => Pretty (Reduce lore) Source # | |
redResults :: [Reduce lore] -> Int Source #
How many reduction results are produced by these Reduce
s?
singleReduce :: Bindable lore => [Reduce lore] -> Reduce lore Source #
Combine multiple reduction operators to a single operator.
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 :: Lambda lore -> [SubExp] -> Lambda lore -> ScremaForm lore Source #
redomapSOAC :: Bindable lore => [Reduce lore] -> Lambda lore -> ScremaForm lore Source #
scanSOAC :: (Bindable lore, MonadFreshNames m) => Lambda lore -> [SubExp] -> m (ScremaForm lore) Source #
reduceSOAC :: (Bindable lore, MonadFreshNames m) => [Reduce lore] -> m (ScremaForm lore) Source #
isScanomapSOAC :: ScremaForm lore -> Maybe (Lambda lore, [SubExp], Lambda lore) Source #
isRedomapSOAC :: ScremaForm lore -> Maybe ([Reduce lore], Lambda lore) Source #
isScanSOAC :: ScremaForm lore -> Maybe (Lambda lore, [SubExp]) Source #
isReduceSOAC :: ScremaForm lore -> Maybe [Reduce lore] 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.