streamit.scheduler2.constrained
Class FeedbackLoop

java.lang.Object
  extended by streamit.misc.AssertedClass
      extended by streamit.misc.Misc
          extended by streamit.misc.DestroyedClass
              extended by streamit.scheduler2.base.StreamWithSplitNJoin
                  extended by streamit.scheduler2.base.FeedbackLoop
                      extended by streamit.scheduler2.hierarchical.FeedbackLoop
                          extended by streamit.scheduler2.constrained.FeedbackLoop
All Implemented Interfaces:
StreamInterface, StreamInterfaceWithSnJ

public class FeedbackLoop
extends FeedbackLoop
implements StreamInterface

streamit.scheduler2.constrained.Pipeline is the pipeline constrained scheduler. It assumes that all streams in the program use the constrained scheduler


Nested Class Summary
 
Nested classes/interfaces inherited from interface streamit.scheduler2.base.StreamInterfaceWithSnJ
StreamInterfaceWithSnJ.JoinFlow, StreamInterfaceWithSnJ.SplitFlow
 
Field Summary
static boolean debugrates
          Turn on debugrates for printing out rates.
static boolean debugsplitjoin
          Turn on debugsplitjoin for printing out splitjoin proportions.
static boolean librarydebug
          Turn on librarydebug as well for debugging in library.
 
Fields inherited from class streamit.scheduler2.base.FeedbackLoop
feedbackLoop
 
Constructor Summary
FeedbackLoop(FeedbackLoopIter iterator, Iterator parent, StreamFactory factory)
           
 
Method Summary
 void computeSchedule()
          compute the initialization and steady state schedules
 void createSteadyStateRestrictions(int streamNumExecs)
           
 void doneSteadyState(LatencyNode node)
           
 StreamInterface getBottomConstrainedStream()
           
 LatencyNode getBottomLatencyNode()
           
protected  StreamInterface getConstrainedBody()
           
protected  StreamInterface getConstrainedLoop()
           
 PhasingSchedule getNextPhase(Restrictions restrs, int nDataAvailable)
           
 int getSteadyPeek()
          return number of data peeked in a minimal steady execution of this element.
 int getSteadyPop()
          return number of data popped in a minimal steady execution of this element.
 int getSteadyPush()
          return number of data pushed in a minimal steady execution of this element.
 Iterator getStreamIter()
          Return an iterator to this stream.
 StreamInterface getTopConstrainedStream()
           
 LatencyNode getTopLatencyNode()
           
 int hashCode()
          Use the identifier of this stream as the hashcode, to ensure deterministic behavior in sets and containers (was causing unpredictable exceptions).
 void initializeRestrictions(Restrictions _restrictions)
           
 void initiateConstrained()
           
 void initRestrictionsCompleted(P2PPortal portal)
           
 boolean isDoneInitializing()
           
 boolean isDoneSteadyState()
           
 void registerConstraint(P2PPortal portal)
           
 void registerNewlyBlockedSteadyRestriction(Restriction restriction)
           
 String toString()
           
 
Methods inherited from class streamit.scheduler2.hierarchical.FeedbackLoop
addInitScheduleStage, addSteadySchedulePhase, advanceChildInitSchedule, advanceChildInitSchedule, advanceChildSteadySchedule, advanceChildSteadySchedule, advanceJoinSchedule, advanceJoinSchedule, advanceSplitSchedule, advanceSplitSchedule, getBottom, getChildInitStage, getChildNextInitStage, getChildNextSteadyPhase, getChildPhases, getChildSteadyPhase, getHierarchicalBody, getHierarchicalLoop, getInitPeek, getInitPop, getInitPush, getInitSchedule, getInitScheduleStage, getInitStageNumPeek, getInitStageNumPop, getInitStageNumPush, getJoinerPhases, getJoinPhase, getJoinSteadyPhase, getJoinSteadyPhaseFlow, getNextJoinSteadyPhase, getNextJoinSteadyPhaseFlow, getNextSplitSteadyPhase, getNextSplitSteadyPhaseFlow, getNumInitStages, getNumJoinPhases, getNumSplitPhases, getNumSteadyPhases, getPhasingInitSchedule, getPhasingSteadySchedule, getSplitPhase, getSplitSteadyPhase, getSplitSteadyPhaseFlow, getSplitterPhases, getSteadyPhaseNumPeek, getSteadyPhaseNumPop, getSteadyPhaseNumPush, getSteadySchedule, getSteadySchedulePhase, getTop
 
Methods inherited from class streamit.scheduler2.base.FeedbackLoop
computeSteadyState, getBody, getJoinFanIn, getLoop, getNumBodyExecs, getNumJoinRounds, getNumLoopExecs, getNumNodeFirings, getNumNodes, getNumSplitRounds, getSplitFanOut
 
Methods inherited from class streamit.scheduler2.base.StreamWithSplitNJoin
getJoinFlow, getSplitFlow, getSteadyJoinFlow, getSteadySplitFlow
 
Methods inherited from class streamit.misc.DestroyedClass
DELETE, finalize
 
Methods inherited from class streamit.misc.Misc
init_array_1D_float, init_array_1D_int, MAX, MIN
 
Methods inherited from class streamit.misc.AssertedClass
ASSERT, ASSERT, ASSERT, ASSERT, ASSERT, ASSERT, ASSERT, ASSERT, ASSERT, ASSERT, ASSERT, ERROR, ERROR, ERROR, SASSERT, SASSERT, SASSERT, SASSERT, SASSERT, SASSERT, SASSERT, SASSERT, SERROR, SERROR, SERROR
 
Methods inherited from class java.lang.Object
clone, equals, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface streamit.scheduler2.hierarchical.StreamInterface
addSteadySchedulePhase, getBottom, getInitScheduleStage, getInitStageNumPeek, getInitStageNumPop, getInitStageNumPush, getNumInitStages, getNumSteadyPhases, getPhasingInitSchedule, getPhasingSteadySchedule, getSteadyPhaseNumPeek, getSteadyPhaseNumPop, getSteadyPhaseNumPush, getSteadySchedulePhase, getTop
 
Methods inherited from interface streamit.scheduler2.base.StreamInterface
getInitPeek, getInitPop, getInitPush, getInitSchedule, getNumNodeFirings, getNumNodes, getSteadyPeek, getSteadyPop, getSteadyPush, getSteadySchedule, getStreamIter
 
Methods inherited from interface streamit.scheduler2.base.StreamInterfaceWithSnJ
getJoinFanIn, getJoinFlow, getSplitFanOut, getSplitFlow, getSteadyJoinFlow, getSteadySplitFlow
 

Field Detail

debugrates

public static boolean debugrates
Turn on debugrates for printing out rates.


debugsplitjoin

public static boolean debugsplitjoin
Turn on debugsplitjoin for printing out splitjoin proportions.


librarydebug

public static boolean librarydebug
Turn on librarydebug as well for debugging in library.
(library and compiler backends use different data so having librarydebug set wrong will produce ClassCastException).

Constructor Detail

FeedbackLoop

public FeedbackLoop(FeedbackLoopIter iterator,
                    Iterator parent,
                    StreamFactory factory)
Method Detail

initiateConstrained

public void initiateConstrained()

getTopConstrainedStream

public StreamInterface getTopConstrainedStream()

getBottomConstrainedStream

public StreamInterface getBottomConstrainedStream()

getConstrainedLoop

protected StreamInterface getConstrainedLoop()

getConstrainedBody

protected StreamInterface getConstrainedBody()

getBottomLatencyNode

public LatencyNode getBottomLatencyNode()

getTopLatencyNode

public LatencyNode getTopLatencyNode()

computeSchedule

public void computeSchedule()
Description copied from class: FeedbackLoop
compute the initialization and steady state schedules

Specified by:
computeSchedule in interface StreamInterface
Specified by:
computeSchedule in class FeedbackLoop

registerConstraint

public void registerConstraint(P2PPortal portal)

createSteadyStateRestrictions

public void createSteadyStateRestrictions(int streamNumExecs)

initRestrictionsCompleted

public void initRestrictionsCompleted(P2PPortal portal)

initializeRestrictions

public void initializeRestrictions(Restrictions _restrictions)

isDoneInitializing

public boolean isDoneInitializing()

getNextPhase

public PhasingSchedule getNextPhase(Restrictions restrs,
                                    int nDataAvailable)

registerNewlyBlockedSteadyRestriction

public void registerNewlyBlockedSteadyRestriction(Restriction restriction)

isDoneSteadyState

public boolean isDoneSteadyState()

doneSteadyState

public void doneSteadyState(LatencyNode node)

hashCode

public int hashCode()
Use the identifier of this stream as the hashcode, to ensure deterministic behavior in sets and containers (was causing unpredictable exceptions).

Overrides:
hashCode in class Object

getStreamIter

public Iterator getStreamIter()
Description copied from interface: StreamInterface
Return an iterator to this stream. The iterator is a unspecialized iterator type.

Specified by:
getStreamIter in interface StreamInterface

getSteadyPeek

public int getSteadyPeek()
Description copied from interface: StreamInterface
return number of data peeked in a minimal steady execution of this element.

Specified by:
getSteadyPeek in interface StreamInterface
Returns:
number of data peeked in a steady execution.

getSteadyPop

public int getSteadyPop()
Description copied from interface: StreamInterface
return number of data popped in a minimal steady execution of this element.

Specified by:
getSteadyPop in interface StreamInterface
Returns:
number of data popped in a steady execution.

getSteadyPush

public int getSteadyPush()
Description copied from interface: StreamInterface
return number of data pushed in a minimal steady execution of this element.

Specified by:
getSteadyPush in interface StreamInterface
Returns:
number of data pushed in a steady execution.

toString

public String toString()
Overrides:
toString in class Object