Refactor shared memory parallelization #49

Merged
Alexander_KS merged 10 commits from refactor_shared_memory_parallelization into master 2024-07-18 06:50:40 +00:00
3 changed files with 6 additions and 1 deletions
Showing only changes of commit 8931aced85 - Show all commits

View File

@@ -390,6 +390,9 @@ bool checkForConflict(const map<DIST::Array*, ArrayInfo*> &currAccesses,
for (auto &itArray : currAccesses)
{
if(!itArray.first)
continue; // skip fictitious array access in free loop
const ArrayInfo &currInfo = *(itArray.second);
const string &arrayName = itArray.first->GetShortName();

View File

@@ -498,7 +498,7 @@ static vector<int> matchArrayToLoopSymbols(const vector<SgForStmt*> &parentLoops
if (itLoop == sortedLoopGraph.end())
printInternalError(convertFileName(__FILE__).c_str(), __LINE__);
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->hasUnknownDistributedMap = true;

View File

@@ -560,6 +560,8 @@ static bool runAnalysis(SgProject &project, const int curr_regime, const bool ne
else if (curr_regime == LOOP_ANALYZER_NODIST)
{
auto& loopsInFile = getObjectForFileFromMap(file_name, loopGraph);
parallizeFreeLoops = 1;
sharedMemoryParallelization = 1;
loopAnalyzer(file, parallelRegions, createdArrays, getObjectForFileFromMap(file_name, SPF_messages), SHARED_MEMORY_PAR,
allFuncInfo, declaredArrays, declaratedArraysSt, arrayLinksByFuncCalls, createDefUseMapByPlace(),
false, &(loopsInFile));