/* - Receive the (small) ping first ....*/
double* sender_time =
- (static_cast<double*>(simgrid::s4u::Mailbox::byName(simgrid::s4u::this_actor::getHost()->getName())->get()));
+ static_cast<double*>(simgrid::s4u::Mailbox::byName(simgrid::s4u::this_actor::getHost()->getName())->get());
double communication_time = simgrid::s4u::Engine::getClock() - *sender_time;
XBT_INFO("Task received : small communication (latency bound)");
XBT_INFO(" Ping time (latency bound) %f", communication_time);
#include "simgrid/datatypes.h"
#include "simgrid/forward.h"
-SG_BEGIN_DECL()
-/* Actions and models are highly connected structures... */
-
-/* user-visible parameters */
-extern XBT_PRIVATE double sg_tcp_gamma;
-extern XBT_PRIVATE double sg_sender_gap;
-extern XBT_PRIVATE double sg_latency_factor;
-extern XBT_PRIVATE double sg_bandwidth_factor;
-extern XBT_PRIVATE double sg_weight_S_parameter;
-extern XBT_PRIVATE int sg_network_crosstraffic;
#ifdef __cplusplus
namespace simgrid {
namespace surf {
-
class Model;
class CpuModel;
class HostModel;
#endif
+SG_BEGIN_DECL()
+/* Actions and models are highly connected structures... */
+
+/* user-visible parameters */
+extern XBT_PRIVATE double sg_tcp_gamma;
+extern XBT_PRIVATE double sg_sender_gap;
+extern XBT_PRIVATE double sg_latency_factor;
+extern XBT_PRIVATE double sg_bandwidth_factor;
+extern XBT_PRIVATE double sg_weight_S_parameter;
+extern XBT_PRIVATE int sg_network_crosstraffic;
+
/** @ingroup SURF_c_bindings
* \brief Model datatype
*
namespace simgrid {
namespace surf {
-
-class XBT_PRIVATE HostModel;
-class XBT_PRIVATE HostImpl;
class XBT_PRIVATE HostAction;
}
}
* @brief SURF Host model interface class
* @details A model is an object which handle the interactions between its Resources and its Actions
*/
-class HostModel : public Model {
+class XBT_PRIVATE HostModel : public Model {
public:
HostModel() : Model() {}
* @brief SURF Host interface class
* @details An host represents a machine with a aggregation of a Cpu, a RoutingEdge and a Storage
*/
-class HostImpl : public simgrid::surf::PropertyHolder {
+class XBT_PRIVATE HostImpl : public simgrid::surf::PropertyHolder {
public:
explicit HostImpl(s4u::Host* host);
double_update(&maxDuration_, delta, sg_surf_precision);
//FIXME: duplicated code
- if ((remains_ <= 0) &&
- (lmm_get_variable_weight(getVariable()) > 0)) {
- finish();
- setState(Action::State::done);
- heapRemove(getModel()->getActionHeap());
- } else if (((maxDuration_ != NO_MAX_DURATION)
- && (maxDuration_ <= 0))) {
+ if (((remains_ <= 0) && (lmm_get_variable_weight(getVariable()) > 0)) ||
+ ((maxDuration_ > NO_MAX_DURATION) && (maxDuration_ <= 0))) {
finish();
setState(Action::State::done);
heapRemove(getModel()->getActionHeap());
/** @brief Join a set of strings as a single string */
char *xbt_str_join(xbt_dynar_t dyn, const char *sep)
{
- int len = 1, dyn_len = xbt_dynar_length(dyn);
+ int len = 1;
+ int dyn_len = xbt_dynar_length(dyn);
unsigned int cpt;
char* cursor;