at.dms.kjc.cluster
Class RegisterStreams

java.lang.Object
  extended by at.dms.kjc.cluster.RegisterStreams

public class RegisterStreams
extends Object

Constructs a list of input and output tapes for each stream operator. Stores this information in static fields and provides static access methods. Needs to be run after NodeEnumerator, after ClusterFusion.fusedWith data is set up, and after StaticSubgraph data is set up. TODO: would be nice to create a Tape only once rather than twice.

Author:
Janis

Constructor Summary
RegisterStreams()
           
 
Method Summary
static Tape getFilterInStream(SIROperator filter)
          Return a Tape that represents input tape for a filter no side effects.
static Tape getFilterOutStream(SIROperator filter)
          Return a Tape that represents output tape for a filter no side effects
static List<Tape> getNodeInStreams(SIROperator op)
          Return a Vector containing input tapes as Tape objects.
static List<Tape> getNodeOutStreams(SIROperator op)
          Return a Vector containing output tapes as Tape objects
0-weight (splitter) edges are represented as null.
static void init(FlatNode top)
          Set up Tape objects for all non-0-weight edges and set up vectors of edges (including nulls for 0-weight edges) for all incoming and outgoing edges for all filters, splitters, and joiners in graph.
static void reset()
          Clean up static data structures (also before using, to allocate)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegisterStreams

public RegisterStreams()
Method Detail

reset

public static void reset()
Clean up static data structures (also before using, to allocate)


init

public static void init(FlatNode top)
Set up Tape objects for all non-0-weight edges and set up vectors of edges (including nulls for 0-weight edges) for all incoming and outgoing edges for all filters, splitters, and joiners in graph.

Parameters:
first - node in a flatgraph

getFilterInStream

public static Tape getFilterInStream(SIROperator filter)
Return a Tape that represents input tape for a filter no side effects.

Parameters:
filter - a SIROperator with at most one input tape
Returns:
The FlatGraph input to in Tape format, or null if no input
See Also:
Tape

getFilterOutStream

public static Tape getFilterOutStream(SIROperator filter)
Return a Tape that represents output tape for a filter no side effects

Parameters:
filter - a SIROperator with at most onr output tape
Returns:
The FlatGraph output of in Tape format, or null if no output
See Also:
Tape

getNodeInStreams

public static List<Tape> getNodeInStreams(SIROperator op)
Return a Vector containing input tapes as Tape objects.
0-weight (joiner) edges are represented as null.

Parameters:
op - a SIROperator
Returns:
List of inputs to in Tape format, may return empty list but never null.
See Also:
Tape

getNodeOutStreams

public static List<Tape> getNodeOutStreams(SIROperator op)
Return a Vector containing output tapes as Tape objects
0-weight (splitter) edges are represented as null.

Parameters:
op - a SIROperator
Returns:
List of outputs from in Tape format, may return empty list but never null.
See Also:
Tape