public class DesignFlowSolution.Partition
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.HashMap<java.lang.Integer,java.util.HashSet<java.lang.String>> |
groupList
Map of list of actors allocated to a group.
|
private int |
numGroups
Total number of groups.
|
private boolean |
sdfAllocation
Is it a SDF partitioning?
TODO: HSDF is not yet supported
|
private int |
totalCommunicationCost
Total communication cost.
|
Constructor and Description |
---|
DesignFlowSolution.Partition(DesignFlowSolution.Partition clonePartition)
Build a partition object from another partition object.
|
DesignFlowSolution.Partition(int numberOfPartitions,
int commCost,
boolean sdfAllocation)
Build a partition object.
|
Modifier and Type | Method and Description |
---|---|
java.util.HashSet<java.lang.String> |
actorsInGroup(int group)
Get a list of actors allocated to a group.
|
void |
addSdfActorToGroup(int group,
java.lang.String sdfActor)
Add SDF actor to a group.
|
int |
commCostBetweenGroups(int group1,
int group2)
Get communication cost between two groups equal to amount of
data transfer between them.
|
java.util.HashMap<java.lang.String,java.util.HashSet<java.lang.String>> |
communicatingActorsBetweenGroups(int group1,
int group2)
Get a list of communicating actors between two groups.
|
int |
getNumGroups()
Get the total number of groups.
|
int |
getTotalCommunicationCost()
Get the total communication cost.
|
int |
groupAllocated(Actor actor)
Get the group to which an actor is allocated.
|
boolean |
isSdfAllocation()
Is it SDF allocation?
|
private final int numGroups
private final int totalCommunicationCost
private final boolean sdfAllocation
private java.util.HashMap<java.lang.Integer,java.util.HashSet<java.lang.String>> groupList
public DesignFlowSolution.Partition(DesignFlowSolution.Partition clonePartition)
clonePartition
- another partition objectpublic DesignFlowSolution.Partition(int numberOfPartitions, int commCost, boolean sdfAllocation)
numberOfPartitions
- total number of partitionscommCost
- total communication costsdfAllocation
- is it SDF allocation or not?public int groupAllocated(Actor actor)
actor
- actor instancepublic java.util.HashMap<java.lang.String,java.util.HashSet<java.lang.String>> communicatingActorsBetweenGroups(int group1, int group2)
group1
- first groupgroup2
- second grouppublic java.util.HashSet<java.lang.String> actorsInGroup(int group)
group
- group indexpublic int getNumGroups()
public int getTotalCommunicationCost()
public boolean isSdfAllocation()
public int commCostBetweenGroups(int group1, int group2)
group1
- first groupgroup2
- second grouppublic void addSdfActorToGroup(int group, java.lang.String sdfActor)
group
- group indexsdfActor
- name of SDF actor