#include <xbt/base.h>
#include <xbt/dict.h>
+#ifdef __cplusplus
+#include <xbt/Extendable.hpp>
+
+#include <map>
+#include <memory>
+#include <string>
+#endif
+
// C interface
////////////////
typedef sg_file_t msg_file_t; // MSG backwards compatibility
//////////////////
#ifdef __cplusplus
-#include <xbt/Extendable.hpp>
-
-#include <map>
-#include <memory>
-#include <string>
namespace simgrid {
namespace s4u {
#include <unistd.h>
#include <xbt/misc.h>
+#ifdef __cplusplus
+#include <vector>
+#endif
+
#ifdef _WIN32
#define MPI_CALL(type, name, args) \
type name args; \
/* C++ declarations for shared_malloc */
#ifdef __cplusplus
-#include <vector>
-
XBT_PUBLIC int smpi_is_shared(void* ptr, std::vector<std::pair<size_t, size_t>>& private_blocks, size_t* offset);
std::vector<std::pair<size_t, size_t>> shift_and_frame_private_blocks(const std::vector<std::pair<size_t, size_t>>& vec,
size_t offset, size_t buff_size);
std::vector<std::pair<size_t, size_t>> merge_private_blocks(const std::vector<std::pair<size_t, size_t>>& src,
const std::vector<std::pair<size_t, size_t>>& dst);
-
#endif
#endif
#ifndef SIMGRID_LUA_HPP
#define SIMGRID_LUA_HPP
-extern "C" {
-#include <lua.h>
+#include <lua.hpp>
/* ********************************************************************************* */
/* Plaftorm functions */
/* ********************************************************************************* */
+extern "C" {
int console_open(lua_State* L);
int console_close(lua_State* L);
#include <boost/intrusive_ptr.hpp>
/********************************* Simcalls *********************************/
-XBT_PUBLIC_DATA const char* simcall_names[]; /* Name of each simcall */
-
#include "popping_enum.h" /* Definition of e_smx_simcall_t, with one value per simcall */
+XBT_PUBLIC_DATA const char* simcall_names[]; /* Name of each simcall */
+
typedef int (*simix_match_func_t)(void*, void*, simgrid::kernel::activity::CommImpl*);
typedef void (*simix_copy_data_func_t)(simgrid::kernel::activity::CommImpl*, void*, size_t);
typedef void (*simix_clean_func_t)(void*);
#include "xbt/config.hpp"
#include <algorithm>
+#include <boost/algorithm/string.hpp> /* trim_right / trim_left */
+#include <boost/tokenizer.hpp>
#include <cfloat> /* DBL_MAX */
#include <cinttypes>
#include <cstdint> /* intmax_t */
#include <fstream>
#include <sys/stat.h>
+#if SG_HAVE_SENDFILE
+#include <sys/sendfile.h>
+#endif
+
+#if HAVE_PAPI
+#include "papi.h"
+#endif
+
#if not defined(__APPLE__) && not defined(__HAIKU__)
#include <link.h>
#endif
constexpr bool HAVE_WORKING_MMAP = true;
#endif
-#if SG_HAVE_SENDFILE
-#include <sys/sendfile.h>
-#endif
-
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_kernel, smpi, "Logging specific to SMPI (kernel)");
-#include <boost/tokenizer.hpp>
-#include <boost/algorithm/string.hpp> /* trim_right / trim_left */
#if SMPI_IFORT
extern "C" void for_rtl_init_ (int *, char **);
#endif
#if HAVE_PAPI
-#include "papi.h"
std::string papi_default_config_name = "default";
std::map</* computation unit name */ std::string, papi_process_data> units2papi_setup;
#endif