已合并
refactor: BlockMemAssigner::InsertStreamInEdge 成员函数补充 const 限定 #4778
refactor: BlockMemAssigner::InsertStreamInEdge 成员函数补充 const 限定 #4778
已合并
tangqunzhang创建于 9月7日
共 2 个文件变更+2-2
@@ -294,7 +294,7 @@ void BlockMemAssigner::InsertStreamOutEdge() {
294 */294 */
295void BlockMemAssigner::InsertStreamInEdge(std::set<EdgeLife, CompareEdgeLife> &in_edge_set, const EdgeLife &new_in_edge,295void BlockMemAssigner::InsertStreamInEdge(std::set<EdgeLife, CompareEdgeLife> &in_edge_set, const EdgeLife &new_in_edge,
296 const int64_t src_stream_id, const int64_t dst_stream_id,296 const int64_t src_stream_id, const int64_t dst_stream_id,
297- const std::pair<const char *, const char *> &node_names) {297+ const std::pair<const char *, const char *> &node_names) const {
298 const auto old_in_edge_iter = in_edge_set.find(new_in_edge);298 const auto old_in_edge_iter = in_edge_set.find(new_in_edge);
299 if (old_in_edge_iter != in_edge_set.end()) {299 if (old_in_edge_iter != in_edge_set.end()) {
300 if (old_in_edge_iter->peer_node_id < new_in_edge.peer_node_id) {300 if (old_in_edge_iter->peer_node_id < new_in_edge.peer_node_id) {
@@ -380,7 +380,7 @@ class BlockMemAssigner : public MemAssigner {
380 void InsertStreamOutEdge();380 void InsertStreamOutEdge();
381 void InsertStreamInEdge(std::set<EdgeLife, CompareEdgeLife> &in_edge_set, const EdgeLife &new_in_edge,381 void InsertStreamInEdge(std::set<EdgeLife, CompareEdgeLife> &in_edge_set, const EdgeLife &new_in_edge,
382 const int64_t src_stream_id, const int64_t dst_stream_id,382 const int64_t src_stream_id, const int64_t dst_stream_id,
383- const std::pair<const char *, const char *> &node_names = {nullptr, nullptr});383+ const std::pair<const char *, const char *> &node_names = {nullptr, nullptr}) const;
384 /// @ingroup GE384 /// @ingroup GE
385 /// @brief Cascade memory scenarios to obtain the actual life time begin of continuous input memory385 /// @brief Cascade memory scenarios to obtain the actual life time begin of continuous input memory
386 /// @return void386 /// @return void