Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
[simgrid.git] / src / smpi / private.hpp
1 /* Copyright (c) 2016. The SimGrid Team. All rights reserved.               */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #ifndef SMPI_PRIVATE_HPP
7 #define SMPI_PRIVATE_HPP
8
9 #include "src/instr/instr_smpi.h"
10 #include <unordered_map>
11 #include <vector>
12
13 /**
14  * Get the address of the beginning of the memory page where addr is located.
15  * Note that we use an integer division here, so (a/b)*b is not a, unless a%b == 0
16  *
17  * This is used when privatizing.
18  */
19 #define TOPAGE(addr) (void *)(((unsigned long)(addr) / xbt_pagesize) * xbt_pagesize)
20
21 #if HAVE_PAPI
22 typedef 
23     std::vector<std::pair</* counter name */std::string, /* counter value */long long>> papi_counter_t;
24 XBT_PRIVATE papi_counter_t& smpi_process_papi_counters();
25 XBT_PRIVATE int smpi_process_papi_event_set();
26 #endif
27
28 extern std::unordered_map<std::string, double> location2speedup;
29
30 /** @brief Returns the last call location (filename, linenumber). Process-specific. */
31 extern "C" {
32 XBT_PUBLIC(smpi_trace_call_location_t*) smpi_process_get_call_location();
33 XBT_PUBLIC(smpi_trace_call_location_t*) smpi_trace_get_call_location();
34 }
35 #endif
36