Refactor shared memory parallelization #49
@@ -390,6 +390,9 @@ bool checkForConflict(const map<DIST::Array*, ArrayInfo*> &currAccesses,
|
|||||||
|
|
||||||
for (auto &itArray : currAccesses)
|
for (auto &itArray : currAccesses)
|
||||||
{
|
{
|
||||||
|
if(!itArray.first)
|
||||||
|
continue; // skip fictitious array access in free loop
|
||||||
|
|
||||||
const ArrayInfo &currInfo = *(itArray.second);
|
const ArrayInfo &currInfo = *(itArray.second);
|
||||||
const string &arrayName = itArray.first->GetShortName();
|
const string &arrayName = itArray.first->GetShortName();
|
||||||
|
|
||||||
|
|||||||
@@ -498,7 +498,7 @@ static vector<int> matchArrayToLoopSymbols(const vector<SgForStmt*> &parentLoops
|
|||||||
if (itLoop == sortedLoopGraph.end())
|
if (itLoop == sortedLoopGraph.end())
|
||||||
printInternalError(convertFileName(__FILE__).c_str(), __LINE__);
|
printInternalError(convertFileName(__FILE__).c_str(), __LINE__);
|
||||||
ifUnknownArrayAssignFound = true;
|
ifUnknownArrayAssignFound = true;
|
||||||
if (side == LEFT && (currRegime == DATA_DISTR || currRegime == COMP_DISTR))
|
if (side == LEFT && (currRegime == DATA_DISTR || currRegime == COMP_DISTR || currRegime == SHARED_MEMORY_PAR))
|
||||||
itLoop->second->hasUnknownArrayAssigns = true;
|
itLoop->second->hasUnknownArrayAssigns = true;
|
||||||
|
|
||||||
itLoop->second->hasUnknownDistributedMap = true;
|
itLoop->second->hasUnknownDistributedMap = true;
|
||||||
|
|||||||
@@ -560,6 +560,8 @@ static bool runAnalysis(SgProject &project, const int curr_regime, const bool ne
|
|||||||
else if (curr_regime == LOOP_ANALYZER_NODIST)
|
else if (curr_regime == LOOP_ANALYZER_NODIST)
|
||||||
{
|
{
|
||||||
auto& loopsInFile = getObjectForFileFromMap(file_name, loopGraph);
|
auto& loopsInFile = getObjectForFileFromMap(file_name, loopGraph);
|
||||||
|
parallizeFreeLoops = 1;
|
||||||
|
sharedMemoryParallelization = 1;
|
||||||
loopAnalyzer(file, parallelRegions, createdArrays, getObjectForFileFromMap(file_name, SPF_messages), SHARED_MEMORY_PAR,
|
loopAnalyzer(file, parallelRegions, createdArrays, getObjectForFileFromMap(file_name, SPF_messages), SHARED_MEMORY_PAR,
|
||||||
allFuncInfo, declaredArrays, declaratedArraysSt, arrayLinksByFuncCalls, createDefUseMapByPlace(),
|
allFuncInfo, declaredArrays, declaratedArraysSt, arrayLinksByFuncCalls, createDefUseMapByPlace(),
|
||||||
false, &(loopsInFile));
|
false, &(loopsInFile));
|
||||||
|
|||||||
Reference in New Issue
Block a user