cetus.analysis
Class BanerjeeTest

java.lang.Object
  extended by cetus.analysis.BanerjeeTest
All Implemented Interfaces:
DDTest

public class BanerjeeTest
extends java.lang.Object
implements DDTest

Banerjee Test implements data-dependence testing for a pair of affine subscripts using Banerjee inequalities


Constructor Summary
BanerjeeTest(SubscriptPair pair)
          Constructor
 
Method Summary
 java.util.LinkedList<Loop> getCommonEnclosingLoops()
          Returns a list of loops from outermost to innermost that are common to the two expressions being tested for dependence, whether they are a pair of subscripts or a pair of whole array accesses
 boolean isTestEligible()
          Returns whether the constructor for the dependence test determined whether it would be eligible to run the test on the pair of subscripts or not
 boolean testDependence(DependenceVector dependence_vector)
          Runs the dependence test on a direction vector
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BanerjeeTest

public BanerjeeTest(SubscriptPair pair)
Constructor

Parameters:
normalSubscript1 -
normalSubscript2 -
loopnest - - Store loop nest ArrayList
loopInfo - - Provide loop information for all loops in the nest
Method Detail

isTestEligible

public boolean isTestEligible()
Description copied from interface: DDTest
Returns whether the constructor for the dependence test determined whether it would be eligible to run the test on the pair of subscripts or not

Specified by:
isTestEligible in interface DDTest
Returns:

testDependence

public boolean testDependence(DependenceVector dependence_vector)
Description copied from interface: DDTest
Runs the dependence test on a direction vector

Specified by:
testDependence in interface DDTest
Parameters:
dependence_vector - The dependence vector under which test needs to be performed
Returns:
whether dependence exists or not

getCommonEnclosingLoops

public java.util.LinkedList<Loop> getCommonEnclosingLoops()
Description copied from interface: DDTest
Returns a list of loops from outermost to innermost that are common to the two expressions being tested for dependence, whether they are a pair of subscripts or a pair of whole array accesses

Specified by:
getCommonEnclosingLoops in interface DDTest
Returns: