+ if (r1->call != r2->call)
+ return request_depend_asymmetric(r1, r2)
+ && request_depend_asymmetric(r2, r1);
+
+ // Those are internal requests, we do not need indirection
+ // because those objects are copies:
+ smx_synchro_t synchro1 = MC_get_comm(r1);
+ smx_synchro_t synchro2 = MC_get_comm(r2);
+
+ switch(r1->call) {
+ case SIMCALL_COMM_ISEND:
+ return simcall_comm_isend__get__rdv(r1) == simcall_comm_isend__get__rdv(r2);
+ case SIMCALL_COMM_IRECV:
+ return simcall_comm_irecv__get__rdv(r1) == simcall_comm_irecv__get__rdv(r2);
+ case SIMCALL_COMM_WAIT:
+ if (synchro1->comm.src_buff == synchro2->comm.src_buff
+ && synchro1->comm.dst_buff == synchro2->comm.dst_buff)
+ return false;
+ else if (synchro1->comm.src_buff != nullptr
+ && synchro1->comm.dst_buff != nullptr
+ && synchro2->comm.src_buff != nullptr
+ && synchro2->comm.dst_buff != nullptr
+ && synchro1->comm.dst_buff != synchro2->comm.src_buff
+ && synchro1->comm.dst_buff != synchro2->comm.dst_buff
+ && synchro2->comm.dst_buff != synchro1->comm.src_buff)
+ return false;
+ else
+ return true;
+ default:
+ return true;
+ }
+}
+
+}