| Safe Haskell | Safe |
|---|---|
| Language | Haskell98 |
DDC.Core.Flow.Procedure
Description
A Procedure is an abstract imperative loop nest.
The loops are represented as a separated loop anatomy, to make it
easy to incrementally build them from a data flow graph expressed
as a Process.
- data Procedure = Procedure {
- procedureName :: Name
- procedureParamFlags :: [(Bool, BindF)]
- procedureNest :: Nest
- data Nest
- = NestEmpty
- | NestList { }
- | NestLoop { }
- | NestGuard { }
- | NestSegment {
- nestOuterRate :: Type Name
- nestInnerRate :: Type Name
- nestLength :: Bound Name
- nestBody :: [StmtBody]
- nestInner :: Nest
- data Context
- = ContextRate {
- contextRate :: Type Name
- contextOps :: [Operator]
- contextInner :: [Context]
- | ContextSelect { }
- | ContextSegment {
- contextOuterRate :: Type Name
- contextInnerRate :: Type Name
- contextLens :: Bound Name
- contextSegd :: Bind Name
- contextOps :: [Operator]
- contextInner :: [Context]
- | ContextAppend { }
- = ContextRate {
- data StmtStart
- = StartStmt {
- startResultBind :: Bind Name
- startExpression :: Exp () Name
- | StartVecNew { }
- | StartAcc {
- startAccName :: Name
- startAccType :: Type Name
- startAccExp :: Exp () Name
- = StartStmt {
- data StmtBody
- = BodyStmt {
- bodyResultBind :: Bind Name
- bodyExpression :: Exp () Name
- | BodyVecWrite {
- bodyVecName :: Name
- bodyVecWriteElemType :: Type Name
- bodyVecWriteIx :: Exp () Name
- bodyVecWriteVal :: Exp () Name
- | BodyAccRead { }
- | BodyAccWrite {
- bodyAccName :: Name
- bodyAccType :: Type Name
- bodyAccExp :: Exp () Name
- = BodyStmt {
- data StmtEnd
Documentation
An imperative procedure made up of some loops.
Constructors
| Procedure | |
Fields
| |
A loop nest.
Constructors
| NestEmpty | |
| NestList | |
| NestLoop | |
| NestGuard | |
| NestSegment | |
Fields
| |
Constructors
| ContextRate | A top-level context associated with a rate that is a parameter of the process. This context isn't created by the process itself. |
Fields
| |
| ContextSelect | A nested context created by a mkSel1# function. |
Fields
| |
| ContextSegment | A nested context created by a mkSegd# function. |
Fields
| |
| ContextAppend | |
Fields
| |
Statements that can appear at the start of a loop. These initialise accumulators.
Constructors
| StartStmt | Evaluate a pure expression |
Fields
| |
| StartVecNew | Allocate a new vector. |
Fields | |
| StartAcc | Inititlise a new accumulator. |
Fields
| |
Statements that appear in the body of a loop.
Constructors
| BodyStmt | Evaluate a pure expression. |
Fields
| |
| BodyVecWrite | Write to a vector. |
Fields
| |
| BodyAccRead | Read from an accumulator. |
Fields
| |
| BodyAccWrite | Body of an accumulation operation. Writes to the accumulator. |
Fields
| |
Statements that appear after a loop to cleanup.
Constructors
| EndStmt | Generic ending statements. |
| EndAcc | Read the result of an accumulator. |
| EndVecTrunc | Destructively truncate a vector to its final size. |
Fields
| |