-// Does half the job
-bool Api::request_depend_asymmetric(smx_simcall_t r1, smx_simcall_t r2) const
-{
- if (r1->call_ == Simcall::COMM_IRECV && r2->call_ == Simcall::COMM_ISEND)
- return false;
-
- // Those are internal requests, we do not need indirection because those objects are copies:
- auto comm1 = get_comm_or_nullptr(r1);
- auto comm2 = get_comm_or_nullptr(r2);
-
- if ((r1->call_ == Simcall::COMM_ISEND || r1->call_ == Simcall::COMM_IRECV) && r2->call_ == Simcall::COMM_WAIT) {
- auto mbox1 = get_mbox_remote_addr(r1);
- auto mbox2 = remote(comm2->mbox_cpy);
-
- if (mbox1 != mbox2 && simcall_comm_wait__get__timeout(r2) <= 0)
- return false;
-
- if ((r1->issuer_ != comm2->src_actor_.get()) && (r1->issuer_ != comm2->dst_actor_.get()) &&
- simcall_comm_wait__get__timeout(r2) <= 0)
- return false;
-
- if ((r1->call_ == Simcall::COMM_ISEND) && (comm2->type_ == kernel::activity::CommImpl::Type::SEND) &&
- (comm2->src_buff_ != simcall_comm_isend__get__src_buff(r1)) && simcall_comm_wait__get__timeout(r2) <= 0)
- return false;
-
- if ((r1->call_ == Simcall::COMM_IRECV) && (comm2->type_ == kernel::activity::CommImpl::Type::RECEIVE) &&
- (comm2->dst_buff_ != simcall_comm_irecv__get__dst_buff(r1)) && simcall_comm_wait__get__timeout(r2) <= 0)
- return false;
- }
-
- /* FIXME: the following rule assumes that the result of the isend/irecv call is not stored in a buffer used in the
- * test call. */
-#if 0
- if((r1->call == Simcall::COMM_ISEND || r1->call == Simcall::COMM_IRECV)
- && r2->call == Simcall::COMM_TEST)
- return false;
-#endif
-
- if (r1->call_ == Simcall::COMM_TEST && r2->call_ == Simcall::COMM_WAIT &&
- (comm1->src_actor_.get() == nullptr || comm1->dst_actor_.get() == nullptr))
- return false;
-
- if (r1->call_ == Simcall::COMM_TEST &&
- (simcall_comm_test__get__comm(r1) == nullptr || comm1->src_buff_ == nullptr || comm1->dst_buff_ == nullptr))
- return false;
-
- if (r1->call_ == Simcall::COMM_TEST && r2->call_ == Simcall::COMM_WAIT && comm1->src_buff_ == comm2->src_buff_ &&
- comm1->dst_buff_ == comm2->dst_buff_)
- return false;
-
- if (r1->call_ == Simcall::COMM_TEST && r2->call_ == Simcall::COMM_WAIT && comm1->src_buff_ != nullptr &&
- comm1->dst_buff_ != nullptr && comm2->src_buff_ != nullptr && comm2->dst_buff_ != nullptr &&
- comm1->dst_buff_ != comm2->src_buff_ && comm1->dst_buff_ != comm2->dst_buff_ &&
- comm2->dst_buff_ != comm1->src_buff_)
- return false;
-
- return true;
-}
-