labelled_sums Subroutine

public subroutine labelled_sums(s, g, label, a, b, c, n_label, n, n_i_pad, n_j)

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.

Arguments

Type IntentOptional 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

Calls

proc~~labelled_sums~~CallsGraph proc~labelled_sums m_cuda_kernels_fieldops::labelled_sums atomicadd atomicadd proc~labelled_sums->atomicadd

Called by

proc~~labelled_sums~~CalledByGraph proc~labelled_sums m_cuda_kernels_fieldops::labelled_sums proc~field_labelled_sums_cuda m_cuda_backend::cuda_backend_t%field_labelled_sums_cuda proc~field_labelled_sums_cuda->proc~labelled_sums