|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object scale.score.dependence.DDEdge scale.score.dependence.DDNormalEdge
public final class DDNormalEdge
This class represents a set of dependence edges from one source to one sink in the data dependence graph.
$Id: DDNormalEdge.java,v 1.20 2007-10-04 19:58:24 burrill Exp $
Copyright 2008 by the
Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
DDEdge
,
DDTransEdge
,
DataDependence
,
DDGraph
,
DDInfo
Field Summary |
---|
Fields inherited from class scale.score.dependence.DDEdge |
---|
cAnti, cFlow, cInput, cNone, colors, cOutput, dependenceName, lineType |
Constructor Summary | |
---|---|
DDNormalEdge(SubscriptExpr src,
SubscriptExpr sink,
long[] ddinfo,
java.lang.String aname,
boolean spatial)
Create an edge for the data dependence graph. |
Method Summary | |
---|---|
boolean |
contains(SubscriptExpr exp)
Return true if the expression is an end of an edge represented by this instance. |
static int |
created()
Return the number of instances of this class that were created. |
boolean |
forLoop(LoopHeaderChord loop)
Return true if this edge has a source or sink in the specified loop. |
java.lang.String |
format(Note s1,
Note s2,
java.lang.String aname,
int ddtype)
Return a string representation of a data dependence edge. |
long[] |
getDDInfo()
Return the computed data dependence information. |
int |
getDistance(int level)
Return the distance for the specified level. |
int |
getEdgeType(Note source,
Note sink)
Return the data dependence type - flow ,
anti , input , or output . |
void |
getEnds(Vector<Note> v)
Add the SubscriptExpr
instances, that are the edge ends, to the Vector. |
int |
getLevel()
Return the level of dependence. |
SubscriptExpr |
getSink()
Return the sink end of the edge. |
SubscriptExpr |
getSource()
Return the source end of the edge. |
void |
graphDependence(DisplayGraph da,
boolean addChord,
HashSet<Note> nodes,
DDGraph graph)
Create a graphic display of the edges represented by this instancce. |
boolean |
isAnyDistanceKnown()
Return true if the distance is known at any level. |
boolean |
isAnyDistanceNonZero()
Return true if any distance is unknown or not zero at any level. |
boolean |
isAnyDistanceNotKnown()
Return true if the distance is not known at any level. |
boolean |
isDistanceKnown(int level)
Return true if the distance is known at the specified level. |
boolean |
isLoopIndependentDependency()
Return true if the edge is loop-independent dependency. |
boolean |
isTransitive()
Return true if this is a transitive edge set. |
java.util.Iterator<SubscriptExpr> |
iterator()
Return an iterator over the SubscriptExpr instances that are
the edge ends. |
int |
numberEdges()
Return a metric for the number of data dependence edges represented. |
void |
printDDInfo(Note s1,
Note s2)
Print to stdout the information about the data dependence. |
boolean |
representsAllInput()
Return true if every edge represented is an input edge. |
java.lang.String |
toString()
|
Methods inherited from class scale.score.dependence.DDEdge |
---|
getArrayName, getNodeID, isSpatial |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DDNormalEdge(SubscriptExpr src, SubscriptExpr sink, long[] ddinfo, java.lang.String aname, boolean spatial)
src
precedes
sink
.
src
- is the one end of the edgesink
- is the other end of the edgeddinfo
- is the computed data dependence informationaname
- is the name of array (or scalar) involved in the dependencespatial
- is true if the edge records a spatial dependenceDataDependence
,
DDGraph
Method Detail |
---|
public static int created()
public SubscriptExpr getSource()
public SubscriptExpr getSink()
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Iterator<SubscriptExpr> iterator()
iterator
over the SubscriptExpr
instances that are
the edge ends.
iterator
in class DDEdge
public boolean contains(SubscriptExpr exp)
contains
in class DDEdge
public boolean representsAllInput()
representsAllInput
in class DDEdge
public void getEnds(Vector<Note> v)
SubscriptExpr
instances, that are the edge ends, to the Vector.
getEnds
in class DDEdge
public int numberEdges()
numberEdges
in class DDEdge
public long[] getDDInfo()
getDDInfo
in class DDEdge
public boolean isLoopIndependentDependency()
isLoopIndependentDependency
in class DDEdge
public int getDistance(int level)
getDistance
in class DDEdge
public boolean isDistanceKnown(int level)
isDistanceKnown
in class DDEdge
public boolean isAnyDistanceKnown()
isAnyDistanceKnown
in class DDEdge
public boolean isAnyDistanceNotKnown()
isAnyDistanceNotKnown
in class DDEdge
public boolean isAnyDistanceNonZero()
isAnyDistanceNonZero
in class DDEdge
public boolean isTransitive()
isTransitive
in class DDEdge
public int getEdgeType(Note source, Note sink)
flow
,
anti
, input
, or output
. This logic assumes that the s1
precedes the s2. The source and sink
must the uses of the addresses represented by the SubscriptExpr
instances that are
the ends of the data dependence edge.
getEdgeType
in class DDEdge
DDGraph
,
DataDependence
public void printDDInfo(Note s1, Note s2)
printDDInfo
in class DDEdge
public java.lang.String format(Note s1, Note s2, java.lang.String aname, int ddtype)
DDEdge
format
in class DDEdge
s1
- is one end of the edges2
- is another end of the edgeaname
- is the array nameddtype
- is the edge typepublic void graphDependence(DisplayGraph da, boolean addChord, HashSet<Note> nodes, DDGraph graph)
graphDependence
in class DDEdge
da
- is the graph displayaddChord
- is true if the ends of each edge should be added
to the nodes
setnodes
- is the set ofpublic boolean forLoop(LoopHeaderChord loop)
forLoop
in class DDEdge
public final int getLevel()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |