@@ -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-
5539PartitionRegion 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
8560void 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 }
0 commit comments