Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module implements facilities for determining whether a reduction or fold can be expressed in a closed form (i.e. not as a SOAC).
Right now, the module can detect only trivial cases. In the future, we would like to make it more powerful, as well as possibly also being able to analyse sequential loops.
Synopsis
- foldClosedForm :: (Attributes lore, BinderOps lore) => VarLookup lore -> Pattern lore -> Lambda lore -> [SubExp] -> [VName] -> RuleM lore ()
- loopClosedForm :: (Attributes lore, BinderOps lore) => Pattern lore -> [(FParam lore, SubExp)] -> Names -> SubExp -> Body lore -> RuleM lore ()
Documentation
foldClosedForm :: (Attributes lore, BinderOps lore) => VarLookup lore -> Pattern lore -> Lambda lore -> [SubExp] -> [VName] -> RuleM lore () Source #
foldClosedForm look foldfun accargs arrargs
determines whether
each of the results of foldfun
can be expressed in a closed form.