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::set;
|
||||
using std::string;
|
||||
using std::vector;
|
||||
using std::to_string;
|
||||
using std::make_pair;
|
||||
|
||||
@@ -104,6 +105,8 @@ static void populateDistributedIoArrays(map<DIST::Array*, set<SgStatement*>>& ar
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,7 +122,7 @@ static void populateDistributedIoArrays(map<DIST::Array*, set<SgStatement*>>& ar
|
||||
{
|
||||
string array_name = string(by_symb->identifier());
|
||||
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());
|
||||
}
|
||||
|
||||
@@ -325,9 +328,9 @@ static bool ioReginBound(SgStatement* stat, SgStatement* last_io_bound)
|
||||
return false;
|
||||
}
|
||||
|
||||
void replaceDistributedArraysInIO(std::vector<ParallelRegion*>& regions,
|
||||
const std::map<std::string, std::vector<FuncInfo*>>& allFuncInfo,
|
||||
std::map<std::string, std::vector<Messages>>& SPF_messages,
|
||||
void replaceDistributedArraysInIO(vector<ParallelRegion*>& regions,
|
||||
const map<string, vector<FuncInfo*>>& allFuncInfo,
|
||||
map<string, vector<Messages>>& SPF_messages,
|
||||
map<string, map<int, set<string>>>& newDeclsToInclude)
|
||||
{
|
||||
map<DIST::Array*, SgSymbol*> created_copies;
|
||||
|
||||
Reference in New Issue
Block a user