* instead of passing by an upper level switch.
*/
resource::LinkImpl* loopback;
- FatTreeNode(ClusterCreationArgs* cluster, int id, int level, int position);
+ FatTreeNode(const ClusterCreationArgs* cluster, int id, int level, int position);
};
/** @brief Link in a fat tree (@ref FatTreeZone).
*/
class FatTreeLink {
public:
- FatTreeLink(ClusterCreationArgs* cluster, FatTreeNode* source, FatTreeNode* destination);
+ FatTreeLink(const ClusterCreationArgs* cluster, FatTreeNode* source, FatTreeNode* destination);
/** Link going up in the tree */
resource::LinkImpl* up_link_;
/** Link going down in the tree */
bool symmetrical, bool change_order);
void get_route_check_params(NetPoint* src, NetPoint* dst);
void add_route_check_params(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
- std::vector<resource::LinkImpl*>& link_list, bool symmetrical);
+ const std::vector<resource::LinkImpl*>& link_list, bool symmetrical);
};
} // namespace routing
} // namespace kernel
XBT_OUT();
}
-activity::ActivityImplPtr ActorImpl::join(ActorImpl* actor, double timeout)
+activity::ActivityImplPtr ActorImpl::join(const ActorImpl* actor, double timeout)
{
activity::ActivityImplPtr sleep = this->sleep(timeout);
actor->on_exit->emplace_back([sleep](bool) {
s4u::Actor* restart();
void suspend();
void resume();
- activity::ActivityImplPtr join(ActorImpl* actor, double timeout);
+ activity::ActivityImplPtr join(const ActorImpl* actor, double timeout);
activity::ActivityImplPtr sleep(double duration);
/** Ask the actor to throw an exception right away */
void throw_exception(std::exception_ptr e);
// It only yields back to worker_context when the work array is exhausted.
// - So, resume() is only launched from the parmap for the first job of each minion.
parmap_->apply(
- [](smx_actor_t process) {
+ [](const actor::ActorImpl* process) {
SwappedContext* context = static_cast<SwappedContext*>(process->context_.get());
context->resume();
},
}
}
-static inline void saturated_variable_set_update(ConstraintLight* cnst_light_tab,
+static inline void saturated_variable_set_update(const ConstraintLight* cnst_light_tab,
const dyn_light_t& saturated_constraints, System* sys)
{
/* Add active variables (i.e. variables that need to be set) from the set of constraints to saturate
* A recursive algorithm to optimize the system recalculation selecting only constraints that have changed. Each
* constraint change is propagated to the list of constraints for each variable.
*/
-void System::update_modified_set_rec(Constraint* cnst)
+void System::update_modified_set_rec(const Constraint* cnst)
{
for (Element const& elem : cnst->enabled_element_set_) {
Variable* var = elem.variable;
/** @brief Update a constraint bound */
void update_constraint_bound(Constraint * cnst, double bound);
- int constraint_used(Constraint* cnst) { return cnst->active_constraint_set_hook_.is_linked(); }
+ int constraint_used(const Constraint* cnst) const { return cnst->active_constraint_set_hook_.is_linked(); }
/** @brief Print the lmm system */
void print() const;
*/
void update(Constraint * cnst, Variable * var, double value);
- void update_modified_set(Constraint * cnst);
- void update_modified_set_rec(Constraint * cnst);
+ void update_modified_set(Constraint* cnst);
+ void update_modified_set_rec(const Constraint* cnst);
/** @brief Remove all constraints of the modified_constraint_set. */
void remove_all_modified_set();
file.close();
}
-FatTreeNode::FatTreeNode(ClusterCreationArgs* cluster, int id, int level, int position)
+FatTreeNode::FatTreeNode(const ClusterCreationArgs* cluster, int id, int level, int position)
: id(id), level(level), position(position)
{
LinkCreationArgs linkTemplate;
}
}
-FatTreeLink::FatTreeLink(ClusterCreationArgs* cluster, FatTreeNode* downNode, FatTreeNode* upNode)
+FatTreeLink::FatTreeLink(const ClusterCreationArgs* cluster, FatTreeNode* downNode, FatTreeNode* upNode)
: up_node_(upNode), down_node_(downNode)
{
static int uniqueId = 0;
src->get_cname(), dst->get_cname(), src_as->get_cname(), dst_as->get_cname(), get_cname());
}
void RoutedZone::add_route_check_params(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
- std::vector<resource::LinkImpl*>& link_list, bool symmetrical)
+ const std::vector<resource::LinkImpl*>& link_list, bool symmetrical)
{
const char* srcName = src->get_cname();
const char* dstName = dst->get_cname();