-
Notifications
You must be signed in to change notification settings - Fork 0
/
MPCs_check.cpp
48 lines (31 loc) · 1.23 KB
/
MPCs_check.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include "MPCs_check.hpp"
/*********************************************************************
*
**********************************************************************/
bool check_communication_Schedule(comm_schedule_type& comm)
{
bool ret=false;
const std::size_t size=comm.size();
unsigned current_lm=1,old_lm=0;
unsigned int lm_comm[size]={0};//track logical moment for every communication
unsigned limit=0;
while(current_lm != old_lm)
{ old_lm=current_lm;
for (int j=0;j<size;j++)
{
FromIdToId_Pair_type id_global=comm[j].first;
FromIndexToIndex_Pair_type indices_global=comm[j].second;
if(indices_global.first==limit)
{
//check if both index are the same In current limit
//a immediate communication is possible and "lm" can be set
if(indices_global.second==limit)
{
}
}else if(indices_global.second==limit)
{
}
}
}
return ret;
}