at.dms.kjc.iterator
Class SIRFeedbackLoopIter

java.lang.Object
  extended by at.dms.kjc.iterator.SIRIterator
      extended by at.dms.kjc.iterator.SIRFeedbackLoopIter
All Implemented Interfaces:
FeedbackLoopIter, Iterator, IteratorBase, JoinerIter, SplitterIter, SplitterNJoinerIter
Direct Known Subclasses:
SIRFineGrainedFeedbackLoopIter

public class SIRFeedbackLoopIter
extends SIRIterator
implements FeedbackLoopIter

IterFactory uses this for SIRFeedbackLoop. Includes extra methods as appropriate.


Field Summary
protected  SIRFeedbackLoop obj
          Object pointed to by this iterator.
 
Fields inherited from class at.dms.kjc.iterator.SIRIterator
factory
 
Method Summary
 void accept(StreamVisitor v)
           
 SIRIterator get(int i)
          Same as above with different signature
 SIRIterator getBody()
           
 Iterator getBodyChild()
          Returns an iterator for the body of the FeedbackLoop.
 int getDelaySize()
          Returns delay of feedbackloop
 int getFanIn()
          Returns the number of ways this Joiner joines data.
 int getFanOut()
          Returns the number of ways this Splitter splits data.
 int getJoinerNumWork()
          Returns the number of work functions for the Joiner of this Stream.
 Object getJoinerWork(int nWork)
          Returns n-th work function associated with this Joiner.
 int[] getJoinPopWeights(int nWork)
          Returns distribution of weights on a particular invocation of work function for Joiner of this SplitJoin.
 int getJoinPush(int nWork)
          Returns number of data items produced by a particular invocation of work function for Joiner of this SplitJoin.
 SIRIterator getLoop()
           
 Iterator getLoopChild()
          Returns an iterator for the loop of the FeedbackLoop.
 int getSplitPop(int nWork)
          Returns number of data items consumed by a particular invocation of work function for Splitter of this Stream.
 int[] getSplitPushWeights(int nWork)
          Returns distribution of weights on a particular invocation of work function for Splitter of this Stream.
 int getSplitterNumWork()
          Returns the number of work functions for this Splitter.
 Object getSplitterWork(int nWork)
          Returns n-th work function associated with this Splitter.
 SIRStream getStream()
          Return the stream pointed to by this.
 Iterator getUnspecializedIter()
          This function is needed by the scheduler, but isn't useful from the compiler.
 FeedbackLoopIter isFeedbackLoop()
          Checks if the iterator points to a FeedbackLoop.
 
Methods inherited from class at.dms.kjc.iterator.SIRIterator
checkValidity, equals, getObject, getParent, getParents, getPos, getRelativeName, hashCode, invalidateNode, invalidateTree, isFilter, isPipeline, isSplitJoin
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface streamit.scheduler2.iriter.IteratorBase
equals, getObject, hashCode
 

Field Detail

obj

protected SIRFeedbackLoop obj
Object pointed to by this iterator.

Method Detail

isFeedbackLoop

public FeedbackLoopIter isFeedbackLoop()
Description copied from interface: Iterator
Checks if the iterator points to a FeedbackLoop. If so, returns a FeedbackLoop iterator that points to the same object. If not, returns null.

Specified by:
isFeedbackLoop in interface Iterator
Overrides:
isFeedbackLoop in class SIRIterator
Returns:
iterator to a FeedbackLoop or null if self doesn't point to a FeedbackLoop

getStream

public SIRStream getStream()
Return the stream pointed to by this.

Specified by:
getStream in class SIRIterator

getDelaySize

public int getDelaySize()
Returns delay of feedbackloop

Specified by:
getDelaySize in interface FeedbackLoopIter
Returns:
delay size

getBodyChild

public Iterator getBodyChild()
Returns an iterator for the body of the FeedbackLoop.

Specified by:
getBodyChild in interface FeedbackLoopIter
Returns:
iterator for the body of the FeedbackLoop

getLoopChild

public Iterator getLoopChild()
Returns an iterator for the loop of the FeedbackLoop.

Specified by:
getLoopChild in interface FeedbackLoopIter
Returns:
iterator for the loop of the FeedbackLoop

getLoop

public SIRIterator getLoop()

getBody

public SIRIterator getBody()

get

public SIRIterator get(int i)
Same as above with different signature


getFanOut

public int getFanOut()
Returns the number of ways this Splitter splits data.

Specified by:
getFanOut in interface SplitterIter
Returns:
return Splitter fan-out

getSplitterNumWork

public int getSplitterNumWork()
Returns the number of work functions for this Splitter.

Specified by:
getSplitterNumWork in interface SplitterIter
Returns:
number of work functions for this Splitter

getSplitterWork

public Object getSplitterWork(int nWork)
Returns n-th work function associated with this Splitter.

Specified by:
getSplitterWork in interface SplitterIter
Returns:
n-th work function for the Splitter

getJoinerWork

public Object getJoinerWork(int nWork)
Returns n-th work function associated with this Joiner.

Specified by:
getJoinerWork in interface JoinerIter
Returns:
n-th work function for the Joiner

getSplitPushWeights

public int[] getSplitPushWeights(int nWork)
Returns distribution of weights on a particular invocation of work function for Splitter of this Stream. The distribution is simply an array of ints, with numChildren elements. The value at index 0 corresponds to number of items pushed out to 1st child, etc.

Specified by:
getSplitPushWeights in interface SplitterIter
Returns:
distribution of weights on a particular invocation of work function for the Splitter of this Stream.

getSplitPop

public int getSplitPop(int nWork)
Returns number of data items consumed by a particular invocation of work function for Splitter of this Stream. These are the items that will end up being pushed out to the children of this Stream.

Specified by:
getSplitPop in interface SplitterIter
Returns:
number of data items consumed by a particular invocation of work function for Splitter of this Stream.

getFanIn

public int getFanIn()
Returns the number of ways this Joiner joines data.

Specified by:
getFanIn in interface JoinerIter
Returns:
return Joiner fan-in

getJoinerNumWork

public int getJoinerNumWork()
Returns the number of work functions for the Joiner of this Stream.

Specified by:
getJoinerNumWork in interface JoinerIter
Returns:
number of work functions for the JOiner of this Stream

getJoinPopWeights

public int[] getJoinPopWeights(int nWork)
Returns distribution of weights on a particular invocation of work function for Joiner of this SplitJoin. The distribution is simply an array of ints, with numChildren elements. The value at index 0 corresponds to number of items popped from 1st child, etc.

Specified by:
getJoinPopWeights in interface JoinerIter
Returns:
distribution of weights on a particular invocation of work function for Joiner of this SplitJoin.

getJoinPush

public int getJoinPush(int nWork)
Returns number of data items produced by a particular invocation of work function for Joiner of this SplitJoin. These are the items that were consumed from various children of this SplitJoin.

Specified by:
getJoinPush in interface JoinerIter
Returns:
number of data items produced by a particular invocation of work function for Joiner of this SplitJoin.

accept

public void accept(StreamVisitor v)
Specified by:
accept in class SIRIterator

getUnspecializedIter

public Iterator getUnspecializedIter()
This function is needed by the scheduler, but isn't useful from the compiler.

Specified by:
getUnspecializedIter in interface SplitterNJoinerIter
Returns:
an Iterator that points to the same object