Safe Haskell | None |
---|
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 {}
- data Nest
- data Context
- = ContextRate {
- contextRate :: Type Name
- | ContextSelect { }
- = ContextRate {
- data StmtStart
- = StartVecNew { }
- | StartAcc {
- startAccName :: Name
- startAccType :: Type Name
- startAccExp :: Exp () Name
- 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
- = EndStmt { }
- | EndAcc { }
- | EndVecSlice {
- endVecName :: Name
- endVecType :: Type Name
- endVecRate :: Type Name
Documentation
An imperative procedure made up of some loops.
Procedure | |
|
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. |
| |
ContextSelect | A nested context created by a mkSel function. |
|
Statements that can appear at the start of a loop. These initialise accumulators.
StartVecNew | |
StartAcc | |
|
Statements that appear in the body of a loop.
BodyStmt | Evaluate a pure expression. |
| |
BodyVecWrite | Write to a vector. |
| |
BodyAccRead | Read from an accumulator. |
| |
BodyAccWrite | Body of an accumulation operation. Writes to the accumulator. |
|
Statements that appear after a loop to cleanup.
EndStmt | Pure ending statements to produce the result of the overall process. |
EndAcc | Read the result of an accumulator. |
EndVecSlice | Destructively slice down a vector to its final size. |
|