From: Martin Quinson Date: Sat, 13 Mar 2021 19:25:36 +0000 (+0100) Subject: Sort comm_* simcalls alphabetically X-Git-Tag: v3.27~158 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/6e7a820f956bdb2e780c93603d7571100e7f9a3f?ds=sidebyside Sort comm_* simcalls alphabetically --- diff --git a/src/mc/api.cpp b/src/mc/api.cpp index c6f11b8ab5..4bbbab5aec 100644 --- a/src/mc/api.cpp +++ b/src/mc/api.cpp @@ -283,7 +283,7 @@ bool Api::request_depend_asymmetric(smx_simcall_t r1, smx_simcall_t r2) const return true; } -bool Api::simcall_check_dependency(smx_simcall_t const req1, smx_simcall_t const req2) const +bool Api::simcall_check_dependency(smx_simcall_t req1, smx_simcall_t req2) const { const auto ISEND = Simcall::COMM_ISEND; const auto IRECV = Simcall::COMM_IRECV; @@ -304,6 +304,11 @@ bool Api::simcall_check_dependency(smx_simcall_t const req1, smx_simcall_t const (req2->call_ == WAIT && simcall_comm_wait__get__timeout(req2) > 0)) return true; + if (req1->call_ < req2->call_) { + auto temp = req1; + req1 = req2; + req2 = temp; + } if (req1->call_ != req2->call_) return request_depend_asymmetric(req1, req2) && request_depend_asymmetric(req2, req1); diff --git a/src/simix/popping_accessors.hpp b/src/simix/popping_accessors.hpp index 091a7cca07..62c1c527d0 100644 --- a/src/simix/popping_accessors.hpp +++ b/src/simix/popping_accessors.hpp @@ -64,6 +64,224 @@ static inline void simcall_execution_waitany_for__set__result(smx_simcall_t simc simgrid::simix::marshal(simcall->result_, result); } +static inline smx_actor_t simcall_comm_recv__get__receiver(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal(simcall->args_[0]); +} +static inline smx_actor_t simcall_comm_recv__getraw__receiver(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args_[0]); +} +static inline void simcall_comm_recv__set__receiver(smx_simcall_t simcall, smx_actor_t arg) +{ + simgrid::simix::marshal(simcall->args_[0], arg); +} +static inline smx_mailbox_t simcall_comm_recv__get__mbox(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal(simcall->args_[1]); +} +static inline smx_mailbox_t simcall_comm_recv__getraw__mbox(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args_[1]); +} +static inline void simcall_comm_recv__set__mbox(smx_simcall_t simcall, smx_mailbox_t arg) +{ + simgrid::simix::marshal(simcall->args_[1], arg); +} +static inline unsigned char* simcall_comm_recv__get__dst_buff(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal(simcall->args_[2]); +} +static inline unsigned char* simcall_comm_recv__getraw__dst_buff(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args_[2]); +} +static inline void simcall_comm_recv__set__dst_buff(smx_simcall_t simcall, unsigned char* arg) +{ + simgrid::simix::marshal(simcall->args_[2], arg); +} +static inline size_t* simcall_comm_recv__get__dst_buff_size(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal(simcall->args_[3]); +} +static inline size_t* simcall_comm_recv__getraw__dst_buff_size(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args_[3]); +} +static inline void simcall_comm_recv__set__dst_buff_size(smx_simcall_t simcall, size_t* arg) +{ + simgrid::simix::marshal(simcall->args_[3], arg); +} +static inline simix_match_func_t simcall_comm_recv__get__match_fun(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal(simcall->args_[4]); +} +static inline simix_match_func_t simcall_comm_recv__getraw__match_fun(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args_[4]); +} +static inline void simcall_comm_recv__set__match_fun(smx_simcall_t simcall, simix_match_func_t arg) +{ + simgrid::simix::marshal(simcall->args_[4], arg); +} +static inline simix_copy_data_func_t simcall_comm_recv__get__copy_data_fun(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal(simcall->args_[5]); +} +static inline simix_copy_data_func_t simcall_comm_recv__getraw__copy_data_fun(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args_[5]); +} +static inline void simcall_comm_recv__set__copy_data_fun(smx_simcall_t simcall, simix_copy_data_func_t arg) +{ + simgrid::simix::marshal(simcall->args_[5], arg); +} +static inline void* simcall_comm_recv__get__data(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal(simcall->args_[6]); +} +static inline void* simcall_comm_recv__getraw__data(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args_[6]); +} +static inline void simcall_comm_recv__set__data(smx_simcall_t simcall, void* arg) +{ + simgrid::simix::marshal(simcall->args_[6], arg); +} +static inline double simcall_comm_recv__get__timeout(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal(simcall->args_[7]); +} +static inline double simcall_comm_recv__getraw__timeout(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args_[7]); +} +static inline void simcall_comm_recv__set__timeout(smx_simcall_t simcall, double arg) +{ + simgrid::simix::marshal(simcall->args_[7], arg); +} +static inline double simcall_comm_recv__get__rate(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal(simcall->args_[8]); +} +static inline double simcall_comm_recv__getraw__rate(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args_[8]); +} +static inline void simcall_comm_recv__set__rate(smx_simcall_t simcall, double arg) +{ + simgrid::simix::marshal(simcall->args_[8], arg); +} + +static inline smx_actor_t simcall_comm_irecv__get__receiver(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal(simcall->args_[0]); +} +static inline smx_actor_t simcall_comm_irecv__getraw__receiver(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args_[0]); +} +static inline void simcall_comm_irecv__set__receiver(smx_simcall_t simcall, smx_actor_t arg) +{ + simgrid::simix::marshal(simcall->args_[0], arg); +} +static inline smx_mailbox_t simcall_comm_irecv__get__mbox(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal(simcall->args_[1]); +} +static inline smx_mailbox_t simcall_comm_irecv__getraw__mbox(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args_[1]); +} +static inline void simcall_comm_irecv__set__mbox(smx_simcall_t simcall, smx_mailbox_t arg) +{ + simgrid::simix::marshal(simcall->args_[1], arg); +} +static inline unsigned char* simcall_comm_irecv__get__dst_buff(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal(simcall->args_[2]); +} +static inline unsigned char* simcall_comm_irecv__getraw__dst_buff(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args_[2]); +} +static inline void simcall_comm_irecv__set__dst_buff(smx_simcall_t simcall, unsigned char* arg) +{ + simgrid::simix::marshal(simcall->args_[2], arg); +} +static inline size_t* simcall_comm_irecv__get__dst_buff_size(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal(simcall->args_[3]); +} +static inline size_t* simcall_comm_irecv__getraw__dst_buff_size(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args_[3]); +} +static inline void simcall_comm_irecv__set__dst_buff_size(smx_simcall_t simcall, size_t* arg) +{ + simgrid::simix::marshal(simcall->args_[3], arg); +} +static inline simix_match_func_t simcall_comm_irecv__get__match_fun(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal(simcall->args_[4]); +} +static inline simix_match_func_t simcall_comm_irecv__getraw__match_fun(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args_[4]); +} +static inline void simcall_comm_irecv__set__match_fun(smx_simcall_t simcall, simix_match_func_t arg) +{ + simgrid::simix::marshal(simcall->args_[4], arg); +} +static inline simix_copy_data_func_t simcall_comm_irecv__get__copy_data_fun(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal(simcall->args_[5]); +} +static inline simix_copy_data_func_t simcall_comm_irecv__getraw__copy_data_fun(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args_[5]); +} +static inline void simcall_comm_irecv__set__copy_data_fun(smx_simcall_t simcall, simix_copy_data_func_t arg) +{ + simgrid::simix::marshal(simcall->args_[5], arg); +} +static inline void* simcall_comm_irecv__get__data(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal(simcall->args_[6]); +} +static inline void* simcall_comm_irecv__getraw__data(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args_[6]); +} +static inline void simcall_comm_irecv__set__data(smx_simcall_t simcall, void* arg) +{ + simgrid::simix::marshal(simcall->args_[6], arg); +} +static inline double simcall_comm_irecv__get__rate(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal(simcall->args_[7]); +} +static inline double simcall_comm_irecv__getraw__rate(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args_[7]); +} +static inline void simcall_comm_irecv__set__rate(smx_simcall_t simcall, double arg) +{ + simgrid::simix::marshal(simcall->args_[7], arg); +} +static inline boost::intrusive_ptr simcall_comm_irecv__get__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal>(simcall->result_); +} +static inline simgrid::kernel::activity::ActivityImpl* simcall_comm_irecv__getraw__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->result_); +} +static inline void simcall_comm_irecv__set__result(smx_simcall_t simcall, boost::intrusive_ptr result) +{ + simgrid::simix::marshal>(simcall->result_, result); +} + static inline smx_actor_t simcall_comm_send__get__sender(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args_[0]); @@ -330,222 +548,66 @@ static inline void simcall_comm_isend__set__result(smx_simcall_t simcall, boost: simgrid::simix::marshal>(simcall->result_, result); } -static inline smx_actor_t simcall_comm_recv__get__receiver(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal(simcall->args_[0]); -} -static inline smx_actor_t simcall_comm_recv__getraw__receiver(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal_raw(simcall->args_[0]); -} -static inline void simcall_comm_recv__set__receiver(smx_simcall_t simcall, smx_actor_t arg) -{ - simgrid::simix::marshal(simcall->args_[0], arg); -} -static inline smx_mailbox_t simcall_comm_recv__get__mbox(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal(simcall->args_[1]); -} -static inline smx_mailbox_t simcall_comm_recv__getraw__mbox(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal_raw(simcall->args_[1]); -} -static inline void simcall_comm_recv__set__mbox(smx_simcall_t simcall, smx_mailbox_t arg) -{ - simgrid::simix::marshal(simcall->args_[1], arg); -} -static inline unsigned char* simcall_comm_recv__get__dst_buff(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal(simcall->args_[2]); -} -static inline unsigned char* simcall_comm_recv__getraw__dst_buff(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal_raw(simcall->args_[2]); -} -static inline void simcall_comm_recv__set__dst_buff(smx_simcall_t simcall, unsigned char* arg) -{ - simgrid::simix::marshal(simcall->args_[2], arg); -} -static inline size_t* simcall_comm_recv__get__dst_buff_size(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal(simcall->args_[3]); -} -static inline size_t* simcall_comm_recv__getraw__dst_buff_size(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal_raw(simcall->args_[3]); -} -static inline void simcall_comm_recv__set__dst_buff_size(smx_simcall_t simcall, size_t* arg) -{ - simgrid::simix::marshal(simcall->args_[3], arg); -} -static inline simix_match_func_t simcall_comm_recv__get__match_fun(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal(simcall->args_[4]); -} -static inline simix_match_func_t simcall_comm_recv__getraw__match_fun(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal_raw(simcall->args_[4]); -} -static inline void simcall_comm_recv__set__match_fun(smx_simcall_t simcall, simix_match_func_t arg) -{ - simgrid::simix::marshal(simcall->args_[4], arg); -} -static inline simix_copy_data_func_t simcall_comm_recv__get__copy_data_fun(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal(simcall->args_[5]); -} -static inline simix_copy_data_func_t simcall_comm_recv__getraw__copy_data_fun(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal_raw(simcall->args_[5]); -} -static inline void simcall_comm_recv__set__copy_data_fun(smx_simcall_t simcall, simix_copy_data_func_t arg) -{ - simgrid::simix::marshal(simcall->args_[5], arg); -} -static inline void* simcall_comm_recv__get__data(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal(simcall->args_[6]); -} -static inline void* simcall_comm_recv__getraw__data(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal_raw(simcall->args_[6]); -} -static inline void simcall_comm_recv__set__data(smx_simcall_t simcall, void* arg) -{ - simgrid::simix::marshal(simcall->args_[6], arg); -} -static inline double simcall_comm_recv__get__timeout(smx_simcall_t simcall) +static inline simgrid::kernel::activity::CommImpl* simcall_comm_test__get__comm(smx_simcall_t simcall) { - return simgrid::simix::unmarshal(simcall->args_[7]); + return simgrid::simix::unmarshal(simcall->args_[0]); } -static inline double simcall_comm_recv__getraw__timeout(smx_simcall_t simcall) +static inline simgrid::kernel::activity::CommImpl* simcall_comm_test__getraw__comm(smx_simcall_t simcall) { - return simgrid::simix::unmarshal_raw(simcall->args_[7]); + return simgrid::simix::unmarshal_raw(simcall->args_[0]); } -static inline void simcall_comm_recv__set__timeout(smx_simcall_t simcall, double arg) +static inline void simcall_comm_test__set__comm(smx_simcall_t simcall, simgrid::kernel::activity::CommImpl* arg) { - simgrid::simix::marshal(simcall->args_[7], arg); + simgrid::simix::marshal(simcall->args_[0], arg); } -static inline double simcall_comm_recv__get__rate(smx_simcall_t simcall) +static inline bool simcall_comm_test__get__result(smx_simcall_t simcall) { - return simgrid::simix::unmarshal(simcall->args_[8]); + return simgrid::simix::unmarshal(simcall->result_); } -static inline double simcall_comm_recv__getraw__rate(smx_simcall_t simcall) +static inline bool simcall_comm_test__getraw__result(smx_simcall_t simcall) { - return simgrid::simix::unmarshal_raw(simcall->args_[8]); + return simgrid::simix::unmarshal_raw(simcall->result_); } -static inline void simcall_comm_recv__set__rate(smx_simcall_t simcall, double arg) +static inline void simcall_comm_test__set__result(smx_simcall_t simcall, bool result) { - simgrid::simix::marshal(simcall->args_[8], arg); + simgrid::simix::marshal(simcall->result_, result); } -static inline smx_actor_t simcall_comm_irecv__get__receiver(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal(simcall->args_[0]); -} -static inline smx_actor_t simcall_comm_irecv__getraw__receiver(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal_raw(simcall->args_[0]); -} -static inline void simcall_comm_irecv__set__receiver(smx_simcall_t simcall, smx_actor_t arg) -{ - simgrid::simix::marshal(simcall->args_[0], arg); -} -static inline smx_mailbox_t simcall_comm_irecv__get__mbox(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal(simcall->args_[1]); -} -static inline smx_mailbox_t simcall_comm_irecv__getraw__mbox(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal_raw(simcall->args_[1]); -} -static inline void simcall_comm_irecv__set__mbox(smx_simcall_t simcall, smx_mailbox_t arg) -{ - simgrid::simix::marshal(simcall->args_[1], arg); -} -static inline unsigned char* simcall_comm_irecv__get__dst_buff(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal(simcall->args_[2]); -} -static inline unsigned char* simcall_comm_irecv__getraw__dst_buff(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal_raw(simcall->args_[2]); -} -static inline void simcall_comm_irecv__set__dst_buff(smx_simcall_t simcall, unsigned char* arg) -{ - simgrid::simix::marshal(simcall->args_[2], arg); -} -static inline size_t* simcall_comm_irecv__get__dst_buff_size(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal(simcall->args_[3]); -} -static inline size_t* simcall_comm_irecv__getraw__dst_buff_size(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal_raw(simcall->args_[3]); -} -static inline void simcall_comm_irecv__set__dst_buff_size(smx_simcall_t simcall, size_t* arg) -{ - simgrid::simix::marshal(simcall->args_[3], arg); -} -static inline simix_match_func_t simcall_comm_irecv__get__match_fun(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal(simcall->args_[4]); -} -static inline simix_match_func_t simcall_comm_irecv__getraw__match_fun(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal_raw(simcall->args_[4]); -} -static inline void simcall_comm_irecv__set__match_fun(smx_simcall_t simcall, simix_match_func_t arg) -{ - simgrid::simix::marshal(simcall->args_[4], arg); -} -static inline simix_copy_data_func_t simcall_comm_irecv__get__copy_data_fun(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal(simcall->args_[5]); -} -static inline simix_copy_data_func_t simcall_comm_irecv__getraw__copy_data_fun(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal_raw(simcall->args_[5]); -} -static inline void simcall_comm_irecv__set__copy_data_fun(smx_simcall_t simcall, simix_copy_data_func_t arg) -{ - simgrid::simix::marshal(simcall->args_[5], arg); -} -static inline void* simcall_comm_irecv__get__data(smx_simcall_t simcall) +static inline simgrid::kernel::activity::CommImpl** simcall_comm_testany__get__comms(smx_simcall_t simcall) { - return simgrid::simix::unmarshal(simcall->args_[6]); + return simgrid::simix::unmarshal(simcall->args_[0]); } -static inline void* simcall_comm_irecv__getraw__data(smx_simcall_t simcall) +static inline simgrid::kernel::activity::CommImpl** simcall_comm_testany__getraw__comms(smx_simcall_t simcall) { - return simgrid::simix::unmarshal_raw(simcall->args_[6]); + return simgrid::simix::unmarshal_raw(simcall->args_[0]); } -static inline void simcall_comm_irecv__set__data(smx_simcall_t simcall, void* arg) +static inline void simcall_comm_testany__set__comms(smx_simcall_t simcall, simgrid::kernel::activity::CommImpl** arg) { - simgrid::simix::marshal(simcall->args_[6], arg); + simgrid::simix::marshal(simcall->args_[0], arg); } -static inline double simcall_comm_irecv__get__rate(smx_simcall_t simcall) +static inline size_t simcall_comm_testany__get__count(smx_simcall_t simcall) { - return simgrid::simix::unmarshal(simcall->args_[7]); + return simgrid::simix::unmarshal(simcall->args_[1]); } -static inline double simcall_comm_irecv__getraw__rate(smx_simcall_t simcall) +static inline size_t simcall_comm_testany__getraw__count(smx_simcall_t simcall) { - return simgrid::simix::unmarshal_raw(simcall->args_[7]); + return simgrid::simix::unmarshal_raw(simcall->args_[1]); } -static inline void simcall_comm_irecv__set__rate(smx_simcall_t simcall, double arg) +static inline void simcall_comm_testany__set__count(smx_simcall_t simcall, size_t arg) { - simgrid::simix::marshal(simcall->args_[7], arg); + simgrid::simix::marshal(simcall->args_[1], arg); } -static inline boost::intrusive_ptr simcall_comm_irecv__get__result(smx_simcall_t simcall) +static inline int simcall_comm_testany__get__result(smx_simcall_t simcall) { - return simgrid::simix::unmarshal>(simcall->result_); + return simgrid::simix::unmarshal(simcall->result_); } -static inline simgrid::kernel::activity::ActivityImpl* simcall_comm_irecv__getraw__result(smx_simcall_t simcall) +static inline int simcall_comm_testany__getraw__result(smx_simcall_t simcall) { - return simgrid::simix::unmarshal_raw(simcall->result_); + return simgrid::simix::unmarshal_raw(simcall->result_); } -static inline void simcall_comm_irecv__set__result(smx_simcall_t simcall, boost::intrusive_ptr result) +static inline void simcall_comm_testany__set__result(smx_simcall_t simcall, int result) { - simgrid::simix::marshal>(simcall->result_, result); + simgrid::simix::marshal(simcall->result_, result); } static inline simgrid::kernel::activity::CommImpl** simcall_comm_waitany__get__comms(smx_simcall_t simcall) @@ -622,68 +684,6 @@ static inline void simcall_comm_wait__set__timeout(smx_simcall_t simcall, double simgrid::simix::marshal(simcall->args_[1], arg); } -static inline simgrid::kernel::activity::CommImpl* simcall_comm_test__get__comm(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal(simcall->args_[0]); -} -static inline simgrid::kernel::activity::CommImpl* simcall_comm_test__getraw__comm(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal_raw(simcall->args_[0]); -} -static inline void simcall_comm_test__set__comm(smx_simcall_t simcall, simgrid::kernel::activity::CommImpl* arg) -{ - simgrid::simix::marshal(simcall->args_[0], arg); -} -static inline bool simcall_comm_test__get__result(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal(simcall->result_); -} -static inline bool simcall_comm_test__getraw__result(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal_raw(simcall->result_); -} -static inline void simcall_comm_test__set__result(smx_simcall_t simcall, bool result) -{ - simgrid::simix::marshal(simcall->result_, result); -} - -static inline simgrid::kernel::activity::CommImpl** simcall_comm_testany__get__comms(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal(simcall->args_[0]); -} -static inline simgrid::kernel::activity::CommImpl** simcall_comm_testany__getraw__comms(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal_raw(simcall->args_[0]); -} -static inline void simcall_comm_testany__set__comms(smx_simcall_t simcall, simgrid::kernel::activity::CommImpl** arg) -{ - simgrid::simix::marshal(simcall->args_[0], arg); -} -static inline size_t simcall_comm_testany__get__count(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal(simcall->args_[1]); -} -static inline size_t simcall_comm_testany__getraw__count(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal_raw(simcall->args_[1]); -} -static inline void simcall_comm_testany__set__count(smx_simcall_t simcall, size_t arg) -{ - simgrid::simix::marshal(simcall->args_[1], arg); -} -static inline int simcall_comm_testany__get__result(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal(simcall->result_); -} -static inline int simcall_comm_testany__getraw__result(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal_raw(simcall->result_); -} -static inline void simcall_comm_testany__set__result(smx_simcall_t simcall, int result) -{ - simgrid::simix::marshal(simcall->result_, result); -} - static inline smx_cond_t simcall_cond_wait__get__cond(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args_[0]); @@ -837,14 +837,14 @@ static inline void simcall_run_blocking__set__code(smx_simcall_t simcall, std::f /* The prototype of all simcall handlers, automatically generated for you */ XBT_PRIVATE void simcall_HANDLER_execution_waitany_for(smx_simcall_t simcall, simgrid::kernel::activity::ExecImpl** execs, size_t count, double timeout); -XBT_PRIVATE void simcall_HANDLER_comm_send(smx_simcall_t simcall, smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, unsigned char* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout); -XBT_PRIVATE boost::intrusive_ptr simcall_HANDLER_comm_isend(smx_simcall_t simcall, smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, unsigned char* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, bool detached); XBT_PRIVATE void simcall_HANDLER_comm_recv(smx_simcall_t simcall, smx_actor_t receiver, smx_mailbox_t mbox, unsigned char* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate); XBT_PRIVATE boost::intrusive_ptr simcall_HANDLER_comm_irecv(smx_simcall_t simcall, smx_actor_t receiver, smx_mailbox_t mbox, unsigned char* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate); -XBT_PRIVATE void simcall_HANDLER_comm_waitany(smx_simcall_t simcall, simgrid::kernel::activity::CommImpl** comms, size_t count, double timeout); -XBT_PRIVATE void simcall_HANDLER_comm_wait(smx_simcall_t simcall, simgrid::kernel::activity::CommImpl* comm, double timeout); +XBT_PRIVATE void simcall_HANDLER_comm_send(smx_simcall_t simcall, smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, unsigned char* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout); +XBT_PRIVATE boost::intrusive_ptr simcall_HANDLER_comm_isend(smx_simcall_t simcall, smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, unsigned char* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, bool detached); XBT_PRIVATE void simcall_HANDLER_comm_test(smx_simcall_t simcall, simgrid::kernel::activity::CommImpl* comm); XBT_PRIVATE void simcall_HANDLER_comm_testany(smx_simcall_t simcall, simgrid::kernel::activity::CommImpl** comms, size_t count); +XBT_PRIVATE void simcall_HANDLER_comm_waitany(smx_simcall_t simcall, simgrid::kernel::activity::CommImpl** comms, size_t count, double timeout); +XBT_PRIVATE void simcall_HANDLER_comm_wait(smx_simcall_t simcall, simgrid::kernel::activity::CommImpl* comm, double timeout); XBT_PRIVATE void simcall_HANDLER_cond_wait(smx_simcall_t simcall, smx_cond_t cond, smx_mutex_t mutex); XBT_PRIVATE void simcall_HANDLER_cond_wait_timeout(smx_simcall_t simcall, smx_cond_t cond, smx_mutex_t mutex, double timeout); XBT_PRIVATE void simcall_HANDLER_sem_acquire(smx_simcall_t simcall, smx_sem_t sem); diff --git a/src/simix/popping_bodies.cpp b/src/simix/popping_bodies.cpp index fc04c38c1c..ea1fa58743 100644 --- a/src/simix/popping_bodies.cpp +++ b/src/simix/popping_bodies.cpp @@ -48,20 +48,6 @@ inline static int simcall_BODY_execution_waitany_for(simgrid::kernel::activity:: return simcall(Simcall::EXECUTION_WAITANY_FOR, execs, count, timeout); } -inline static void simcall_BODY_comm_send(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, unsigned char* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout) -{ - if (false) /* Go to that function to follow the code flow through the simcall barrier */ - simcall_HANDLER_comm_send(&SIMIX_process_self()->simcall_, sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, copy_data_fun, data, timeout); - return simcall(Simcall::COMM_SEND, sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, copy_data_fun, data, timeout); -} - -inline static boost::intrusive_ptr simcall_BODY_comm_isend(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, unsigned char* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, bool detached) -{ - if (false) /* Go to that function to follow the code flow through the simcall barrier */ - simcall_HANDLER_comm_isend(&SIMIX_process_self()->simcall_, sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, clean_fun, copy_data_fun, data, detached); - return simcall, smx_actor_t, smx_mailbox_t, double, double, unsigned char*, size_t, simix_match_func_t, simix_clean_func_t, simix_copy_data_func_t, void*, bool>(Simcall::COMM_ISEND, sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, clean_fun, copy_data_fun, data, detached); -} - inline static void simcall_BODY_comm_recv(smx_actor_t receiver, smx_mailbox_t mbox, unsigned char* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate) { if (false) /* Go to that function to follow the code flow through the simcall barrier */ @@ -76,18 +62,18 @@ inline static boost::intrusive_ptr simc return simcall, smx_actor_t, smx_mailbox_t, unsigned char*, size_t*, simix_match_func_t, simix_copy_data_func_t, void*, double>(Simcall::COMM_IRECV, receiver, mbox, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate); } -inline static int simcall_BODY_comm_waitany(simgrid::kernel::activity::CommImpl** comms, size_t count, double timeout) +inline static void simcall_BODY_comm_send(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, unsigned char* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout) { if (false) /* Go to that function to follow the code flow through the simcall barrier */ - simcall_HANDLER_comm_waitany(&SIMIX_process_self()->simcall_, comms, count, timeout); - return simcall(Simcall::COMM_WAITANY, comms, count, timeout); + simcall_HANDLER_comm_send(&SIMIX_process_self()->simcall_, sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, copy_data_fun, data, timeout); + return simcall(Simcall::COMM_SEND, sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, copy_data_fun, data, timeout); } -inline static void simcall_BODY_comm_wait(simgrid::kernel::activity::CommImpl* comm, double timeout) +inline static boost::intrusive_ptr simcall_BODY_comm_isend(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, unsigned char* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, bool detached) { if (false) /* Go to that function to follow the code flow through the simcall barrier */ - simcall_HANDLER_comm_wait(&SIMIX_process_self()->simcall_, comm, timeout); - return simcall(Simcall::COMM_WAIT, comm, timeout); + simcall_HANDLER_comm_isend(&SIMIX_process_self()->simcall_, sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, clean_fun, copy_data_fun, data, detached); + return simcall, smx_actor_t, smx_mailbox_t, double, double, unsigned char*, size_t, simix_match_func_t, simix_clean_func_t, simix_copy_data_func_t, void*, bool>(Simcall::COMM_ISEND, sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, clean_fun, copy_data_fun, data, detached); } inline static bool simcall_BODY_comm_test(simgrid::kernel::activity::CommImpl* comm) @@ -104,6 +90,20 @@ inline static int simcall_BODY_comm_testany(simgrid::kernel::activity::CommImpl* return simcall(Simcall::COMM_TESTANY, comms, count); } +inline static int simcall_BODY_comm_waitany(simgrid::kernel::activity::CommImpl** comms, size_t count, double timeout) +{ + if (false) /* Go to that function to follow the code flow through the simcall barrier */ + simcall_HANDLER_comm_waitany(&SIMIX_process_self()->simcall_, comms, count, timeout); + return simcall(Simcall::COMM_WAITANY, comms, count, timeout); +} + +inline static void simcall_BODY_comm_wait(simgrid::kernel::activity::CommImpl* comm, double timeout) +{ + if (false) /* Go to that function to follow the code flow through the simcall barrier */ + simcall_HANDLER_comm_wait(&SIMIX_process_self()->simcall_, comm, timeout); + return simcall(Simcall::COMM_WAIT, comm, timeout); +} + inline static void simcall_BODY_cond_wait(smx_cond_t cond, smx_mutex_t mutex) { if (false) /* Go to that function to follow the code flow through the simcall barrier */ diff --git a/src/simix/popping_enum.hpp b/src/simix/popping_enum.hpp index 5e21f81bfb..903a7f54d1 100644 --- a/src/simix/popping_enum.hpp +++ b/src/simix/popping_enum.hpp @@ -22,14 +22,14 @@ namespace simix { enum class Simcall { NONE, EXECUTION_WAITANY_FOR, - COMM_SEND, - COMM_ISEND, COMM_RECV, COMM_IRECV, - COMM_WAITANY, - COMM_WAIT, + COMM_SEND, + COMM_ISEND, COMM_TEST, COMM_TESTANY, + COMM_WAITANY, + COMM_WAIT, COND_WAIT, COND_WAIT_TIMEOUT, SEM_ACQUIRE, diff --git a/src/simix/popping_generated.cpp b/src/simix/popping_generated.cpp index 8f47b97cd5..b6d0c2baad 100644 --- a/src/simix/popping_generated.cpp +++ b/src/simix/popping_generated.cpp @@ -30,14 +30,14 @@ using simgrid::simix::Simcall; constexpr std::array simcall_names{{ "Simcall::NONE", "Simcall::EXECUTION_WAITANY_FOR", - "Simcall::COMM_SEND", - "Simcall::COMM_ISEND", "Simcall::COMM_RECV", "Simcall::COMM_IRECV", - "Simcall::COMM_WAITANY", - "Simcall::COMM_WAIT", + "Simcall::COMM_SEND", + "Simcall::COMM_ISEND", "Simcall::COMM_TEST", "Simcall::COMM_TESTANY", + "Simcall::COMM_WAITANY", + "Simcall::COMM_WAIT", "Simcall::COND_WAIT", "Simcall::COND_WAIT_TIMEOUT", "Simcall::SEM_ACQUIRE", @@ -64,15 +64,6 @@ void simgrid::kernel::actor::ActorImpl::simcall_handle(int times_considered_) simcall_HANDLER_execution_waitany_for(&simcall_, simgrid::simix::unmarshal(simcall_.args_[0]), simgrid::simix::unmarshal(simcall_.args_[1]), simgrid::simix::unmarshal(simcall_.args_[2])); break; - case Simcall::COMM_SEND: - simcall_HANDLER_comm_send(&simcall_, simgrid::simix::unmarshal(simcall_.args_[0]), simgrid::simix::unmarshal(simcall_.args_[1]), simgrid::simix::unmarshal(simcall_.args_[2]), simgrid::simix::unmarshal(simcall_.args_[3]), simgrid::simix::unmarshal(simcall_.args_[4]), simgrid::simix::unmarshal(simcall_.args_[5]), simgrid::simix::unmarshal(simcall_.args_[6]), simgrid::simix::unmarshal(simcall_.args_[7]), simgrid::simix::unmarshal(simcall_.args_[8]), simgrid::simix::unmarshal(simcall_.args_[9])); - break; - - case Simcall::COMM_ISEND: - simgrid::simix::marshal>(simcall_.result_, simcall_HANDLER_comm_isend(&simcall_, simgrid::simix::unmarshal(simcall_.args_[0]), simgrid::simix::unmarshal(simcall_.args_[1]), simgrid::simix::unmarshal(simcall_.args_[2]), simgrid::simix::unmarshal(simcall_.args_[3]), simgrid::simix::unmarshal(simcall_.args_[4]), simgrid::simix::unmarshal(simcall_.args_[5]), simgrid::simix::unmarshal(simcall_.args_[6]), simgrid::simix::unmarshal(simcall_.args_[7]), simgrid::simix::unmarshal(simcall_.args_[8]), simgrid::simix::unmarshal(simcall_.args_[9]), simgrid::simix::unmarshal(simcall_.args_[10]))); - simcall_answer(); - break; - case Simcall::COMM_RECV: simcall_HANDLER_comm_recv(&simcall_, simgrid::simix::unmarshal(simcall_.args_[0]), simgrid::simix::unmarshal(simcall_.args_[1]), simgrid::simix::unmarshal(simcall_.args_[2]), simgrid::simix::unmarshal(simcall_.args_[3]), simgrid::simix::unmarshal(simcall_.args_[4]), simgrid::simix::unmarshal(simcall_.args_[5]), simgrid::simix::unmarshal(simcall_.args_[6]), simgrid::simix::unmarshal(simcall_.args_[7]), simgrid::simix::unmarshal(simcall_.args_[8])); break; @@ -82,12 +73,13 @@ void simgrid::kernel::actor::ActorImpl::simcall_handle(int times_considered_) simcall_answer(); break; - case Simcall::COMM_WAITANY: - simcall_HANDLER_comm_waitany(&simcall_, simgrid::simix::unmarshal(simcall_.args_[0]), simgrid::simix::unmarshal(simcall_.args_[1]), simgrid::simix::unmarshal(simcall_.args_[2])); + case Simcall::COMM_SEND: + simcall_HANDLER_comm_send(&simcall_, simgrid::simix::unmarshal(simcall_.args_[0]), simgrid::simix::unmarshal(simcall_.args_[1]), simgrid::simix::unmarshal(simcall_.args_[2]), simgrid::simix::unmarshal(simcall_.args_[3]), simgrid::simix::unmarshal(simcall_.args_[4]), simgrid::simix::unmarshal(simcall_.args_[5]), simgrid::simix::unmarshal(simcall_.args_[6]), simgrid::simix::unmarshal(simcall_.args_[7]), simgrid::simix::unmarshal(simcall_.args_[8]), simgrid::simix::unmarshal(simcall_.args_[9])); break; - case Simcall::COMM_WAIT: - simcall_HANDLER_comm_wait(&simcall_, simgrid::simix::unmarshal(simcall_.args_[0]), simgrid::simix::unmarshal(simcall_.args_[1])); + case Simcall::COMM_ISEND: + simgrid::simix::marshal>(simcall_.result_, simcall_HANDLER_comm_isend(&simcall_, simgrid::simix::unmarshal(simcall_.args_[0]), simgrid::simix::unmarshal(simcall_.args_[1]), simgrid::simix::unmarshal(simcall_.args_[2]), simgrid::simix::unmarshal(simcall_.args_[3]), simgrid::simix::unmarshal(simcall_.args_[4]), simgrid::simix::unmarshal(simcall_.args_[5]), simgrid::simix::unmarshal(simcall_.args_[6]), simgrid::simix::unmarshal(simcall_.args_[7]), simgrid::simix::unmarshal(simcall_.args_[8]), simgrid::simix::unmarshal(simcall_.args_[9]), simgrid::simix::unmarshal(simcall_.args_[10]))); + simcall_answer(); break; case Simcall::COMM_TEST: @@ -98,6 +90,14 @@ void simgrid::kernel::actor::ActorImpl::simcall_handle(int times_considered_) simcall_HANDLER_comm_testany(&simcall_, simgrid::simix::unmarshal(simcall_.args_[0]), simgrid::simix::unmarshal(simcall_.args_[1])); break; + case Simcall::COMM_WAITANY: + simcall_HANDLER_comm_waitany(&simcall_, simgrid::simix::unmarshal(simcall_.args_[0]), simgrid::simix::unmarshal(simcall_.args_[1]), simgrid::simix::unmarshal(simcall_.args_[2])); + break; + + case Simcall::COMM_WAIT: + simcall_HANDLER_comm_wait(&simcall_, simgrid::simix::unmarshal(simcall_.args_[0]), simgrid::simix::unmarshal(simcall_.args_[1])); + break; + case Simcall::COND_WAIT: simcall_HANDLER_cond_wait(&simcall_, simgrid::simix::unmarshal(simcall_.args_[0]), simgrid::simix::unmarshal(simcall_.args_[1])); break; diff --git a/src/simix/simcalls.in b/src/simix/simcalls.in index d83300b0b8..48d8d243c3 100644 --- a/src/simix/simcalls.in +++ b/src/simix/simcalls.in @@ -37,14 +37,14 @@ int execution_waitany_for(simgrid::kernel::activity::ExecImpl** execs, size_t count, double timeout) [[block]]; -void comm_send(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, unsigned char* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout) [[block]]; -boost::intrusive_ptr comm_isend(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, unsigned char* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, bool detached); void comm_recv(smx_actor_t receiver, smx_mailbox_t mbox, unsigned char* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate) [[block]]; boost::intrusive_ptr comm_irecv(smx_actor_t receiver, smx_mailbox_t mbox, unsigned char* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate); -int comm_waitany(simgrid::kernel::activity::CommImpl** comms, size_t count, double timeout) [[block]]; -void comm_wait(simgrid::kernel::activity::CommImpl* comm, double timeout) [[block]]; +void comm_send(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, unsigned char* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout) [[block]]; +boost::intrusive_ptr comm_isend(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, unsigned char* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, bool detached); bool comm_test(simgrid::kernel::activity::CommImpl* comm) [[block]]; int comm_testany(simgrid::kernel::activity::CommImpl** comms, size_t count) [[block]]; +int comm_waitany(simgrid::kernel::activity::CommImpl** comms, size_t count, double timeout) [[block]]; +void comm_wait(simgrid::kernel::activity::CommImpl* comm, double timeout) [[block]]; void cond_wait(smx_cond_t cond, smx_mutex_t mutex) [[block]]; int cond_wait_timeout(smx_cond_t cond, smx_mutex_t mutex, double timeout) [[block]];