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
Comment unused parameters.
[simgrid.git]
/
src
/
surf
/
network_constant.cpp
diff --git
a/src/surf/network_constant.cpp
b/src/surf/network_constant.cpp
index
fc4babc
..
97deb3d
100644
(file)
--- a/
src/surf/network_constant.cpp
+++ b/
src/surf/network_constant.cpp
@@
-2,10
+2,9
@@
#include "surf/random_mgr.h"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_network);
#include "surf/random_mgr.h"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_network);
-static random_data_t random_latency = NULL;
static int host_number_int = 0;
static int host_number_int = 0;
-static void netcste_count_hosts(sg_platf_host_cbarg_t
h
) {
+static void netcste_count_hosts(sg_platf_host_cbarg_t
/*h*/
) {
host_number_int++;
}
host_number_int++;
}
@@
-17,24
+16,22
@@
void surf_network_model_init_Constant()
xbt_assert(surf_network_model == NULL);
surf_network_model = new NetworkConstantModel();
xbt_assert(surf_network_model == NULL);
surf_network_model = new NetworkConstantModel();
- if (!random_latency)
- random_latency = random_new(RAND, 100, 0.0, 1.0, .125, .034);
+ sg_platf_host_add_cb(netcste_count_hosts);
- //FIXME:sg_platf_host_add_cb(netcste_count_hosts);
+ ModelPtr model = static_cast<ModelPtr>(surf_network_model);
+ xbt_dynar_push(model_list, &model);
- xbt_dynar_push(model_list, &surf_network_model);
-
- //FIXME:routing_model_create(NULL);
+ routing_model_create(NULL);
}
}
-double NetworkConstantModel::shareResources(double
now
)
+double NetworkConstantModel::shareResources(double
/*now*/
)
{
void *_action = NULL;
NetworkConstantActionLmmPtr action = NULL;
double min = -1.0;
xbt_swag_foreach(_action, p_runningActionSet) {
{
void *_action = NULL;
NetworkConstantActionLmmPtr action = NULL;
double min = -1.0;
xbt_swag_foreach(_action, p_runningActionSet) {
- action =
(NetworkConstantActionLmmPtr) _action
;
+ action =
dynamic_cast<NetworkConstantActionLmmPtr>(static_cast<ActionPtr>(_action))
;
if (action->m_latency > 0) {
if (min < 0)
min = action->m_latency;
if (action->m_latency > 0) {
if (min < 0)
min = action->m_latency;
@@
-46,13
+43,13
@@
double NetworkConstantModel::shareResources(double now)
return min;
}
return min;
}
-void NetworkConstantModel::updateActionsState(double
now
, double delta)
+void NetworkConstantModel::updateActionsState(double
/*now*/
, double delta)
{
void *_action, *_next_action;
NetworkConstantActionLmmPtr action = NULL;
xbt_swag_foreach_safe(_action, _next_action, p_runningActionSet) {
{
void *_action, *_next_action;
NetworkConstantActionLmmPtr action = NULL;
xbt_swag_foreach_safe(_action, _next_action, p_runningActionSet) {
- action =
(NetworkConstantActionLmmPtr) _action
;
+ action =
dynamic_cast<NetworkConstantActionLmmPtr>(static_cast<ActionPtr>(_action))
;
if (action->m_latency > 0) {
if (action->m_latency > delta) {
double_update(&(action->m_latency), delta);
if (action->m_latency > 0) {
if (action->m_latency > delta) {
double_update(&(action->m_latency), delta);
@@
-76,7
+73,7
@@
void NetworkConstantModel::updateActionsState(double now, double delta)
}
}
}
}
-
NetworkCm02ActionLmm
Ptr NetworkConstantModel::communicate(RoutingEdgePtr src, RoutingEdgePtr dst,
+
Action
Ptr NetworkConstantModel::communicate(RoutingEdgePtr src, RoutingEdgePtr dst,
double size, double rate)
{
char *src_name = src->p_name;
double size, double rate)
{
char *src_name = src->p_name;
@@
-97,8
+94,8
@@
bool NetworkConstantLinkLmm::isUsed()
return 0;
}
return 0;
}
-void NetworkConstantLinkLmm::updateState(tmgr_trace_event_t
event_type
,
-
double value, double time
)
+void NetworkConstantLinkLmm::updateState(tmgr_trace_event_t
/*event_type*/
,
+
double /*value*/, double /*time*/
)
{
DIE_IMPOSSIBLE;
}
{
DIE_IMPOSSIBLE;
}
@@
-129,7
+126,7
@@
int NetworkConstantActionLmm::unref()
{
m_refcount--;
if (!m_refcount) {
{
m_refcount--;
if (!m_refcount) {
- xbt_swag_remove(
this
, p_stateSet);
+ xbt_swag_remove(
static_cast<ActionPtr>(this)
, p_stateSet);
delete this;
return 1;
}
delete this;
return 1;
}
@@
-142,7
+139,7
@@
void NetworkConstantActionLmm::cancel()
}
#ifdef HAVE_TRACING
}
#ifdef HAVE_TRACING
-void NetworkConstantActionLmm::setCategory(const char *
category
)
+void NetworkConstantActionLmm::setCategory(const char *
/*category*/
)
{
//ignore completely the categories in constant model, they are not traced
}
{
//ignore completely the categories in constant model, they are not traced
}