mirror of
https://github.com/sfilippone/amg4psblas.git
synced 2026-10-06 14:44:55 +00:00
PROCESS_CROSS_EDGE refactoring
This commit is contained in:
@@ -287,8 +287,7 @@ extern "C"
|
||||
staticQueue &privateQMsgType,
|
||||
staticQueue &privateQOwner);
|
||||
|
||||
void PROCESS_CROSS_EDGE(vector<MilanLongInt> &Counter,
|
||||
MilanLongInt edge,
|
||||
void PROCESS_CROSS_EDGE(MilanLongInt *edge,
|
||||
MilanLongInt *SPtr);
|
||||
|
||||
void processMatchedVertices(
|
||||
|
||||
+1
-1
@@ -456,7 +456,7 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP(
|
||||
fflush(stdout);
|
||||
#endif
|
||||
|
||||
PROCESS_CROSS_EDGE(Counter, Ghost2LocalMap[w], &S);
|
||||
PROCESS_CROSS_EDGE(&Counter[Ghost2LocalMap[w]], &S);
|
||||
|
||||
} // End of if CandidateMate[w] = v
|
||||
} // End of if a Ghost Vertex
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
#include "MatchBoxPC.h"
|
||||
|
||||
void PROCESS_CROSS_EDGE(vector<MilanLongInt> &Counter,
|
||||
MilanLongInt edge,
|
||||
void PROCESS_CROSS_EDGE(MilanLongInt *edge,
|
||||
MilanLongInt *SPtr)
|
||||
{
|
||||
// Start: PARALLEL_PROCESS_CROSS_EDGE_B
|
||||
MilanLongInt captureCounter;
|
||||
|
||||
#pragma omp atomic capture
|
||||
captureCounter = --Counter[edge]; // Decrement
|
||||
captureCounter = --(*edge); // Decrement
|
||||
|
||||
//assert(captureCounter >= 0);
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ void PARALLEL_PROCESS_EXPOSED_VERTEX_B(MilanLongInt NLVer,
|
||||
|
||||
//TODO refactor this!!
|
||||
// Decrement the counter:
|
||||
PROCESS_CROSS_EDGE(Counter, Ghost2LocalMap[w], &S);
|
||||
PROCESS_CROSS_EDGE(&Counter[Ghost2LocalMap[w]], &S);
|
||||
} // End of if CandidateMate[w] = v
|
||||
|
||||
} // End of if a Ghost Vertex
|
||||
|
||||
@@ -183,7 +183,7 @@ void processMatchedVertices(
|
||||
fflush(stdout);
|
||||
#endif
|
||||
// Decrement the counter:
|
||||
PROCESS_CROSS_EDGE(Counter, Ghost2LocalMap[w], SPtr);
|
||||
PROCESS_CROSS_EDGE(&Counter[Ghost2LocalMap[w]], SPtr);
|
||||
case 2:
|
||||
// Found a dominating edge, it is a ghost
|
||||
ghostOwner = findOwnerOfGhost(w, verDistance, myRank, numProcs);
|
||||
|
||||
@@ -194,7 +194,7 @@ void processMessages(
|
||||
fflush(stdout);
|
||||
#endif
|
||||
|
||||
PROCESS_CROSS_EDGE(Counter, Ghost2LocalMap[u], S);
|
||||
PROCESS_CROSS_EDGE(&Counter[Ghost2LocalMap[u]], S);
|
||||
} // End of if ( candidateMate[v-StartIndex] == u )e
|
||||
} // End of if ( Mate[v] == -1 )
|
||||
} // End of REQUEST
|
||||
@@ -207,7 +207,7 @@ void processMessages(
|
||||
fflush(stdout);
|
||||
#endif
|
||||
GMate[Ghost2LocalMap[u]] = EndIndex + 1; // Set a Dummy Mate to make sure that we do not (u is a ghost) process it again
|
||||
PROCESS_CROSS_EDGE(Counter, Ghost2LocalMap[u], S);
|
||||
PROCESS_CROSS_EDGE(&Counter[Ghost2LocalMap[u]], S);
|
||||
#ifdef DEBUG_GHOST_
|
||||
if ((v < 0) || (v < StartIndex) || ((v - StartIndex) > NLVer))
|
||||
{
|
||||
@@ -260,7 +260,7 @@ void processMessages(
|
||||
fflush(stdout);
|
||||
#endif
|
||||
|
||||
PROCESS_CROSS_EDGE(Counter, Ghost2LocalMap[w], S);
|
||||
PROCESS_CROSS_EDGE(&Counter[Ghost2LocalMap[w]], S);
|
||||
} // End of if CandidateMate[w] = v
|
||||
} // End of if a Ghost Vertex
|
||||
else
|
||||
@@ -319,7 +319,7 @@ void processMessages(
|
||||
fflush(stdout);
|
||||
#endif
|
||||
GMate[Ghost2LocalMap[u]] = EndIndex + 1; // Set a Dummy Mate to make sure that we do not (u is a ghost) process this anymore
|
||||
PROCESS_CROSS_EDGE(Counter, Ghost2LocalMap[u], S); // Decrease the counter
|
||||
PROCESS_CROSS_EDGE(&Counter[Ghost2LocalMap[u]], S); // Decrease the counter
|
||||
} // End of else: CASE III
|
||||
} // End of else: CASE I
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user