|
|
@ -274,8 +274,12 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP(
|
|
|
|
/////////////////////////// PROCESS MATCHED VERTICES //////////////////////////////
|
|
|
|
/////////////////////////// PROCESS MATCHED VERTICES //////////////////////////////
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// TODO what would be the optimal UCHUNK
|
|
|
|
|
|
|
|
vector<MilanLongInt> UChunkBeingProcessed;
|
|
|
|
|
|
|
|
UChunkBeingProcessed.reserve(UCHUNK);
|
|
|
|
|
|
|
|
|
|
|
|
processMatchedVertices(NLVer,
|
|
|
|
processMatchedVertices(NLVer,
|
|
|
|
//UChunkBeingProcessed,
|
|
|
|
UChunkBeingProcessed,
|
|
|
|
U,
|
|
|
|
U,
|
|
|
|
privateU,
|
|
|
|
privateU,
|
|
|
|
StartIndex,
|
|
|
|
StartIndex,
|
|
|
@ -382,40 +386,29 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP(
|
|
|
|
v = verLocInd[k];
|
|
|
|
v = verLocInd[k];
|
|
|
|
if ((v >= StartIndex) && (v <= EndIndex))
|
|
|
|
if ((v >= StartIndex) && (v <= EndIndex))
|
|
|
|
{ // v is a Local Vertex:
|
|
|
|
{ // v is a Local Vertex:
|
|
|
|
if (Mate[v - StartIndex] >= 0) // v is already matched
|
|
|
|
//if (Mate[v - StartIndex] >= 0) // v is already matched
|
|
|
|
continue;
|
|
|
|
// continue;
|
|
|
|
#ifdef PRINT_DEBUG_INFO_
|
|
|
|
#ifdef PRINT_DEBUG_INFO_
|
|
|
|
cout << "\n(" << myRank << ")v: " << v << " c(v)= " << candidateMate[v - StartIndex] << " Mate[v]: " << Mate[v];
|
|
|
|
cout << "\n(" << myRank << ")v: " << v << " c(v)= " << candidateMate[v - StartIndex] << " Mate[v]: " << Mate[v];
|
|
|
|
fflush(stdout);
|
|
|
|
fflush(stdout);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// If the current vertex is pointing to a matched vertex and is not matched
|
|
|
|
|
|
|
|
if (Mate[v - StartIndex] < 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (candidateMate[v - StartIndex] == u)
|
|
|
|
if (candidateMate[v - StartIndex] == u)
|
|
|
|
{ // Only if pointing to the matched vertex
|
|
|
|
{ // Only if pointing to the matched vertex
|
|
|
|
// Start: PARALLEL_PROCESS_EXPOSED_VERTEX_B(v)
|
|
|
|
// Start: PARALLEL_PROCESS_EXPOSED_VERTEX_B(v)
|
|
|
|
// Start: PARALLEL_COMPUTE_CANDIDATE_MATE_B(v)
|
|
|
|
// Start: PARALLEL_PROCESS_EXPOSED_VERTEX_B(v)
|
|
|
|
adj11 = verLocPtr[v - StartIndex];
|
|
|
|
w = computeCandidateMate(verLocPtr[v - StartIndex],
|
|
|
|
adj12 = verLocPtr[v - StartIndex + 1];
|
|
|
|
verLocPtr[v - StartIndex + 1],
|
|
|
|
w = -1;
|
|
|
|
edgeLocWeight, 0,
|
|
|
|
heaviestEdgeWt = MilanRealMin; // Assign the smallest Value possible first LDBL_MIN
|
|
|
|
verLocInd,
|
|
|
|
for (k1 = adj11; k1 < adj12; k1++)
|
|
|
|
StartIndex,
|
|
|
|
{
|
|
|
|
EndIndex,
|
|
|
|
if ((verLocInd[k1] < StartIndex) || (verLocInd[k1] > EndIndex))
|
|
|
|
GMate,
|
|
|
|
{ // Is it a ghost vertex?
|
|
|
|
Mate,
|
|
|
|
if (GMate[Ghost2LocalMap[verLocInd[k1]]] >= 0) // Already matched
|
|
|
|
Ghost2LocalMap);
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{ // A local vertex
|
|
|
|
|
|
|
|
if (Mate[verLocInd[k1] - StartIndex] >= 0) // Already matched
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ((edgeLocWeight[k1] > heaviestEdgeWt) ||
|
|
|
|
|
|
|
|
((edgeLocWeight[k1] == heaviestEdgeWt) && (w < verLocInd[k1])))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
heaviestEdgeWt = edgeLocWeight[k1];
|
|
|
|
|
|
|
|
w = verLocInd[k1];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} // End of for loop
|
|
|
|
|
|
|
|
candidateMate[v - StartIndex] = w;
|
|
|
|
candidateMate[v - StartIndex] = w;
|
|
|
|
// End: PARALLEL_COMPUTE_CANDIDATE_MATE_B(v)
|
|
|
|
// End: PARALLEL_COMPUTE_CANDIDATE_MATE_B(v)
|
|
|
|
#ifdef PRINT_DEBUG_INFO_
|
|
|
|
#ifdef PRINT_DEBUG_INFO_
|
|
|
@ -507,6 +500,7 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP(
|
|
|
|
} // End of Else: w == -1
|
|
|
|
} // End of Else: w == -1
|
|
|
|
// End: PARALLEL_PROCESS_EXPOSED_VERTEX_B(v)
|
|
|
|
// End: PARALLEL_PROCESS_EXPOSED_VERTEX_B(v)
|
|
|
|
} // End of If (candidateMate[v-StartIndex] == u)
|
|
|
|
} // End of If (candidateMate[v-StartIndex] == u)
|
|
|
|
|
|
|
|
}
|
|
|
|
} // End of if ( (v >= StartIndex) && (v <= EndIndex) ) //If Local Vertex:
|
|
|
|
} // End of if ( (v >= StartIndex) && (v <= EndIndex) ) //If Local Vertex:
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{ // Neighbor v is a ghost vertex
|
|
|
|
{ // Neighbor v is a ghost vertex
|
|
|
|