at.dms.kjc.spacedynamic
Class SimulationCounter

java.lang.Object
  extended by at.dms.kjc.spacedynamic.SimulationCounter

public class SimulationCounter
extends Object

This class keeps the counters for weights of the splitter/joiners and performs the test to check whether the simulation is finished


Field Summary
static HashMap<FlatNode,Integer> maxJoinerBufferSize
           
 
Constructor Summary
SimulationCounter(HashMap<FlatNode,JoinerScheduleNode> joinerSchedules)
           
 
Method Summary
 void addJoinerReceiveBuffer(FlatNode node, String buffer)
           
 void decrementArcCountOutgoing(FlatNode node, int way)
           
 void decrementBufferCount(FlatNode node, int val)
           
 void decrementJoinerBufferCount(FlatNode node, String buf)
           
 int getArcCountOutgoing(FlatNode node, int way)
           
 int getBufferCount(FlatNode node)
           
 String getJoinerBuffer(FlatNode node)
           
 int getJoinerBufferCount(FlatNode node, String buf)
           
 String getJoinerReceiveBuffer(FlatNode node)
           
 boolean hasFired(FlatNode node)
           
 void incrementBufferCount(FlatNode node)
           
 void incrementJoinerBufferCount(FlatNode node, String buf)
           
 void incrementJoinerSchedule(FlatNode node)
           
 void resetArcCountOutgoing(FlatNode node, int way)
           
 void resetBuffers()
           
 void setFired(FlatNode node)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

maxJoinerBufferSize

public static HashMap<FlatNode,Integer> maxJoinerBufferSize
Constructor Detail

SimulationCounter

public SimulationCounter(HashMap<FlatNode,JoinerScheduleNode> joinerSchedules)
Method Detail

getJoinerReceiveBuffer

public String getJoinerReceiveBuffer(FlatNode node)

addJoinerReceiveBuffer

public void addJoinerReceiveBuffer(FlatNode node,
                                   String buffer)

getJoinerBuffer

public String getJoinerBuffer(FlatNode node)

incrementJoinerSchedule

public void incrementJoinerSchedule(FlatNode node)

hasFired

public boolean hasFired(FlatNode node)

setFired

public void setFired(FlatNode node)

resetBuffers

public void resetBuffers()

getBufferCount

public int getBufferCount(FlatNode node)

decrementBufferCount

public void decrementBufferCount(FlatNode node,
                                 int val)

incrementBufferCount

public void incrementBufferCount(FlatNode node)

getJoinerBufferCount

public int getJoinerBufferCount(FlatNode node,
                                String buf)

decrementJoinerBufferCount

public void decrementJoinerBufferCount(FlatNode node,
                                       String buf)

incrementJoinerBufferCount

public void incrementJoinerBufferCount(FlatNode node,
                                       String buf)

getArcCountOutgoing

public int getArcCountOutgoing(FlatNode node,
                               int way)

decrementArcCountOutgoing

public void decrementArcCountOutgoing(FlatNode node,
                                      int way)

resetArcCountOutgoing

public void resetArcCountOutgoing(FlatNode node,
                                  int way)