mat_mat_rel Function

private pure function mat_mat_rel(A, B, transA, transB, option) result(C)

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), contiguous :: A(:,:)
real(kind=rk), intent(in), contiguous :: B(:,:)
logical, intent(in), optional :: transA
logical, intent(in), optional :: transB
character(len=*), intent(in), optional :: option

Return Value real(kind=rk), allocatable, (:,:)


Calls

proc~~mat_mat_rel~~CallsGraph proc~mat_mat_rel formatmul::mat_mat_rel proc~mat_mat_rel_ab formatmul::mat_mat_rel_AB proc~mat_mat_rel->proc~mat_mat_rel_ab proc~mat_mat_rel_abt formatmul::mat_mat_rel_ABT proc~mat_mat_rel->proc~mat_mat_rel_abt proc~mat_mat_rel_atb formatmul::mat_mat_rel_ATB proc~mat_mat_rel->proc~mat_mat_rel_atb proc~mat_mat_rel_atbt formatmul::mat_mat_rel_ATBT proc~mat_mat_rel->proc~mat_mat_rel_atbt proc~mat_mat_rel_ab_opt formatmul_opts::mat_mat_rel_AB_opt proc~mat_mat_rel_ab->proc~mat_mat_rel_ab_opt proc~mat_mat_rel_abt_opt formatmul_opts::mat_mat_rel_ABT_opt proc~mat_mat_rel_abt->proc~mat_mat_rel_abt_opt proc~mat_mat_rel_atb_opt formatmul_opts::mat_mat_rel_ATB_opt proc~mat_mat_rel_atb->proc~mat_mat_rel_atb_opt proc~mat_mat_rel_atbt_opt formatmul_opts::mat_mat_rel_ATBT_opt proc~mat_mat_rel_atbt->proc~mat_mat_rel_atbt_opt proc~mm_ab_1 formatmul_opts::mm_AB_1 proc~mat_mat_rel_ab_opt->proc~mm_ab_1 proc~mm_ab_10 formatmul_opts::mm_AB_10 proc~mat_mat_rel_ab_opt->proc~mm_ab_10 proc~mm_ab_11 formatmul_opts::mm_AB_11 proc~mat_mat_rel_ab_opt->proc~mm_ab_11 proc~mm_ab_12 formatmul_opts::mm_AB_12 proc~mat_mat_rel_ab_opt->proc~mm_ab_12 proc~mm_ab_13 formatmul_opts::mm_AB_13 proc~mat_mat_rel_ab_opt->proc~mm_ab_13 proc~mm_ab_2 formatmul_opts::mm_AB_2 proc~mat_mat_rel_ab_opt->proc~mm_ab_2 proc~mm_ab_3 formatmul_opts::mm_AB_3 proc~mat_mat_rel_ab_opt->proc~mm_ab_3 proc~mm_ab_4 formatmul_opts::mm_AB_4 proc~mat_mat_rel_ab_opt->proc~mm_ab_4 proc~mm_ab_5 formatmul_opts::mm_AB_5 proc~mat_mat_rel_ab_opt->proc~mm_ab_5 proc~mm_ab_6 formatmul_opts::mm_AB_6 proc~mat_mat_rel_ab_opt->proc~mm_ab_6 proc~mm_ab_7 formatmul_opts::mm_AB_7 proc~mat_mat_rel_ab_opt->proc~mm_ab_7 proc~mm_ab_8 formatmul_opts::mm_AB_8 proc~mat_mat_rel_ab_opt->proc~mm_ab_8 proc~mm_ab_9 formatmul_opts::mm_AB_9 proc~mat_mat_rel_ab_opt->proc~mm_ab_9 proc~mm_abt_1 formatmul_opts::mm_ABT_1 proc~mat_mat_rel_abt_opt->proc~mm_abt_1 proc~mm_abt_10 formatmul_opts::mm_ABT_10 proc~mat_mat_rel_abt_opt->proc~mm_abt_10 proc~mm_abt_11 formatmul_opts::mm_ABT_11 proc~mat_mat_rel_abt_opt->proc~mm_abt_11 proc~mm_abt_12 formatmul_opts::mm_ABT_12 proc~mat_mat_rel_abt_opt->proc~mm_abt_12 proc~mm_abt_13 formatmul_opts::mm_ABT_13 proc~mat_mat_rel_abt_opt->proc~mm_abt_13 proc~mm_abt_2 formatmul_opts::mm_ABT_2 proc~mat_mat_rel_abt_opt->proc~mm_abt_2 proc~mm_abt_3 formatmul_opts::mm_ABT_3 proc~mat_mat_rel_abt_opt->proc~mm_abt_3 proc~mm_abt_4 formatmul_opts::mm_ABT_4 proc~mat_mat_rel_abt_opt->proc~mm_abt_4 proc~mm_abt_5 formatmul_opts::mm_ABT_5 proc~mat_mat_rel_abt_opt->proc~mm_abt_5 proc~mm_abt_6 formatmul_opts::mm_ABT_6 proc~mat_mat_rel_abt_opt->proc~mm_abt_6 proc~mm_abt_7 formatmul_opts::mm_ABT_7 proc~mat_mat_rel_abt_opt->proc~mm_abt_7 proc~mm_abt_8 formatmul_opts::mm_ABT_8 proc~mat_mat_rel_abt_opt->proc~mm_abt_8 proc~mm_abt_9 formatmul_opts::mm_ABT_9 proc~mat_mat_rel_abt_opt->proc~mm_abt_9 proc~mm_atb_1 formatmul_opts::mm_ATB_1 proc~mat_mat_rel_atb_opt->proc~mm_atb_1 proc~mm_atb_10 formatmul_opts::mm_ATB_10 proc~mat_mat_rel_atb_opt->proc~mm_atb_10 proc~mm_atb_11 formatmul_opts::mm_ATB_11 proc~mat_mat_rel_atb_opt->proc~mm_atb_11 proc~mm_atb_12 formatmul_opts::mm_ATB_12 proc~mat_mat_rel_atb_opt->proc~mm_atb_12 proc~mm_atb_13 formatmul_opts::mm_ATB_13 proc~mat_mat_rel_atb_opt->proc~mm_atb_13 proc~mm_atb_2 formatmul_opts::mm_ATB_2 proc~mat_mat_rel_atb_opt->proc~mm_atb_2 proc~mm_atb_3 formatmul_opts::mm_ATB_3 proc~mat_mat_rel_atb_opt->proc~mm_atb_3 proc~mm_atb_4 formatmul_opts::mm_ATB_4 proc~mat_mat_rel_atb_opt->proc~mm_atb_4 proc~mm_atb_5 formatmul_opts::mm_ATB_5 proc~mat_mat_rel_atb_opt->proc~mm_atb_5 proc~mm_atb_6 formatmul_opts::mm_ATB_6 proc~mat_mat_rel_atb_opt->proc~mm_atb_6 proc~mm_atb_7 formatmul_opts::mm_ATB_7 proc~mat_mat_rel_atb_opt->proc~mm_atb_7 proc~mm_atb_8 formatmul_opts::mm_ATB_8 proc~mat_mat_rel_atb_opt->proc~mm_atb_8 proc~mm_atb_9 formatmul_opts::mm_ATB_9 proc~mat_mat_rel_atb_opt->proc~mm_atb_9 proc~mm_atbt_1 formatmul_opts::mm_ATBT_1 proc~mat_mat_rel_atbt_opt->proc~mm_atbt_1 proc~mm_atbt_10 formatmul_opts::mm_ATBT_10 proc~mat_mat_rel_atbt_opt->proc~mm_atbt_10 proc~mm_atbt_11 formatmul_opts::mm_ATBT_11 proc~mat_mat_rel_atbt_opt->proc~mm_atbt_11 proc~mm_atbt_12 formatmul_opts::mm_ATBT_12 proc~mat_mat_rel_atbt_opt->proc~mm_atbt_12 proc~mm_atbt_13 formatmul_opts::mm_ATBT_13 proc~mat_mat_rel_atbt_opt->proc~mm_atbt_13 proc~mm_atbt_2 formatmul_opts::mm_ATBT_2 proc~mat_mat_rel_atbt_opt->proc~mm_atbt_2 proc~mm_atbt_3 formatmul_opts::mm_ATBT_3 proc~mat_mat_rel_atbt_opt->proc~mm_atbt_3 proc~mm_atbt_4 formatmul_opts::mm_ATBT_4 proc~mat_mat_rel_atbt_opt->proc~mm_atbt_4 proc~mm_atbt_5 formatmul_opts::mm_ATBT_5 proc~mat_mat_rel_atbt_opt->proc~mm_atbt_5 proc~mm_atbt_6 formatmul_opts::mm_ATBT_6 proc~mat_mat_rel_atbt_opt->proc~mm_atbt_6 proc~mm_atbt_7 formatmul_opts::mm_ATBT_7 proc~mat_mat_rel_atbt_opt->proc~mm_atbt_7 proc~mm_atbt_8 formatmul_opts::mm_ATBT_8 proc~mat_mat_rel_atbt_opt->proc~mm_atbt_8 proc~mm_atbt_9 formatmul_opts::mm_ATBT_9 proc~mat_mat_rel_atbt_opt->proc~mm_atbt_9 interface~gemm external_interfaces_matmul::gemm proc~mm_ab_2->interface~gemm proc~mm_abt_2->interface~gemm proc~mm_atb_2->interface~gemm proc~mm_atbt_2->interface~gemm

Called by

proc~~mat_mat_rel~~CalledByGraph proc~mat_mat_rel formatmul::mat_mat_rel interface~matmul formatmul::matmul interface~matmul->proc~mat_mat_rel

Source Code

   pure function mat_mat_rel(A, B, transA, transB, option) result(C)
      real(rk), intent(in), contiguous :: A(:,:), B(:,:)
      real(rk), allocatable :: C(:,:)
      character(*), intent(in), optional :: option
      logical, intent(in), optional :: transA, transB

      if (present(transA) .and. present(transB)) then
         if (.not.transA .and. .not.transB) then
            ! AB
            allocate(C(size(A,1), size(B,2)), source=0.0_rk)
            call mat_mat_rel_AB(A, B, C, option)
         else if (transA .and. transB) then
            ! ATBT
            allocate(C(size(A,2), size(B,1)), source=0.0_rk)
            call mat_mat_rel_ATBT(A, B, C, option)
         else if (transA .and. .not.transB) then
            ! ATB
            allocate(C(size(A,2), size(B,2)), source=0.0_rk)
            call mat_mat_rel_ATB(A, B, C, option)
         else if (.not.transA .and. transB) then
            ! ABT
            allocate(C(size(A,1), size(B,1)), source=0.0_rk)
            call mat_mat_rel_ABT(A, B, C, option)
         end if
      else if (present(transA) .or. present(transB)) then
         if (present(transA)) then
            if (transA) then
               ! ATB
               allocate(C(size(A,2), size(B,2)), source=0.0_rk)
               call mat_mat_rel_ATB(A, B, C, option)
            else if (.not.transA) then
               ! ABT
               allocate(C(size(A,1), size(B,1)), source=0.0_rk)
               call mat_mat_rel_ABT(A, B, C, option)
            end if
         else if (present(transB)) then
            if (transB) then
               ! ABT
               allocate(C(size(A,1), size(B,1)), source=0.0_rk)
               call mat_mat_rel_ABT(A, B, C, option)
            else if (.not.transB) then
               ! ATB
               allocate(C(size(A,2), size(B,2)), source=0.0_rk)
               call mat_mat_rel_ATB(A, B, C, option)
            end if
         end if
      else if (.not.present(transA) .and. .not.present(transB)) then
         ! AB
         allocate(C(size(A,1), size(B,2)), source=0.0_rk)
         call mat_mat_rel_AB(A, B, C, option)
      end if
   end function mat_mat_rel