本文整理汇总了C++中PatchMap::numHomePatches方法的典型用法代码示例。如果您正苦于以下问题:C++ PatchMap::numHomePatches方法的具体用法?C++ PatchMap::numHomePatches怎么用?C++ PatchMap::numHomePatches使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PatchMap
的用法示例。
在下文中一共展示了PatchMap::numHomePatches方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: triggerCompute
void Sync::triggerCompute()
{
PatchMap *patchMap = PatchMap::Object();
const int numHomePatches = patchMap->numHomePatches();
if (numPatches == -1)
numPatches = ProxyMgr::Object()->numProxies() + numHomePatches;
// if (CkMyPe()<=8) CkPrintf("SYNC[%d]: PATCHREADY:%d %d patches:%d %d\n", CkMyPe(), counter, numHomePatches, nPatcheReady, numPatches);
// CkPrintf("SYNC[%d]: PATCHREADY:%d %d patches:%d %d\n", CkMyPe(), counter, PatchMap::Object()->numHomePatches(), nPatcheReady, numPatches);
if (homeReady == 0 && counter >= numHomePatches) {
homeReady = 1;
// if (CkMyPe()<=8) CkPrintf("HOMEREADY[%d]\n", CkMyPe());
if (!useProxySync) releaseComputes();
}
if (homeReady && nPatcheReady == numPatches)
{
// if (CkMyPe()<=8) CkPrintf("TRIGGERED[%d]\n", CkMyPe());
// CkPrintf("TRIGGERED[%d]\n", CkMyPe());
if (useProxySync) releaseComputes();
// reset counter
numPatches = -1;
step++;
nPatcheReady = 0;
for (int i= 0; i<cnum; i++) {
if (clist[i].pid != -1 && clist[i].step == step) ++nPatcheReady;
}
homeReady = 0;
if ( numHomePatches ) {
counter -= numHomePatches;
if (counter >= numHomePatches) triggerCompute();
}
}
}