}
/* We use a map instead of a std::vector here because that's a sparse vector. Some values may not exist */
- /* The pair is {linkUp, linkDown} */
+ /* The pair is {link_up, link_down} */
std::unordered_map<unsigned int, std::pair<kernel::resource::LinkImpl*, kernel::resource::LinkImpl*>> private_links_;
unsigned int node_pos(int id) { return id * num_links_per_node_; }
void generateLinks();
void createLink(const std::string& id, int numlinks, resource::LinkImpl** linkup, resource::LinkImpl** linkdown);
- void rankId_to_coords(int rankId, unsigned int coords[4]);
+ void rankId_to_coords(int rank_id, unsigned int coords[4]);
private:
simgrid::s4u::Link::SharingPolicy sharing_policy_;
public:
/** @brief Make an host within that NetZone */
- simgrid::s4u::Host* create_host(const char* name, std::vector<double>* speedPerPstate, int coreAmount,
+ simgrid::s4u::Host* create_host(const char* name, std::vector<double>* speed_per_pstate, int core_count,
std::map<std::string, std::string>* props);
/** @brief Creates a new route in this NetZone */
void add_bypass_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
found = true;
}
if (not found || std::string(val) == "help") {
- std::string mesg;
+ std::string mesg = std::string("\n");
if (std::string(val) == "help")
- mesg = std::string("\nPossible values for option ") + name + ":\n";
+ mesg += std::string("Possible values for option ") + name + ":\n";
else
- mesg = std::string("\nInvalid value '") + val + "' for option " + name + ". Possible values:\n";
+ mesg += std::string("Invalid value '") + val + "' for option " + name + ". Possible values:\n";
for (auto kv : valid_values)
mesg += " - '" + std::string(kv.first) + "': " + kv.second +
(kv.first == value ? " <=== DEFAULT" : "") + "\n";
class StorageImpl : public kernel::resource::Resource, public PropertyHolder {
public:
/** @brief Storage constructor */
- StorageImpl(kernel::resource::Model* model, std::string name, kernel::lmm::System* maxminSystem, double bread,
+ StorageImpl(kernel::resource::Model* model, std::string name, kernel::lmm::System* maxmin_system, double bread,
double bwrite, std::string type_id, std::string content_name, sg_size_t size, std::string attach);
~StorageImpl() override;
class CpuCas01 : public Cpu {
public:
- CpuCas01(CpuCas01Model *model, simgrid::s4u::Host *host, std::vector<double> *speedPerPstate, int core);
+ CpuCas01(CpuCas01Model* model, simgrid::s4u::Host* host, std::vector<double>* speed_per_pstate, int core);
~CpuCas01() override;
void apply_event(tmgr_trace_event_t event, double value) override;
CpuAction* execution_start(double size) override;
- CpuAction* execution_start(double size, int requestedCore) override;
+ CpuAction* execution_start(double size, int requested_cores) override;
CpuAction* sleep(double duration) override;
bool is_used() override;
friend CpuAction *CpuCas01::sleep(double duration);
public:
CpuCas01Action(kernel::resource::Model* model, double cost, bool failed, double speed,
- kernel::lmm::Constraint* constraint, int coreAmount);
+ kernel::lmm::Constraint* constraint, int core_count);
CpuCas01Action(kernel::resource::Model* model, double cost, bool failed, double speed,
kernel::lmm::Constraint* constraint);
~CpuCas01Action() override;
* @param speedPerPstate Processor speed (in Flops) of each pstate. This ignores any potential external load coming from a trace.
* @param core The number of core of this Cpu
*/
- virtual Cpu* create_cpu(simgrid::s4u::Host* host, std::vector<double>* speedPerPstate, int core) = 0;
+ virtual Cpu* create_cpu(simgrid::s4u::Host* host, std::vector<double>* speed_per_pstate, int core) = 0;
void update_actions_state_lazy(double now, double delta) override;
void update_actions_state_full(double now, double delta) override;
* @param requestedCores The desired amount of cores. Must be >= 1
* @return The CpuAction corresponding to the processing
*/
- virtual simgrid::kernel::resource::Action* execution_start(double size, int requestedCores) = 0;
+ virtual simgrid::kernel::resource::Action* execution_start(double size, int requested_cores) = 0;
/**
* @brief Make a process sleep for duration (in seconds)
class CpuTiTmgr {
public:
CpuTiTmgr(trace_type type, double value) : type_(type), value_(value){};
- CpuTiTmgr(tmgr_trace_t speedTrace, double value);
+ CpuTiTmgr(tmgr_trace_t speed_trace, double value);
CpuTiTmgr(const CpuTiTmgr&) = delete;
CpuTiTmgr& operator=(const CpuTiTmgr&) = delete;
~CpuTiTmgr();
bool is_used() override;
CpuAction *execution_start(double size) override;
- simgrid::kernel::resource::Action* execution_start(double size, int requestedCores) override
+ simgrid::kernel::resource::Action* execution_start(double size, int requested_cores) override
{
THROW_UNIMPLEMENTED;
return nullptr;
};
XBT_PUBLIC void ns3_initialize(std::string TcpProtocol);
-XBT_PUBLIC void ns3_simulator(double maxSeconds);
+XBT_PUBLIC void ns3_simulator(double max_seconds);
XBT_PUBLIC void ns3_add_link(NetPointNs3* src, NetPointNs3* dst, double bw, double lat);
XBT_PUBLIC void ns3_add_cluster(const char* id, double bw, double lat);
class XBT_PRIVATE SgFlow {
public:
- SgFlow(uint32_t totalBytes, simgrid::kernel::resource::NetworkNS3Action* action);
+ SgFlow(uint32_t total_bytes, simgrid::kernel::resource::NetworkNS3Action* action);
// private:
std::uint32_t bufferedBytes_ = 0;
void StartFlow(ns3::Ptr<ns3::Socket> sock, const char* to, uint16_t port_number);
-static inline std::string transformSocketPtr(ns3::Ptr<ns3::Socket> localSocket)
+static inline std::string transformSocketPtr(ns3::Ptr<ns3::Socket> local_socket)
{
std::stringstream sstream;
- sstream << localSocket;
+ sstream << local_socket;
return sstream.str();
}
bool is_used() override;
void apply_event(tmgr_trace_event_t event, double value) override;
kernel::resource::Action* execution_start(double size) override;
- simgrid::kernel::resource::Action* execution_start(double size, int requestedCores) override
+ simgrid::kernel::resource::Action* execution_start(double size, int requested_cores) override
{
THROW_UNIMPLEMENTED;
return nullptr;