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
- = NestEmpty
- | NestList { }
- | NestLoop { }
- | NestGuard { }
- | NestSegment {
- nestOuterRate :: Type Name
- nestInnerRate :: Type Name
- nestLength :: Bound Name
- nestBody :: [StmtBody]
- nestInner :: Nest
- data Context
- = ContextRate {
- contextRate :: Type Name
- | ContextSelect { }
- | ContextSegment { }
- = 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
- = EndStmt { }
- | EndAcc { }
- | EndVecTrunc {
- endVecName :: Name
- endVecType :: Type Name
- endVecRate :: Type Name
Documentation
An imperative procedure made up of some loops.
Procedure | |
|
A loop nest.
NestEmpty | |
NestList | |
NestLoop | |
NestGuard | |
NestSegment | |
|
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 mkSel1# function. |
| |
ContextSegment | A nested context created by a mkSegd# function. |
|
Statements that can appear at the start of a loop. These initialise accumulators.
StartStmt | Evaluate a pure expression |
| |
StartVecNew | Allocate a new vector. |
StartAcc | Inititlise a new accumulator. |
|
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 | Generic ending statements. |
EndAcc | Read the result of an accumulator. |
EndVecTrunc | Destructively truncate a vector to its final size. |
|