Skip to content

Commit 0026905

Browse files
remove exclusivity_index from PartitionRegion
1 parent 6e20704 commit 0026905

File tree

2 files changed

+6
-43
lines changed

2 files changed

+6
-43
lines changed

vpr/src/base/partition_region.cpp

Lines changed: 6 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -36,38 +36,13 @@ bool PartitionRegion::is_loc_in_part_reg(const t_pl_loc& loc) const {
3636
return is_in_pr;
3737
}
3838

39-
int PartitionRegion::get_exclusivity_index() const {
40-
return exclusivity_index;
41-
}
42-
43-
void PartitionRegion::set_exclusivity_index(int index) {
44-
/* negative exclusivity index means this PartitionRegion is compatible
45-
* with other PartitionsRegions as long as the intersection of their
46-
* regions is not empty.
47-
*/
48-
if (index < 0) {
49-
index = -1;
50-
}
51-
52-
exclusivity_index = index;
53-
}
54-
5539
PartitionRegion intersection(const PartitionRegion& cluster_pr, const PartitionRegion& new_pr) {
5640
/**for N regions in part_region and M in the calling object you can get anywhere from
5741
* 0 to M*N regions in the resulting vector. Only intersection regions with non-zero area rectangles and
5842
* equivalent subtiles are put in the resulting vector
5943
* Rectangles are not merged even if it would be possible
6044
*/
6145
PartitionRegion pr;
62-
63-
const int cluster_exclusivity = cluster_pr.get_exclusivity_index();
64-
const int new_exclusivity = new_pr.get_exclusivity_index();
65-
66-
// PartitionRegion are not compatible even if their regions overlap
67-
if (cluster_exclusivity != new_exclusivity) {
68-
return pr;
69-
}
70-
7146
auto& pr_regions = pr.get_mutable_regions();
7247

7348
for (const auto& cluster_region : cluster_pr.get_regions()) {
@@ -85,19 +60,12 @@ PartitionRegion intersection(const PartitionRegion& cluster_pr, const PartitionR
8560
void update_cluster_part_reg(PartitionRegion& cluster_pr, const PartitionRegion& new_pr) {
8661
std::vector<Region> int_regions;
8762

88-
const int cluster_exclusivity = cluster_pr.get_exclusivity_index();
89-
const int new_exclusivity = new_pr.get_exclusivity_index();
90-
91-
// check whether PartitionRegions are compatible in the first place
92-
if (cluster_exclusivity == new_exclusivity) {
93-
94-
// now that we know PartitionRegions are compatible, look for overlapping regions
95-
for (const auto& cluster_region : cluster_pr.get_regions()) {
96-
for (const auto& new_region : new_pr.get_regions()) {
97-
Region intersect_region = intersection(cluster_region, new_region);
98-
if (!intersect_region.empty()) {
99-
int_regions.push_back(intersect_region);
100-
}
63+
// now that we know PartitionRegions are compatible, look for overlapping regions
64+
for (const auto& cluster_region : cluster_pr.get_regions()) {
65+
for (const auto& new_region : new_pr.get_regions()) {
66+
Region intersect_region = intersection(cluster_region, new_region);
67+
if (!intersect_region.empty()) {
68+
int_regions.push_back(intersect_region);
10169
}
10270
}
10371
}

vpr/src/base/partition_region.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,8 @@ class PartitionRegion {
5050
*/
5151
bool is_loc_in_part_reg(const t_pl_loc& loc) const;
5252

53-
int get_exclusivity_index() const;
54-
55-
void set_exclusivity_index(int index);
56-
5753
private:
5854
std::vector<Region> regions; ///< union of rectangular regions that a partition can be placed in
59-
int exclusivity_index = -1; ///< PartitionRegions with different exclusivity_index values are not compatible
6055
};
6156

6257
///@brief used to print data from a PartitionRegion

0 commit comments

Comments
 (0)