You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
584 B
C++
24 lines
584 B
C++
#include "MatchBoxPC.h"
|
|
void PROCESS_CROSS_EDGE(MilanLongInt *edge,
|
|
MilanLongInt *S)
|
|
{
|
|
// Start: PARALLEL_PROCESS_CROSS_EDGE_B
|
|
MilanLongInt captureCounter;
|
|
|
|
#pragma omp atomic capture
|
|
captureCounter = --(*edge); // Decrement
|
|
|
|
//assert(captureCounter >= 0);
|
|
|
|
if (captureCounter == 0)
|
|
#pragma omp atomic
|
|
(*S)--; // Decrement S
|
|
|
|
#ifdef PRINT_DEBUG_INFO_
|
|
cout << "\n(" << myRank << ")Decrementing S: Ghost vertex " << edge << " has received all its messages";
|
|
fflush(stdout);
|
|
#endif
|
|
|
|
// End: PARALLEL_PROCESS_CROSS_EDGE_B
|
|
}
|