at.dms.kjc.slicegraph
Class Edge

java.lang.Object
  extended by at.dms.kjc.slicegraph.Edge
Direct Known Subclasses:
InterSliceEdge

public class Edge
extends Object

An Edge connects two SliceNodes. Edges can be differentiated into InterSliceEdges that connect the OutputSliceNode of a slice and the InputSliceNode of a slice, and

Intra-Slice Edges
that connect two SliceNodes in the same slice. TODO: Warning Edge is currently used as a key for Channel, but sophisticated graph optimizations remove SIRIdentity filters, and remove redundant adjacent edges. A RR(1) splitter connected to a RR(1) joiner in a slice graph could represent an identity operation, but could also represent a permutation operation (e.g. by having the first output of the splitter connect to the second input of the joiner, and the second output of the splitter connect to the first input of the joiner). Our optimizations would change this permutation to an identity. Luckily this sort of permutation is impossible in the SIR graph, and is not introduced by any current optimization on the slice graph.

Author:
mgordon

Field Summary
protected  SliceNode dest
          Destination of directed edge in Slice graph
protected  SliceNode src
          Source of directed edge in Slice graph
 
Constructor Summary
protected Edge()
          Partial constructor, for subclasses.
  Edge(InputSliceNode dest)
           
  Edge(OutputSliceNode src)
           
  Edge(SliceNode src, SliceNode dest)
          Full constructor, (type will be inferred from src / dest).
 
Method Summary
 SliceNode getDest()
           
 SliceNode getSrc()
           
 CType getType()
           
 void setDest(SliceNode dest)
          Set the destination SliceNode
 void setSrc(SliceNode src)
          Set the source SliceNode
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

src

protected SliceNode src
Source of directed edge in Slice graph


dest

protected SliceNode dest
Destination of directed edge in Slice graph

Constructor Detail

Edge

public Edge(SliceNode src,
            SliceNode dest)
Full constructor, (type will be inferred from src / dest).

Parameters:
src - Source assumed to be an OutputSliceNode or a FilterSliceNode.
dest - Dest assumed to be an InputSliceNode or a FilterSliceNode.

Edge

protected Edge()
Partial constructor, for subclasses.


Edge

public Edge(OutputSliceNode src)

Edge

public Edge(InputSliceNode dest)
Method Detail

getSrc

public SliceNode getSrc()
Returns:
source SliceNode

getType

public CType getType()

getDest

public SliceNode getDest()
Returns:
dest SliceNode

setSrc

public void setSrc(SliceNode src)
Set the source SliceNode

Parameters:
src -

setDest

public void setDest(SliceNode dest)
Set the destination SliceNode

Parameters:
dest -

toString

public String toString()
Overrides:
toString in class Object