.. default-domain:: chpl .. module:: DistributedBag :synopsis: Implements a highly parallel segmented multi-pool specialized for depth-first DistributedBag ============== **Usage** .. code-block:: chapel use DistributedBag; or .. code-block:: chapel import DistributedBag; Implements a highly parallel segmented multi-pool specialized for depth-first search (DFS), sometimes referenced as ``DistBag_DFS``. Summary _______ A parallel-safe distributed multi-pool implementation specialized for depth-first search (DFS), that scales in terms of nodes, processors per node (PPN), and workload; the more PPN, the more segments we allocate to increase raw parallelism, and the larger the workload the better locality (see :const:`distributedBagInitialSegmentCap`). This data structure is locally ordered (ensuring DFS), encapsulates a dynamic work stealing mechanism to balance work across nodes, and provides a means to obtain a privatized instance of the data structure for maximized performance. .. note:: This module is a work in progress and may change in future releases. Usage _____ To use :record:`distBag`, the initializer must be invoked explicitly to properly initialize the data structure. By default, one bag instance is initialized per locale, and one segment per task. .. code-block:: chapel var bag = new distBag(int, targetLocales=ourTargetLocales); The basic methods that distBag supports require a ``taskId`` argument. This ``taskId`` will serve as an index to the segment to be updated and it must be in ``0..