One of the key ideas behind collection classes is to enable the programmer to build a distributed data structure where data movement operators can be closely linked to the semantics of the data type. For example, elements of a DistributedGrid need to access their neighbors. A Tree node will often reference its children or parent. Each application has a topology of communication and global operators that must be supported efficiently by the collection structure.
If c is a collection of type C<E>, then any processor
thread may access the element of c by the Kernel
functions
c->Get_Element(i); c->Get_ElementPart(i, offset, size);The first function accesses the
x = c(i,j) + c(i+1,j)work by calling the Get_Element function if a reference is not to a local element.