at.dms.kjc.cluster
Class LatencyConstraints

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

public class LatencyConstraints
extends Object

A class that detects and stores pairwise latency constraints between message senders and receivers. A latency constraint only exists if a downstream message is sent at negative latency or an upstream message is being sent (latency must be positive). Note that current implementation assumes that each filter that receives credits receives them from only one filter.


Constructor Summary
LatencyConstraints()
           
 
Method Summary
static void detectConstraints(SIRPortal[] portals)
          Given an array of portals detect and register all pairwise latency constraints.
static HashSet<LatencyConstraint> getOutgoingConstraints(SIRFilter filter)
          Returns a set of outgoing constraints for a SIRFilter this represents a set of filters to which an execution credit messages will have to be sent.
static boolean isMessageDirectionDownstream(SIRFilter sender, SIRFilter receiver)
          Checks if the message direction between sender and receiver is downstream
static boolean isRestricted(SIRFilter filter)
          Returns true if a SIRFilter needs to receive credit messages and limit its execution accordingly.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LatencyConstraints

public LatencyConstraints()
Method Detail

isRestricted

public static boolean isRestricted(SIRFilter filter)
Returns true if a SIRFilter needs to receive credit messages and limit its execution accordingly.


getOutgoingConstraints

public static HashSet<LatencyConstraint> getOutgoingConstraints(SIRFilter filter)
Returns a set of outgoing constraints for a SIRFilter this represents a set of filters to which an execution credit messages will have to be sent.

Parameters:
filter - the filter
Returns:
a set of filters that need to receive credit messages

isMessageDirectionDownstream

public static boolean isMessageDirectionDownstream(SIRFilter sender,
                                                   SIRFilter receiver)
Checks if the message direction between sender and receiver is downstream


detectConstraints

public static void detectConstraints(SIRPortal[] portals)
Given an array of portals detect and register all pairwise latency constraints.

Parameters:
topStreamIter - top stream iterator
portals - an array of all portals