get_partial_merge_right_val Subroutine

private pure subroutine get_partial_merge_right_val(this, upstream_grad, output)

Arguments

Type IntentOptional Attributes Name
class(array_type), intent(in) :: this
real(kind=real32), intent(in), dimension(:,:) :: upstream_grad
real(kind=real32), intent(out), dimension(:,:) :: output

Source Code

  pure subroutine get_partial_merge_right_val(this, upstream_grad, output)
    implicit none
    class(array_type), intent(in) :: this
    real(real32), dimension(:,:), intent(in) :: upstream_grad
    real(real32), dimension(:,:), intent(out) :: output

    integer :: i, j

    do concurrent(i = 1:size(this%val,1), j = 1:size(this%val,2))
       if(this%mask(i,j)) then
          output(i,j) = 0._real32
       else
          output(i,j) = upstream_grad(i,j)
       end if
    end do

  end subroutine get_partial_merge_right_val