Commit b67a04fd authored by Andreas Marek's avatar Andreas Marek

Cleanup of ELPA solve_tridi_impl signatures

parent 7d262729
......@@ -448,8 +448,7 @@ module elpa1_auxiliary_impl
!> \param wantDebug logical, give more debug information if .true.
!> \result success logical, .true. on success, else .false.
function elpa_solve_tridi_double_impl(na, nev, d, e, q, ldq, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols, wantDebug) &
result(success)
function elpa_solve_tridi_double_impl(obj, d, e, q) result(success)
#include "elpa_solve_tridi_impl_public.X90"
......@@ -479,8 +478,7 @@ module elpa1_auxiliary_impl
!> \param wantDebug logical, give more debug information if .true.
!> \result success logical, .true. on success, else .false.
function elpa_solve_tridi_single_impl(na, nev, d, e, q, ldq, nblk, matrixCols, mpi_comm_rows, &
mpi_comm_cols, wantDebug) result(success)
function elpa_solve_tridi_single_impl(obj, d, e, q) result(success)
#include "elpa_solve_tridi_impl_public.X90"
......
......@@ -62,19 +62,36 @@
&PRECISION&
&_impl
use precision
use elpa_api
implicit none
class(elpa_t), intent(in):: obj
integer(kind=ik) :: na, nev, ldq, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols
real(kind=REAL_DATATYPE) :: d(na), e(na)
real(kind=REAL_DATATYPE) :: d(obj%na), e(obj%na)
#ifdef USE_ASSUMED_SIZE
real(kind=REAL_DATATYPE) :: q(ldq,*)
real(kind=REAL_DATATYPE) :: q(obj%local_nrows,*)
#else
real(kind=REAL_DATATYPE) :: q(ldq,matrixCols)
real(kind=REAL_DATATYPE) :: q(obj%local_nrows, obj%local_ncols)
#endif
logical, intent(in) :: wantDebug
logical :: success
logical :: wantDebug
logical :: success
na = obj%na
nev = obj%nev
nblk = obj%nblk
ldq = obj%local_nrows
matrixCols = obj%local_ncols
mpi_comm_rows = obj%get("mpi_comm_rows")
mpi_comm_cols = obj%get("mpi_comm_cols")
if (obj%get("wantDebug") == 1) then
wantDebug = .true.
else
wantDebug = .false.
endif
success = .false.
call solve_tridi_&
......
......@@ -880,22 +880,8 @@ module elpa_impl
integer, optional :: error
logical :: success_l
integer(kind=c_int) :: error_actual
logical :: wantDebugIntern
if (self%get("wantDebug",error_actual) .eq. 1) then
if (error_actual .ne. ELPA_OK) then
print *,"Could not querry wantDebug"
stop
endif
wantDebugIntern = .true.
else
wantDebugIntern = .false.
endif
success_l = elpa_solve_tridi_double_impl(self%na, self%nev, d, e, q, self%local_nrows, self%nblk, &
self%local_ncols, self%get("mpi_comm_rows"), self%get("mpi_comm_cols"),&
wantDebugIntern)
success_l = elpa_solve_tridi_double_impl(self, d, e, q)
if (present(error)) then
if (success_l) then
error = ELPA_OK
......@@ -923,22 +909,9 @@ module elpa_impl
integer, optional :: error
logical :: success_l
integer(kind=c_int) :: error_actual
logical :: wantDebugIntern
if (self%get("wantDebug",error_actual) .eq. 1) then
if (error_actual .ne. ELPA_OK) then
print *,"Could not querry wantDebug"
stop
endif
wantDebugIntern = .true.
else
wantDebugIntern = .false.
endif
#ifdef WANT_SINGLE_PRECISION_REAL
success_l = elpa_solve_tridi_single_impl(self%na, self%nev, d, e, q, self%local_nrows, self%nblk, &
self%local_ncols, self%get("mpi_comm_rows"), self%get("mpi_comm_cols"),&
wantDebugIntern)
success_l = elpa_solve_tridi_single_impl(d, e, q)
#else
print *,"This installation of the ELPA library has not been build with single-precision support"
error = ELPA_ERROR
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment