utility_zgemm Subroutine

public subroutine utility_zgemm(c, a, transa, b, transb, n)

Uses

  • proc~~utility_zgemm~~UsesGraph proc~utility_zgemm utility_zgemm module~w90_constants w90_constants proc~utility_zgemm->module~w90_constants

Return matrix product of complex n x n matrices a and b:

                   C = Op(A) Op(B)

transa = 'N' ==> Op(A) = A transa = 'T' ==> Op(A) = transpose(A) transa = 'C' ==> Op(A) = congj(transpose(A))

similarly for B

Arguments

Type IntentOptional AttributesName
complex(kind=dp), intent(out) :: c(n,n)
complex(kind=dp), intent(in) :: a(n,n)
character(len=1), intent(in) :: transa
complex(kind=dp), intent(in) :: b(n,n)
character(len=1), intent(in) :: transb
integer, intent(in) :: n

Calls

proc~~utility_zgemm~~CallsGraph proc~utility_zgemm utility_zgemm zgemm zgemm proc~utility_zgemm->zgemm

Called by

proc~~utility_zgemm~~CalledByGraph proc~utility_zgemm utility_zgemm proc~wann_main_gamma wann_main_gamma proc~wann_main_gamma->proc~utility_zgemm program~wannier wannier program~wannier->proc~wann_main_gamma proc~wannier_run wannier_run proc~wannier_run->proc~wann_main_gamma

Contents

Source Code


Source Code

  subroutine utility_zgemm(c, a, transa, b, transb, n)
    !=============================================================!
    !                                                             !
    !! Return matrix product of complex n x n matrices a and b:
    !!
    !!                       C = Op(A) Op(B)
    !!
    !! transa = 'N'  ==> Op(A) = A
    !! transa = 'T'  ==> Op(A) = transpose(A)
    !! transa = 'C'  ==> Op(A) = congj(transpose(A))
    !!
    !! similarly for B
    !                                                             !
    !=============================================================!

    use w90_constants, only: cmplx_0, cmplx_1

    implicit none

    integer, intent(in)  :: n
    character(len=1), intent(in)  :: transa
    character(len=1), intent(in)  :: transb
    complex(kind=dp), intent(in)  :: a(n, n)
    complex(kind=dp), intent(in)  :: b(n, n)
    complex(kind=dp), intent(out) :: c(n, n)

    call zgemm(transa, transb, n, n, n, cmplx_1, a, n, b, n, cmplx_0, c, n)

    return

  end subroutine utility_zgemm