A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
please sonar, even if it is really pesky sometimes
[simgrid.git]
/
src
/
simgrid
/
host.cpp
diff --git
a/src/simgrid/host.cpp
b/src/simgrid/host.cpp
index
09bb732
..
e655063
100644
(file)
--- a/
src/simgrid/host.cpp
+++ b/
src/simgrid/host.cpp
@@
-11,13
+11,13
@@
#include <xbt/Extendable.hpp>
#include <simgrid/s4u/host.hpp>
#include <xbt/Extendable.hpp>
#include <simgrid/s4u/host.hpp>
+#include "src/kernel/routing/NetCard.hpp"
#include "src/surf/HostImpl.hpp"
#include "src/surf/HostImpl.hpp"
-#include "surf/surf.h" // routing_get_network_element_type FIXME:killme
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sg_host, sd, "Logging specific to sg_hosts");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sg_host, sd, "Logging specific to sg_hosts");
-extern std::unordered_map<s
imgrid::xbt
::string, simgrid::s4u::Host*>
- host_list; // FIXME: don't dup
p
licate the content of s4u::Host this way
+extern std::unordered_map<s
td
::string, simgrid::s4u::Host*>
+ host_list; // FIXME: don't duplicate the content of s4u::Host this way
void sg_host_exit()
{
void sg_host_exit()
{
@@
-61,7
+61,7
@@
sg_host_t *sg_host_list() {
const char *sg_host_get_name(sg_host_t host)
{
const char *sg_host_get_name(sg_host_t host)
{
- return host->
name().c_str
();
+ return host->
cname
();
}
void* sg_host_extension_get(sg_host_t host, size_t ext)
}
void* sg_host_extension_get(sg_host_t host, size_t ext)
@@
-81,8
+81,8
@@
sg_host_t sg_host_by_name(const char *name)
static int hostcmp_voidp(const void* pa, const void* pb)
{
static int hostcmp_voidp(const void* pa, const void* pb)
{
- return strcmp((*static_cast<simgrid::s4u::Host* const*>(pa))->
name().c_str
(),
- (*static_cast<simgrid::s4u::Host* const*>(pb))->
name().c_str
());
+ return strcmp((*static_cast<simgrid::s4u::Host* const*>(pa))->
cname
(),
+ (*static_cast<simgrid::s4u::Host* const*>(pb))->
cname
());
}
xbt_dynar_t sg_hosts_as_dynar()
}
xbt_dynar_t sg_hosts_as_dynar()
@@
-101,7
+101,6
@@
xbt_dynar_t sg_hosts_as_dynar()
// ========= Layering madness ==============*
#include "src/surf/cpu_interface.hpp"
// ========= Layering madness ==============*
#include "src/surf/cpu_interface.hpp"
-#include "src/surf/surf_routing.hpp"
// ========== User data Layer ==========
void *sg_host_user(sg_host_t host) {
// ========== User data Layer ==========
void *sg_host_user(sg_host_t host) {
@@
-198,10
+197,10
@@
void sg_host_dump(sg_host_t host)
xbt_dict_cursor_t cursor=nullptr;
char *key,*data;
xbt_dict_cursor_t cursor=nullptr;
char *key,*data;
- XBT_INFO("Displaying host %s",
sg_host_get_name(host
));
+ XBT_INFO("Displaying host %s",
host->cname(
));
XBT_INFO(" - speed: %.0f", host->speed());
XBT_INFO(" - available speed: %.2f", sg_host_get_available_speed(host));
XBT_INFO(" - speed: %.0f", host->speed());
XBT_INFO(" - available speed: %.2f", sg_host_get_available_speed(host));
- props =
sg_host_get_properties(host
);
+ props =
host->properties(
);
if (!xbt_dict_is_empty(props)){
XBT_INFO(" - properties:");
if (!xbt_dict_is_empty(props)){
XBT_INFO(" - properties:");