Commit 8206df2f authored by Andreas Marek's avatar Andreas Marek
Browse files

Update signature of hermetian_multiply functions

parent ce22ceba
......@@ -280,7 +280,7 @@ module elpa1_auxiliary_impl
#define REALCASE 1
#define DOUBLE_PRECISION
#include "../general/precision_macros.h"
function elpa_mult_at_b_real_double_impl(obj, uplo_a, uplo_c, na, ncb, a, lda, ldaCols, b, ldb, ldbCols, &
function elpa_mult_at_b_real_double_impl(obj, uplo_a, uplo_c, ncb, a, b, ldb, ldbCols, &
c, ldc, ldcCols) result(success)
#include "elpa_multiply_a_b.X90"
end function elpa_mult_at_b_real_double_impl
......@@ -293,9 +293,9 @@ module elpa1_auxiliary_impl
#include "../general/precision_macros.h"
!> \brief elpa_mult_at_b_real_single_impl: Performs C : = A**T * B
!> where A is a square matrix (na,na) which is optionally upper or lower triangular
!> B is a (na,ncb) matrix
!> C is a (na,ncb) matrix where optionally only the upper or lower
!> where A is a square matrix (obj%na,obj%na) which is optionally upper or lower triangular
!> B is a (obj%na,ncb) matrix
!> C is a (obj%na,ncb) matrix where optionally only the upper or lower
!> triangle may be computed
!> \details
......@@ -314,7 +314,7 @@ module elpa1_auxiliary_impl
!> \param na Number of rows/columns of A, number of rows of B and C
!> \param ncb Number of columns of B and C
!> \param a matrix a
!> \param lda leading dimension of matrix a
!> \param obj%local_nrows leading dimension of matrix a, set with class method obj%set("local_nrows",value)
!> \param b matrix b
!> \param ldb leading dimension of matrix b
!> \param nblk blocksize of cyclic distribution, must be the same in both directions!
......@@ -324,7 +324,7 @@ module elpa1_auxiliary_impl
!> \param ldc leading dimension of matrix c
!> \result success
function elpa_mult_at_b_real_single_impl(obj, uplo_a, uplo_c, na, ncb, a, lda, ldaCols, b, ldb, ldbCols, &
function elpa_mult_at_b_real_single_impl(obj, uplo_a, uplo_c, ncb, a, b, ldb, ldbCols, &
c, ldc, ldcCols) result(success)
#include "elpa_multiply_a_b.X90"
......@@ -340,9 +340,9 @@ module elpa1_auxiliary_impl
#include "../general/precision_macros.h"
!> \brief elpa_mult_ah_b_complex_double_impl: Performs C : = A**H * B
!> where A is a square matrix (na,na) which is optionally upper or lower triangular
!> B is a (na,ncb) matrix
!> C is a (na,ncb) matrix where optionally only the upper or lower
!> where A is a square matrix (obj%na,obj%na) which is optionally upper or lower triangular
!> B is a (obj%na,ncb) matrix
!> C is a (obj%na,ncb) matrix where optionally only the upper or lower
!> triangle may be computed
!> \details
!>
......@@ -361,7 +361,7 @@ module elpa1_auxiliary_impl
!> \param na Number of rows/columns of A, number of rows of B and C
!> \param ncb Number of columns of B and C
!> \param a matrix a
!> \param lda leading dimension of matrix a
!> \param obj%local_ncols leading dimension of matrix a, set with class method obj%set("local_nrows",value)
!> \param ldaCols columns of matrix a
!> \param b matrix b
!> \param ldb leading dimension of matrix b
......@@ -373,7 +373,7 @@ module elpa1_auxiliary_impl
!> \param ldc leading dimension of matrix c
!> \result success
function elpa_mult_ah_b_complex_double_impl(obj, uplo_a, uplo_c, na, ncb, a, lda, ldaCols, b, ldb, ldbCols, &
function elpa_mult_ah_b_complex_double_impl(obj, uplo_a, uplo_c, ncb, a, b, ldb, ldbCols, &
c, ldc, ldcCols) result(success)
#include "elpa_multiply_a_b.X90"
......@@ -387,9 +387,9 @@ module elpa1_auxiliary_impl
#include "../general/precision_macros.h"
!> \brief elpa_mult_ah_b_complex_single_impl: Performs C : = A**H * B
!> where A is a square matrix (na,na) which is optionally upper or lower triangular
!> B is a (na,ncb) matrix
!> C is a (na,ncb) matrix where optionally only the upper or lower
!> where A is a square matrix (obj%na,obj%na) which is optionally upper or lower triangular
!> B is a (obj%na,ncb) matrix
!> C is a (obj%na,ncb) matrix where optionally only the upper or lower
!> triangle may be computed
!> \details
!>
......@@ -420,7 +420,7 @@ module elpa1_auxiliary_impl
!> \param ldc leading dimension of matrix c
!> \result success
function elpa_mult_ah_b_complex_single_impl(obj, uplo_a, uplo_c, na, ncb, a, lda, ldaCols, b, ldb, ldbCols, &
function elpa_mult_ah_b_complex_single_impl(obj, uplo_a, uplo_c, ncb, a, b, ldb, ldbCols, &
c, ldc, ldcCols) result(success)
#include "elpa_multiply_a_b.X90"
......
......@@ -65,20 +65,20 @@
character*1 :: uplo_a, uplo_c
integer(kind=ik), intent(in) :: na, lda, ldaCols, ldb, ldbCols, ldc, ldcCols
integer(kind=ik) :: ncb
integer(kind=ik), intent(in) :: ldb, ldbCols, ldc, ldcCols
integer(kind=ik) :: na, ncb
#if REALCASE == 1
#ifdef USE_ASSUMED_SIZE
real(kind=REAL_DATATYPE) :: a(lda,*), b(ldb,*), c(ldc,*)
real(kind=REAL_DATATYPE) :: a(obj%local_nrows,*), b(ldb,*), c(ldc,*)
#else
real(kind=REAL_DATATYPE) :: a(lda,ldaCols), b(ldb,ldbCols), c(ldc,ldcCols)
real(kind=REAL_DATATYPE) :: a(obj%local_nrows,obj%local_ncols), b(ldb,ldbCols), c(ldc,ldcCols)
#endif
#endif
#if COMPLEXCASE == 1
#ifdef USE_ASSUMED_SIZE
complex(kind=COMPLEX_DATATYPE) :: a(lda,*), b(ldb,*), c(ldc,*)
complex(kind=COMPLEX_DATATYPE) :: a(obj%local_nrows,*), b(ldb,*), c(ldc,*)
#else
complex(kind=COMPLEX_DATATYPE) :: a(lda,ldaCols), b(ldb,ldbCols), c(ldc,ldcCols)
complex(kind=COMPLEX_DATATYPE) :: a(obj%local_nrows,obj%local_ncols), b(ldb,ldbCols), c(ldc,ldcCols)
#endif
#endif
integer(kind=ik) :: my_prow, my_pcol, np_rows, np_cols, mpierr
......@@ -98,7 +98,7 @@
integer(kind=ik) :: istat
character(200) :: errorMessage
logical :: success
integer(kind=ik) :: nblk, mpi_comm_rows, mpi_comm_cols
integer(kind=ik) :: nblk, mpi_comm_rows, mpi_comm_cols, lda, ldaCols
call obj%timer%start("elpa_mult_at_b_&
&MATH_DATATYPE&
......@@ -106,7 +106,11 @@
&PRECISION&
&")
na = obj%na
nblk = obj%nblk
lda = obj%local_nrows
ldaCols = obj%local_ncols
call obj%get("mpi_comm_rows",mpi_comm_rows)
call obj%get("mpi_comm_cols",mpi_comm_cols)
......
......@@ -140,7 +140,7 @@
success = .false.
endif
call e%hermitian_multiply(uplo_a, uplo_c, na, ncb, a(1:lda,1:ldaCols), lda, ldaCols, &
call e%hermitian_multiply(uplo_a, uplo_c, ncb, a(1:lda,1:ldaCols), &
b(1:ldb,1:ldbCols), ldb, ldbCols, &
c(1:ldc,1:ldcCols), ldc, ldcCols, successInternal)
......
......@@ -487,15 +487,16 @@ module elpa_api
end interface
!> \brief abstract definition of interface to compute C : = A**T * B for double real matrices
!> where A is a square matrix (na,na) which is optionally upper or lower triangular
!> B is a (na,ncb) matrix
!> C is a (na,ncb) matrix where optionally only the upper or lower
!> where A is a square matrix (self%a,self%na) which is optionally upper or lower triangular
!> B is a (self%na,ncb) matrix
!> C is a (self%na,ncb) matrix where optionally only the upper or lower
!> triangle may be computed
!>
!> the MPI commicators are already known to the type. Thus the class method "setup" must be called
!> BEFORE this method is used
!> \details
!>
!> \param self class(elpa_t), the ELPA object
!> \param uplo_a 'U' if A is upper triangular
!> 'L' if A is lower triangular
!> anything else if A is a full matrix
......@@ -508,11 +509,10 @@ module elpa_api
!> anything else if the full matrix C is needed
!> Please note: Even when uplo_c is 'U' or 'L', the other triangle may be
!> written to a certain extent, i.e. one shouldn't rely on the content there!
!> \param na Number of rows/columns of global matrix A, number of rows of global matrices B and C
!> \param ncb Number of columns of global matrices B and C
!> \param a matrix a
!> \param nrows_a number of rows of local (sub) matrix a
!> \param ncols_a number of columns of local (sub) matrix a
!> \param self%local_nrows number of rows of local (sub) matrix a, set with method set("local_nrows,value")
!> \param self%local_ncols number of columns of local (sub) matrix a, set with method set("local_ncols,value")
!> \param b matrix b
!> \param nrows_b number of rows of local (sub) matrix b
!> \param ncols_b number of columns of local (sub) matrix b
......@@ -522,33 +522,34 @@ module elpa_api
!> \param ncols_c number of columns of local (sub) matrix c
!> \param error optional argument, error code which can be queried with elpa_strerr
abstract interface
subroutine elpa_hermitian_multiply_d_i (self,uplo_a, uplo_c, na, ncb, a, nrows_a, ncols_a, b, nrows_b, ncols_b, &
subroutine elpa_hermitian_multiply_d_i (self,uplo_a, uplo_c, ncb, a, b, nrows_b, ncols_b, &
c, nrows_c, ncols_c, error)
use iso_c_binding
import elpa_t
implicit none
class(elpa_t) :: self
character*1 :: uplo_a, uplo_c
integer(kind=c_int), intent(in) :: na, nrows_a, ncols_a, nrows_b, ncols_b, nrows_c, ncols_c, ncb
integer(kind=c_int), intent(in) :: nrows_b, ncols_b, nrows_c, ncols_c, ncb
#ifdef USE_ASSUMED_SIZE
real(kind=c_double) :: a(nrows_a,*), b(nrows_b,*), c(nrows_c,*)
real(kind=c_double) :: a(self%local_nrows,*), b(nrows_b,*), c(nrows_c,*)
#else
real(kind=c_double) :: a(nrows_a,ncols_a), b(nrows_b,ncols_b), c(nrows_c,ncols_c)
real(kind=c_double) :: a(self%local_nrows,self%local_ncols), b(nrows_b,ncols_b), c(nrows_c,ncols_c)
#endif
integer, optional :: error
end subroutine
end interface
!> \brief abstract definition of interface to compute C : = A**T * B
!> where A is a square matrix (na,na) which is optionally upper or lower triangular
!> B is a (na,ncb) matrix
!> C is a (na,ncb) matrix where optionally only the upper or lower
!> where A is a square matrix (self%na,self%na) which is optionally upper or lower triangular
!> B is a (self%na,ncb) matrix
!> C is a (self%na,ncb) matrix where optionally only the upper or lower
!> triangle may be computed
!>
!> the MPI commicators are already known to the type. Thus the class method "setup" must be called
!> BEFORE this method is used
!> \details
!>
!> \param self class(elpa_t), the ELPA object
!> \param uplo_a 'U' if A is upper triangular
!> 'L' if A is lower triangular
!> anything else if A is a full matrix
......@@ -561,11 +562,10 @@ module elpa_api
!> anything else if the full matrix C is needed
!> Please note: Even when uplo_c is 'U' or 'L', the other triangle may be
!> written to a certain extent, i.e. one shouldn't rely on the content there!
!> \param na Number of rows/columns of global matrix A, number of rows of global matrices B and C
!> \param ncb Number of columns of global matrices B and C
!> \param a matrix a
!> \param nrows_a number of rows of local (sub) matrix a
!> \param ncols_a number of columns of local (sub) matrix a
!> \param self%local_nrows number of rows of local (sub) matrix a, set with method set("local_nrows",value)
!> \param self%local_ncols number of columns of local (sub) matrix a, set with method set("local_nrows",value)
!> \param b matrix b
!> \param nrows_b number of rows of local (sub) matrix b
!> \param ncols_b number of columns of local (sub) matrix b
......@@ -575,33 +575,34 @@ module elpa_api
!> \param ncols_c number of columns of local (sub) matrix c
!> \param error optional argument, error code which can be queried with elpa_strerr
abstract interface
subroutine elpa_hermitian_multiply_f_i (self,uplo_a, uplo_c, na, ncb, a, nrows_a, ncols_a, b, nrows_b, ncols_b, &
subroutine elpa_hermitian_multiply_f_i (self,uplo_a, uplo_c, ncb, a, b, nrows_b, ncols_b, &
c, nrows_c, ncols_c, error)
use iso_c_binding
import elpa_t
implicit none
class(elpa_t) :: self
character*1 :: uplo_a, uplo_c
integer(kind=c_int), intent(in) :: na, nrows_a, ncols_a, nrows_b, ncols_b, nrows_c, ncols_c, ncb
integer(kind=c_int), intent(in) :: nrows_b, ncols_b, nrows_c, ncols_c, ncb
#ifdef USE_ASSUMED_SIZE
real(kind=c_float) :: a(nrows_a,*), b(nrows_b,*), c(nrows_c,*)
real(kind=c_float) :: a(self%local_nrows,*), b(nrows_b,*), c(nrows_c,*)
#else
real(kind=c_float) :: a(nrows_a,ncols_a), b(nrows_b,ncols_b), c(nrows_c,ncols_c)
real(kind=c_float) :: a(self%local_nrows,self%local_ncols), b(nrows_b,ncols_b), c(nrows_c,ncols_c)
#endif
integer, optional :: error
end subroutine
end interface
!> \brief abstract definition of interface to compute C : = A**H * B
!> where A is a square matrix (na,na) which is optionally upper or lower triangular
!> B is a (na,ncb) matrix
!> C is a (na,ncb) matrix where optionally only the upper or lower
!> where A is a square matrix (self%na,self%a) which is optionally upper or lower triangular
!> B is a (self%na,ncb) matrix
!> C is a (self%na,ncb) matrix where optionally only the upper or lower
!> triangle may be computed
!>
!> the MPI commicators are already known to the type. Thus the class method "setup" must be called
!> BEFORE this method is used
!> \details
!>
!> \param self class(elpa_t), the ELPA object
!> \param uplo_a 'U' if A is upper triangular
!> 'L' if A is lower triangular
!> anything else if A is a full matrix
......@@ -614,11 +615,10 @@ module elpa_api
!> anything else if the full matrix C is needed
!> Please note: Even when uplo_c is 'U' or 'L', the other triangle may be
!> written to a certain extent, i.e. one shouldn't rely on the content there!
!> \param na Number of rows/columns of global matrix A, number of rows of global matrices B and C
!> \param ncb Number of columns of global matrices B and C
!> \param a matrix a
!> \param nrows_a number of rows of local (sub) matrix a
!> \param ncols_a number of columns of local (sub) matrix a
!> \param self%local_nrows number of rows of local (sub) matrix a, set with the method set("local_nrows",value)
!> \param self%local_ncols number of columns of local (sub) matrix a, set with the method set("local_ncols",value)
!> \param b matrix b
!> \param nrows_b number of rows of local (sub) matrix b
!> \param ncols_b number of columns of local (sub) matrix b
......@@ -628,33 +628,34 @@ module elpa_api
!> \param ncols_c number of columns of local (sub) matrix c
!> \param error optional argument, error code which can be queried with elpa_strerr
abstract interface
subroutine elpa_hermitian_multiply_dc_i (self,uplo_a, uplo_c, na, ncb, a, nrows_a, ncols_a, b, nrows_b, ncols_b, &
subroutine elpa_hermitian_multiply_dc_i (self,uplo_a, uplo_c, ncb, a, b, nrows_b, ncols_b, &
c, nrows_c, ncols_c, error)
use iso_c_binding
import elpa_t
implicit none
class(elpa_t) :: self
character*1 :: uplo_a, uplo_c
integer(kind=c_int), intent(in) :: na, nrows_a, ncols_a, nrows_b, ncols_b, nrows_c, ncols_c, ncb
integer(kind=c_int), intent(in) :: nrows_b, ncols_b, nrows_c, ncols_c, ncb
#ifdef USE_ASSUMED_SIZE
complex(kind=c_double_complex) :: a(nrows_a,*), b(nrows_b,*), c(nrows_c,*)
complex(kind=c_double_complex) :: a(self%local_nrows,*), b(nrows_b,*), c(nrows_c,*)
#else
complex(kind=c_double_complex) :: a(nrows_a,ncols_a), b(nrows_b,ncols_b), c(nrows_c,ncols_c)
complex(kind=c_double_complex) :: a(self%local_nrows,self%local_ncols), b(nrows_b,ncols_b), c(nrows_c,ncols_c)
#endif
integer, optional :: error
end subroutine
end interface
!> \brief abstract definition of interface to compute C : = A**H * B
!> where A is a square matrix (na,na) which is optionally upper or lower triangular
!> B is a (na,ncb) matrix
!> C is a (na,ncb) matrix where optionally only the upper or lower
!> where A is a square matrix (self%na,self%na) which is optionally upper or lower triangular
!> B is a (self%na,ncb) matrix
!> C is a (self%na,ncb) matrix where optionally only the upper or lower
!> triangle may be computed
!>
!> the MPI commicators are already known to the type. Thus the class method "setup" must be called
!> BEFORE this method is used
!> \details
!>
!> \param self class(elpa_t), the ELPA object
!> \param uplo_a 'U' if A is upper triangular
!> 'L' if A is lower triangular
!> anything else if A is a full matrix
......@@ -667,11 +668,10 @@ module elpa_api
!> anything else if the full matrix C is needed
!> Please note: Even when uplo_c is 'U' or 'L', the other triangle may be
!> written to a certain extent, i.e. one shouldn't rely on the content there!
!> \param na Number of rows/columns of global matrix A, number of rows of global matrices B and C
!> \param ncb Number of columns of global matrices B and C
!> \param a matrix a
!> \param nrows_a number of rows of local (sub) matrix a
!> \param ncols_a number of columns of local (sub) matrix a
!> \param self%local_nrows number of rows of local (sub) matrix a, set with class method set("local_nrows",value)
!> \param self%local_ncols number of columns of local (sub) matrix a, set with class method set("local_ncols",value)
!> \param b matrix b
!> \param nrows_b number of rows of local (sub) matrix b
!> \param ncols_b number of columns of local (sub) matrix b
......@@ -681,18 +681,18 @@ module elpa_api
!> \param ncols_c number of columns of local (sub) matrix c
!> \param error optional argument, error code which can be queried with elpa_strerr
abstract interface
subroutine elpa_hermitian_multiply_fc_i (self, uplo_a, uplo_c, na, ncb, a, nrows_a, ncols_a, b, nrows_b, ncols_b, &
subroutine elpa_hermitian_multiply_fc_i (self, uplo_a, uplo_c, ncb, a, b, nrows_b, ncols_b, &
c, nrows_c, ncols_c, error)
use iso_c_binding
import elpa_t
implicit none
class(elpa_t) :: self
character*1 :: uplo_a, uplo_c
integer(kind=c_int), intent(in) :: na, nrows_a, ncols_a, nrows_b, ncols_b, nrows_c, ncols_c, ncb
integer(kind=c_int), intent(in) :: nrows_b, ncols_b, nrows_c, ncols_c, ncb
#ifdef USE_ASSUMED_SIZE
complex(kind=c_float_complex) :: a(nrows_a,*), b(nrows_b,*), c(nrows_c,*)
complex(kind=c_float_complex) :: a(self%local_nrows,*), b(nrows_b,*), c(nrows_c,*)
#else
complex(kind=c_float_complex) :: a(nrows_a,ncols_a), b(nrows_b,ncols_b), c(nrows_c,ncols_c)
complex(kind=c_float_complex) :: a(self%local_nrows,self%local_ncols), b(nrows_b,ncols_b), c(nrows_c,ncols_c)
#endif
integer, optional :: error
end subroutine
......@@ -703,7 +703,7 @@ module elpa_api
!> The dimensions of the matrix a (locally ditributed and global), the block-cylic-distribution
!> block size, and the MPI communicators are already known to the object and MUST be set BEFORE
!> with the class method "setup"
!>
!>
!> Parameters
!> \param self class(elpa_t), the ELPA object
!> \param a double real matrix: the matrix to be decomposed
......
......@@ -898,9 +898,9 @@ module elpa_impl
end subroutine
!> \brief elpa_hermitian_multiply_d: class method to perform C : = A**T * B for double real matrices
!> where A is a square matrix (na,na) which is optionally upper or lower triangular
!> B is a (na,ncb) matrix
!> C is a (na,ncb) matrix where optionally only the upper or lower
!> where A is a square matrix (self%na,self%na) which is optionally upper or lower triangular
!> B is a (self%na,ncb) matrix
!> C is a (self%na,ncb) matrix where optionally only the upper or lower
!> triangle may be computed
!>
!> the MPI commicators and the block-cyclic distribution block size are already known to the type.
......@@ -908,6 +908,7 @@ module elpa_impl
!>
!> \details
!>
!> \param self class(elpa_t), the ELPA object
!> \param uplo_a 'U' if A is upper triangular
!> 'L' if A is lower triangular
!> anything else if A is a full matrix
......@@ -920,11 +921,10 @@ module elpa_impl
!> anything else if the full matrix C is needed
!> Please note: Even when uplo_c is 'U' or 'L', the other triangle may be
!> written to a certain extent, i.e. one shouldn't rely on the content there!
!> \param na Number of rows/columns of global matrix A, number of rows of global matrices B and C
!> \param ncb Number of columns of global matrices B and C
!> \param a matrix a
!> \param nrows_a number of rows of local (sub) matrix a
!> \param ncols_a number of columns of local (sub) matrix a
!> \param local_nrows number of rows of local (sub) matrix a, set with class method set("local_nrows",value)
!> \param local_ncols number of columns of local (sub) matrix a, set with class method set("local_ncols",value)
!> \param b matrix b
!> \param nrows_b number of rows of local (sub) matrix b
!> \param ncols_b number of columns of local (sub) matrix b
......@@ -932,22 +932,22 @@ module elpa_impl
!> \param nrows_c number of rows of local (sub) matrix c
!> \param ncols_c number of columns of local (sub) matrix c
!> \param error optional argument, error code which can be queried with elpa_strerr
subroutine elpa_hermitian_multiply_d (self,uplo_a, uplo_c, na, ncb, a, nrows_a, ncols_a, b, nrows_b, ncols_b, &
subroutine elpa_hermitian_multiply_d (self,uplo_a, uplo_c, ncb, a, b, nrows_b, ncols_b, &
c, nrows_c, ncols_c, error)
use iso_c_binding
use elpa1_auxiliary_impl
class(elpa_impl_t) :: self
character*1 :: uplo_a, uplo_c
integer(kind=c_int), intent(in) :: na, nrows_a, ncols_a, nrows_b, ncols_b, nrows_c, ncols_c, ncb
integer(kind=c_int), intent(in) :: nrows_b, ncols_b, nrows_c, ncols_c, ncb
#ifdef USE_ASSUMED_SIZE
real(kind=c_double) :: a(nrows_a,*), b(nrows_b,*), c(nrows_c,*)
real(kind=c_double) :: a(self%local_nrows,*), b(nrows_b,*), c(nrows_c,*)
#else
real(kind=c_double) :: a(nrows_a,ncols_a), b(nrows_b,ncols_b), c(nrows_c,ncols_c)
real(kind=c_double) :: a(self%local_nrows,self%local_ncols), b(nrows_b,ncols_b), c(nrows_c,ncols_c)
#endif
integer, optional :: error
logical :: success_l
success_l = elpa_mult_at_b_real_double_impl(self, uplo_a, uplo_c, na, ncb, a, nrows_a, ncols_a, b, nrows_b, ncols_b, &
success_l = elpa_mult_at_b_real_double_impl(self, uplo_a, uplo_c, ncb, a, b, nrows_b, ncols_b, &
c, nrows_c, ncols_c)
if (present(error)) then
if (success_l) then
......@@ -961,9 +961,9 @@ module elpa_impl
end subroutine
!> \brief elpa_hermitian_multiply_f: class method to perform C : = A**T * B for float real matrices
!> where A is a square matrix (na,na) which is optionally upper or lower triangular
!> B is a (na,ncb) matrix
!> C is a (na,ncb) matrix where optionally only the upper or lower
!> where A is a square matrix (self%na,self%na) which is optionally upper or lower triangular
!> B is a (self%na,ncb) matrix
!> C is a (self%na,ncb) matrix where optionally only the upper or lower
!> triangle may be computed
!>
!> the MPI commicators and the block-cyclic distribution block size are already known to the type.
......@@ -971,6 +971,7 @@ module elpa_impl
!>
!> \details
!>
!> \param self class(elpa_t), the ELPA object
!> \param uplo_a 'U' if A is upper triangular
!> 'L' if A is lower triangular
!> anything else if A is a full matrix
......@@ -983,11 +984,10 @@ module elpa_impl
!> anything else if the full matrix C is needed
!> Please note: Even when uplo_c is 'U' or 'L', the other triangle may be
!> written to a certain extent, i.e. one shouldn't rely on the content there!
!> \param na Number of rows/columns of global matrix A, number of rows of global matrices B and C
!> \param ncb Number of columns of global matrices B and C
!> \param a matrix a
!> \param nrows_a number of rows of local (sub) matrix a
!> \param ncols_a number of columns of local (sub) matrix a
!> \param self%local_nrows number of rows of local (sub) matrix a, set with class method set("local_nrows",value)
!> \param self%local_ncols number of columns of local (sub) matrix a, set with class method set("local_ncols",value)
!> \param b matrix b
!> \param nrows_b number of rows of local (sub) matrix b
!> \param ncols_b number of columns of local (sub) matrix b
......@@ -995,22 +995,22 @@ module elpa_impl
!> \param nrows_c number of rows of local (sub) matrix c
!> \param ncols_c number of columns of local (sub) matrix c
!> \param error optional argument, returns an error code, which can be queried with elpa_strerr
subroutine elpa_hermitian_multiply_f (self,uplo_a, uplo_c, na, ncb, a, nrows_a, ncols_a, b, nrows_b, ncols_b, &
subroutine elpa_hermitian_multiply_f (self,uplo_a, uplo_c, ncb, a, b, nrows_b, ncols_b, &
c, nrows_c, ncols_c, error)
use iso_c_binding
use elpa1_auxiliary_impl
class(elpa_impl_t) :: self
character*1 :: uplo_a, uplo_c
integer(kind=c_int), intent(in) :: na, nrows_a, ncols_a, nrows_b, ncols_b, nrows_c, ncols_c, ncb
integer(kind=c_int), intent(in) :: nrows_b, ncols_b, nrows_c, ncols_c, ncb
#ifdef USE_ASSUMED_SIZE
real(kind=c_float) :: a(nrows_a,*), b(nrows_b,*), c(nrows_c,*)
real(kind=c_float) :: a(self%local_nrows,*), b(self%local_nrows,*), c(nrows_c,*)
#else
real(kind=c_float) :: a(nrows_a,ncols_a), b(nrows_b,ncols_b), c(nrows_c,ncols_c)
real(kind=c_float) :: a(self%local_nrows_a,self%local_ncols), b(nrows_b,ncols_b), c(nrows_c,ncols_c)
#endif
integer, optional :: error
logical :: success_l
#ifdef WANT_SINGLE_PRECISION_REAL
success_l = elpa_mult_at_b_real_single_impl(self, uplo_a, uplo_c, na, ncb, a, nrows_a, ncols_a, b, nrows_a, ncols_b, &
success_l = elpa_mult_at_b_real_single_impl(self, uplo_a, uplo_c, ncb, a, b, nrows_b, ncols_b, &
c, nrows_c, ncols_c)
if (present(error)) then
if (success_l) then
......@@ -1028,9 +1028,9 @@ module elpa_impl
end subroutine
!> \brief elpa_hermitian_multiply_dc: class method to perform C : = A**H * B for double complex matrices
!> where A is a square matrix (na,na) which is optionally upper or lower triangular
!> B is a (na,ncb) matrix
!> C is a (na,ncb) matrix where optionally only the upper or lower
!> where A is a square matrix (self%na,self%na) which is optionally upper or lower triangular
!> B is a (self%na,ncb) matrix
!> C is a (self%na,ncb) matrix where optionally only the upper or lower
!> triangle may be computed
!>
!> the MPI commicators and the block-cyclic distribution block size are already known to the type.
......@@ -1038,6 +1038,7 @@ module elpa_impl
!>
!> \details
!>
!> \param self class(elpa_t), the ELPA object
!> \param uplo_a 'U' if A is upper triangular
!> 'L' if A is lower triangular
!> anything else if A is a full matrix
......@@ -1050,11 +1051,10 @@ module elpa_impl
!> anything else if the full matrix C is needed
!> Please note: Even when uplo_c is 'U' or 'L', the other triangle may be
!> written to a certain extent, i.e. one shouldn't rely on the content there!
!> \param na Number of rows/columns of global matrix A, number of rows of global matrices B and C
!> \param ncb Number of columns of global matrices B and C
!> \param a matrix a
!> \param nrows_a number of rows of local (sub) matrix a
!> \param ncols_a number of columns of local (sub) matrix a
!> \param self%local_nrows number of rows of local (sub) matrix a, set with class method set("local_nows",value)
!> \param self%local_ncols number of columns of local (sub) matrix a, set with class method set("local_ncols",value)
!> \param b matrix b
!> \param nrows_b number of rows of local (sub) matrix b
!> \param ncols_b number of columns of local (sub) matrix b
......@@ -1062,22 +1062,22 @@ module elpa_impl
!> \param nrows_c number of rows of local (sub) matrix c
!> \param ncols_c number of columns of local (sub) matrix c
!> \param error optional argument, returns an error code, which can be queried with elpa_strerr
subroutine elpa_hermitian_multiply_dc (self,uplo_a, uplo_c, na, ncb, a, nrows_a, ncols_a, b, nrows_b, ncols_b, &
subroutine elpa_hermitian_multiply_dc (self,uplo_a, uplo_c, ncb, a, b, nrows_b, ncols_b, &
c, nrows_c, ncols_c, error)
use iso_c_binding
use elpa1_auxiliary_impl
class(elpa_impl_t) :: self
character*1 :: uplo_a, uplo_c
integer(kind=c_int), intent(in) :: na, nrows_a, ncols_a, nrows_b, ncols_b, nrows_c, ncols_c, ncb
integer(kind=c_int), intent(in) :: nrows_b, ncols_b, nrows_c, ncols_c, ncb
#ifdef USE_ASSUMED_SIZE
complex(kind=c_double_complex) :: a(nrows_a,*), b(nrows_b,*), c(nrows_c,*)
complex(kind=c_double_complex) :: a(self%local_nrows,*), b(nrows_b,*), c(nrows_c,*)
#else
complex(kind=c_double_complex) :: a(nrows_a,ncols_a), b(nrows_b,ncols_b), c(nrows_c,ncols_c)
complex(kind=c_double_complex) :: a(self%local_nrows,self%local_ncols), b(nrows_b,ncols_b), c(nrows_c,ncols_c)
#endif
integer, optional :: error
logical :: success_l
success_l = elpa_mult_ah_b_complex_double_impl(self, uplo_a, uplo_c, na, ncb, a, nrows_a, ncols_a, b, nrows_a, ncols_b, &
success_l = elpa_mult_ah_b_complex_double_impl(self, uplo_a, uplo_c, ncb, a, b, nrows_b, ncols_b, &
c, nrows_c, ncols_c)
if (present(error)) then
if (success_l) then
......@@ -1091,9 +1091,9 @@ module elpa_impl
end subroutine
!> \brief elpa_hermitian_multiply_fc: class method to perform C : = A**H * B for float complex matrices
!> where A is a square matrix (na,na) which is optionally upper or lower triangular
!> B is a (na,ncb) matrix
!> C is a (na,ncb) matrix where optionally only the upper or lower
!> where A is a square matrix (self%na,self%na) which is optionally upper or lower triangular
!> B is a (self%na,ncb) matrix
!> C is a (self%na,ncb) matrix where optionally only the upper or lower
!> triangle may be computed
!>
!> the MPI commicators and the block-cyclic distribution block size are already known to the type.
......@@ -1101,6 +1101,7 @@ module elpa_impl
!>
!> \details
!>
!> \param self class(elpa_t), the ELPA object
!> \param uplo_a 'U' if A is upper triangular
!> 'L' if A is lower triangular
!> anything else if A is a full matrix
......@@ -1113,11 +1114,10 @@ module elpa_impl
!> anything else if the full matrix C is needed
!> Please note: Even when uplo_c is 'U' or 'L', the other triangle may be
!> written to a certain extent, i.e. one shouldn't rely on the content there!
!> \param na Number of rows/columns of global matrix A, number of rows of global matrices B and C
!> \param ncb Number of columns of global matrices B and C
!> \param a matrix a
!> \param nrows_a number of rows of local (sub) matrix a
!> \param ncols_a number of columns of local (sub) matrix a
!> \param self%local_nrows number of rows of local (sub) matrix a, set with class method set("local_nrows",value)
!> \param self%local_ncols number of columns of local (sub) matrix a, set with class method set("local_ncols",value)
!> \param b matrix b
!> \param nrows_b number of rows of local (sub) matrix b
!> \param ncols_b number of columns of local (sub) matrix b
......@@ -1125,23 +1125,23 @@ module elpa_impl
!> \param nrows_c number of rows of local (sub) matrix c
!> \param ncols_c number of columns of local (sub) matrix c