A not-necessarily disjoint collective of boxes
A BoxLayout is a collection of Box objects that are assigned to a process number. Each box is associated with only one process. processes are numbered from 0 to n-1 (for an n process parallel job)BoxLayout can be either open or closed. null construction or deepcopy creates an open BoxLayout. Boxes may be added to an open BoxLayout. non-const operations may be performed on the boxes existing in an open BoxLayout. closed BoxLayouts are sorted. Many uses of BoxLayouts require a closed BoxLayout. A closed BoxLayout cannot be modified.
Ref-counting ------------ BoxLayout is an explicitly ref-counted object.
Assignment and copy are compiler generated. They increment the refcount on the contained data members. They perform shallow, ref-counted operations.
Refcounting is a process whereby multiple instaniations make use of a single implementation of that object and keep a tally of how many instantiations are sharing. Thus
BoxLayout b1(boxes, procIDs); b1 ----> refcount = 1 ----> m_boxes ----> m_processors BoxLayout b2(b1) b1 ----> refcount = 2 <---- b2 ----> m_boxes <---- ----> m_processors <---- BoxLayout b3; b3 = b2; b1 ----> refcount = 3 <---- b2 ----> m_boxes <---- ----> m_processors <---- ^^^ ||| b3
BoxLayout b1(boxes, procIDs);
b1 ----> refcount = 1 ----> m_boxes ----> m_processors BoxLayout b2(b1) b1 ----> refcount = 2 <---- b2 ----> m_boxes <---- ----> m_processors <---- BoxLayout b3; b3.deepCopy(b2); b1 ----> refcount = 2 <---- b2 b3 ----> refcount = 1 ----> m_boxes <---- ----> m_boxes ----> m_processors <---- ----> m_processors
This software is copyright (C) by the Lawrence Berkeley National Laboratory. Permission is granted to reproduce this software for non-commercial purposes provided that this notice is left intact.
It is acknowledged that the U.S. Government has rights to this software under Contract DE-AC03-765F00098 between the U.S. Department of Energy and the University of California.
This software is provided as a professional and academic contribution for joint exchange. Thus it is experimental, is provided ``as is'', with no warranties of any kind whatsoever, no support, no promise of updates, or printed documentation. By using this software, you acknowledge that the Lawrence Berkeley National Laboratory and Regents of the University of California shall have no liability with respect to the infringement of other copyrights by any part of this software.