1 /* Copyright (c) 2013-2022. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
6 #ifndef SIMGRID_ROUTING_FULL_HPP_
7 #define SIMGRID_ROUTING_FULL_HPP_
9 #include <simgrid/kernel/routing/RoutedZone.hpp>
15 /** @ingroup ROUTING_API
16 * @brief NetZone with an explicit routing provided by the user
18 * The full communication matrix is provided at creation, so this model has the highest expressive power and the lowest
19 * computational requirements, but also the highest memory requirements (both in platform file and in memory).
21 class XBT_PRIVATE FullZone : public RoutedZone {
22 std::vector<std::vector<std::unique_ptr<Route>>> routing_table_;
23 void do_seal() override;
24 /** @brief Check and resize (if necessary) the routing table */
25 void check_routing_table();
28 using RoutedZone::RoutedZone;
29 FullZone(const FullZone&) = delete;
30 FullZone& operator=(const FullZone) = delete;
32 void get_local_route(const NetPoint* src, const NetPoint* dst, Route* into, double* latency) override;
33 void add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
34 const std::vector<s4u::LinkInRoute>& link_list, bool symmetrical) override;
36 } // namespace routing
38 } // namespace simgrid
40 #endif /* SIMGRID_ROUTING_FULL_HPP_ */