LCOV - code coverage report
Current view: top level - shared/common/src/28_numeric_noabirule - abi_xgemm.f90 (source / functions) Coverage Total Hit
Test: coverage.info Lines: 65.8 % 73 48
Test Date: 2026-09-20 15:27:41 Functions: 81.8 % 11 9

            Line data    Source code
       1              : !{\src2tex{textfont=tt}}
       2              : !!****f* m_abi_linalg/abi_xgemm
       3              : !! NAME
       4              : !!  abi_xgemm
       5              : !!
       6              : !! FUNCTION
       7              : !!  abi_xgemm is the generic function that solves:
       8              : !!
       9              : !!    C := alpha*op( A )*op( B ) + beta*C,
      10              : !!
      11              : !!  where  op( X ) is one of
      12              : !!
      13              : !!    op( X ) = X   or   op( X ) = X**T,
      14              : !!
      15              : !! alpha and beta are scalars, and A, B and C are matrices, with op( A )
      16              : !! an m by k matrix,  op( B )  a  k by n matrix and  C an m by n matrix.
      17              : !!
      18              : !! COPYRIGHT
      19              : !!  Copyright (C) 2001-2026 ABINIT group (LNguyen,FDahm (CS))
      20              : !!  This file is distributed under the terms of the
      21              : !!  GNU General Public License, see ~abinit/COPYING
      22              : !!  or http://www.gnu.org/copyleft/gpl.txt .
      23              : !!
      24              : !! SOURCE
      25              : 
      26              : !!***
      27              : 
      28              : !!****f* m_abi_gpu_linalg/abi_xgemm_gpu_cptr
      29              : !! NAME
      30              : !!  abi_gpu_xgemm_gpu_cptr
      31              : !!
      32              : !! FUNCTION
      33              : !!  Compute a scalar-matrix-matrix product and return a scalar-matrix product on GPU
      34              : !!  c = alpha * op(a) * op(b) + beta * c
      35              : !!
      36              : !! INPUTS
      37              : !!  cplx  = 1 if real 2 if complex
      38              : !!  transa= from of op(a) to be used in the matrix multiplication
      39              : !!  transb= from of op(b) to be used in the matrix multiplication
      40              : !!  m     = number of rows of the matrix op(a) and of the matrix c
      41              : !!  n     = number of rows of the matrix op(b) and the number of columns of the matrix c
      42              : !!  k     = number of columns of the matrix op(a) and the number of rows of the matrix op(b)
      43              : !!  alpha = alpha scalar coefficient for matrix op(a)
      44              : !!  a = pointer to gpu memory location of  matrix a
      45              : !!  lda   = first dimension of a
      46              : !!  b = pointer to gpu memory location of  matrix b
      47              : !!  ldb   = first dimension of b
      48              : !!  beta  = beta scalar coefficient for matrix c
      49              : !!  c = pointer to gpu memory location of  matrix c
      50              : !!  ldc   = first dimension of c
      51              : !!
      52              : !! OUTPUT
      53              : !!  c     = c matrix
      54              : !!
      55              : !! SOURCE
      56              : 
      57            0 : subroutine abi_xgemm_gpu_cptr(cplx,transa,transb,m,n,k,alpha,a,lda,b,ldb,beta,c,ldc)
      58              : 
      59              : !Arguments ------------------------------------
      60              :  integer,intent(in) :: cplx,lda,ldb,ldc,m,n,k
      61              :  complex(dp),intent(in) :: alpha,beta
      62              :  character(len=1),intent(in) :: transa,transb
      63              :  type(c_ptr),intent(in) :: a,b
      64              :  type(c_ptr),intent(in) :: c
      65              : ! *********************************************************************
      66              : 
      67            0 :   if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then
      68            0 :     ABI_BUG("You requested to run on CPU to a GPU wrapper :/")
      69              :   end if
      70              : 
      71              : #ifdef HAVE_GPU
      72              :   call gpu_xgemm(cplx,transa,transb,m,n,k,alpha,&
      73              :       a,lda,b,ldb,beta,c,ldc)
      74              : 
      75              :   if (abi_linalg_gpu_mode == ABI_GPU_OPENMP) then
      76              :     ! CUDA/HIP linalg calls are run asynchronously and OpenMP is unaware of them.
      77              :     ! Therefore, we issue a stream sync here to avoid
      78              :     ! potential mistakes in calling context.
      79              :     call gpu_linalg_stream_synchronize()
      80              :   end if
      81              : 
      82              : #else
      83              :   ! Unused if GPU code disabled
      84              :   ABI_UNUSED((/cplx,lda,ldb,ldc,m,n,k/))
      85              :   ABI_UNUSED((/alpha,beta/))
      86              :   ABI_UNUSED((/transa,transb/))
      87              :   ABI_UNUSED((/a,b,c/))
      88              : #endif
      89              : 
      90              : end subroutine abi_xgemm_gpu_cptr
      91              : !!***
      92              : 
      93              : !----------------------------------------------------------------------
      94              : 
      95              : !!****f* m_abi_linalg/abi_zgemm_2dd
      96              : !! NAME
      97              : !! abi_zgemm_2dd
      98              : !!
      99              : !! FUNCTION
     100              : !!
     101              : !! INPUTS
     102              : !!
     103              : !! SOURCE
     104              : 
     105     58672501 :  subroutine abi_zgemm_2dd(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC,&
     106              :      gpu_option)
     107              : 
     108              :  !Arguments------------------------------------
     109              :  character(len=1),intent(in) :: TRANSA
     110              :  character(len=1),intent(in) :: TRANSB
     111              :  integer,intent(in) :: K
     112              :  integer,intent(in) :: LDA
     113              :  integer,intent(in) :: LDB
     114              :  integer,intent(in) :: LDC
     115              :  integer,intent(in) :: M
     116              :  integer,intent(in) :: N
     117              :  complex(dp),intent(in) :: ALPHA
     118              :  complex(dp),intent(in) :: BETA
     119              :  complex(dp),target,intent(in) :: A(*)
     120              :  complex(dp),target,intent(in) :: B(*)
     121              :  complex(dp),target,intent(inout) :: C(*)
     122              :  !Optionals -----------------------------------
     123              :  integer, intent(in), optional :: gpu_option
     124              : 
     125              :  !Local variables-------------------------------
     126              :  integer  :: gpu_option_,info
     127              : #ifdef DEV_LINALG_TIMING
     128              :  real(dp) :: tsec(2)
     129              :  call timab(TIMAB_XGEMM,1,tsec)
     130              : #endif
     131              : 
     132     58672501 :  gpu_option_=ABI_GPU_DISABLED ; if(PRESENT(gpu_option)) gpu_option_ = gpu_option
     133              : 
     134              : #if defined(DEBUG_VERBOSE) && defined(HAVE_OPENMP_OFFLOAD)
     135              :  if ( gpu_option_ == ABI_GPU_OPENMP ) then
     136              :    ABI_CHECK(xomp_target_is_present(c_loc(a)), "Array isn't mapped on GPU")
     137              :    ABI_CHECK(xomp_target_is_present(c_loc(b)), "Array isn't mapped on GPU")
     138              :    ABI_CHECK(xomp_target_is_present(c_loc(c)), "Array isn't mapped on GPU")
     139              :  end if
     140              : #endif
     141              : 
     142     50232353 :  if(gpu_option_/=ABI_GPU_DISABLED) then
     143            0 :    if(gpu_option == ABI_GPU_LEGACY .or. gpu_option == ABI_GPU_KOKKOS) then
     144              :      call abi_xgemm_gpu_cptr(2,transa,transb,m,n,k,alpha,&
     145              :          c_loc(a),lda,&
     146              :          c_loc(b),ldb,&
     147              :          beta,&
     148            0 :          c_loc(c),ldc)
     149            0 :    else if(gpu_option == ABI_GPU_OPENMP) then
     150              : #ifdef HAVE_OPENMP_OFFLOAD
     151              :      !$OMP TARGET DATA USE_DEVICE_ADDR(a,b,c)
     152              :      call abi_xgemm_gpu_cptr(2,transa,transb,m,n,k,alpha,&
     153              :        c_loc(a),lda,&
     154              :        c_loc(b),ldb,&
     155              :        beta,&
     156              :        c_loc(c),ldc)
     157              :      !$OMP END TARGET DATA
     158              : #endif
     159              :    else
     160            0 :      ABI_BUG(sjoin("Unhandled GPU mode:", itoa(gpu_option)))
     161              :    end if
     162     58672501 :  else if (ABI_LINALG_PLASMA_ISON) then
     163            0 :    info = -1
     164              : #ifdef HAVE_LINALG_PLASMA
     165              :    !write(std_out,*)"Will call PLASMA_zgemm_c"
     166              :    info = PLASMA_zgemm_c(trans_plasma(TRANSA),trans_plasma(TRANSB),M,N,K,ALPHA,&
     167              : &    c_loc(A),LDA,c_loc(B),LDB,BETA,c_loc(C),LDC)
     168              : #endif
     169            0 :    ABI_CHECK(info==0,"PLASMA_zgemm_c returned info !=0")
     170              :  else
     171            0 :    if (use_zgemm3m(m,n,k)) then
     172            0 :      call _ZGEMM3M(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
     173              :    else
     174     58672501 :      call zgemm(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
     175              :    end if
     176              :  end if
     177              : 
     178              : #ifdef DEV_LINALG_TIMING
     179              :  call timab(TIMAB_XGEMM,2,tsec)
     180              : #endif
     181              : 
     182     58672501 : end subroutine abi_zgemm_2dd
     183              : !!***
     184              : 
     185              : !----------------------------------------------------------------------
     186     41807885 :  subroutine abi_zgemm_2d(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC,&
     187              :      gpu_option)
     188              : 
     189              :  !Arguments------------------------------------
     190              :  character(len=1),intent(in) :: TRANSA
     191              :  character(len=1),intent(in) :: TRANSB
     192              :  integer,intent(in) :: K
     193              :  integer,intent(in) :: LDA
     194              :  integer,intent(in) :: LDB
     195              :  integer,intent(in) :: LDC
     196              :  integer,intent(in) :: M
     197              :  integer,intent(in) :: N
     198              :  complex(dp),intent(in) :: ALPHA
     199              :  complex(dp),intent(in) :: BETA
     200              :  complex(dp),target,intent(in) :: A(lda,*)
     201              :  complex(dp),target,intent(in) :: B(ldb,*)
     202              :  complex(dp),target,intent(inout) :: C(ldc,*)
     203              :  !Optionals -----------------------------------
     204              :  integer, intent(in), optional :: gpu_option
     205              : 
     206              :  !Local variables-------------------------------
     207              :  integer  :: gpu_option_
     208              : #ifdef DEV_LINALG_TIMING
     209              :  real(dp) :: tsec(2)
     210              :  call timab(TIMAB_XGEMM,1,tsec)
     211              : #endif
     212              : 
     213     41807853 :  gpu_option_=ABI_GPU_DISABLED ; if(PRESENT(gpu_option)) gpu_option_ = gpu_option
     214              : 
     215              :  call abi_zgemm_2dd(transa,transb,m,n,k,alpha,&
     216              :  &    a,lda,&
     217              :  &    b,ldb,&
     218              :  &    beta,&
     219              :  &    c,ldc,&
     220     41807885 :  &    gpu_option=gpu_option_)
     221              : 
     222     41807853 : end subroutine abi_zgemm_2d
     223              : !!***
     224              : 
     225              : !----------------------------------------------------------------------
     226            0 :  subroutine abi_zgemm_3d(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC,&
     227              :      gpu_option)
     228              : 
     229              :  !Arguments------------------------------------
     230              :  character(len=1),intent(in) :: TRANSA
     231              :  character(len=1),intent(in) :: TRANSB
     232              :  integer,intent(in) :: K
     233              :  integer,intent(in) :: LDA
     234              :  integer,intent(in) :: LDB
     235              :  integer,intent(in) :: LDC
     236              :  integer,intent(in) :: M
     237              :  integer,intent(in) :: N
     238              :  complex(dp),intent(in) :: ALPHA
     239              :  complex(dp),intent(in) :: BETA
     240              :  complex(dp),target,intent(in) :: A(:,:)
     241              :  complex(dp),target,intent(in) :: B(:,:,:)
     242              :  complex(dp),target,intent(inout) :: C(:,:)
     243              :  !Optionals -----------------------------------
     244              :  integer, intent(in), optional :: gpu_option
     245              : 
     246              :  !Local variables-------------------------------
     247              :  integer  :: gpu_option_
     248              : #ifdef DEV_LINALG_TIMING
     249              :  real(dp) :: tsec(2)
     250              :  call timab(TIMAB_XGEMM,1,tsec)
     251              : #endif
     252              : 
     253            0 :  gpu_option_=ABI_GPU_DISABLED ; if(PRESENT(gpu_option)) gpu_option_ = gpu_option
     254              : 
     255              :  call abi_zgemm_2dd(transa,transb,m,n,k,alpha,&
     256              :  &    a,lda,&
     257              :  &    b,ldb,&
     258              :  &    beta,&
     259              :  &    c,ldc,&
     260            0 :  &    gpu_option=gpu_option_)
     261              : 
     262            0 : end subroutine abi_zgemm_3d
     263              : !!***
     264              : 
     265              : !----------------------------------------------------------------------
     266              : 
     267              : !!****f* m_abi_linalg/abi_d2zgemm
     268              : !! NAME
     269              : !! abi_d2zgemm
     270              : !!
     271              : !! FUNCTION
     272              : !!
     273              : !! INPUTS
     274              : !!
     275              : !! SOURCE
     276              : !!
     277    123349248 : subroutine abi_d2zgemm(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC,&
     278              :                        x_cplx,gpu_option)
     279              : 
     280              : !Arguments ------------------------------------
     281              :  character(len=1), intent(in) :: transa
     282              :  character(len=1), intent(in) :: transb
     283              :  integer, intent(in) :: lda
     284              :  integer, intent(in) :: ldb
     285              :  integer, intent(in) :: ldc
     286              :  integer, intent(in) :: m
     287              :  integer, intent(in) :: n
     288              :  integer, intent(in) :: k
     289              :  complex(dp),intent(in) :: alpha
     290              :  complex(dp),intent(in) :: beta
     291              :  real(dp),target,intent(in)    :: a(*)    ! FIXME should be lda * x_cplx
     292              :  real(dp),target,intent(in)    :: b(*)
     293              :  real(dp),target,intent(inout) :: c(*)
     294              :  !Optionals -----------------------------------
     295              :  integer, intent(in), optional :: x_cplx, gpu_option
     296              : 
     297              : !Local variables-------------------------------
     298              :  integer  :: cplx_,gpu_option_,info
     299              : #ifdef DEV_LINALG_TIMING
     300              :  real(dp) :: tsec(2)
     301              :  call timab(TIMAB_XGEMM,1,tsec)
     302              : #endif
     303              : 
     304    123349248 :  cplx_=1 ; if(PRESENT(x_cplx)) cplx_ = x_cplx
     305    123349248 :  gpu_option_=ABI_GPU_DISABLED ; if(PRESENT(gpu_option)) gpu_option_ = gpu_option
     306              : 
     307              : #if defined(DEBUG_VERBOSE) && defined(HAVE_OPENMP_OFFLOAD)
     308              :  if ( gpu_option_ == ABI_GPU_OPENMP ) then
     309              :    ABI_CHECK(xomp_target_is_present(c_loc(a)), "Array isn't mapped on GPU")
     310              :    ABI_CHECK(xomp_target_is_present(c_loc(b)), "Array isn't mapped on GPU")
     311              :    ABI_CHECK(xomp_target_is_present(c_loc(c)), "Array isn't mapped on GPU")
     312              :  end if
     313              : #endif
     314              : 
     315    123349248 :  if(gpu_option_/=ABI_GPU_DISABLED) then
     316              : #ifdef HAVE_OPENMP_OFFLOAD
     317              :    !$OMP TARGET DATA USE_DEVICE_ADDR(a,b,c) IF(gpu_option_==ABI_GPU_OPENMP)
     318              : #endif
     319              :    call abi_xgemm_gpu_cptr(cplx_,transa,transb,m,n,k,alpha,&
     320              :        c_loc(a),lda,&
     321              :        c_loc(b),ldb,&
     322              :        beta,&
     323            0 :        c_loc(c),ldc)
     324              : #ifdef HAVE_OPENMP_OFFLOAD
     325              :    !$OMP END TARGET DATA
     326              : #endif
     327    123349248 :  else if (ABI_LINALG_PLASMA_ISON) then
     328            0 :    info = -1
     329              : #ifdef HAVE_LINALG_PLASMA
     330              :    !write(std_out,*) "Will call plasma_[zd]gemm"
     331              :    if (cplx_ == 2) then
     332              :       info = PLASMA_zgemm_c(trans_plasma(TRANSA),trans_plasma(TRANSB),M,N,K,&
     333              : &      ALPHA,A,LDA,B,LDB,BETA,C,LDC)
     334              :    else
     335              :       info = PLASMA_dgemm_c(trans_plasma(TRANSA),trans_plasma(TRANSB),M,N,K,&
     336              : &      real(ALPHA,dp),A,LDA,B,LDB,real(BETA,dp),C,LDC)
     337              :    end if
     338              : #endif
     339            0 :    ABI_CHECK(info==0,"PLASMA_[z,d]gemm_c returned info !=0")
     340              :  else
     341    123349248 :    if (cplx_ == 2) then
     342            0 :      if (use_zgemm3m(m,n,k)) then
     343            0 :        call _ZGEMM3M(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
     344              :      else
     345    118351131 :        call zgemm(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
     346              :      end if
     347              :    else
     348      4998117 :      call dgemm(TRANSA,TRANSB,M,N,K,real(ALPHA,dp),A,LDA,B,LDB,real(BETA,dp),C,LDC)
     349              :    end if
     350              :  end if
     351              : 
     352              : #ifdef DEV_LINALG_TIMING
     353              :  call timab(TIMAB_XGEMM,2,tsec)
     354              : #endif
     355              : 
     356    123349248 : end subroutine abi_d2zgemm
     357              : !!***
     358              : 
     359              : !----------------------------------------------------------------------
     360              : 
     361              : !!****f* m_abi_linalg/abi_zgemm_2r
     362              : !! NAME
     363              : !! abi_zgemm_2r
     364              : !!
     365              : !! FUNCTION
     366              : !!
     367              : !! INPUTS
     368              : !!
     369              : !!
     370              : !! SOURCE
     371              : 
     372       323862 :  subroutine abi_zgemm_2r(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC,&
     373              : &                        gpu_option)
     374              : 
     375              :  !Arguments------------------------------------
     376              :  character(len=1),intent(in) :: TRANSA
     377              :  character(len=1),intent(in) :: TRANSB
     378              :  integer,intent(in) :: K
     379              :  integer,intent(in) :: LDA
     380              :  integer,intent(in) :: LDB
     381              :  integer,intent(in) :: LDC
     382              :  integer,intent(in) :: M
     383              :  integer,intent(in) :: N
     384              :  complex(dp),intent(in) :: ALPHA
     385              :  complex(dp),intent(in) :: BETA
     386              :  real(dp),target,intent(in) :: A(*)
     387              :  real(dp),target,intent(in) :: B(*)
     388              :  real(dp),target,intent(inout) :: C(*)
     389              :  !Optionals -----------------------------------
     390              :  integer, intent(in), optional :: gpu_option
     391              : 
     392              : !Local variables-------------------------------
     393              :  integer  :: gpu_option_
     394              : 
     395       323862 :  gpu_option_=ABI_GPU_DISABLED ; if(PRESENT(gpu_option)) gpu_option_ = gpu_option
     396              : 
     397              :  call abi_d2zgemm(transa,transb,m,n,k,alpha,&
     398              :  &    a,lda,&
     399              :  &    b,ldb,&
     400              :  &    beta,&
     401              :  &    c,ldc,&
     402       323862 :  &    x_cplx=2,gpu_option=gpu_option_)
     403              : 
     404       323862 : end subroutine abi_zgemm_2r
     405              : !!***
     406              : 
     407              : !----------------------------------------------------------------------
     408              : 
     409              : !!****f* m_abi_linalg/abi_d2zgemm_222
     410              : !! NAME
     411              : !! abi_d2zgemm_333
     412              : !!
     413              : !! FUNCTION
     414              : !!
     415              : !! INPUTS
     416              : !!
     417              : !! SOURCE
     418              : !!
     419              : subroutine abi_d2zgemm_222(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC,&
     420              :                        x_cplx,gpu_option)
     421              : 
     422              : !Arguments ------------------------------------
     423              :  character(len=1), intent(in) :: transa
     424              :  character(len=1), intent(in) :: transb
     425              :  integer, intent(in) :: lda
     426              :  integer, intent(in) :: ldb
     427              :  integer, intent(in) :: ldc
     428              :  integer, intent(in) :: m
     429              :  integer, intent(in) :: n
     430              :  integer, intent(in) :: k
     431              :  complex(dp),intent(in) :: alpha
     432              :  complex(dp),intent(in) :: beta
     433              :  real(dp),target, intent(in)    :: a(:,:)
     434              :  real(dp),target, intent(in)    :: b(:,:)
     435              :  real(dp),target, intent(inout) :: c(:,:)
     436              :  !Optionals -----------------------------------
     437              :  integer, intent(in), optional :: x_cplx, gpu_option
     438              : 
     439              : !Local variables-------------------------------
     440              :  integer  :: cplx_,gpu_option_
     441              : 
     442              :  cplx_=1 ; if(PRESENT(x_cplx)) cplx_ = x_cplx
     443              :  gpu_option_=ABI_GPU_DISABLED ; if(PRESENT(gpu_option)) gpu_option_ = gpu_option
     444              : 
     445              :  call abi_d2zgemm(transa,transb,m,n,k,alpha,&
     446              :  &    a,lda,&
     447              :  &    b,ldb,&
     448              :  &    beta,&
     449              :  &    c,ldc,&
     450              :  &    x_cplx=cplx_,gpu_option=gpu_option_)
     451              : 
     452              : end subroutine abi_d2zgemm_222
     453              : !!***
     454              : 
     455              : !----------------------------------------------------------------------
     456              : 
     457              : !!****f* m_abi_linalg/abi_d2zgemm_233
     458              : !! NAME
     459              : !! abi_d2zgemm_333
     460              : !!
     461              : !! FUNCTION
     462              : !!
     463              : !! INPUTS
     464              : !!
     465              : !! SOURCE
     466              : !!
     467        59496 : subroutine abi_d2zgemm_233(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC,&
     468              :                        x_cplx,gpu_option)
     469              : 
     470              : !Arguments ------------------------------------
     471              :  character(len=1), intent(in) :: transa
     472              :  character(len=1), intent(in) :: transb
     473              :  integer, intent(in) :: lda
     474              :  integer, intent(in) :: ldb
     475              :  integer, intent(in) :: ldc
     476              :  integer, intent(in) :: m
     477              :  integer, intent(in) :: n
     478              :  integer, intent(in) :: k
     479              :  complex(dp),intent(in) :: alpha
     480              :  complex(dp),intent(in) :: beta
     481              :  real(dp),target, intent(in)    :: a(:,:)
     482              :  real(dp),target, intent(in)    :: b(:,:,:)
     483              :  real(dp),target, intent(inout) :: c(:,:,:)
     484              :  !Optionals -----------------------------------
     485              :  integer, intent(in), optional :: x_cplx, gpu_option
     486              : 
     487              : !Local variables-------------------------------
     488              :  integer  :: cplx_,gpu_option_
     489              : 
     490        59496 :  cplx_=1 ; if(PRESENT(x_cplx)) cplx_ = x_cplx
     491        59496 :  gpu_option_=ABI_GPU_DISABLED ; if(PRESENT(gpu_option)) gpu_option_ = gpu_option
     492              : 
     493              :  call abi_d2zgemm(transa,transb,m,n,k,alpha,&
     494              :  &    a,lda,&
     495              :  &    b,ldb,&
     496              :  &    beta,&
     497              :  &    c,ldc,&
     498        59496 :  &    x_cplx=cplx_,gpu_option=gpu_option_)
     499              : 
     500        59496 : end subroutine abi_d2zgemm_233
     501              : !!***
     502              : 
     503              : !----------------------------------------------------------------------
     504              : 
     505              : !!****f* m_abi_linalg/abi_d2zgemm_333
     506              : !! NAME
     507              : !! abi_d2zgemm_333
     508              : !!
     509              : !! FUNCTION
     510              : !!
     511              : !! INPUTS
     512              : !!
     513              : !! SOURCE
     514              : !!
     515            0 : subroutine abi_d2zgemm_333(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC,&
     516              :                        x_cplx,gpu_option)
     517              : 
     518              : !Arguments ------------------------------------
     519              :  character(len=1), intent(in) :: transa
     520              :  character(len=1), intent(in) :: transb
     521              :  integer, intent(in) :: lda
     522              :  integer, intent(in) :: ldb
     523              :  integer, intent(in) :: ldc
     524              :  integer, intent(in) :: m
     525              :  integer, intent(in) :: n
     526              :  integer, intent(in) :: k
     527              :  complex(dp),intent(in) :: alpha
     528              :  complex(dp),intent(in) :: beta
     529              :  real(dp),target, intent(in)    :: a(:,:,:)
     530              :  real(dp),target, intent(in)    :: b(:,:,:)
     531              :  real(dp),target, intent(inout) :: c(:,:,:)
     532              :  !Optionals -----------------------------------
     533              :  integer, intent(in), optional :: x_cplx, gpu_option
     534              : 
     535              : !Local variables-------------------------------
     536              :  integer  :: cplx_,gpu_option_
     537              : 
     538            0 :  cplx_=1 ; if(PRESENT(x_cplx)) cplx_ = x_cplx
     539            0 :  gpu_option_=ABI_GPU_DISABLED ; if(PRESENT(gpu_option)) gpu_option_ = gpu_option
     540              : 
     541              :  call abi_d2zgemm(transa,transb,m,n,k,alpha,&
     542              :  &    a,lda,&
     543              :  &    b,ldb,&
     544              :  &    beta,&
     545              :  &    c,ldc,&
     546            0 :  &    x_cplx=cplx_,gpu_option=gpu_option_)
     547              : 
     548            0 : end subroutine abi_d2zgemm_333
     549              : !!***
     550              : 
     551              : 
     552              : !----------------------------------------------------------------------
     553              : 
     554              : !!****f* m_abi_linalg/abi_d2zgemm_313
     555              : !! NAME
     556              : !! abi_d2zgemm_313
     557              : !!
     558              : !! FUNCTION
     559              : !!
     560              : !! INPUTS
     561              : !!
     562              : !! SOURCE
     563              : !!
     564        25082 : subroutine abi_d2zgemm_313(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC,&
     565              :                        x_cplx,gpu_option)
     566              : 
     567              : !Arguments ------------------------------------
     568              :  character(len=1), intent(in) :: transa
     569              :  character(len=1), intent(in) :: transb
     570              :  integer, intent(in) :: lda
     571              :  integer, intent(in) :: ldb
     572              :  integer, intent(in) :: ldc
     573              :  integer, intent(in) :: m
     574              :  integer, intent(in) :: n
     575              :  integer, intent(in) :: k
     576              :  complex(dp),intent(in) :: alpha
     577              :  complex(dp),intent(in) :: beta
     578              :  real(dp),target, intent(in)    :: a(:,:,:)    ! FIXME should be lda * x_cplx
     579              :  real(dp),target, intent(in)    :: b(:)
     580              :  real(dp),target, intent(inout) :: c(:,:,:)
     581              :  !Optionals -----------------------------------
     582              :  integer, intent(in), optional :: x_cplx, gpu_option
     583              : 
     584              : !Local variables-------------------------------
     585              :  integer  :: cplx_,gpu_option_
     586              : 
     587        25082 :  cplx_=1 ; if(PRESENT(x_cplx)) cplx_ = x_cplx
     588        25082 :  gpu_option_=ABI_GPU_DISABLED ; if(PRESENT(gpu_option)) gpu_option_ = gpu_option
     589              : 
     590              :  call abi_d2zgemm(transa,transb,m,n,k,alpha,&
     591              :  &    a,lda,&
     592              :  &    b,ldb,&
     593              :  &    beta,&
     594              :  &    c,ldc,&
     595        25082 :  &    x_cplx=cplx_,gpu_option=gpu_option_)
     596              : 
     597        25082 : end subroutine abi_d2zgemm_313
     598              : !!***
     599              : 
     600              : 
     601              : !!****f* m_abi_linalg/abi_d2zgemm_331
     602              : !! NAME
     603              : !! abi_d2zgemm_331
     604              : !!
     605              : !! FUNCTION
     606              : !!
     607              : !! INPUTS
     608              : !!
     609              : !! SOURCE
     610              : !!
     611        17945 : subroutine abi_d2zgemm_331(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC,&
     612              :                        x_cplx,gpu_option)
     613              : 
     614              : !Arguments ------------------------------------
     615              :  character(len=1), intent(in) :: transa
     616              :  character(len=1), intent(in) :: transb
     617              :  integer, intent(in) :: lda
     618              :  integer, intent(in) :: ldb
     619              :  integer, intent(in) :: ldc
     620              :  integer, intent(in) :: m
     621              :  integer, intent(in) :: n
     622              :  integer, intent(in) :: k
     623              :  complex(dp),intent(in) :: alpha
     624              :  complex(dp),intent(in) :: beta
     625              :  real(dp),target, intent(in)    :: a(:,:,:)    ! FIXME should be lda * x_cplx
     626              :  real(dp),target, intent(in)    :: b(:,:,:)
     627              :  real(dp),target, intent(inout) :: c(:)
     628              :  !Optionals -----------------------------------
     629              :  integer, intent(in), optional :: x_cplx, gpu_option
     630              : 
     631              : !Local variables-------------------------------
     632              :  integer  :: cplx_,gpu_option_
     633              : 
     634        17945 :  cplx_=1 ; if(PRESENT(x_cplx)) cplx_ = x_cplx
     635        17945 :  gpu_option_=ABI_GPU_DISABLED ; if(PRESENT(gpu_option)) gpu_option_ = gpu_option
     636              : 
     637              :  call abi_d2zgemm(transa,transb,m,n,k,alpha,&
     638              :  &    a,lda,&
     639              :  &    b,ldb,&
     640              :  &    beta,&
     641              :  &    c,ldc,&
     642        17945 :  &    x_cplx=cplx_,gpu_option=gpu_option_)
     643              : 
     644        17945 : end subroutine abi_d2zgemm_331
     645              : !!***
     646              : 
     647              : !----------------------------------------------------------------------
     648              : 
     649              : !!****f* m_abi_linalg/abi_d2zgemm_334
     650              : !! NAME
     651              : !! abi_d2zgemm_334
     652              : !!
     653              : !! FUNCTION
     654              : !!
     655              : !! INPUTS
     656              : !!
     657              : !! SOURCE
     658              : !!
     659        11528 : subroutine abi_d2zgemm_334(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC,&
     660              :                        x_cplx,gpu_option)
     661              : 
     662              : !Arguments ------------------------------------
     663              :  character(len=1), intent(in) :: transa
     664              :  character(len=1), intent(in) :: transb
     665              :  integer, intent(in) :: lda
     666              :  integer, intent(in) :: ldb
     667              :  integer, intent(in) :: ldc
     668              :  integer, intent(in) :: m
     669              :  integer, intent(in) :: n
     670              :  integer, intent(in) :: k
     671              :  complex(dp),intent(in) :: alpha
     672              :  complex(dp),intent(in) :: beta
     673              :  real(dp),target, intent(in)    :: a(:,:,:)    ! FIXME should be lda * x_cplx
     674              :  real(dp),target, intent(in)    :: b(:,:,:)
     675              :  real(dp),target, intent(inout) :: c(:,:,:,:)
     676              :  !Optionals -----------------------------------
     677              :  integer, intent(in), optional :: x_cplx, gpu_option
     678              : 
     679              : !Local variables-------------------------------
     680              :  integer  :: cplx_,gpu_option_
     681              : 
     682        11528 :  cplx_=1 ; if(PRESENT(x_cplx)) cplx_ = x_cplx
     683        11528 :  gpu_option_=ABI_GPU_DISABLED ; if(PRESENT(gpu_option)) gpu_option_ = gpu_option
     684              : 
     685              :  call abi_d2zgemm(transa,transb,m,n,k,alpha,&
     686              :  &    a,lda,&
     687              :  &    b,ldb,&
     688              :  &    beta,&
     689              :  &    c,ldc,&
     690        11528 :  &    x_cplx=cplx_,gpu_option=gpu_option_)
     691              : 
     692        11528 : end subroutine abi_d2zgemm_334
     693              : !!***
     694              : 
     695              : !----------------------------------------------------------------------
     696              : 
     697              : !!****f* m_abi_linalg/abi_d2zgemm_d
     698              : !! NAME
     699              : !! abi_d2zgemm_2d
     700              : !!
     701              : !! FUNCTION
     702              : !!
     703              : !! INPUTS
     704              : !!
     705              : !! SOURCE
     706              : !!
     707    122911335 : subroutine abi_d2zgemm_2d(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC,&
     708              :                        x_cplx,gpu_option)
     709              : 
     710              : !Arguments ------------------------------------
     711              :  character(len=1), intent(in) :: transa
     712              :  character(len=1), intent(in) :: transb
     713              :  integer, intent(in) :: lda
     714              :  integer, intent(in) :: ldb
     715              :  integer, intent(in) :: ldc
     716              :  integer, intent(in) :: m
     717              :  integer, intent(in) :: n
     718              :  integer, intent(in) :: k
     719              :  complex(dp),intent(in) :: alpha
     720              :  complex(dp),intent(in) :: beta
     721              :  real(dp),target, intent(in)    :: a(lda,*)    ! FIXME should be lda * x_cplx
     722              :  real(dp),target, intent(in)    :: b(ldb,*)
     723              :  real(dp),target, intent(inout) :: c(ldc,*)
     724              :  !Optionals -----------------------------------
     725              :  integer, intent(in), optional :: x_cplx, gpu_option
     726              : 
     727              : !Local variables-------------------------------
     728              :  integer  :: cplx_,gpu_option_
     729              : 
     730    122911335 :  cplx_=1 ; if(PRESENT(x_cplx)) cplx_ = x_cplx
     731    122911335 :  gpu_option_=ABI_GPU_DISABLED ; if(PRESENT(gpu_option)) gpu_option_ = gpu_option
     732              : 
     733              :  call abi_d2zgemm(transa,transb,m,n,k,alpha,&
     734              :  &    a,lda,&
     735              :  &    b,ldb,&
     736              :  &    beta,&
     737              :  &    c,ldc,&
     738    122911335 :  &    x_cplx=cplx_,gpu_option=gpu_option_)
     739              : 
     740    122911335 : end subroutine abi_d2zgemm_2d
     741              : !!***
        

Generated by: LCOV version 2.3-1