shared memory parallelization: avoid use of arrays struct in shared memory case
This commit is contained in:
@@ -780,7 +780,7 @@ ParallelDirective::genDirective(File* file, const vector<pair<DIST::Array*, cons
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool isOut = acrossOutAttribute.find(currArray) != acrossOutAttribute.end();
|
bool isOut = acrossOutAttribute.find(currArray) != acrossOutAttribute.end();
|
||||||
string bounds = genBounds(across[i1], acrossShifts[i1], reducedG, allArrays, remoteReads, readOps, true, regionId, distribution, arraysInAcross, shiftsByAccess, arrayLinksByFuncCalls);
|
string bounds = genBounds(across[i1], acrossShifts[i1], reducedG, allArrays, currArray, remoteReads, readOps, true, regionId, distribution, arraysInAcross, shiftsByAccess, arrayLinksByFuncCalls);
|
||||||
if (bounds != "")
|
if (bounds != "")
|
||||||
{
|
{
|
||||||
if (inserted != 0)
|
if (inserted != 0)
|
||||||
@@ -869,7 +869,8 @@ ParallelDirective::genDirective(File* file, const vector<pair<DIST::Array*, cons
|
|||||||
{
|
{
|
||||||
const int i1 = ordered[k];
|
const int i1 = ordered[k];
|
||||||
vector<map<pair<int, int>, int>> shiftsByAccess;
|
vector<map<pair<int, int>, int>> shiftsByAccess;
|
||||||
const string bounds = genBounds(shadowRenew[i1], shadowRenewShifts[i1], reducedG, allArrays, remoteReads, readOps, false, regionId, distribution, arraysInAcross, shiftsByAccess, arrayLinksByFuncCalls);
|
DIST::Array* shadowArray = allArrays.GetArrayByName(shadowRenew[i1].first.second);
|
||||||
|
const string bounds = genBounds(shadowRenew[i1], shadowRenewShifts[i1], reducedG, allArrays, shadowArray, remoteReads, readOps, false, regionId, distribution, arraysInAcross, shiftsByAccess, arrayLinksByFuncCalls);
|
||||||
if (bounds != "")
|
if (bounds != "")
|
||||||
{
|
{
|
||||||
DIST::Array* currArray = allArrays.GetArrayByName(shadowRenew[i1].first.second);
|
DIST::Array* currArray = allArrays.GetArrayByName(shadowRenew[i1].first.second);
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ private:
|
|||||||
std::string genBounds(std::pair<std::pair<std::string, std::string>, std::vector<std::pair<int, int>>> &shadowOp,
|
std::string genBounds(std::pair<std::pair<std::string, std::string>, std::vector<std::pair<int, int>>> &shadowOp,
|
||||||
std::vector<std::pair<int, int>> &shadowOpShift,
|
std::vector<std::pair<int, int>> &shadowOpShift,
|
||||||
DIST::GraphCSR<int, double, attrType> &reducedG,
|
DIST::GraphCSR<int, double, attrType> &reducedG,
|
||||||
DIST::Arrays<int> &allArrays,
|
DIST::Arrays<int> &allArrays, DIST::Array* shadowArray,
|
||||||
std::map<DIST::Array*, std::vector<ArrayOp>>& remoteRegularReads,
|
std::map<DIST::Array*, std::vector<ArrayOp>>& remoteRegularReads,
|
||||||
const std::map<DIST::Array*, std::pair<std::vector<ArrayOp>, std::vector<bool>>> &readOps,
|
const std::map<DIST::Array*, std::pair<std::vector<ArrayOp>, std::vector<bool>>> &readOps,
|
||||||
const bool isAcross, const uint64_t regionId,
|
const bool isAcross, const uint64_t regionId,
|
||||||
|
|||||||
@@ -461,7 +461,7 @@ static inline string calculateShifts(DIST::GraphCSR<int, double, attrType> &redu
|
|||||||
string ParallelDirective::genBounds(pair<pair<string, string>, vector<pair<int, int>>> &shadowOp,
|
string ParallelDirective::genBounds(pair<pair<string, string>, vector<pair<int, int>>> &shadowOp,
|
||||||
vector<pair<int, int>> &shadowOpShift,
|
vector<pair<int, int>> &shadowOpShift,
|
||||||
DIST::GraphCSR<int, double, attrType> &reducedG,
|
DIST::GraphCSR<int, double, attrType> &reducedG,
|
||||||
DIST::Arrays<int> &allArrays,
|
DIST::Arrays<int> &allArrays, DIST::Array* shadowArray,
|
||||||
map<DIST::Array*, vector<ArrayOp>>& remoteRegularReads,
|
map<DIST::Array*, vector<ArrayOp>>& remoteRegularReads,
|
||||||
const map<DIST::Array*, pair<vector<ArrayOp>, vector<bool>>> &readOps,
|
const map<DIST::Array*, pair<vector<ArrayOp>, vector<bool>>> &readOps,
|
||||||
const bool isAcross,
|
const bool isAcross,
|
||||||
@@ -471,8 +471,7 @@ string ParallelDirective::genBounds(pair<pair<string, string>, vector<pair<int,
|
|||||||
vector<map<pair<int, int>, int>> &shiftsByAccess,
|
vector<map<pair<int, int>, int>> &shiftsByAccess,
|
||||||
const map<DIST::Array*, set<DIST::Array*>> &arrayLinksByFuncCalls) const
|
const map<DIST::Array*, set<DIST::Array*>> &arrayLinksByFuncCalls) const
|
||||||
{
|
{
|
||||||
DIST::Array *shadowArray = allArrays.GetArrayByName(shadowOp.first.second);
|
checkNull(shadowArray, convertFileName(__FILE__).c_str(), __LINE__);
|
||||||
checkNull(shadowArray, convertFileName(__FILE__).c_str(), __LINE__);
|
|
||||||
|
|
||||||
auto on_ext = on;
|
auto on_ext = on;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user