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
Fix NS3 and latency bound tracking
[simgrid.git]
/
examples
/
msg
/
bittorrent
/
bittorrent_platfgen.c
diff --git
a/examples/msg/bittorrent/bittorrent_platfgen.c
b/examples/msg/bittorrent/bittorrent_platfgen.c
index
8fac6a1
..
9afada0
100644
(file)
--- a/
examples/msg/bittorrent/bittorrent_platfgen.c
+++ b/
examples/msg/bittorrent/bittorrent_platfgen.c
@@
-1,7
+1,9
@@
-/* Copyright (c) 2012. The SimGrid Team.
+/* Copyright (c) 2012
-2014
. The SimGrid Team.
* All rights reserved. */
* All rights reserved. */
+
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
+
#include "bittorrent.h"
#include "peer.h"
#include "tracker.h"
#include "bittorrent.h"
#include "peer.h"
#include "tracker.h"
@@
-30,8
+32,9
@@
void promoter(context_node_t node)
host_parameters.id = NULL;
//Power from 3,000,000 to 10,000,000
host_parameters.id = NULL;
//Power from 3,000,000 to 10,000,000
- host_parameters.power_peak =
- 7000000 * RngStream_RandU01(rng_stream) + 3000000;
+ host_parameters.power_peak = xbt_dynar_new(sizeof(double), NULL);
+ xbt_dynar_push_as(host_parameters.power_peak, double,
+ 7000000 * RngStream_RandU01(rng_stream) + 3000000.0);
host_parameters.core_amount = 1;
host_parameters.power_scale = 1;
host_parameters.power_trace = NULL;
host_parameters.core_amount = 1;
host_parameters.power_scale = 1;
host_parameters.power_trace = NULL;