Skip to content

Commit 9fd7389

Browse files
add == operator for PartitionRegion
1 parent 8d41358 commit 9fd7389

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

vpr/src/base/partition_region.h

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

53+
/**
54+
* @brief Compares whether this PartitionRegion includes the same regions
55+
* and another PartitionRegion.
56+
* @param pr The other PartitionRegion to be compared with this object.
57+
* @return True if both PartitionRegions contain the same regions.
58+
*/
59+
bool operator==(const PartitionRegion& pr) const {
60+
return (regions == pr.get_regions());
61+
}
62+
5363
private:
5464
std::vector<Region> regions; ///< union of rectangular regions that a partition can be placed in
5565
};

0 commit comments

Comments
 (0)