-/* Copyright (c) 2014-2021. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2014-2022. The SimGrid Team. All rights reserved. */
/* 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 XBT_PRIVATE TorusZone : public ClusterZone {
- std::vector<unsigned int> dimensions_;
+class XBT_PRIVATE TorusZone : public ClusterBase {
+ std::vector<unsigned long> dimensions_;
public:
- using ClusterZone::ClusterZone;
- void create_links_for_node(ClusterCreationArgs* cluster, int id, int rank, unsigned int position) override;
- void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
- void parse_specific_arguments(ClusterCreationArgs* cluster) override;
+ explicit TorusZone(const std::string& name) : ClusterBase(name){};
+ void create_torus_links(unsigned long id, int rank, unsigned long position);
+ void get_local_route(const NetPoint* src, const NetPoint* dst, Route* into, double* latency) override;
+ void set_topology(const std::vector<unsigned long>& dimensions);
+
+ /** @brief Convert topology parameters from string to vector of uint */
+ static std::vector<unsigned long> parse_topo_parameters(const std::string& topo_parameters);
};
+
} // namespace routing
} // namespace kernel
} // namespace simgrid