LCOV - code coverage report
Current view: top level - src/elpa_driver/legacy_interface - elpa_driver_c_interface_template.F90 (source / functions) Hit Total Coverage
Test: coverage_50ab7a7628bba174fc62cee3ab72b26e81f87fe5.info Lines: 9 12 75.0 %
Date: 2018-01-10 09:29:53 Functions: 4 4 100.0 %

          Line data    Source code
       1             : !    This file is part of ELPA.
       2             : !
       3             : !    The ELPA library was originally created by the ELPA consortium,
       4             : !    consisting of the following organizations:
       5             : !
       6             : !    - Max Planck Computing and Data Facility (MPCDF), formerly known as
       7             : !      Rechenzentrum Garching der Max-Planck-Gesellschaft (RZG),
       8             : !    - Bergische Universität Wuppertal, Lehrstuhl für angewandte
       9             : !      Informatik,
      10             : !    - Technische Universität München, Lehrstuhl für Informatik mit
      11             : !      Schwerpunkt Wissenschaftliches Rechnen ,
      12             : !    - Fritz-Haber-Institut, Berlin, Abt. Theorie,
      13             : !    - Max-Plack-Institut für Mathematik in den Naturwissenschaften,
      14             : !      Leipzig, Abt. Komplexe Strukutren in Biologie und Kognition,
      15             : !      and
      16             : !    - IBM Deutschland GmbH
      17             : !
      18             : !    This particular source code file contains additions, changes and
      19             : !    enhancements authored by Intel Corporation which is not part of
      20             : !    the ELPA consortium.
      21             : !
      22             : !    More information can be found here:
      23             : !    http://elpa.mpcdf.mpg.de/
      24             : !
      25             : !    ELPA is free software: you can redistribute it and/or modify
      26             : !    it under the terms of the version 3 of the license of the
      27             : !    GNU Lesser General Public License as published by the Free
      28             : !    Software Foundation.
      29             : !
      30             : !    ELPA is distributed in the hope that it will be useful,
      31             : !    but WITHOUT ANY WARRANTY; without even the implied warranty of
      32             : !    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      33             : !    GNU Lesser General Public License for more details.
      34             : !
      35             : !    You should have received a copy of the GNU Lesser General Public License
      36             : !    along with ELPA.  If not, see <http://www.gnu.org/licenses/>
      37             : !
      38             : !    ELPA reflects a substantial effort on the part of the original
      39             : !    ELPA consortium, and we ask you to respect the spirit of the
      40             : !    license that we chose: i.e., please contribute any changes you
      41             : !    may have back to the original ELPA library distribution, and keep
      42             : !    any derivatives of ELPA under the same license that we chose for
      43             : !    the original distribution, the GNU Lesser General Public License.
      44             : !
      45             : ! Author: A. Marek, MPCDF
      46             : 
      47        2592 : function elpa_solve_evp_&
      48             :  &MATH_DATATYPE&
      49             :  &_wrapper_&
      50             :  &PRECISION&
      51        2592 :  & (na, nev, a, lda, ev, q, ldq, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols, mpi_comm_all, &
      52             : #if REALCASE == 1
      53             :     THIS_REAL_ELPA_KERNEL_API, useQR, &
      54             : #endif
      55             : #if COMPLEXCASE == 1
      56             :     THIS_COMPLEX_ELPA_KERNEL_API, &
      57             : #endif
      58             :     useGPU, method) result(success) bind(C,name="elpa_solve_evp_&
      59             :     &MATH_DATATYPE&
      60             :     &_&
      61             :     &PRECISION&
      62             :     &")
      63             : 
      64             :     use, intrinsic :: iso_c_binding
      65             :     use elpa_api
      66             :     use elpa_driver, only : elpa_solve_evp_&
      67             :     &MATH_DATATYPE&
      68             :     &_&
      69             :     &PRECISION
      70             : 
      71             :     implicit none
      72             :     integer(kind=c_int)                      :: success
      73             :     integer(kind=c_int), value, intent(in)   :: na, nev, lda, ldq, nblk, matrixCols, &
      74             :                                                 mpi_comm_cols, mpi_comm_rows, mpi_comm_all
      75             :     integer(kind=c_int), value, intent(in)   :: useGPU
      76             : #if REALCASE == 1
      77             :     integer(kind=c_int), value, intent(in)   :: THIS_REAL_ELPA_KERNEL_API, useQR
      78             : #endif
      79             : #if COMPLEXCASE == 1
      80             :     integer(kind=c_int), value, intent(in)   :: THIS_COMPLEX_ELPA_KERNEL_API
      81             : #endif
      82             :     real(kind=C_DATATYPE_KIND)               :: ev(1:na)
      83             : #if REALCASE == 1
      84             : #ifdef USE_ASSUMED_SIZE
      85             :     real(kind=C_DATATYPE_KIND)               :: a(lda,*), q(ldq,*)
      86             : #else
      87             :     real(kind=C_DATATYPE_KIND)               :: a(1:lda,1:matrixCols), q(1:ldq,1:matrixCols)
      88             : #endif
      89             : #endif /* REALCASE == 1 */
      90             : #if COMPLEXCASE == 1
      91             : #ifdef USE_ASSUMED_SIZE
      92             :     complex(kind=C_DATATYPE_KIND)            :: a(lda,*), q(ldq,*)
      93             : #else
      94             :     complex(kind=C_DATATYPE_KIND)            :: a(1:lda,1:matrixCols), q(1:ldq,1:matrixCols)
      95             : #endif
      96             : #endif /* COMPLEXCASE == 1 */
      97             :     logical                                  :: successFortran, useQRFortran
      98             :     type(c_ptr), intent(in), value           :: method
      99             : 
     100             : #if REALCASE == 1
     101        1296 :     if (useQR .eq. 0) then
     102        1296 :       useQRFortran =.false.
     103             :     else
     104           0 :       useQRFortran = .true.
     105             :     endif
     106             : #endif
     107             : 
     108        2592 :     if (c_associated(method)) then
     109             :       successFortran = elpa_solve_evp_&
     110             :       &MATH_DATATYPE&
     111             :       &_&
     112             :       &PRECISION&
     113             :       & (na, nev, a, lda, ev, q, ldq, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols, mpi_comm_all, &
     114             : #if REALCASE == 1
     115             :          THIS_REAL_ELPA_KERNEL_API, useQRFortran, &
     116             : #endif
     117             : #if COMPLEXCASE == 1
     118             :          THIS_COMPLEX_ELPA_KERNEL_API, &
     119             : #endif
     120        2592 :          useGPU == 1, elpa_c_string(method))
     121             :     else
     122             :       successFortran = elpa_solve_evp_&
     123             :       &MATH_DATATYPE&
     124             :       &_&
     125             :       &PRECISION&
     126             :       & (na, nev, a, lda, ev, q, ldq, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols, mpi_comm_all,  &
     127             : #if REALCASE == 1
     128             :          THIS_REAL_ELPA_KERNEL_API, useQRFortran, &
     129             : #endif
     130             : #if COMPLEXCASE == 1
     131             :          THIS_COMPLEX_ELPA_KERNEL_API,  &
     132             : #endif
     133           0 :          useGPU == 1)
     134             :     endif
     135             : 
     136        2592 :     if (successFortran) then
     137        2592 :       success = 1
     138             :     else
     139           0 :       success = 0
     140             :     endif
     141             : 
     142        2592 :   end function
     143             : 
     144             : ! vim: syntax=fortran

Generated by: LCOV version 1.12