Skip to content
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

drt: genPatterns_commit refactoring #5872

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
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
21 changes: 20 additions & 1 deletion src/drt/src/pa/FlexPA.h
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,25 @@ class FlexPA
int curr_unique_inst_idx,
int max_access_point_size);

/**
* @brief Extracts the access patterns given the graph nodes composing the
* access points relatioship
*
* @param nodes {pin,access_point} nodes of the access pattern graph
* @param pins vector os pins of the unique instance
* @param used_access_points a set of all used access points
* @param max_access_point_size number of acc points the instance with most
* acc points has
*
* @returns a vector of ints representing the access pattern in the form:
* access_pattern[pin_idx] = access_point_idx of the pin
*/
std::vector<int> extractAccessPatternFromNodes(
const std::vector<FlexDPNode>& nodes,
const std::vector<std::pair<frMPin*, frInstTerm*>>& pins,
std::set<std::pair<int, int>>& used_access_points,
const int max_access_point_size);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: parameter 'max_access_point_size' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]

Suggested change
const int max_access_point_size);
int max_access_point_size);


bool genPatterns_commit(
const std::vector<FlexDPNode>& nodes,
const std::vector<std::pair<frMPin*, frInstTerm*>>& pins,
Expand All @@ -557,7 +576,7 @@ class FlexPA

int getFlatIdx(int idx_1, int idx_2, int idx_2_dim);

void getNestedIdx(int flat_idx, int& idx_1, int& idx_2, int idx_2_dim);
std::pair<int, int> getNestedIdx(int flat_idx, int idx_2_dim);

int getFlatEdgeIdx(int prev_idx_1,
int prev_idx_2,
Expand Down
Loading
Loading