@@ -285,6 +285,7 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
285
285
RRGraphBuilder* rr_graph_builder,
286
286
RRGraphView* rr_graph,
287
287
vtr::vector<RRSwitchId, t_rr_switch_inf>* rr_switch_inf,
288
+ vtr::vector<RRSwitchOffsetInfoId, t_rr_switch_offset_inf>* rr_switch_offset_inf,
288
289
vtr::vector<RRIndexedDataId, t_rr_indexed_data>* rr_indexed_data,
289
290
std::vector<t_rr_rc_data>* rr_rc_data,
290
291
const std::vector<t_arch_switch_inf>& arch_switch_inf,
@@ -302,6 +303,7 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
302
303
, rr_graph_builder_(rr_graph_builder)
303
304
, rr_graph_(rr_graph)
304
305
, rr_switch_inf_(rr_switch_inf)
306
+ , rr_switch_offset_inf_(rr_switch_offset_inf)
305
307
, rr_indexed_data_(rr_indexed_data)
306
308
, read_rr_graph_filename_(read_rr_graph_filename)
307
309
, rr_rc_data_(rr_rc_data)
@@ -624,6 +626,13 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
624
626
// If make_room_in_vector was used for allocation, this ensures that
625
627
// the final storage has no overhead.
626
628
rr_switch_inf_->shrink_to_fit ();
629
+
630
+ rr_switch_offset_inf_->reserve (rr_switch_inf_->size ());
631
+ std::ranges::transform (*rr_switch_inf_,
632
+ std::back_inserter (*rr_switch_offset_inf_),
633
+ [](const t_rr_switch_inf& rr_sw) -> t_rr_switch_offset_inf {
634
+ return t_rr_switch_offset_inf{rr_sw};
635
+ });
627
636
}
628
637
629
638
/* * Generated for complex type "meta":
@@ -2160,6 +2169,7 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
2160
2169
RRGraphBuilder* rr_graph_builder_;
2161
2170
RRGraphView* rr_graph_;
2162
2171
vtr::vector<RRSwitchId, t_rr_switch_inf>* rr_switch_inf_;
2172
+ vtr::vector<RRSwitchOffsetInfoId, t_rr_switch_offset_inf>* rr_switch_offset_inf_;
2163
2173
vtr::vector<RRIndexedDataId, t_rr_indexed_data>* rr_indexed_data_;
2164
2174
t_rr_node_indices* rr_node_indices_;
2165
2175
std::string* read_rr_graph_filename_;
0 commit comments