Safe Haskell | Safe-Inferred |
---|---|
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 :: (ASTRep rep, BuilderOps rep) => VarLookup rep -> Pat rep -> Lambda rep -> [SubExp] -> [VName] -> RuleM rep ()
- loopClosedForm :: (ASTRep rep, BuilderOps rep) => Pat rep -> [(FParam rep, SubExp)] -> Names -> IntType -> SubExp -> Body rep -> RuleM rep ()