- if (req1->call_ != req2->call_)
- return request_depend_asymmetric(req1, req2) && request_depend_asymmetric(req2, req1);
-
- // Those are internal requests, we do not need indirection because those objects are copies:
- const kernel::activity::CommImpl* activity1 = get_comm(req1);
- const kernel::activity::CommImpl* activity2 = get_comm(req2);
-
- switch (req1->call_) {
- case Simcall::COMM_ISEND:
- return simcall_comm_isend__get__mbox(req1) == simcall_comm_isend__get__mbox(req2);
- case Simcall::COMM_IRECV:
- return simcall_comm_irecv__get__mbox(req1) == simcall_comm_irecv__get__mbox(req2);
- case Simcall::COMM_WAIT:
- if (activity1->src_buff_ == activity2->src_buff_ && activity1->dst_buff_ == activity2->dst_buff_)
- return false;
- if (activity1->src_buff_ != nullptr && activity1->dst_buff_ != nullptr && activity2->src_buff_ != nullptr &&
- activity2->dst_buff_ != nullptr && activity1->dst_buff_ != activity2->src_buff_ &&
- activity1->dst_buff_ != activity2->dst_buff_ && activity2->dst_buff_ != activity1->src_buff_)
- return false;
- return true;
- default:
- return true;
- }