Skip to content

Phase 4 of UDPOR Integration: Variable For-loop

Maxwell Pirtle requested to merge maxwellpirtle/simgrid:udpor-phase4 into master

Overview

This MR adds in the iterator variable_for_loop<...> and a convenience container simgrid::xbt::iterator_wrapping<...>. The former provides a means of iterating over all possible ways to select one element from each of k collections, acting much like a nested for-loop. The advantage of the iterator is that the number of nested loops can be determined dynamically and it comes with the benefits of all the nice C++ functions that operate on iterators. The latter prevents the need to write boilerplate classes to treat the iterators as collections that could be used e.g. in a for-auto loop.

Changes

The primary addition is the variable_for_loop<...>. This is what will be used most heavily in the next phases, so it should be scrutinized appropriately. You should ensure that there aren't any more obvious compilation issues you see arising on other platforms, since getting the templates correct is not always so easy.

Future Changes

The variable_for_loop<...> will be used in the next phase to determine conflicts among a collection of events and to compute K-partial alternatives. The former will be developed first in addition to the completing (for the most part) the "brute-force" method of computing ex(C) and en(C). The latter will use the iterator to traverse the A-comb data structure according to the paper "Quasi-Optimal DPOR" by Nguyen et al. Things are coming together nicely, and there is a clear roadmap ahead.

Merge request reports