s(1:3, l) += sums of ga, gb and g*c over the points labelled l; launch as vector_norm_squared. Each thread accumulates runs of equal labels along its pencil and flushes a run when the label changes, so the atomics scale with the label changes rather than the points.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout), | device | :: | s(3,n_label) | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | g | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | label | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | a | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | b | ||
| real(kind=dp), | intent(in), | device, dimension(:, :, :) | :: | c | ||
| integer, | intent(in), | value | :: | n_label | ||
| integer, | intent(in), | value | :: | n | ||
| integer, | intent(in), | value | :: | n_i_pad | ||
| integer, | intent(in), | value | :: | n_j |