replace_dist_arrays_in_io: insert PROCESS_PRIVATE directives
This commit is contained in:
@@ -445,6 +445,24 @@ void replaceDistributedArraysInIO(std::vector<ParallelRegion*>& regions,
|
||||
suffix = "_io_m";
|
||||
|
||||
auto origCopy = copyArray(place, array_to_copy, linesByFile.second, suffix + to_string(region->GetId()), fileName, newDeclsToInclude, copied);
|
||||
SgStatement* decl = SgStatement::getStatementByFileAndLine(place.first, place.second);
|
||||
|
||||
if(decl)
|
||||
decl = decl->lexNext();
|
||||
|
||||
if(decl)
|
||||
{
|
||||
string dir_str;
|
||||
if (decl->comments())
|
||||
{
|
||||
string str_comment = string(decl->comments());
|
||||
if(str_comment.size() && str_comment.back() != '\n')
|
||||
dir_str += "\n";
|
||||
}
|
||||
|
||||
dir_str += "!$SPF ANALYSIS(PROCESS_PRIVATE(" + string(origCopy.second->identifier()) + "))\n";
|
||||
decl->addComment(dir_str.c_str());
|
||||
}
|
||||
created_copies.insert({ array_to_copy, origCopy.second });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user