!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!  This file is AUTOMATICALLY GENERATED by:
!!  tools/fortran_wrappers.pl include/magma_c.i
!!  Do not edit.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

module magma_cfortran

use magma_param

implicit none

!---- Fortran interfaces to MAGMA subroutines ----
interface

integer function magmaf_get_cpotrf_nb( n )
    integer          :: n
end

integer function magmaf_get_cgetrf_nb( m, n )
    integer          :: m
    integer          :: n
end

integer function magmaf_get_cgetri_nb( n )
    integer          :: n
end

integer function magmaf_get_chetrf_nb( n )
    integer          :: n
end

integer function magmaf_get_chetrf_nopiv_nb( n )
    integer          :: n
end

integer function magmaf_get_chetrf_aasen_nb( n )
    integer          :: n
end

integer function magmaf_get_cgeqp3_nb( m, n )
    integer          :: m
    integer          :: n
end

integer function magmaf_get_cgeqrf_nb( m, n )
    integer          :: m
    integer          :: n
end

integer function magmaf_get_cgeqlf_nb( m, n )
    integer          :: m
    integer          :: n
end

integer function magmaf_get_cgelqf_nb( m, n )
    integer          :: m
    integer          :: n
end

integer function magmaf_get_cgehrd_nb( n )
    integer          :: n
end

integer function magmaf_get_chetrd_nb( n )
    integer          :: n
end

integer function magmaf_get_chegst_nb( n )
    integer          :: n
end

integer function magmaf_get_chegst_m_nb( n )
    integer          :: n
end

integer function magmaf_get_cgebrd_nb( m, n )
    integer          :: m
    integer          :: n
end

integer function magmaf_get_cgesvd_nb( m, n )
    integer          :: m
    integer          :: n
end

integer function magmaf_get_cbulge_nb( n, nbthreads )
    integer          :: n
    integer          :: nbthreads
end

integer function magmaf_get_cbulge_vblksiz( n, nb, nbthreads )
    integer          :: n
    integer          :: nb
    integer          :: nbthreads
end

integer function magmaf_get_cbulge_gcperf(  )
end

subroutine magmaf_cgebrd( m, n, A, lda, d, e, tauq, taup, work, lwork, info )
    integer          :: m
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    real             :: d(*)
    real             :: e(*)
    complex          :: tauq(*)
    complex          :: taup(*)
    complex          :: work(*)
    integer          :: lwork
    integer          :: info
end

subroutine magmaf_cgeev( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, work, lwork,  &
        rwork, info )
    character        :: jobvl
    character        :: jobvr
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    complex          :: w(*)
    complex          :: VL(*)
    integer          :: ldvl
    complex          :: VR(*)
    integer          :: ldvr
    complex          :: work(*)
    integer          :: lwork
    real             :: rwork(*)
    integer          :: info
end

subroutine magmaf_cgeev_m( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, work, lwork,  &
        rwork, info )
    character        :: jobvl
    character        :: jobvr
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    complex          :: w(*)
    complex          :: VL(*)
    integer          :: ldvl
    complex          :: VR(*)
    integer          :: ldvr
    complex          :: work(*)
    integer          :: lwork
    real             :: rwork(*)
    integer          :: info
end

subroutine magmaf_cgegqr_gpu( ikind, m, n, dA, ldda, dwork, work, info )
    integer          :: ikind
    integer          :: m
    integer          :: n
    magma_devptr_t   :: dA
    integer          :: ldda
    magma_devptr_t   :: dwork
    complex          :: work(*)
    integer          :: info
end

subroutine magmaf_cgehrd( n, ilo, ihi, A, lda, tau, work, lwork, dT, info )
    integer          :: n
    integer          :: ilo
    integer          :: ihi
    complex          :: A(*)
    integer          :: lda
    complex          :: tau(*)
    complex          :: work(*)
    integer          :: lwork
    magma_devptr_t   :: dT
    integer          :: info
end

subroutine magmaf_cgehrd_m( n, ilo, ihi, A, lda, tau, work, lwork, T, info )
    integer          :: n
    integer          :: ilo
    integer          :: ihi
    complex          :: A(*)
    integer          :: lda
    complex          :: tau(*)
    complex          :: work(*)
    integer          :: lwork
    complex          :: T(*)
    integer          :: info
end

subroutine magmaf_cgehrd2( n, ilo, ihi, A, lda, tau, work, lwork, info )
    integer          :: n
    integer          :: ilo
    integer          :: ihi
    complex          :: A(*)
    integer          :: lda
    complex          :: tau(*)
    complex          :: work(*)
    integer          :: lwork
    integer          :: info
end

subroutine magmaf_cgelqf( m, n, A, lda, tau, work, lwork, info )
    integer          :: m
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    complex          :: tau(*)
    complex          :: work(*)
    integer          :: lwork
    integer          :: info
end

subroutine magmaf_cgelqf_gpu( m, n, dA, ldda, tau, work, lwork, info )
    integer          :: m
    integer          :: n
    magma_devptr_t   :: dA
    integer          :: ldda
    complex          :: tau(*)
    complex          :: work(*)
    integer          :: lwork
    integer          :: info
end

subroutine magmaf_cgels( trans, m, n, nrhs, A, lda, B, ldb, hwork, lwork, info )
    character        :: trans
    integer          :: m
    integer          :: n
    integer          :: nrhs
    magma_devptr_t   :: A
    integer          :: lda
    magma_devptr_t   :: B
    integer          :: ldb
    complex          :: hwork(*)
    integer          :: lwork
    integer          :: info
end

subroutine magmaf_cggrqf( m, p, n, A, lda, taua, B, ldb, taub, work, lwork, info )
    integer          :: m
    integer          :: p
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    complex          :: taua(*)
    complex          :: B(*)
    integer          :: ldb
    complex          :: taub(*)
    complex          :: work(*)
    integer          :: lwork
    integer          :: info
end

subroutine magmaf_cgglse( m, n, p, A, lda, B, ldb, c, d, x, work, lwork, info )
    integer          :: m
    integer          :: n
    integer          :: p
    complex          :: A(*)
    integer          :: lda
    complex          :: B(*)
    integer          :: ldb
    complex          :: c(*)
    complex          :: d(*)
    complex          :: x(*)
    complex          :: work(*)
    integer          :: lwork
    integer          :: info
end

subroutine magmaf_cgels_gpu( trans, m, n, nrhs, dA, ldda, dB, lddb, hwork, lwork, info )
    character        :: trans
    integer          :: m
    integer          :: n
    integer          :: nrhs
    magma_devptr_t   :: dA
    integer          :: ldda
    magma_devptr_t   :: dB
    integer          :: lddb
    complex          :: hwork(*)
    integer          :: lwork
    integer          :: info
end

subroutine magmaf_cgels3_gpu( trans, m, n, nrhs, dA, ldda, dB, lddb, hwork, lwork, info )
    character        :: trans
    integer          :: m
    integer          :: n
    integer          :: nrhs
    magma_devptr_t   :: dA
    integer          :: ldda
    magma_devptr_t   :: dB
    integer          :: lddb
    complex          :: hwork(*)
    integer          :: lwork
    integer          :: info
end

subroutine magmaf_cgeqlf( m, n, A, lda, tau, work, lwork, info )
    integer          :: m
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    complex          :: tau(*)
    complex          :: work(*)
    integer          :: lwork
    integer          :: info
end

subroutine magmaf_cgeqp3( m, n, A, lda, jpvt, tau, work, lwork, rwork, info )
    integer          :: m
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    integer          :: jpvt(*)
    complex          :: tau(*)
    complex          :: work(*)
    integer          :: lwork
    real             :: rwork(*)
    integer          :: info
end

subroutine magmaf_cgeqp3_gpu( m, n, dA, ldda, jpvt, tau, dwork, lwork, rwork, info )
    integer          :: m
    integer          :: n
    magma_devptr_t   :: dA
    integer          :: ldda
    integer          :: jpvt(*)
    complex          :: tau(*)
    magma_devptr_t   :: dwork
    integer          :: lwork
    real             :: rwork(*)
    integer          :: info
end

subroutine magmaf_cgeqr2x_gpu( m, n, dA, ldda, dtau, dT, ddA, dwork, info )
    integer          :: m
    integer          :: n
    magma_devptr_t   :: dA
    integer          :: ldda
    magma_devptr_t   :: dtau
    magma_devptr_t   :: dT
    magma_devptr_t   :: ddA
    magma_devptr_t   :: dwork
    integer          :: info
end

subroutine magmaf_cgeqr2x2_gpu( m, n, dA, ldda, dtau, dT, ddA, dwork, info )
    integer          :: m
    integer          :: n
    magma_devptr_t   :: dA
    integer          :: ldda
    magma_devptr_t   :: dtau
    magma_devptr_t   :: dT
    magma_devptr_t   :: ddA
    magma_devptr_t   :: dwork
    integer          :: info
end

subroutine magmaf_cgeqr2x3_gpu( m, n, dA, ldda, dtau, dT, ddA, dwork, info )
    integer          :: m
    integer          :: n
    magma_devptr_t   :: dA
    integer          :: ldda
    magma_devptr_t   :: dtau
    magma_devptr_t   :: dT
    magma_devptr_t   :: ddA
    magma_devptr_t   :: dwork
    integer          :: info
end

subroutine magmaf_cgeqr2x4_gpu( m, n, dA, ldda, dtau, dT, ddA, dwork, queue, info )
    integer          :: m
    integer          :: n
    magma_devptr_t   :: dA
    integer          :: ldda
    magma_devptr_t   :: dtau
    magma_devptr_t   :: dT
    magma_devptr_t   :: ddA
    magma_devptr_t   :: dwork
    magma_devptr_t   :: queue
    integer          :: info
end

subroutine magmaf_cgeqrf( m, n, A, lda, tau, work, lwork, info )
    integer          :: m
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    complex          :: tau(*)
    complex          :: work(*)
    integer          :: lwork
    integer          :: info
end

subroutine magmaf_cgeqrf_gpu( m, n, dA, ldda, tau, dT, info )
    integer          :: m
    integer          :: n
    magma_devptr_t   :: dA
    integer          :: ldda
    complex          :: tau(*)
    magma_devptr_t   :: dT
    integer          :: info
end

subroutine magmaf_cgeqrf_m( ngpu, m, n, A, lda, tau, work, lwork, info )
    integer          :: ngpu
    integer          :: m
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    complex          :: tau(*)
    complex          :: work(*)
    integer          :: lwork
    integer          :: info
end

subroutine magmaf_cgeqrf_ooc( m, n, A, lda, tau, work, lwork, info )
    integer          :: m
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    complex          :: tau(*)
    complex          :: work(*)
    integer          :: lwork
    integer          :: info
end

subroutine magmaf_cgeqrf2_gpu( m, n, dA, ldda, tau, info )
    integer          :: m
    integer          :: n
    magma_devptr_t   :: dA
    integer          :: ldda
    complex          :: tau(*)
    integer          :: info
end

subroutine magmaf_cgeqrf3_gpu( m, n, dA, ldda, tau, dT, info )
    integer          :: m
    integer          :: n
    magma_devptr_t   :: dA
    integer          :: ldda
    complex          :: tau(*)
    magma_devptr_t   :: dT
    integer          :: info
end

subroutine magmaf_cgeqrs_gpu( m, n, nrhs, dA, ldda, tau, dT, dB, lddb, hwork, lwork, info  &
        )
    integer          :: m
    integer          :: n
    integer          :: nrhs
    magma_devptr_t   :: dA
    integer          :: ldda
    complex          :: tau(*)
    magma_devptr_t   :: dT
    magma_devptr_t   :: dB
    integer          :: lddb
    complex          :: hwork(*)
    integer          :: lwork
    integer          :: info
end

subroutine magmaf_cgeqrs3_gpu( m, n, nrhs, dA, ldda, tau, dT, dB, lddb, hwork, lwork,  &
        info )
    integer          :: m
    integer          :: n
    integer          :: nrhs
    magma_devptr_t   :: dA
    integer          :: ldda
    complex          :: tau(*)
    magma_devptr_t   :: dT
    magma_devptr_t   :: dB
    integer          :: lddb
    complex          :: hwork(*)
    integer          :: lwork
    integer          :: info
end

subroutine magmaf_cgerbt_gpu( gen, n, nrhs, dA, ldda, dB, lddb, U, V, info )
    character        :: gen
    integer          :: n
    integer          :: nrhs
    magma_devptr_t   :: dA
    integer          :: ldda
    magma_devptr_t   :: dB
    integer          :: lddb
    complex          :: U(*)
    complex          :: V(*)
    integer          :: info
end

subroutine magmaf_cgerfs_nopiv_gpu( trans, n, nrhs, dA, ldda, dB, lddb, dX, lddx, dworkd,  &
        dAF, iter, info )
    character        :: trans
    integer          :: n
    integer          :: nrhs
    magma_devptr_t   :: dA
    integer          :: ldda
    magma_devptr_t   :: dB
    integer          :: lddb
    magma_devptr_t   :: dX
    integer          :: lddx
    magma_devptr_t   :: dworkd
    magma_devptr_t   :: dAF
    integer          :: iter
    integer          :: info
end

subroutine magmaf_cgesdd( jobz, m, n, A, lda, s, U, ldu, VT, ldvt, work, lwork, rwork,  &
        iwork, info )
    character        :: jobz
    integer          :: m
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    real             :: s(*)
    complex          :: U(*)
    integer          :: ldu
    complex          :: VT(*)
    integer          :: ldvt
    complex          :: work(*)
    integer          :: lwork
    real             :: rwork(*)
    integer          :: iwork(*)
    integer          :: info
end

subroutine magmaf_cgesv( n, nrhs, A, lda, ipiv, B, ldb, info )
    integer          :: n
    integer          :: nrhs
    complex          :: A(*)
    integer          :: lda
    integer          :: ipiv(*)
    complex          :: B(*)
    integer          :: ldb
    integer          :: info
end

subroutine magmaf_cgesv_gpu( n, nrhs, dA, ldda, ipiv, dB, lddb, info )
    integer          :: n
    integer          :: nrhs
    magma_devptr_t   :: dA
    integer          :: ldda
    integer          :: ipiv(*)
    magma_devptr_t   :: dB
    integer          :: lddb
    integer          :: info
end

subroutine magmaf_cgesv_nopiv_gpu( n, nrhs, dA, ldda, dB, lddb, info )
    integer          :: n
    integer          :: nrhs
    magma_devptr_t   :: dA
    integer          :: ldda
    magma_devptr_t   :: dB
    integer          :: lddb
    integer          :: info
end

subroutine magmaf_cgesv_rbt( ref, n, nrhs, A, lda, B, ldb, info )
    character        :: ref
    integer          :: n
    integer          :: nrhs
    complex          :: A(*)
    integer          :: lda
    complex          :: B(*)
    integer          :: ldb
    integer          :: info
end

subroutine magmaf_cgesvd( jobu, jobvt, m, n, A, lda, s, U, ldu, VT, ldvt, work, lwork,  &
        rwork, info )
    character        :: jobu
    character        :: jobvt
    integer          :: m
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    real             :: s(*)
    complex          :: U(*)
    integer          :: ldu
    complex          :: VT(*)
    integer          :: ldvt
    complex          :: work(*)
    integer          :: lwork
    real             :: rwork(*)
    integer          :: info
end

subroutine magmaf_cgetf2_gpu( m, n, dA, ldda, ipiv, queue, info )
    integer          :: m
    integer          :: n
    magma_devptr_t   :: dA
    integer          :: ldda
    integer          :: ipiv(*)
    magma_devptr_t   :: queue
    integer          :: info
end

subroutine magmaf_cgetf2_nopiv( m, n, A, lda, info )
    integer          :: m
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    integer          :: info
end

subroutine magmaf_cgetrf( m, n, A, lda, ipiv, info )
    integer          :: m
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    integer          :: ipiv(*)
    integer          :: info
end

subroutine magmaf_cgetrf_gpu( m, n, dA, ldda, ipiv, info )
    integer          :: m
    integer          :: n
    magma_devptr_t   :: dA
    integer          :: ldda
    integer          :: ipiv(*)
    integer          :: info
end

subroutine magmaf_cgetrf_m( ngpu, m, n, A, lda, ipiv, info )
    integer          :: ngpu
    integer          :: m
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    integer          :: ipiv(*)
    integer          :: info
end

subroutine magmaf_cgetrf_nopiv( m, n, A, lda, info )
    integer          :: m
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    integer          :: info
end

subroutine magmaf_cgetrf_nopiv_gpu( m, n, dA, ldda, info )
    integer          :: m
    integer          :: n
    magma_devptr_t   :: dA
    integer          :: ldda
    integer          :: info
end

subroutine magmaf_cgetri_gpu( n, dA, ldda, ipiv, dwork, lwork, info )
    integer          :: n
    magma_devptr_t   :: dA
    integer          :: ldda
    integer          :: ipiv(*)
    magma_devptr_t   :: dwork
    integer          :: lwork
    integer          :: info
end

subroutine magmaf_cgetrs_gpu( trans, n, nrhs, dA, ldda, ipiv, dB, lddb, info )
    character        :: trans
    integer          :: n
    integer          :: nrhs
    magma_devptr_t   :: dA
    integer          :: ldda
    integer          :: ipiv(*)
    magma_devptr_t   :: dB
    integer          :: lddb
    integer          :: info
end

subroutine magmaf_cgetrs_nopiv_gpu( trans, n, nrhs, dA, ldda, dB, lddb, info )
    character        :: trans
    integer          :: n
    integer          :: nrhs
    magma_devptr_t   :: dA
    integer          :: ldda
    magma_devptr_t   :: dB
    integer          :: lddb
    integer          :: info
end

subroutine magmaf_cheevd( jobz, uplo, n, A, lda, w, work, lwork, rwork, lrwork, iwork,  &
        liwork, info )
    character        :: jobz
    character        :: uplo
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    real             :: w(*)
    complex          :: work(*)
    integer          :: lwork
    real             :: rwork(*)
    integer          :: lrwork
    integer          :: iwork(*)
    integer          :: liwork
    integer          :: info
end

subroutine magmaf_cheevd_gpu( jobz, uplo, n, dA, ldda, w, wA, ldwa, work, lwork, rwork,  &
        lrwork, iwork, liwork, info )
    character        :: jobz
    character        :: uplo
    integer          :: n
    magma_devptr_t   :: dA
    integer          :: ldda
    real             :: w(*)
    complex          :: wA(*)
    integer          :: ldwa
    complex          :: work(*)
    integer          :: lwork
    real             :: rwork(*)
    integer          :: lrwork
    integer          :: iwork(*)
    integer          :: liwork
    integer          :: info
end

subroutine magmaf_cheevd_m( ngpu, jobz, uplo, n, A, lda, w, work, lwork, rwork, lrwork,  &
        iwork, liwork, info )
    integer          :: ngpu
    character        :: jobz
    character        :: uplo
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    real             :: w(*)
    complex          :: work(*)
    integer          :: lwork
    real             :: rwork(*)
    integer          :: lrwork
    integer          :: iwork(*)
    integer          :: liwork
    integer          :: info
end

subroutine magmaf_cheevdx( jobz, range, uplo, n, A, lda, vl, vu, il, iu, mout, w, work,  &
        lwork, rwork, lrwork, iwork, liwork, info )
    character        :: jobz
    character        :: range
    character        :: uplo
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    real             :: vl
    real             :: vu
    integer          :: il
    integer          :: iu
    integer          :: mout(*)
    real             :: w(*)
    complex          :: work(*)
    integer          :: lwork
    real             :: rwork(*)
    integer          :: lrwork
    integer          :: iwork(*)
    integer          :: liwork
    integer          :: info
end

subroutine magmaf_cheevdx_gpu( jobz, range, uplo, n, dA, ldda, vl, vu, il, iu, mout, w,  &
        wA, ldwa, work, lwork, rwork, lrwork, iwork, liwork, info )
    character        :: jobz
    character        :: range
    character        :: uplo
    integer          :: n
    magma_devptr_t   :: dA
    integer          :: ldda
    real             :: vl
    real             :: vu
    integer          :: il
    integer          :: iu
    integer          :: mout(*)
    real             :: w(*)
    complex          :: wA(*)
    integer          :: ldwa
    complex          :: work(*)
    integer          :: lwork
    real             :: rwork(*)
    integer          :: lrwork
    integer          :: iwork(*)
    integer          :: liwork
    integer          :: info
end

subroutine magmaf_cheevdx_m( ngpu, jobz, range, uplo, n, A, lda, vl, vu, il, iu, mout, w,  &
        work, lwork, rwork, lrwork, iwork, liwork, info )
    integer          :: ngpu
    character        :: jobz
    character        :: range
    character        :: uplo
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    real             :: vl
    real             :: vu
    integer          :: il
    integer          :: iu
    integer          :: mout(*)
    real             :: w(*)
    complex          :: work(*)
    integer          :: lwork
    real             :: rwork(*)
    integer          :: lrwork
    integer          :: iwork(*)
    integer          :: liwork
    integer          :: info
end

subroutine magmaf_cheevdx_2stage( jobz, range, uplo, n, A, lda, vl, vu, il, iu, mout, w,  &
        work, lwork, rwork, lrwork, iwork, liwork, info )
    character        :: jobz
    character        :: range
    character        :: uplo
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    real             :: vl
    real             :: vu
    integer          :: il
    integer          :: iu
    integer          :: mout(*)
    real             :: w(*)
    complex          :: work(*)
    integer          :: lwork
    real             :: rwork(*)
    integer          :: lrwork
    integer          :: iwork(*)
    integer          :: liwork
    integer          :: info
end

subroutine magmaf_cheevdx_2stage_m( ngpu, jobz, range, uplo, n, A, lda, vl, vu, il, iu,  &
        mout, w, work, lwork, rwork, lrwork, iwork, liwork, info )
    integer          :: ngpu
    character        :: jobz
    character        :: range
    character        :: uplo
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    real             :: vl
    real             :: vu
    integer          :: il
    integer          :: iu
    integer          :: mout(*)
    real             :: w(*)
    complex          :: work(*)
    integer          :: lwork
    real             :: rwork(*)
    integer          :: lrwork
    integer          :: iwork(*)
    integer          :: liwork
    integer          :: info
end

subroutine magmaf_cheevr( jobz, range, uplo, n, A, lda, vl, vu, il, iu, abstol, mout, w,  &
        Z, ldz, isuppz, work, lwork, rwork, lrwork, iwork, liwork, info )
    character        :: jobz
    character        :: range
    character        :: uplo
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    real             :: vl
    real             :: vu
    integer          :: il
    integer          :: iu
    real             :: abstol
    integer          :: mout(*)
    real             :: w(*)
    complex          :: Z(*)
    integer          :: ldz
    integer          :: isuppz(*)
    complex          :: work(*)
    integer          :: lwork
    real             :: rwork(*)
    integer          :: lrwork
    integer          :: iwork(*)
    integer          :: liwork
    integer          :: info
end

subroutine magmaf_cheevr_gpu( jobz, range, uplo, n, dA, ldda, vl, vu, il, iu, abstol,  &
        mout, w, dZ, lddz, isuppz, wA, ldwa, wZ, ldwz, work, lwork, rwork, lrwork, iwork,  &
        liwork, info )
    character        :: jobz
    character        :: range
    character        :: uplo
    integer          :: n
    magma_devptr_t   :: dA
    integer          :: ldda
    real             :: vl
    real             :: vu
    integer          :: il
    integer          :: iu
    real             :: abstol
    integer          :: mout(*)
    real             :: w(*)
    magma_devptr_t   :: dZ
    integer          :: lddz
    integer          :: isuppz(*)
    complex          :: wA(*)
    integer          :: ldwa
    complex          :: wZ(*)
    integer          :: ldwz
    complex          :: work(*)
    integer          :: lwork
    real             :: rwork(*)
    integer          :: lrwork
    integer          :: iwork(*)
    integer          :: liwork
    integer          :: info
end

subroutine magmaf_cheevx( jobz, range, uplo, n, A, lda, vl, vu, il, iu, abstol, mout, w,  &
        Z, ldz, work, lwork, rwork, iwork, ifail, info )
    character        :: jobz
    character        :: range
    character        :: uplo
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    real             :: vl
    real             :: vu
    integer          :: il
    integer          :: iu
    real             :: abstol
    integer          :: mout(*)
    real             :: w(*)
    complex          :: Z(*)
    integer          :: ldz
    complex          :: work(*)
    integer          :: lwork
    real             :: rwork(*)
    integer          :: iwork(*)
    integer          :: ifail(*)
    integer          :: info
end

subroutine magmaf_cheevx_gpu( jobz, range, uplo, n, dA, ldda, vl, vu, il, iu, abstol,  &
        mout, w, dZ, lddz, wA, ldwa, wZ, ldwz, work, lwork, rwork, iwork, ifail, info )
    character        :: jobz
    character        :: range
    character        :: uplo
    integer          :: n
    magma_devptr_t   :: dA
    integer          :: ldda
    real             :: vl
    real             :: vu
    integer          :: il
    integer          :: iu
    real             :: abstol
    integer          :: mout(*)
    real             :: w(*)
    magma_devptr_t   :: dZ
    integer          :: lddz
    complex          :: wA(*)
    integer          :: ldwa
    complex          :: wZ(*)
    integer          :: ldwz
    complex          :: work(*)
    integer          :: lwork
    real             :: rwork(*)
    integer          :: iwork(*)
    integer          :: ifail(*)
    integer          :: info
end

subroutine magmaf_chegst( itype, uplo, n, A, lda, B, ldb, info )
    integer          :: itype
    character        :: uplo
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    complex          :: B(*)
    integer          :: ldb
    integer          :: info
end

subroutine magmaf_chegst_gpu( itype, uplo, n, dA, ldda, dB, lddb, info )
    integer          :: itype
    character        :: uplo
    integer          :: n
    magma_devptr_t   :: dA
    integer          :: ldda
    magma_devptr_t   :: dB
    integer          :: lddb
    integer          :: info
end

subroutine magmaf_chegst_m( ngpu, itype, uplo, n, A, lda, B, ldb, info )
    integer          :: ngpu
    integer          :: itype
    character        :: uplo
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    complex          :: B(*)
    integer          :: ldb
    integer          :: info
end

subroutine magmaf_chegvd( itype, jobz, uplo, n, A, lda, B, ldb, w, work, lwork, rwork,  &
        lrwork, iwork, liwork, info )
    integer          :: itype
    character        :: jobz
    character        :: uplo
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    complex          :: B(*)
    integer          :: ldb
    real             :: w(*)
    complex          :: work(*)
    integer          :: lwork
    real             :: rwork(*)
    integer          :: lrwork
    integer          :: iwork(*)
    integer          :: liwork
    integer          :: info
end

subroutine magmaf_chegvd_m( ngpu, itype, jobz, uplo, n, A, lda, B, ldb, w, work, lwork,  &
        rwork, lrwork, iwork, liwork, info )
    integer          :: ngpu
    integer          :: itype
    character        :: jobz
    character        :: uplo
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    complex          :: B(*)
    integer          :: ldb
    real             :: w(*)
    complex          :: work(*)
    integer          :: lwork
    real             :: rwork(*)
    integer          :: lrwork
    integer          :: iwork(*)
    integer          :: liwork
    integer          :: info
end

subroutine magmaf_chegvdx( itype, jobz, range, uplo, n, A, lda, B, ldb, vl, vu, il, iu,  &
        mout, w, work, lwork, rwork, lrwork, iwork, liwork, info )
    integer          :: itype
    character        :: jobz
    character        :: range
    character        :: uplo
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    complex          :: B(*)
    integer          :: ldb
    real             :: vl
    real             :: vu
    integer          :: il
    integer          :: iu
    integer          :: mout(*)
    real             :: w(*)
    complex          :: work(*)
    integer          :: lwork
    real             :: rwork(*)
    integer          :: lrwork
    integer          :: iwork(*)
    integer          :: liwork
    integer          :: info
end

subroutine magmaf_chegvdx_m( ngpu, itype, jobz, range, uplo, n, A, lda, B, ldb, vl, vu,  &
        il, iu, mout, w, work, lwork, rwork, lrwork, iwork, liwork, info )
    integer          :: ngpu
    integer          :: itype
    character        :: jobz
    character        :: range
    character        :: uplo
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    complex          :: B(*)
    integer          :: ldb
    real             :: vl
    real             :: vu
    integer          :: il
    integer          :: iu
    integer          :: mout(*)
    real             :: w(*)
    complex          :: work(*)
    integer          :: lwork
    real             :: rwork(*)
    integer          :: lrwork
    integer          :: iwork(*)
    integer          :: liwork
    integer          :: info
end

subroutine magmaf_chegvdx_2stage( itype, jobz, range, uplo, n, A, lda, B, ldb, vl, vu,  &
        il, iu, mout, w, work, lwork, rwork, lrwork, iwork, liwork, info )
    integer          :: itype
    character        :: jobz
    character        :: range
    character        :: uplo
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    complex          :: B(*)
    integer          :: ldb
    real             :: vl
    real             :: vu
    integer          :: il
    integer          :: iu
    integer          :: mout(*)
    real             :: w(*)
    complex          :: work(*)
    integer          :: lwork
    real             :: rwork(*)
    integer          :: lrwork
    integer          :: iwork(*)
    integer          :: liwork
    integer          :: info
end

subroutine magmaf_chegvdx_2stage_m( ngpu, itype, jobz, range, uplo, n, A, lda, B, ldb,  &
        vl, vu, il, iu, mout, w, work, lwork, rwork, lrwork, iwork, liwork, info )
    integer          :: ngpu
    integer          :: itype
    character        :: jobz
    character        :: range
    character        :: uplo
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    complex          :: B(*)
    integer          :: ldb
    real             :: vl
    real             :: vu
    integer          :: il
    integer          :: iu
    integer          :: mout(*)
    real             :: w(*)
    complex          :: work(*)
    integer          :: lwork
    real             :: rwork(*)
    integer          :: lrwork
    integer          :: iwork(*)
    integer          :: liwork
    integer          :: info
end

subroutine magmaf_chegvr( itype, jobz, range, uplo, n, A, lda, B, ldb, vl, vu, il, iu,  &
        abstol, mout, w, Z, ldz, isuppz, work, lwork, rwork, lrwork, iwork, liwork, info  &
        )
    integer          :: itype
    character        :: jobz
    character        :: range
    character        :: uplo
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    complex          :: B(*)
    integer          :: ldb
    real             :: vl
    real             :: vu
    integer          :: il
    integer          :: iu
    real             :: abstol
    integer          :: mout(*)
    real             :: w(*)
    complex          :: Z(*)
    integer          :: ldz
    integer          :: isuppz(*)
    complex          :: work(*)
    integer          :: lwork
    real             :: rwork(*)
    integer          :: lrwork
    integer          :: iwork(*)
    integer          :: liwork
    integer          :: info
end

subroutine magmaf_chegvx( itype, jobz, range, uplo, n, A, lda, B, ldb, vl, vu, il, iu,  &
        abstol, mout, w, Z, ldz, work, lwork, rwork, iwork, ifail, info )
    integer          :: itype
    character        :: jobz
    character        :: range
    character        :: uplo
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    complex          :: B(*)
    integer          :: ldb
    real             :: vl
    real             :: vu
    integer          :: il
    integer          :: iu
    real             :: abstol
    integer          :: mout(*)
    real             :: w(*)
    complex          :: Z(*)
    integer          :: ldz
    complex          :: work(*)
    integer          :: lwork
    real             :: rwork(*)
    integer          :: iwork(*)
    integer          :: ifail(*)
    integer          :: info
end

subroutine magmaf_chesv( uplo, n, nrhs, A, lda, ipiv, B, ldb, info )
    character        :: uplo
    integer          :: n
    integer          :: nrhs
    complex          :: A(*)
    integer          :: lda
    integer          :: ipiv(*)
    complex          :: B(*)
    integer          :: ldb
    integer          :: info
end

subroutine magmaf_chesv_nopiv_gpu( uplo, n, nrhs, dA, ldda, dB, lddb, info )
    character        :: uplo
    integer          :: n
    integer          :: nrhs
    magma_devptr_t   :: dA
    integer          :: ldda
    magma_devptr_t   :: dB
    integer          :: lddb
    integer          :: info
end

subroutine magmaf_chetrd( uplo, n, A, lda, d, e, tau, work, lwork, info )
    character        :: uplo
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    real             :: d(*)
    real             :: e(*)
    complex          :: tau(*)
    complex          :: work(*)
    integer          :: lwork
    integer          :: info
end

subroutine magmaf_chetrd_gpu( uplo, n, dA, ldda, d, e, tau, wA, ldwa, work, lwork, info )
    character        :: uplo
    integer          :: n
    magma_devptr_t   :: dA
    integer          :: ldda
    real             :: d(*)
    real             :: e(*)
    complex          :: tau(*)
    complex          :: wA(*)
    integer          :: ldwa
    complex          :: work(*)
    integer          :: lwork
    integer          :: info
end

subroutine magmaf_chetrd2_gpu( uplo, n, dA, ldda, d, e, tau, wA, ldwa, work, lwork,  &
        dwork, ldwork, info )
    character        :: uplo
    integer          :: n
    magma_devptr_t   :: dA
    integer          :: ldda
    real             :: d(*)
    real             :: e(*)
    complex          :: tau(*)
    complex          :: wA(*)
    integer          :: ldwa
    complex          :: work(*)
    integer          :: lwork
    magma_devptr_t   :: dwork
    integer          :: ldwork
    integer          :: info
end

integer function magmaf_chetrd_hb2st( uplo, n, nb, Vblksiz, A, lda, d, e, V, ldv, TAU,  &
        compT, T, ldt )
    character        :: uplo
    integer          :: n
    integer          :: nb
    integer          :: Vblksiz
    complex          :: A(*)
    integer          :: lda
    real             :: d(*)
    real             :: e(*)
    complex          :: V(*)
    integer          :: ldv
    complex          :: TAU(*)
    integer          :: compT
    complex          :: T(*)
    integer          :: ldt
end

subroutine magmaf_chetrd_he2hb( uplo, n, nb, A, lda, tau, work, lwork, dT, info )
    character        :: uplo
    integer          :: n
    integer          :: nb
    complex          :: A(*)
    integer          :: lda
    complex          :: tau(*)
    complex          :: work(*)
    integer          :: lwork
    magma_devptr_t   :: dT
    integer          :: info
end

subroutine magmaf_chetrf( uplo, n, A, lda, ipiv, info )
    character        :: uplo
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    integer          :: ipiv(*)
    integer          :: info
end

subroutine magmaf_chetrf_aasen( uplo, cpu_panel, n, A, lda, ipiv, info )
    character        :: uplo
    integer          :: cpu_panel
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    integer          :: ipiv(*)
    integer          :: info
end

subroutine magmaf_chetrf_nopiv( uplo, n, A, lda, info )
    character        :: uplo
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    integer          :: info
end

subroutine magmaf_chetrf_nopiv_cpu( uplo, n, ib, A, lda, info )
    character        :: uplo
    integer          :: n
    integer          :: ib
    complex          :: A(*)
    integer          :: lda
    integer          :: info
end

subroutine magmaf_chetrf_nopiv_gpu( uplo, n, dA, ldda, info )
    character        :: uplo
    integer          :: n
    magma_devptr_t   :: dA
    integer          :: ldda
    integer          :: info
end

subroutine magmaf_chetrs_nopiv_gpu( uplo, n, nrhs, dA, ldda, dB, lddb, info )
    character        :: uplo
    integer          :: n
    integer          :: nrhs
    magma_devptr_t   :: dA
    integer          :: ldda
    magma_devptr_t   :: dB
    integer          :: lddb
    integer          :: info
end

integer function magmaf_clarf_gpu( m, n, dv, dtau, dC, lddc, queue )
    integer          :: m
    integer          :: n
    magma_devptr_t   :: dv
    magma_devptr_t   :: dtau
    magma_devptr_t   :: dC
    integer          :: lddc
    magma_devptr_t   :: queue
end

integer function magmaf_clarfb2_gpu( m, n, k, dV, lddv, dT, lddt, dC, lddc, dwork,  &
        ldwork, queue )
    integer          :: m
    integer          :: n
    integer          :: k
    magma_devptr_t   :: dV
    integer          :: lddv
    magma_devptr_t   :: dT
    integer          :: lddt
    magma_devptr_t   :: dC
    integer          :: lddc
    magma_devptr_t   :: dwork
    integer          :: ldwork
    magma_devptr_t   :: queue
end

subroutine magmaf_clatrsd( uplo, trans, diag, normin, n, A, lda, lambda, x, scale, cnorm,  &
        info )
    character        :: uplo
    character        :: trans
    character        :: diag
    character        :: normin
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    complex          :: lambda
    complex          :: x(*)
    real             :: scale(*)
    real             :: cnorm(*)
    integer          :: info
end

subroutine magmaf_clauum( uplo, n, A, lda, info )
    character        :: uplo
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    integer          :: info
end

subroutine magmaf_clauum_gpu( uplo, n, dA, ldda, info )
    character        :: uplo
    integer          :: n
    magma_devptr_t   :: dA
    integer          :: ldda
    integer          :: info
end

subroutine magmaf_cposv( uplo, n, nrhs, A, lda, B, ldb, info )
    character        :: uplo
    integer          :: n
    integer          :: nrhs
    complex          :: A(*)
    integer          :: lda
    complex          :: B(*)
    integer          :: ldb
    integer          :: info
end

subroutine magmaf_cposv_gpu( uplo, n, nrhs, dA, ldda, dB, lddb, info )
    character        :: uplo
    integer          :: n
    integer          :: nrhs
    magma_devptr_t   :: dA
    integer          :: ldda
    magma_devptr_t   :: dB
    integer          :: lddb
    integer          :: info
end

subroutine magmaf_cpotf2_gpu( uplo, n, dA, ldda, queue, info )
    character        :: uplo
    integer          :: n
    magma_devptr_t   :: dA
    integer          :: ldda
    magma_devptr_t   :: queue
    integer          :: info
end

subroutine magmaf_cpotrf( uplo, n, A, lda, info )
    character        :: uplo
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    integer          :: info
end

subroutine magmaf_cpotrf_gpu( uplo, n, dA, ldda, info )
    character        :: uplo
    integer          :: n
    magma_devptr_t   :: dA
    integer          :: ldda
    integer          :: info
end

subroutine magmaf_cpotrf_m( ngpu, uplo, n, A, lda, info )
    integer          :: ngpu
    character        :: uplo
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    integer          :: info
end

subroutine magmaf_cpotri( uplo, n, A, lda, info )
    character        :: uplo
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    integer          :: info
end

subroutine magmaf_cpotri_gpu( uplo, n, dA, ldda, info )
    character        :: uplo
    integer          :: n
    magma_devptr_t   :: dA
    integer          :: ldda
    integer          :: info
end

subroutine magmaf_cpotrs_gpu( uplo, n, nrhs, dA, ldda, dB, lddb, info )
    character        :: uplo
    integer          :: n
    integer          :: nrhs
    magma_devptr_t   :: dA
    integer          :: ldda
    magma_devptr_t   :: dB
    integer          :: lddb
    integer          :: info
end

subroutine magmaf_csysv_nopiv_gpu( uplo, n, nrhs, dA, ldda, dB, lddb, info )
    character        :: uplo
    integer          :: n
    integer          :: nrhs
    magma_devptr_t   :: dA
    integer          :: ldda
    magma_devptr_t   :: dB
    integer          :: lddb
    integer          :: info
end

subroutine magmaf_csytrf_nopiv_cpu( uplo, n, ib, A, lda, info )
    character        :: uplo
    integer          :: n
    integer          :: ib
    complex          :: A(*)
    integer          :: lda
    integer          :: info
end

subroutine magmaf_csytrf_nopiv_gpu( uplo, n, dA, ldda, info )
    character        :: uplo
    integer          :: n
    magma_devptr_t   :: dA
    integer          :: ldda
    integer          :: info
end

subroutine magmaf_csytrs_nopiv_gpu( uplo, n, nrhs, dA, ldda, dB, lddb, info )
    character        :: uplo
    integer          :: n
    integer          :: nrhs
    magma_devptr_t   :: dA
    integer          :: ldda
    magma_devptr_t   :: dB
    integer          :: lddb
    integer          :: info
end

subroutine magmaf_cstedx( range, n, vl, vu, il, iu, d, e, Z, ldz, rwork, lrwork, iwork,  &
        liwork, dwork, info )
    character        :: range
    integer          :: n
    real             :: vl
    real             :: vu
    integer          :: il
    integer          :: iu
    real             :: d(*)
    real             :: e(*)
    complex          :: Z(*)
    integer          :: ldz
    real             :: rwork(*)
    integer          :: lrwork
    integer          :: iwork(*)
    integer          :: liwork
    magma_devptr_t   :: dwork
    integer          :: info
end

subroutine magmaf_cstedx_m( ngpu, range, n, vl, vu, il, iu, d, e, Z, ldz, rwork, lrwork,  &
        iwork, liwork, info )
    integer          :: ngpu
    character        :: range
    integer          :: n
    real             :: vl
    real             :: vu
    integer          :: il
    integer          :: iu
    real             :: d(*)
    real             :: e(*)
    complex          :: Z(*)
    integer          :: ldz
    real             :: rwork(*)
    integer          :: lrwork
    integer          :: iwork(*)
    integer          :: liwork
    integer          :: info
end

subroutine magmaf_ctrevc3( side, howmany, select, n, T, ldt, VL, ldvl, VR, ldvr, mm,  &
        mout, work, lwork, rwork, info )
    character        :: side
    character        :: howmany
    integer          :: select(*)
    integer          :: n
    complex          :: T(*)
    integer          :: ldt
    complex          :: VL(*)
    integer          :: ldvl
    complex          :: VR(*)
    integer          :: ldvr
    integer          :: mm
    integer          :: mout(*)
    complex          :: work(*)
    integer          :: lwork
    real             :: rwork(*)
    integer          :: info
end

subroutine magmaf_ctrevc3_mt( side, howmany, select, n, T, ldt, VL, ldvl, VR, ldvr, mm,  &
        mout, work, lwork, rwork, info )
    character        :: side
    character        :: howmany
    integer          :: select(*)
    integer          :: n
    complex          :: T(*)
    integer          :: ldt
    complex          :: VL(*)
    integer          :: ldvl
    complex          :: VR(*)
    integer          :: ldvr
    integer          :: mm
    integer          :: mout(*)
    complex          :: work(*)
    integer          :: lwork
    real             :: rwork(*)
    integer          :: info
end

integer function magmaf_ctrsm_m( ngpu, side, uplo, transa, diag, m, n, alpha, A, lda, B,  &
        ldb )
    integer          :: ngpu
    character        :: side
    character        :: uplo
    character        :: transa
    character        :: diag
    integer          :: m
    integer          :: n
    complex          :: alpha
    complex          :: A(*)
    integer          :: lda
    complex          :: B(*)
    integer          :: ldb
end

subroutine magmaf_ctrtri( uplo, diag, n, A, lda, info )
    character        :: uplo
    character        :: diag
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    integer          :: info
end

subroutine magmaf_ctrtri_gpu( uplo, diag, n, dA, ldda, info )
    character        :: uplo
    character        :: diag
    integer          :: n
    magma_devptr_t   :: dA
    integer          :: ldda
    integer          :: info
end

subroutine magmaf_cungbr( vect, m, n, k, A, lda, tau, work, lwork, info )
    character        :: vect
    integer          :: m
    integer          :: n
    integer          :: k
    complex          :: A(*)
    integer          :: lda
    complex          :: tau(*)
    complex          :: work(*)
    integer          :: lwork
    integer          :: info
end

subroutine magmaf_cunghr( n, ilo, ihi, A, lda, tau, dT, nb, info )
    integer          :: n
    integer          :: ilo
    integer          :: ihi
    complex          :: A(*)
    integer          :: lda
    complex          :: tau(*)
    magma_devptr_t   :: dT
    integer          :: nb
    integer          :: info
end

subroutine magmaf_cunghr_m( n, ilo, ihi, A, lda, tau, T, nb, info )
    integer          :: n
    integer          :: ilo
    integer          :: ihi
    complex          :: A(*)
    integer          :: lda
    complex          :: tau(*)
    complex          :: T(*)
    integer          :: nb
    integer          :: info
end

subroutine magmaf_cunglq( m, n, k, A, lda, tau, dT, nb, info )
    integer          :: m
    integer          :: n
    integer          :: k
    complex          :: A(*)
    integer          :: lda
    complex          :: tau(*)
    magma_devptr_t   :: dT
    integer          :: nb
    integer          :: info
end

subroutine magmaf_cungqr( m, n, k, A, lda, tau, dT, nb, info )
    integer          :: m
    integer          :: n
    integer          :: k
    complex          :: A(*)
    integer          :: lda
    complex          :: tau(*)
    magma_devptr_t   :: dT
    integer          :: nb
    integer          :: info
end

subroutine magmaf_cungqr_gpu( m, n, k, dA, ldda, tau, dT, nb, info )
    integer          :: m
    integer          :: n
    integer          :: k
    magma_devptr_t   :: dA
    integer          :: ldda
    complex          :: tau(*)
    magma_devptr_t   :: dT
    integer          :: nb
    integer          :: info
end

subroutine magmaf_cungqr_m( m, n, k, A, lda, tau, T, nb, info )
    integer          :: m
    integer          :: n
    integer          :: k
    complex          :: A(*)
    integer          :: lda
    complex          :: tau(*)
    complex          :: T(*)
    integer          :: nb
    integer          :: info
end

subroutine magmaf_cungqr2( m, n, k, A, lda, tau, info )
    integer          :: m
    integer          :: n
    integer          :: k
    complex          :: A(*)
    integer          :: lda
    complex          :: tau(*)
    integer          :: info
end

subroutine magmaf_cunmbr( vect, side, trans, m, n, k, A, lda, tau, C, ldc, work, lwork,  &
        info )
    character        :: vect
    character        :: side
    character        :: trans
    integer          :: m
    integer          :: n
    integer          :: k
    complex          :: A(*)
    integer          :: lda
    complex          :: tau(*)
    complex          :: C(*)
    integer          :: ldc
    complex          :: work(*)
    integer          :: lwork
    integer          :: info
end

subroutine magmaf_cunmlq( side, trans, m, n, k, A, lda, tau, C, ldc, work, lwork, info )
    character        :: side
    character        :: trans
    integer          :: m
    integer          :: n
    integer          :: k
    complex          :: A(*)
    integer          :: lda
    complex          :: tau(*)
    complex          :: C(*)
    integer          :: ldc
    complex          :: work(*)
    integer          :: lwork
    integer          :: info
end

subroutine magmaf_cunmrq( side, trans, m, n, k, A, lda, tau, C, ldc, work, lwork, info )
    character        :: side
    character        :: trans
    integer          :: m
    integer          :: n
    integer          :: k
    complex          :: A(*)
    integer          :: lda
    complex          :: tau(*)
    complex          :: C(*)
    integer          :: ldc
    complex          :: work(*)
    integer          :: lwork
    integer          :: info
end

subroutine magmaf_cunmql( side, trans, m, n, k, A, lda, tau, C, ldc, work, lwork, info )
    character        :: side
    character        :: trans
    integer          :: m
    integer          :: n
    integer          :: k
    complex          :: A(*)
    integer          :: lda
    complex          :: tau(*)
    complex          :: C(*)
    integer          :: ldc
    complex          :: work(*)
    integer          :: lwork
    integer          :: info
end

subroutine magmaf_cunmql2_gpu( side, trans, m, n, k, dA, ldda, tau, dC, lddc, wA, ldwa,  &
        info )
    character        :: side
    character        :: trans
    integer          :: m
    integer          :: n
    integer          :: k
    magma_devptr_t   :: dA
    integer          :: ldda
    complex          :: tau(*)
    magma_devptr_t   :: dC
    integer          :: lddc
    complex          :: wA(*)
    integer          :: ldwa
    integer          :: info
end

subroutine magmaf_cunmqr( side, trans, m, n, k, A, lda, tau, C, ldc, work, lwork, info )
    character        :: side
    character        :: trans
    integer          :: m
    integer          :: n
    integer          :: k
    complex          :: A(*)
    integer          :: lda
    complex          :: tau(*)
    complex          :: C(*)
    integer          :: ldc
    complex          :: work(*)
    integer          :: lwork
    integer          :: info
end

subroutine magmaf_cunmqr_gpu( side, trans, m, n, k, dA, ldda, tau, dC, lddc, hwork,  &
        lwork, dT, nb, info )
    character        :: side
    character        :: trans
    integer          :: m
    integer          :: n
    integer          :: k
    magma_devptr_t   :: dA
    integer          :: ldda
    complex          :: tau(*)
    magma_devptr_t   :: dC
    integer          :: lddc
    complex          :: hwork(*)
    integer          :: lwork
    magma_devptr_t   :: dT
    integer          :: nb
    integer          :: info
end

subroutine magmaf_cunmqr2_gpu( side, trans, m, n, k, dA, ldda, tau, dC, lddc, wA, ldwa,  &
        info )
    character        :: side
    character        :: trans
    integer          :: m
    integer          :: n
    integer          :: k
    magma_devptr_t   :: dA
    integer          :: ldda
    complex          :: tau(*)
    magma_devptr_t   :: dC
    integer          :: lddc
    complex          :: wA(*)
    integer          :: ldwa
    integer          :: info
end

subroutine magmaf_cunmqr_m( ngpu, side, trans, m, n, k, A, lda, tau, C, ldc, work, lwork,  &
        info )
    integer          :: ngpu
    character        :: side
    character        :: trans
    integer          :: m
    integer          :: n
    integer          :: k
    complex          :: A(*)
    integer          :: lda
    complex          :: tau(*)
    complex          :: C(*)
    integer          :: ldc
    complex          :: work(*)
    integer          :: lwork
    integer          :: info
end

subroutine magmaf_cunmtr( side, uplo, trans, m, n, A, lda, tau, C, ldc, work, lwork, info  &
        )
    character        :: side
    character        :: uplo
    character        :: trans
    integer          :: m
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    complex          :: tau(*)
    complex          :: C(*)
    integer          :: ldc
    complex          :: work(*)
    integer          :: lwork
    integer          :: info
end

subroutine magmaf_cunmtr_gpu( side, uplo, trans, m, n, dA, ldda, tau, dC, lddc, wA, ldwa,  &
        info )
    character        :: side
    character        :: uplo
    character        :: trans
    integer          :: m
    integer          :: n
    magma_devptr_t   :: dA
    integer          :: ldda
    complex          :: tau(*)
    magma_devptr_t   :: dC
    integer          :: lddc
    complex          :: wA(*)
    integer          :: ldwa
    integer          :: info
end

subroutine magmaf_cunmtr_m( ngpu, side, uplo, trans, m, n, A, lda, tau, C, ldc, work,  &
        lwork, info )
    integer          :: ngpu
    character        :: side
    character        :: uplo
    character        :: trans
    integer          :: m
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    complex          :: tau(*)
    complex          :: C(*)
    integer          :: ldc
    complex          :: work(*)
    integer          :: lwork
    integer          :: info
end

integer function magmaf_c_isnan( x )
    complex          :: x
end

integer function magmaf_c_isinf( x )
    complex          :: x
end

integer function magmaf_c_isnan_inf( x )
    complex          :: x
end

integer function magmaf_cnan_inf( uplo, m, n, A, lda, cnt_nan, cnt_inf )
    character        :: uplo
    integer          :: m
    integer          :: n
    complex          :: A(*)
    integer          :: lda
    integer          :: cnt_nan(*)
    integer          :: cnt_inf(*)
end

integer function magmaf_cnan_inf_gpu( uplo, m, n, dA, ldda, cnt_nan, cnt_inf, queue )
    character        :: uplo
    integer          :: m
    integer          :: n
    magma_devptr_t   :: dA
    integer          :: ldda
    integer          :: cnt_nan(*)
    integer          :: cnt_inf(*)
    magma_devptr_t   :: queue
end

subroutine magmaf_cprint( m, n, A, lda )
    integer          :: m
    integer          :: n
    complex          :: A(*)
    integer          :: lda
end

subroutine magmaf_cprint_gpu( m, n, dA, ldda, queue )
    integer          :: m
    integer          :: n
    magma_devptr_t   :: dA
    integer          :: ldda
    magma_devptr_t   :: queue
end

subroutine magmaf_cpanel_to_q( uplo, ib, A, lda, work )
    character        :: uplo
    integer          :: ib
    complex          :: A(*)
    integer          :: lda
    complex          :: work(*)
end

subroutine magmaf_cq_to_panel( uplo, ib, A, lda, work )
    character        :: uplo
    integer          :: ib
    complex          :: A(*)
    integer          :: lda
    complex          :: work(*)
end

end interface

end module magma_cfortran
