Refactor shared memory parallelization #49
@@ -280,7 +280,54 @@ static inline string calculateShifts(DIST::GraphCSR<int, double, attrType> &redu
|
||||
// check for distributed and not mapped dims -> zero them out ('coeffs.second')
|
||||
set<DIST::Array*> refs;
|
||||
getRealArrayRefs(calcForArray, calcForArray, refs, arrayLinksByFuncCalls);
|
||||
|
||||
|
||||
//TODO: need to correct errors
|
||||
/*if (!sharedMemoryParallelization)
|
||||
{
|
||||
for (auto& array : refs)
|
||||
{
|
||||
DIST::Array* tmpl = array->GetTemplateArray(regionId);
|
||||
checkNull(tmpl, convertFileName(__FILE__).c_str(), __LINE__);
|
||||
|
||||
auto align = array->GetLinksWithTemplate(regionId);
|
||||
|
||||
bool found = false;
|
||||
for (auto& t : distribution)
|
||||
{
|
||||
if (t.first == tmpl)
|
||||
{
|
||||
found = true;
|
||||
|
||||
for (int aDim = 0; aDim < align.size(); ++aDim)
|
||||
{
|
||||
int link = align[aDim];
|
||||
if (link != -1)
|
||||
{
|
||||
int tLink = link;
|
||||
if (!arrayRef->IsTemplate())
|
||||
{
|
||||
auto alignMain = arrayRef->GetLinksWithTemplate(regionId);
|
||||
for (int z = 0; z < alignMain.size(); ++z)
|
||||
if (alignMain[z] == tLink)
|
||||
tLink = z;
|
||||
}
|
||||
|
||||
if (t.second->distRule[link] == dist::BLOCK && baseOnRule[aDim].first == "*")
|
||||
{
|
||||
for (int z = 0; z < coeffs.second.size(); ++z)
|
||||
coeffs.second[z].first = coeffs.second[z].second = 0;
|
||||
return out;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!found)
|
||||
printInternalError(convertFileName(__FILE__).c_str(), __LINE__);
|
||||
}
|
||||
}*/
|
||||
|
||||
const pair<vector<ArrayOp>, vector<bool>> *currReadOp = NULL;
|
||||
auto readIt = readOps.find(calcForArray);
|
||||
if (readIt != readOps.end())
|
||||
|
||||
Reference in New Issue
Block a user