fill_gpu_2d Subroutine

private pure subroutine fill_gpu_2d(arr, val)

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(inout) :: arr(:,:)
real(kind=wp), intent(in) :: val

Called by

proc~~fill_gpu_2d~~CalledByGraph proc~fill_gpu_2d fill_gpu_2d interface~fill_gpu fill_gpu interface~fill_gpu->proc~fill_gpu_2d

Variables

Type Visibility Attributes Name Initial
integer, private :: hi1
integer, private :: hi2
integer, private :: i
integer, private :: j
integer, private :: lo1
integer, private :: lo2

Source Code

   pure subroutine fill_gpu_2d(arr, val)
      ! assumed-shape-ok: generic fill utility; must accept any rank-2 slice
      real(wp), intent(inout) :: arr(:, :)
      real(wp), intent(in)    :: val
      integer :: i, j, lo1, hi1, lo2, hi2
      lo1 = lbound(arr, 1)
      hi1 = ubound(arr, 1)
      lo2 = lbound(arr, 2)
      hi2 = ubound(arr, 2)
      do concurrent(j=lo2:hi2, i=lo1:hi1)
         arr(i, j) = val
      end do
   end subroutine fill_gpu_2d