X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/8ce2c767b3688a843e90e06e124e9bd8b56ecf38..1957cbeaedc9d28cea7839684d82ac8454cc8bef:/src/kernel/routing/ClusterZone.hpp?ds=sidebyside diff --git a/src/kernel/routing/ClusterZone.hpp b/src/kernel/routing/ClusterZone.hpp index 9fe165366d..d5523ba1ba 100644 --- a/src/kernel/routing/ClusterZone.hpp +++ b/src/kernel/routing/ClusterZone.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2016. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2013-2017. 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. */ @@ -82,6 +82,10 @@ public: /* The pair is {linkUp, linkDown} */ std::unordered_map> privateLinks_; + int nodePosition(int id) { return id * linkCountPerNode_; } + int nodePositionWithLoopback(int id) { return nodePosition(id) + (hasLoopback_ ? 1 : 0); } + int nodePositionWithLimiter(int id) { return nodePositionWithLoopback(id) + (hasLimiter_ ? 1 : 0); } + surf::LinkImpl* backbone_ = nullptr; void* loopback_ = nullptr; NetPoint* router_ = nullptr;