Skip to content

Commit 79694d3

Browse files
committed
[lib][rr_graph] remove ptc_to_string from rr_graph_builder
1 parent 3c7b677 commit 79694d3

File tree

5 files changed

+1
-27
lines changed

5 files changed

+1
-27
lines changed

libs/librrgraph/src/base/rr_graph_builder.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,6 @@ void RRGraphBuilder::set_node_ptc_nums(RRNodeId node, const std::vector<int>& pt
229229
node_storage_.set_node_ptc_nums(node, ptc_numbers);
230230
}
231231

232-
std::string RRGraphBuilder::node_ptc_nums_to_string(RRNodeId node) const {
233-
return node_storage_.node_ptc_nums_to_string(node);
234-
}
235-
236232
bool RRGraphBuilder::node_contain_multiple_ptc(RRNodeId node) const {
237233
return node_storage_.node_contain_multiple_ptc(node);
238234
}

libs/librrgraph/src/base/rr_graph_builder.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,6 @@ class RRGraphBuilder {
279279
/** @brief Add a list of ptc numbers to a given node. This function is used by rr graph reader only. */
280280
void set_node_ptc_nums(RRNodeId node, const std::vector<int>& ptc_numbers);
281281

282-
/** @brief With a given node, output ptc numbers into a string (use comma as delima). This function is used by rr graph writer only. */
283-
std::string node_ptc_nums_to_string(RRNodeId node) const;
284-
285282
/** @brief Identify if a node contains multiple ptc numbers. It is used for tileable RR Graph and mainly used by I/O reader only. */
286283
bool node_contain_multiple_ptc(RRNodeId node) const;
287284

libs/librrgraph/src/base/rr_graph_storage.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -667,23 +667,6 @@ void t_rr_graph_storage::add_node_tilable_track_num(RRNodeId node, size_t node_o
667667
node_tilable_track_nums_[node][node_offset] = track_id;
668668
}
669669

670-
std::string t_rr_graph_storage::node_ptc_nums_to_string(RRNodeId node) const {
671-
if (node_tilable_track_nums_.empty()) {
672-
return std::to_string(size_t(node_ptc_num(node)));
673-
}
674-
VTR_ASSERT(size_t(node) < node_tilable_track_nums_.size());
675-
if (node_tilable_track_nums_[node].empty()) {
676-
return std::to_string(size_t(node_ptc_num(node)));
677-
}
678-
std::string ret;
679-
for (size_t iptc = 0; iptc < node_tilable_track_nums_[node].size(); iptc++) {
680-
ret += std::to_string(size_t(node_tilable_track_nums_[node][iptc])) + ",";
681-
}
682-
// Remove the last comma
683-
ret.pop_back();
684-
return ret;
685-
}
686-
687670
void t_rr_graph_storage::add_node_side(RRNodeId id, e_side new_side) {
688671
if (node_type(id) != e_rr_type::IPIN && node_type(id) != e_rr_type::OPIN) {
689672
VTR_LOG_ERROR("Attempted to set RR node 'side' for non-pin type '%s'", node_type_string(id));

libs/librrgraph/src/base/rr_graph_storage.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -728,8 +728,6 @@ class t_rr_graph_storage {
728728
}
729729
}
730730

731-
std::string node_ptc_nums_to_string(RRNodeId node) const;
732-
733731
const std::vector<short>& node_tilable_track_nums(RRNodeId node) const {
734732
return node_tilable_track_nums_[node];
735733
}

libs/librrgraph/src/io/rr_graph_uxsdcxx_serializer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
718718
}
719719

720720
inline const char* get_node_loc_ptc(const t_rr_node& node) final {
721-
temp_string_ = rr_graph_builder_->node_ptc_nums_to_string(node.id());
721+
temp_string_ = node_ptc_number_to_string(*rr_graph_, node.id());
722722
return temp_string_.c_str();
723723
}
724724
inline int get_node_loc_layer_low(const t_rr_node& node) final {

0 commit comments

Comments
 (0)