Skip to content

Add a new API init_fan_in() to RRGraphBuilder #1903

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions vpr/src/device/rr_graph_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,14 @@ class RRGraphBuilder {
return node_storage_.count_rr_switches(num_arch_switches, arch_switch_inf, arch_switch_fanins);
}

/** @brief Init per node fan-in data. Should only be called after all edges have
* been allocated.
* @note
* This is an expensive, O(N), operation so it should be called once you
* have a complete rr-graph and not called often. */
inline void init_fan_in() {
node_storage_.init_fan_in();
}
/* -- Internal data storage -- */
private:
/* TODO: When the refactoring effort finishes,
Expand Down
2 changes: 1 addition & 1 deletion vpr/src/route/rr_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,7 @@ static std::function<void(t_chan_width*)> alloc_and_load_rr_graph(RRGraphBuilder
};
}

L_rr_node.init_fan_in();
rr_graph_builder.init_fan_in();

return update_chan_width;
}
Expand Down
2 changes: 1 addition & 1 deletion vpr/src/route/rr_graph_uxsdcxx_serializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -1547,7 +1547,7 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
void finish_load() final {
process_rr_node_indices();

rr_nodes_->init_fan_in();
rr_graph_builder_->init_fan_in();

alloc_and_load_rr_indexed_data(
segment_inf_,
Expand Down