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
pass netElm&CPU as parameter to the host constructor
[simgrid.git]
/
src
/
surf
/
sg_platf.cpp
diff --git
a/src/surf/sg_platf.cpp
b/src/surf/sg_platf.cpp
index
df16227
..
820a60e
100644
(file)
--- a/
src/surf/sg_platf.cpp
+++ b/
src/surf/sg_platf.cpp
@@
-137,10
+137,12
@@
void sg_platf_exit(void) {
void sg_platf_new_host(sg_platf_host_cbarg_t host)
{
void sg_platf_new_host(sg_platf_host_cbarg_t host)
{
+ RoutingEdge *net = NULL;
As* current_routing = routing_get_current();
if (current_routing)
As* current_routing = routing_get_current();
if (current_routing)
- routing_add_host(current_routing, host);
- surf_cpu_model_pm->createCpu(
+ net = routing_add_host(current_routing, host);
+
+ Cpu *cpu = surf_cpu_model_pm->createCpu(
host->id,
host->power_peak,
host->pstate,
host->id,
host->power_peak,
host->pstate,
@@
-150,7
+152,7
@@
void sg_platf_new_host(sg_platf_host_cbarg_t host)
host->initial_state,
host->state_trace,
host->properties);
host->initial_state,
host->state_trace,
host->properties);
- surf_host_model->createHost(host->id);
+ surf_host_model->createHost(host->id
, net, cpu
);
unsigned int iterator;
sg_platf_host_cb_t fun;
unsigned int iterator;
sg_platf_host_cb_t fun;