at.dms.kjc.sir.lowering.partition
Class PartitionRecord

java.lang.Object
  extended by at.dms.kjc.sir.lowering.partition.PartitionRecord

public class PartitionRecord
extends Object

This is just a structure for recording what has been assigned to a given partition.


Constructor Summary
PartitionRecord()
           
 
Method Summary
 void add(SIRContainer cont)
          Add container
 void add(SIROperator op, int k)
          Add operator
static HashMap<SIROperator,Integer> asIntegerMap(LinkedList<PartitionRecord> partitions)
          Given that
static HashMap<SIROperator,Object> asStringMap(LinkedList<PartitionRecord> partitions)
          Given that
 boolean contains(SIROperator op)
          Returns whether or not this partition contains
 SIROperator get(int i)
          Returns the i'th contents of this
 int getWork()
           
 int size()
          Returns number of operators in this.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PartitionRecord

public PartitionRecord()
Method Detail

getWork

public int getWork()

add

public void add(SIROperator op,
                int k)
Add operator
op
with work amount
k
to this partition. Requires that this does not already contain
op
.


add

public void add(SIRContainer cont)
Add container
cont
to this. Requires that this does not already contain
cont
.


get

public SIROperator get(int i)
Returns the i'th contents of this


size

public int size()
Returns number of operators in this.


contains

public boolean contains(SIROperator op)
Returns whether or not this partition contains
pre
op.


asStringMap

public static HashMap<SIROperator,Object> asStringMap(LinkedList<PartitionRecord> partitions)
Given that
partitions
is a list of PartitionRecords, returns a hashmap in which each SIROperator that's in one of the partitions is mapped to a STRING representing the list of partitions it's assigned to.


asIntegerMap

public static HashMap<SIROperator,Integer> asIntegerMap(LinkedList<PartitionRecord> partitions)
Given that
partitions
is a list of PartitionRecords, returns a hashmap in which each SIROperator that's in one of the partitions is mapped to an Integer representing the list of partitions it's assigned to. Unlike asStringMap, requires that each operator is mapped to only one partition.