#include "popping_enum.h" /* Definition of e_smx_simcall_t, with one value per simcall */
typedef int (*simix_match_func_t)(void*, void*, simgrid::kernel::activity::CommImpl*);
typedef void (*simix_copy_data_func_t)(smx_activity_t, void*, size_t);
#include "popping_enum.h" /* Definition of e_smx_simcall_t, with one value per simcall */
typedef int (*simix_match_func_t)(void*, void*, simgrid::kernel::activity::CommImpl*);
typedef void (*simix_copy_data_func_t)(smx_activity_t, void*, size_t);
XBT_PRIVATE void SIMIX_simcall_answer(smx_simcall_t simcall);
XBT_PRIVATE void SIMIX_simcall_handle(smx_simcall_t simcall, int value);
XBT_PRIVATE void SIMIX_simcall_exit(smx_activity_t synchro);
XBT_PRIVATE void SIMIX_simcall_answer(smx_simcall_t simcall);
XBT_PRIVATE void SIMIX_simcall_handle(smx_simcall_t simcall, int value);
XBT_PRIVATE void SIMIX_simcall_exit(smx_activity_t synchro);
XBT_PRIVATE void SIMIX_run_kernel(std::function<void()> const* code);
XBT_PRIVATE void SIMIX_run_blocking(std::function<void()> const* code);
}
XBT_PRIVATE void SIMIX_run_kernel(std::function<void()> const* code);
XBT_PRIVATE void SIMIX_run_blocking(std::function<void()> const* code);
}
-template<class T>
-class type {
- constexpr bool operator==(type) const { return true; }
- template<class U>
- constexpr bool operator==(type<U>) const { return false; }
- constexpr bool operator!=(type) const { return false; }
- template<class U>
- constexpr bool operator!=(type<U>) const { return true; }
+template <class T> class type {
+ constexpr bool operator==(type) const { return true; }
+ template <class U> constexpr bool operator==(type<U>) const { return false; }
+ constexpr bool operator!=(type) const { return false; }
+ template <class U> constexpr bool operator!=(type<U>) const { return true; }
#define SIMIX_MARSHAL(T, field) \
inline void marshal(type<T>, u_smx_scalar& simcall, T value) { simcall.field = value; } \
inline T unmarshal(type<T>, u_smx_scalar const& simcall) { return simcall.field; } \
#define SIMIX_MARSHAL(T, field) \
inline void marshal(type<T>, u_smx_scalar& simcall, T value) { simcall.field = value; } \
inline T unmarshal(type<T>, u_smx_scalar const& simcall) { return simcall.field; } \
-template<class T> inline
-void marshal(type<T*>, u_smx_scalar& simcall, T* value)
+template <class T> inline void marshal(type<T*>, u_smx_scalar& simcall, T* value)
-template<class R, class... T> inline
-void marshal(type<R(*)(T...)>, u_smx_scalar& simcall, R(*value)(T...))
+template <class R, class... T> inline void marshal(type<R (*)(T...)>, u_smx_scalar& simcall, R (*value)(T...))
-template<class R, class... T> inline
-auto unmarshal(type<R(*)(T...)>, u_smx_scalar simcall) -> R(*)(T...)
+template <class R, class... T> inline auto unmarshal(type<R (*)(T...)>, u_smx_scalar simcall) -> R (*)(T...)
}
template <class R, class... T> inline auto unmarshal_raw(type<R (*)(T...)>, u_smx_scalar simcall) -> R (*)(T...)
{
return (R(*)(T...))simcall.fp;
}
}
template <class R, class... T> inline auto unmarshal_raw(type<R (*)(T...)>, u_smx_scalar simcall) -> R (*)(T...)
{
return (R(*)(T...))simcall.fp;
}
-template<std::size_t I, class A>
-inline void marshalArgs(smx_simcall_t simcall, A const& a)
+template <std::size_t I, class A> inline void marshalArgs(smx_simcall_t simcall, A const& a)
-template<std::size_t I, class A, class... B>
-inline void marshalArgs(smx_simcall_t simcall, A const& a, B const&... b)
+template <std::size_t I, class A, class... B> inline void marshalArgs(smx_simcall_t simcall, A const& a, B const&... b)
-template<class... A> inline
-void marshal(smx_simcall_t simcall, e_smx_simcall_t call, A const&... a)
+template <class... A> inline void marshal(smx_simcall_t simcall, e_smx_simcall_t call, A const&... a)
{
simcall->call = call;
memset(&simcall->result, 0, sizeof(simcall->result));
memset(simcall->args, 0, sizeof(simcall->args));
marshalArgs<0>(simcall, a...);
}
{
simcall->call = call;
memset(&simcall->result, 0, sizeof(simcall->result));
memset(simcall->args, 0, sizeof(simcall->args));
marshalArgs<0>(simcall, a...);
}