streamit.scheduler2.constrained
Class SplitJoin

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.SplitJoin
                      extended by streamit.scheduler2.hierarchical.SplitJoin
                          extended by streamit.scheduler2.constrained.SplitJoin
All Implemented Interfaces:
StreamInterface, StreamInterfaceWithSnJ

public class SplitJoin
extends SplitJoin
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.SplitJoin
splitjoin
 
Constructor Summary
SplitJoin(SplitJoinIter 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()
           
 PhasingSchedule getJoinPhase(int nPhase)
           
 PhasingSchedule getNextPhase(Restrictions restrs, int nDataAvailable)
           
 PhasingSchedule getSplitPhase(int nPhase)
           
 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.SplitJoin
addInitScheduleStage, addSteadySchedulePhase, advanceChildInitSchedule, advanceChildInitSchedule, advanceChildSteadySchedule, advanceChildSteadySchedule, advanceJoinSchedule, advanceJoinSchedule, advanceSplitSchedule, advanceSplitSchedule, getBottom, getChildInitStage, getChildNextInitStage, getChildNextSteadyPhase, getChildPhases, getChildSteadyPhase, getHierarchicalChild, getInitPeek, getInitPop, getInitPush, getInitSchedule, getInitScheduleStage, getInitStageNumPeek, getInitStageNumPop, getInitStageNumPush, getJoinerPhases, getJoinSteadyPhase, getJoinSteadyPhaseFlow, getNextJoinSteadyPhase, getNextJoinSteadyPhaseFlow, getNextSplitSteadyPhase, getNextSplitSteadyPhaseFlow, getNumInitStages, getNumJoinPhases, getNumSplitPhases, getNumSteadyPhases, getPhasingInitSchedule, getPhasingSteadySchedule, getSplitSteadyPhase, getSplitSteadyPhaseFlow, getSplitterPhases, getSteadyPhaseNumPeek, getSteadyPhaseNumPop, getSteadyPhaseNumPush, getSteadySchedule, getSteadySchedulePhase, getTop
 
Methods inherited from class streamit.scheduler2.base.SplitJoin
computeSteadyState, getChild, getChildNumExecs, getJoinFanIn, getJoinNumRounds, getNumChildren, getNumNodeFirings, getNumNodes, getSplitFanOut, getSplitNumRounds
 
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

SplitJoin

public SplitJoin(SplitJoinIter iterator,
                 Iterator parent,
                 StreamFactory factory)
Method Detail

initiateConstrained

public void initiateConstrained()

getTopConstrainedStream

public StreamInterface getTopConstrainedStream()

getBottomConstrainedStream

public StreamInterface getBottomConstrainedStream()

getBottomLatencyNode

public LatencyNode getBottomLatencyNode()

getTopLatencyNode

public LatencyNode getTopLatencyNode()

getSplitPhase

public PhasingSchedule getSplitPhase(int nPhase)
Overrides:
getSplitPhase in class SplitJoin

getJoinPhase

public PhasingSchedule getJoinPhase(int nPhase)
Overrides:
getJoinPhase in class SplitJoin

computeSchedule

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

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

registerConstraint

public void registerConstraint(P2PPortal portal)

createSteadyStateRestrictions

public void createSteadyStateRestrictions(int streamNumExecs)

doneSteadyState

public void doneSteadyState(LatencyNode node)

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()

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