Skip to content

Commit 13fb245

Browse files
committed
[librrgraph] change std::parition to std::stable partition to be consistant with SPEC changes
1 parent 3d12b46 commit 13fb245

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libs/librrgraph/src/base/rr_graph_obj.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,7 @@ void RRGraph::set_node_segment(const RRNodeId& node, const RRSegmentId& segment_
10411041
*/
10421042
void RRGraph::partition_node_in_edges(const RRNodeId& node) {
10431043
//Partition the edges so the first set of edges are all configurable, and the later are not
1044-
auto first_non_config_edge = std::partition(node_in_edges_[node].begin(), node_in_edges_[node].end(),
1044+
auto first_non_config_edge = std::stable_partition(node_in_edges_[node].begin(), node_in_edges_[node].end(),
10451045
[&](const RREdgeId edge) { return edge_is_configurable(edge); }); /* Condition to partition edges */
10461046

10471047
size_t num_conf_edges = std::distance(node_in_edges_[node].begin(), first_non_config_edge);
@@ -1060,7 +1060,7 @@ void RRGraph::partition_node_in_edges(const RRNodeId& node) {
10601060
*/
10611061
void RRGraph::partition_node_out_edges(const RRNodeId& node) {
10621062
//Partition the edges so the first set of edges are all configurable, and the later are not
1063-
auto first_non_config_edge = std::partition(node_out_edges_[node].begin(), node_out_edges_[node].end(),
1063+
auto first_non_config_edge = std::stable_partition(node_out_edges_[node].begin(), node_out_edges_[node].end(),
10641064
[&](const RREdgeId edge) { return edge_is_configurable(edge); }); /* Condition to partition edges */
10651065

10661066
size_t num_conf_edges = std::distance(node_out_edges_[node].begin(), first_non_config_edge);

0 commit comments

Comments
 (0)