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 ,
--eg, a range created by by a constructor
call such as
BlockRange(N, d,
,
--as its rth dimension,
it is required that
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 ,
.
If the alignment stride of src.rng(r)
is s, the required constraints are
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.