No need to overload higher classes with useless cruft
***********/
class XBT_PRIVATE NetworkCm02Model;
class XBT_PRIVATE NetworkCm02Action;
***********/
class XBT_PRIVATE NetworkCm02Model;
class XBT_PRIVATE NetworkCm02Action;
+class XBT_PRIVATE NetworkSmpiModel;
public:
NetworkCm02Model(int /*i*/) : NetworkModel() {};
NetworkCm02Model();
public:
NetworkCm02Model(int /*i*/) : NetworkModel() {};
NetworkCm02Model();
- ~NetworkCm02Model() {
- }
+ ~NetworkCm02Model() { }
Link* createLink(const char *name,
double bw_initial,
tmgr_trace_t bw_trace,
Link* createLink(const char *name,
double bw_initial,
tmgr_trace_t bw_trace,
Action *communicate(RoutingEdge *src, RoutingEdge *dst,
double size, double rate);
bool shareResourcesIsIdempotent() {return true;}
Action *communicate(RoutingEdge *src, RoutingEdge *dst,
double size, double rate);
bool shareResourcesIsIdempotent() {return true;}
+ virtual void gapAppend(double /*size*/, const Link* /*link*/, NetworkAction * /*action*/) {};
+ bool m_haveGap = false;
void updateState(tmgr_trace_event_t event_type, double value, double date);
void updateBandwidth(double value, double date=surf_get_clock());
void updateLatency(double value, double date=surf_get_clock());
void updateState(tmgr_trace_event_t event_type, double value, double date);
void updateBandwidth(double value, double date=surf_get_clock());
void updateLatency(double value, double date=surf_get_clock());
+ virtual void gapAppend(double /*size*/, const Link* /*link*/, NetworkAction * /*action*/) {};
+
+
};
/**********
* Action *
**********/
};
/**********
* Action *
**********/
class NetworkCm02Action : public NetworkAction {
friend Action *NetworkCm02Model::communicate(RoutingEdge *src, RoutingEdge *dst, double size, double rate);
class NetworkCm02Action : public NetworkAction {
friend Action *NetworkCm02Model::communicate(RoutingEdge *src, RoutingEdge *dst, double size, double rate);
+ friend NetworkSmpiModel;
public:
NetworkCm02Action(Model *model, double cost, bool failed)
: NetworkAction(model, cost, failed) {};
void updateRemainingLazy(double now);
public:
NetworkCm02Action(Model *model, double cost, bool failed)
: NetworkAction(model, cost, failed) {};
void updateRemainingLazy(double now);
+protected:
+ double m_senderGap;
};
#endif /* SURF_NETWORK_CM02_HPP_ */
};
#endif /* SURF_NETWORK_CM02_HPP_ */
e_surf_link_sharing_policy_t policy,
xbt_dict_t properties)=0;
e_surf_link_sharing_policy_t policy,
xbt_dict_t properties)=0;
- virtual void gapAppend(double /*size*/, const Link* /*link*/, NetworkAction * /*action*/) {};
-
/**
* @brief Create a communication between two hosts.
* @details It makes calls to the routing part, and execute the communication
/**
* @brief Create a communication between two hosts.
* @details It makes calls to the routing part, and execute the communication
*/
virtual double bandwidthConstraint(double rate, double bound, double size);
double shareResourcesFull(double now);
*/
virtual double bandwidthConstraint(double rate, double bound, double size);
double shareResourcesFull(double now);
- bool m_haveGap = false;
double m_weight;
double m_rate;
const char* p_senderLinkName;
double m_weight;
double m_rate;
const char* p_senderLinkName;
double m_senderSize;
xbt_fifo_item_t p_senderFifoItem;
#ifdef HAVE_LATENCY_BOUND_TRACKING
double m_senderSize;
xbt_fifo_item_t p_senderFifoItem;
#ifdef HAVE_LATENCY_BOUND_TRACKING
-void NetworkSmpiModel::gapAppend(double size, Link* link, NetworkAction *action)
+void NetworkSmpiModel::gapAppend(double size, Link* link, NetworkAction *act)
{
const char *src = link->getName();
xbt_fifo_t fifo;
{
const char *src = link->getName();
xbt_fifo_t fifo;
+ NetworkCm02Action *action= static_cast<NetworkCm02Action*>(act);
if (sg_sender_gap > 0.0) {
if (!gap_lookup) {
if (sg_sender_gap > 0.0) {
if (!gap_lookup) {
NetworkSmpiModel();
~NetworkSmpiModel();
NetworkSmpiModel();
~NetworkSmpiModel();
- using NetworkModel::gapAppend; // Explicit about overloaded method (silence Woverloaded-virtual from clang)
+ using NetworkCm02Model::gapAppend; // Explicit about overloaded method (silence Woverloaded-virtual from clang)
void gapAppend(double size, Link* link, NetworkAction *action);
void gapRemove(Action *action);
double latencyFactor(double size);
void gapAppend(double size, Link* link, NetworkAction *action);
void gapRemove(Action *action);
double latencyFactor(double size);