replace_dist_arrays_in_io: fix code style, replace only distributed arrays
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
using std::map;
|
using std::map;
|
||||||
using std::set;
|
using std::set;
|
||||||
using std::string;
|
using std::string;
|
||||||
|
using std::vector;
|
||||||
using std::to_string;
|
using std::to_string;
|
||||||
using std::make_pair;
|
using std::make_pair;
|
||||||
|
|
||||||
@@ -104,6 +105,8 @@ static void populateDistributedIoArrays(map<DIST::Array*, set<SgStatement*>>& ar
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,7 +122,7 @@ static void populateDistributedIoArrays(map<DIST::Array*, set<SgStatement*>>& ar
|
|||||||
{
|
{
|
||||||
string array_name = string(by_symb->identifier());
|
string array_name = string(by_symb->identifier());
|
||||||
DIST::Array* array_p = getArrayFromDeclarated(declaratedInStmt(by_symb), array_name);
|
DIST::Array* array_p = getArrayFromDeclarated(declaratedInStmt(by_symb), array_name);
|
||||||
if (arrays[array_p].insert(stat).second)
|
if (array_p && array_p->GetDistributeFlagVal() == Distribution::distFlag::DISTR && arrays[array_p].insert(stat).second)
|
||||||
__spf_print(DEBUG_TRACE, "[%d]: add array %s\n", stat->lineNumber(), array_p->GetName().c_str());
|
__spf_print(DEBUG_TRACE, "[%d]: add array %s\n", stat->lineNumber(), array_p->GetName().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -325,10 +328,10 @@ static bool ioReginBound(SgStatement* stat, SgStatement* last_io_bound)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void replaceDistributedArraysInIO(std::vector<ParallelRegion*>& regions,
|
void replaceDistributedArraysInIO(vector<ParallelRegion*>& regions,
|
||||||
const std::map<std::string, std::vector<FuncInfo*>>& allFuncInfo,
|
const map<string, vector<FuncInfo*>>& allFuncInfo,
|
||||||
std::map<std::string, std::vector<Messages>>& SPF_messages,
|
map<string, vector<Messages>>& SPF_messages,
|
||||||
map<string, map<int, set<string>>>& newDeclsToInclude)
|
map<string, map<int, set<string>>>& newDeclsToInclude)
|
||||||
{
|
{
|
||||||
map<DIST::Array*, SgSymbol*> created_copies;
|
map<DIST::Array*, SgSymbol*> created_copies;
|
||||||
map<string, map<int, set<string>>> copied;
|
map<string, map<int, set<string>>> copied;
|
||||||
|
|||||||
Reference in New Issue
Block a user