Next: Communication between Collection Up: Collections. Ver 1.0+ Previous: The Structure of

Collection Constructors. Ver 1.0+

Every collection must have a constructor and each constructor must have at least two standard arguments: a pointer to a distribution and a pointer to an alignment. These two arguments must be passed to the parent collection, which, in tern, passes them to the SuperKernel collection. For example, to build a collection constructor that initializes the local TEClass data one could write as follows.

Collection C: DistributedArray{
   int z;
   float x;
      C(Distribution *D, Align *A, int i, float j);

C::C(Distribution *D, Align *A, int i, float j): DistributedArray(D, A){
         z = i;
         x = j;

A BUG in the version 1.0 pC++ compiler will not allow constructors to be defined inline in the Collection body.

Constructors for the ElementType of a collection are restricted as well. See section 4.3.
Mon Nov 21 09:49:54 EST 1994