next up previous contents
Next: Type restrictions: Up: class WriteHalo Previous: class WriteHalo

Constructor

WriteHalo(const DAD* src, const int len,
          const int wlo [], const int whi [],
          const Mode [] mode)
The array is described by the DAD *src. len specifies the size of each array element, in bytes. The vectors wlo, whi and mode have extent R--the rank of the array.

Vectors wlo and wlo define the halo of ghost cells updated by the schedule. The upper and lower widths in dimension r are given by wlo [r] and whi [r]. These values are non-negative, and can only be non-zero if array src actually has suitable ghost extensions in the dimension concerned. More specifically, if the array src was created using a range with ghost extensions tex2html_wrap_inline14197 , tex2html_wrap_inline14199 --eg, a range created by by a constructor call such as BlockRange(N, d, tex2html_wrap_inline14197 , tex2html_wrap_inline14203 --as its rth dimension, it is required that

eqnarray852

The situation is complicated if the array is a section, or some other array with non-trivial alignment stride. In practise it is unusual to construct WriteHalo schedules for such arrays, but for completeness we describe the constraints that apply in that case. First, by definition, the ghost extensions of a subrange are those of its template range. Now, suppose the array of which src is a section has ghost extensions tex2html_wrap_inline14197 , tex2html_wrap_inline14199 . If the alignment stride of src.rng(r) is s, the required constraints are

eqnarray870

The point to note is that the widths defined in the WriteHalo construtor are expressed in terms of the global subscript of the range of the array, whereas the ghost extensions of the array are measured in units of template range subscripts.

The vector mode defines how ghost cells are updated in each dimension--including how the cells at the extremes of the array are updated. Its elements take value CYCL, EDGE or NONE.

Note that (as usual for ordinary data arguments of collective constructors) the vectors wlo, whi and mode must have identical values in all members of the active process group.




next up previous contents
Next: Type restrictions: Up: class WriteHalo Previous: class WriteHalo

Guansong Zhang
Fri Oct 9 12:29:23 EDT 1998