X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5faf49cdf3f8ad8751317b857a6d3134fe07eda3..73e97710413bba3ee2ae8baab0537fbd78811016:/src/surf/network_smpi.hpp diff --git a/src/surf/network_smpi.hpp b/src/surf/network_smpi.hpp index beae8e2286..cd2133d1c6 100644 --- a/src/surf/network_smpi.hpp +++ b/src/surf/network_smpi.hpp @@ -1,71 +1,33 @@ -#include "network.hpp" +/* Copyright (c) 2013-2021. The SimGrid Team. + * All rights reserved. */ -/*********** - * Classes * - ***********/ +/* 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. */ -class NetworkSmpiModel; -typedef NetworkSmpiModel *NetworkSmpiModelPtr; +#ifndef SIMGRID_SURF_NETWORK_SMPI_HPP +#define SIMGRID_SURF_NETWORK_SMPI_HPP -class NetworkSmpiLink; -typedef NetworkSmpiLink *NetworkSmpiLinkPtr; +#include -class NetworkSmpiLinkLmm; -typedef NetworkSmpiLinkLmm *NetworkSmpiLinkLmmPtr; +#include "network_cm02.hpp" -class NetworkSmpiAction; -typedef NetworkSmpiAction *NetworkSmpiActionPtr; +namespace simgrid { +namespace kernel { +namespace resource { -class NetworkSmpiActionLmm; -typedef NetworkSmpiActionLmm *NetworkSmpiActionLmmPtr; - -/********* - * Tools * - *********/ - -/********* - * Model * - *********/ - -class NetworkSmpiModel : public NetworkCm02Model { -public: - NetworkSmpiModel(){}; - void gapAppend(double size, const NetworkCm02LinkLmmPtr link, NetworkCm02ActionLmmPtr action); - void gapRemove(ActionLmmPtr action); - double latencyFactor(double size); - double bandwidthFactor(double size); - double bandwidthConstraint(double rate, double bound, double size); - void communicateCallBack() {}; -}; - - -/************ - * Resource * - ************/ - -class NetworkSmpiLinkLmm : public NetworkCm02LinkLmm { +class XBT_PRIVATE NetworkSmpiModel : public NetworkCm02Model { public: - NetworkSmpiLinkLmm(NetworkSmpiModelPtr model, const char *name, xbt_dict_t props, - lmm_system_t system, - double constraint_value, - tmgr_history_t history, - e_surf_resource_state_t state_init, - tmgr_trace_t state_trace, - double metric_peak, - tmgr_trace_t metric_trace, - double lat_initial, - tmgr_trace_t lat_trace, - e_surf_link_sharing_policy_t policy); -}; + using NetworkCm02Model::NetworkCm02Model; + double get_latency_factor(double size) override; + double get_bandwidth_factor(double size) override; -/********** - * Action * - **********/ - -class NetworkSmpiActionLmm : public NetworkCm02ActionLmm { -public: - NetworkSmpiActionLmm(ModelPtr model, double cost, bool failed); +protected: + void check_lat_factor_cb() override; + void check_bw_factor_cb() override; }; +} // namespace resource +} // namespace kernel +} // namespace simgrid - +#endif