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.
33 lines
1.0 KiB
C++
33 lines
1.0 KiB
C++
2 years ago
|
#include "MatchBoxPC.h"
|
||
|
#include <stdio.h>
|
||
|
#include <iostream>
|
||
|
#include <assert.h>
|
||
|
#include <map>
|
||
|
#include <vector>
|
||
|
#include "primitiveDataTypeDefinitions.h"
|
||
|
#include "dataStrStaticQueue.h"
|
||
|
#include "omp.h"
|
||
|
|
||
|
inline void PROCESS_CROSS_EDGE(vector<MilanLongInt> &Counter,
|
||
|
map<MilanLongInt, MilanLongInt> &Ghost2LocalMap,
|
||
|
MilanLongInt edge,
|
||
|
MilanLongInt *SPtr)
|
||
|
{
|
||
|
MilanLongInt S = *SPtr;
|
||
|
// Decrement the counter:
|
||
|
// Start: PARALLEL_PROCESS_CROSS_EDGE_B
|
||
|
if (Counter[Ghost2LocalMap[edge]] > 0)
|
||
|
{
|
||
|
Counter[Ghost2LocalMap[edge]] -= 1; // Decrement
|
||
|
if (Counter[Ghost2LocalMap[edge]] == 0)
|
||
|
{
|
||
|
S--; // Decrement S
|
||
|
#ifdef PRINT_DEBUG_INFO_
|
||
|
cout << "\n(" << myRank << ")Decrementing S: Ghost vertex " << edge << " has received all its messages";
|
||
|
fflush(stdout);
|
||
|
#endif
|
||
|
}
|
||
|
} // End of if Counter[edge] > 0
|
||
|
// End: PARALLEL_PROCESS_CROSS_EDGE_B
|
||
|
*SPtr = S;
|
||
|
}
|