From: Martin Quinson Date: Sun, 2 Oct 2016 16:42:34 +0000 (+0200) Subject: rename next_occuring_event_isIdempotent() into nextOccuringEventIsIdempotent() (... X-Git-Tag: v3_14~367 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/6766ab1720c600311e3a7c98f16265528736b42f?ds=sidebyside rename next_occuring_event_isIdempotent() into nextOccuringEventIsIdempotent() (+sort bits around) --- diff --git a/src/surf/HostImpl.hpp b/src/surf/HostImpl.hpp index 9307cd3a00..695e0c05fc 100644 --- a/src/surf/HostImpl.hpp +++ b/src/surf/HostImpl.hpp @@ -50,15 +50,12 @@ namespace surf { class HostModel : public Model { public: HostModel() : Model() {} - ~HostModel() override {} HostImpl *createHost(const char *name, kernel::routing::NetCard *net, Cpu *cpu); virtual void adjustWeightOfDummyCpuActions(); virtual Action *executeParallelTask(int host_nb, sg_host_t *host_list, double *flops_amount, double *bytes_amount, double rate); - - bool next_occuring_event_isIdempotent() override {return true;} }; /************ diff --git a/src/surf/cpu_interface.hpp b/src/surf/cpu_interface.hpp index 22317b574f..7fbfbe4e88 100644 --- a/src/surf/cpu_interface.hpp +++ b/src/surf/cpu_interface.hpp @@ -51,7 +51,6 @@ public: void updateActionsStateLazy(double now, double delta) override; void updateActionsStateFull(double now, double delta) override; - bool next_occuring_event_isIdempotent() {return true;}; }; /************ diff --git a/src/surf/host_clm03.cpp b/src/surf/host_clm03.cpp index ffdf58f54e..14de789cfe 100644 --- a/src/surf/host_clm03.cpp +++ b/src/surf/host_clm03.cpp @@ -52,7 +52,7 @@ double HostCLM03Model::nextOccuringEvent(double now){ adjustWeightOfDummyCpuActions(); double min_by_cpu = surf_cpu_model_pm->nextOccuringEvent(now); - double min_by_net = surf_network_model->next_occuring_event_isIdempotent() ? surf_network_model->nextOccuringEvent(now) : -1; + double min_by_net = surf_network_model->nextOccuringEventIsIdempotent() ? surf_network_model->nextOccuringEvent(now) : -1; double min_by_sto = surf_storage_model->nextOccuringEvent(now); XBT_DEBUG("model %p, %s min_by_cpu %f, %s min_by_net %f, %s min_by_sto %f", diff --git a/src/surf/network_cm02.cpp b/src/surf/network_cm02.cpp index e1eb56ab22..91a4622f8d 100644 --- a/src/surf/network_cm02.cpp +++ b/src/surf/network_cm02.cpp @@ -386,11 +386,6 @@ Action *NetworkCm02Model::communicate(kernel::routing::NetCard *src, kernel::rou return action; } -bool NetworkCm02Model::next_occuring_event_isIdempotent() -{ - return true; -} - void NetworkCm02Model::gapAppend(double size, const Link* link, NetworkAction* action) { // Nothing diff --git a/src/surf/network_cm02.hpp b/src/surf/network_cm02.hpp index 4a97f34326..b16be534ec 100644 --- a/src/surf/network_cm02.hpp +++ b/src/surf/network_cm02.hpp @@ -46,7 +46,6 @@ namespace simgrid { void updateActionsStateLazy(double now, double delta) override; void updateActionsStateFull(double now, double delta) override; Action *communicate(kernel::routing::NetCard *src, kernel::routing::NetCard *dst, double size, double rate) override; - bool next_occuring_event_isIdempotent() override; virtual void gapAppend(double size, const Link* link, NetworkAction* action); protected: bool haveGap_ = false; diff --git a/src/surf/network_constant.hpp b/src/surf/network_constant.hpp index 7a8644d0d2..e0d7d7d63d 100644 --- a/src/surf/network_constant.hpp +++ b/src/surf/network_constant.hpp @@ -31,7 +31,6 @@ namespace simgrid { Action *communicate(kernel::routing::NetCard *src, kernel::routing::NetCard *dst, double size, double rate) override; double nextOccuringEvent(double now) override; - bool next_occuring_event_isIdempotent() override {return true;} void updateActionsState(double now, double delta) override; Link* createLink(const char *name, double bw, double lat, e_surf_link_sharing_policy_t policy, xbt_dict_t properties) override; diff --git a/src/surf/network_ns3.hpp b/src/surf/network_ns3.hpp index e4254bea48..0660b01810 100644 --- a/src/surf/network_ns3.hpp +++ b/src/surf/network_ns3.hpp @@ -23,7 +23,7 @@ public: e_surf_link_sharing_policy_t policy, xbt_dict_t properties) override; Action *communicate(kernel::routing::NetCard *src, kernel::routing::NetCard *dst, double size, double rate); double nextOccuringEvent(double now) override; - bool next_occuring_event_isIdempotent() {return false;} + bool nextOccuringEventIsIdempotent() {return false;} void updateActionsState(double now, double delta) override; }; diff --git a/src/surf/ptask_L07.hpp b/src/surf/ptask_L07.hpp index a611d4771e..c03c0b1266 100644 --- a/src/surf/ptask_L07.hpp +++ b/src/surf/ptask_L07.hpp @@ -63,7 +63,6 @@ public: xbt_dict_t properties) override; Action *communicate(kernel::routing::NetCard *src, kernel::routing::NetCard *dst, double size, double rate) override; - bool next_occuring_event_isIdempotent() override {return true;} HostL07Model *hostModel_; }; diff --git a/src/surf/storage_interface.hpp b/src/surf/storage_interface.hpp index 46cbf19181..db2dbea6e1 100644 --- a/src/surf/storage_interface.hpp +++ b/src/surf/storage_interface.hpp @@ -68,8 +68,6 @@ public: const char* content_name, const char* content_type, xbt_dict_t properties, const char *attach) = 0; - bool next_occuring_event_isIdempotent() {return true;} - std::vector p_storageList; }; diff --git a/src/surf/surf_c_bindings.cpp b/src/surf/surf_c_bindings.cpp index e0c865ba00..a18cf79650 100644 --- a/src/surf/surf_c_bindings.cpp +++ b/src/surf/surf_c_bindings.cpp @@ -87,7 +87,7 @@ double surf_solve(double max_date) next_event_date = future_evt_set->next_date(); XBT_DEBUG("Next TRACE event: %f", next_event_date); - if(! surf_network_model->next_occuring_event_isIdempotent()){ // NS3, I see you + if(! surf_network_model->nextOccuringEventIsIdempotent()){ // NS3, I see you if (next_event_date!=-1.0 && time_delta!=-1.0) { time_delta = MIN(next_event_date - NOW, time_delta); } else { diff --git a/src/surf/surf_interface.hpp b/src/surf/surf_interface.hpp index 6f994749cf..daf878be70 100644 --- a/src/surf/surf_interface.hpp +++ b/src/surf/surf_interface.hpp @@ -342,7 +342,7 @@ public: * The only model that is not is NS3: computing the next timestamp moves the model up to that point, * so we need to call it only when the next timestamp of other sources is computed. */ - virtual bool next_occuring_event_isIdempotent()=0; + virtual bool nextOccuringEventIsIdempotent() { return true;} protected: ActionLmmListPtr modifiedSet_;