-#include "popping_bodies.cpp"
-
-/**
- * @ingroup simix_process_management
- * @brief Creates a synchro that may involve parallel computation on
- * several hosts and communication between them.
- *
- * @param name Name of the execution synchro to create
- * @param host_nb Number of hosts where the synchro will be executed
- * @param host_list Array (of size host_nb) of hosts where the synchro will be executed
- * @param flops_amount Array (of size host_nb) of computation amount of hosts (in bytes)
- * @param bytes_amount Array (of size host_nb * host_nb) representing the communication
- * amount between each pair of hosts
- * @param rate the SURF action rate
- * @param timeout timeout
- * @return A new SIMIX execution synchronization
- */
-smx_activity_t simcall_execution_parallel_start(const std::string& name, int host_nb, const sg_host_t* host_list,
- const double* flops_amount, const double* bytes_amount, double rate,
- double timeout)
-{
- /* checking for infinite values */
- for (int i = 0 ; i < host_nb ; ++i) {
- if (flops_amount != nullptr)
- xbt_assert(std::isfinite(flops_amount[i]), "flops_amount[%d] is not finite!", i);
- if (bytes_amount != nullptr) {
- for (int j = 0 ; j < host_nb ; ++j) {
- xbt_assert(std::isfinite(bytes_amount[i + host_nb * j]),
- "bytes_amount[%d+%d*%d] is not finite!", i, host_nb, j);
- }
- }
- }
-
- xbt_assert(std::isfinite(rate), "rate is not finite!");
-
- return simgrid::simix::simcall([name, host_nb, host_list, flops_amount, bytes_amount, rate, timeout] {
- return SIMIX_execution_parallel_start(std::move(name), host_nb, host_list, flops_amount, bytes_amount, rate,
- timeout);
- });
-}
-
-/**
- * @ingroup simix_host_management
- * @brief Waits for the completion of an execution synchro and destroy it.
- *
- * @param execution The execution synchro
- */
-e_smx_state_t simcall_execution_wait(smx_activity_t execution)
-{
- return (e_smx_state_t) simcall_BODY_execution_wait(execution);
-}
-
-e_smx_state_t simcall_execution_test(const smx_activity_t& execution)
-{
- return (e_smx_state_t)simcall_BODY_execution_test(static_cast<simgrid::kernel::activity::ExecImpl*>(execution.get()));
-}
-
-void simcall_process_join(smx_actor_t process, double timeout)
-{
- simcall_BODY_process_join(process, timeout);
-}
-
-/**
- * @ingroup simix_process_management
- * @brief Suspends an actor
- */
-void simcall_process_suspend(smx_actor_t process)
-{
- simcall_BODY_process_suspend(process);
-}
-
-/**
- * @ingroup simix_process_management
- * @brief Creates a new sleep SIMIX synchro.
- *
- * This function creates a SURF action and allocates the data necessary
- * to create the SIMIX synchro. It can raise a HostFailureException if the
- * host crashed. The default SIMIX name of the synchro is "sleep".
- *
- * @param duration Time duration of the sleep.
- * @return A result telling whether the sleep was successful
- */
-e_smx_state_t simcall_process_sleep(double duration)
-{
- /* checking for infinite values */
- xbt_assert(std::isfinite(duration), "duration is not finite!");
- return (e_smx_state_t) simcall_BODY_process_sleep(duration);
-}