Periodic wrap-around on a single rank: copies the first n_data elements of a halo buffer, the groups of the direction being exchanged. The buffers are sized for the direction with the most groups, so a whole-array assignment would copy that maximum on every exchange (16 times the data in use on an elongated mesh).
The copy is a device array section assignment, which CUDA Fortran runs on the device in the default stream like the kernels around it. The dummies are plain assumed shape: declaring them contiguous made the caller copy its arguments through a host temporary in a debug build, touching device memory from the host.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout), | device, dimension(:, :, :) | :: | dst | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | src | ||
| integer, | intent(in) | :: | n_data |