int4_2D_or_int4 Function

public function int4_2D_or_int4(a, b) result(r)

Bitwise 'OR' over one 2D integer array and integer of kind 4

Arguments

Type IntentOptional AttributesName
integer(kind=4), intent(in), dimension(:, :):: a
integer(kind=4), intent(in) :: b

Return Value integer(kind=4), dimension(:, :),allocatable


Called by

proc~~int4_2d_or_int4~~CalledByGraph proc~int4_2d_or_int4 int4_2D_or_int4 interface~operator(.or.) operator(.or.) interface~operator(.or.)->proc~int4_2d_or_int4

Contents

Source Code


Source Code

        function int4_2D_or_int4(a, b) result(r)
          !< Bitwise 'OR' over one 2D integer array and integer of kind 4
            implicit none
            integer(kind=4), dimension(:, :), intent(in) :: a
            integer(kind=4), intent(in) :: b
            integer(kind=4), dimension(1:2) :: n
            integer(kind=4), dimension(:, :), allocatable :: r
            integer :: i, j
            n = shape(a)
            allocate(r(1:n(1), 1:n(2)))
            do j = 1, n(2)
             do i = 1, n(1)
                r(i,j) = ior(a(i, j), b)
             end do
            end do
        end function int4_2D_or_int4