at.dms.kjc.raw
Class Layout

java.lang.Object
  extended by at.dms.util.Utils
      extended by at.dms.kjc.raw.Layout
All Implemented Interfaces:
DeepCloneable, FlatVisitor, Serializable

public class Layout
extends Utils
implements FlatVisitor

The Layout class generates mapping of filters to raw tiles. It assumes that the Sis namer has been run and that the stream graph has been partitioned.

See Also:
Serialized Form

Field Summary
static int ANNEALITERATIONS
           
static int MAXTEMPITERATIONS
           
static int MINTEMPITERATIONS
           
static double TFACTR
           
 
Fields inherited from class at.dms.util.Utils
EMPTY_LIST, getForLoopCallers
 
Constructor Summary
Layout()
           
 
Method Summary
static boolean areNeighbors(Coordinate tile1, Coordinate tile2)
           
static void dumpLayout(String fileName)
           
static String getDirection(Coordinate from, Coordinate to)
           
static HashSet<FlatNode> getIdentities()
           
static HashSet<FlatNode> getJoiners()
           
static Layout getLayout()
           
static FlatNode getNode(Coordinate coord)
           
static Coordinate getTile(FlatNode str)
           
static Coordinate getTile(int tileNumber)
           
static Coordinate getTile(int row, int column)
           
static Coordinate getTile(SIROperator str)
          Returns the tile number assignment for , or null if none has been layout.assigned.
static int getTileNumber(Coordinate tile)
           
static int getTileNumber(FlatNode node)
           
static int getTileNumber(SIROperator str)
           
static Set<Object> getTiles()
           
static int getTilesAssigned()
           
static void handAssign(FlatNode node)
           
static boolean isAssigned(Coordinate tile)
           
static boolean isAssigned(FlatNode node)
           
static void setLayout(Layout lo)
           
static void simAnnealAssign(FlatNode node)
           
 void visitNode(FlatNode node)
          The visitor must define this method that will be called once on each FlatNode that is down stream of the accepting node.
 
Methods inherited from class at.dms.util.Utils
asPercent, cellMathEquivalent, cMathEquivalent, cppMathEquivalent, deepClone, deepCloneInto, equalArrays, fail, getEnvironmentVariable, getExpression, hasPeeks, initArray, initArray, initLiteralArray, intArrayToList, isMathMethod, isUniform, kopi_assert, kopi_assert, makeCountdownForLoop, makeDotFileName, makeForLoop, makeForLoop, makeForLoop, makeForLoopFieldIndex, makeForLoopLocalIndex, nextPow2, passThruParens, peelMarkers, popBeforePeek, readFile, removeUnusedPops, replaceAll, setupDotFileName, simplifyMathMethod, splitQualifiedName, splitQualifiedName, toArray, toIntArray, toVector, voidToInt, writeFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MINTEMPITERATIONS

public static int MINTEMPITERATIONS

MAXTEMPITERATIONS

public static int MAXTEMPITERATIONS

ANNEALITERATIONS

public static int ANNEALITERATIONS

TFACTR

public static double TFACTR
Constructor Detail

Layout

public Layout()
Method Detail

getLayout

public static Layout getLayout()

setLayout

public static void setLayout(Layout lo)

getTilesAssigned

public static int getTilesAssigned()

isAssigned

public static boolean isAssigned(FlatNode node)

isAssigned

public static boolean isAssigned(Coordinate tile)

getTiles

public static Set<Object> getTiles()

getJoiners

public static HashSet<FlatNode> getJoiners()

getIdentities

public static HashSet<FlatNode> getIdentities()

getTile

public static Coordinate getTile(SIROperator str)
Returns the tile number assignment for , or null if none has been layout.assigned.


getTile

public static Coordinate getTile(FlatNode str)

getTile

public static Coordinate getTile(int row,
                                 int column)

getTile

public static Coordinate getTile(int tileNumber)

getDirection

public static String getDirection(Coordinate from,
                                  Coordinate to)

areNeighbors

public static boolean areNeighbors(Coordinate tile1,
                                   Coordinate tile2)

getTileNumber

public static int getTileNumber(FlatNode node)

getTileNumber

public static int getTileNumber(Coordinate tile)

getTileNumber

public static int getTileNumber(SIROperator str)

getNode

public static FlatNode getNode(Coordinate coord)

simAnnealAssign

public static void simAnnealAssign(FlatNode node)

dumpLayout

public static void dumpLayout(String fileName)

handAssign

public static void handAssign(FlatNode node)

visitNode

public void visitNode(FlatNode node)
Description copied from interface: FlatVisitor
The visitor must define this method that will be called once on each FlatNode that is down stream of the accepting node.

Specified by:
visitNode in interface FlatVisitor
Parameters:
node - the node that is being currently visited.