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

[fix] correct usage of the method compare in CGRA.cpp and CGRANode.cpp #23

Merged
merged 1 commit into from
Jul 4, 2024
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
4 changes: 2 additions & 2 deletions src/CGRA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ CGRA::CGRA(int t_rows, int t_columns, bool t_diagonalVectorization,
if (!canEnable) {
cout<<"\033[0;31mInvalid operation "<<iter->first<<" on CGRA node ID "<<nodeIndex<<"\033[0m"<<endl;
} else {
if ((iter->first).compare("store")) {
if ((iter->first).compare("store") == 0) {
storeCount += 1;
}
if ((iter->first).compare("load")) {
if ((iter->first).compare("load") == 0) {
loadCount += 1;
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/CGRANode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -407,15 +407,15 @@ int CGRANode::getCurrentCtrlMemItems() {

// TODO: will support precision-based operations (e.g., fadd, fmul, etc).
bool CGRANode::enableFunctionality(string t_func) {
if (t_func.compare("store")) {
if (t_func.compare("store") == 0) {
enableStore();
} else if (t_func.compare("load")) {
} else if (t_func.compare("load") == 0) {
enableLoad();
} else if (t_func.compare("return")) {
} else if (t_func.compare("return") == 0) {
enableReturn();
} else if (t_func.compare("call")) {
} else if (t_func.compare("call") == 0) {
enableCall();
} else if (t_func.compare("complex")) {
} else if (t_func.compare("complex") == 0) {
enableComplex();
} else {
return false;
Expand Down
Loading