coins.mdf
Class ChangeStructure

java.lang.Object
  extended bycoins.mdf.ChangeStructure

class ChangeStructure
extends java.lang.Object

Change the structure of the program into `switch-case' structure. Each `case' structure include one macro-task. This class also insert OpenMP pragmas, and wrap the `switch-case' structure up in `while' loop.


Field Summary
static int THR
          The threshold of debug output
 
Constructor Summary
(package private) ChangeStructure(MdfEnvironment e, MacroFlowGraph graph)
          Constructor.
 
Method Summary
(package private)  BlockStmt makeGetTask()
          Generate the dynamic scheduler
(package private)  BlockStmt makeInitTask()
          Generate the initialize part of the MDF program.
(package private)  BlockStmt makeSwitchBody(HirList labelList)
          Generate the body part of the `switch-case' structure.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

THR

public static final int THR
The threshold of debug output

See Also:
Constant Field Values
Constructor Detail

ChangeStructure

ChangeStructure(MdfEnvironment e,
                MacroFlowGraph graph)
          throws PassException
Constructor. Change the structure of the program.

Parameters:
e - The environment of the MDF module
graph - The current macro flow graph
Throws:
PassException - Any exception in the MDF module
Method Detail

makeInitTask

BlockStmt makeInitTask()
Generate the initialize part of the MDF program.

Returns:
The initialize part

makeGetTask

BlockStmt makeGetTask()
Generate the dynamic scheduler

Returns:
The dynamic scheduler

makeSwitchBody

BlockStmt makeSwitchBody(HirList labelList)
                   throws PassException
Generate the body part of the `switch-case' structure.

Returns:
The body part of the `switch-case' structure
Throws:
PassException - Any exception in MDF module