88 subroutine elpa_hermitian_multiply_a_h_a_&
90 & (self, uplo_a, uplo_c, ncb, a, b, nrows_b, ncols_b, &
91 c, nrows_c, ncols_c, error)
92 class(elpa_impl_t) :: self
93 character*1 :: uplo_a, uplo_c
94 integer(kind=c_int),
intent(in) :: nrows_b, ncols_b, nrows_c, ncols_c, ncb
95#ifdef USE_ASSUMED_SIZE
96 math_datatype(kind=c_datatype_kind) :: a(self%local_nrows,*), b(nrows_b,*), c(nrows_c,*)
98 math_datatype(kind=c_datatype_kind) :: a(self%local_nrows,self%local_ncols), b(nrows_b,ncols_b), c(nrows_c,ncols_c)
100#ifdef USE_FORTRAN2008
101 integer,
optional :: error
109#if defined(INCLUDE_ROUTINES)
110 success_l = elpa_hermitian_multiply_a_h_a_&
114 &_impl(self, uplo_a, uplo_c, ncb, a, b, nrows_b, ncols_b, &
118#ifdef USE_FORTRAN2008
119 if (
present(error))
then
125 else if (.not. success_l)
then
126 write(error_unit,
'(a)')
"ELPA: Error in hermitian_multiply() and you did not check for errors!"
173 subroutine elpa_hermitian_multiply_d_ptr_&
175 & (self, uplo_a, uplo_c, ncb, a, b, nrows_b, ncols_b, &
176 c, nrows_c, ncols_c, error)
177 class(elpa_impl_t) :: self
178 character*1 :: uplo_a, uplo_c
179 integer(kind=c_int),
intent(in) :: nrows_b, ncols_b, nrows_c, ncols_c, ncb
180 type(c_ptr) :: a, b, c
181#ifdef USE_FORTRAN2008
182 integer,
optional :: error
190#if defined(INCLUDE_ROUTINES)
191 success_l = elpa_hermitian_multiply_d_ptr_&
195 &_impl(self, uplo_a, uplo_c, ncb, a, b, nrows_b, ncols_b, &
199#ifdef USE_FORTRAN2008
200 if (
present(error))
then
206 else if (.not. success_l)
then
207 write(error_unit,
'(a)')
"ELPA: Error in hermitian_multiply() and you did not check for errors!"
236 subroutine elpa_hermitian_multiply_a_h_a_&
238 &_c(handle, uplo_a, uplo_c, ncb, a_p, b_p, nrows_b, &
239 ncols_b, c_p, nrows_c, ncols_c, error) &
241#ifdef DOUBLE_PRECISION_REAL
242 bind(C, name="elpa_hermitian_multiply_a_h_a_d")
244#ifdef SINGLE_PRECISION_REAL
245 bind(C, name="elpa_hermitian_multiply_a_h_a_f")
249#ifdef DOUBLE_PRECISION_COMPLEX
250 bind(C, name="elpa_hermitian_multiply_a_h_a_dc")
252#ifdef SINGLE_PRECISION_COMPLEX
253 bind(C, name="elpa_hermitian_multiply_a_h_a_fc")
257 type(c_ptr),
intent(in),
value :: handle, a_p, b_p, c_p
258 character(1,C_CHAR),
value :: uplo_a, uplo_c
259 integer(kind=c_int),
value :: ncb, nrows_b, ncols_b, nrows_c, ncols_c
260#ifdef USE_FORTRAN2008
261 integer(kind=c_int),
optional,
intent(in) :: error
263 integer(kind=c_int),
intent(in) :: error
265 math_datatype(kind=c_datatype_kind),
pointer :: a(:, :), b(:,:), c(:,:)
271 type(elpa_impl_t),
pointer :: self
273 call c_f_pointer(handle, self)
274 call c_f_pointer(a_p, a, [self%local_nrows, self%local_ncols])
275 call c_f_pointer(b_p, b, [nrows_b, ncols_b])
276 call c_f_pointer(c_p, c, [nrows_c, ncols_c])
278 call elpa_hermitian_multiply_a_h_a_&
280 & (self, uplo_a, uplo_c, ncb, a, b, nrows_b, &
281 ncols_b, c, nrows_c, ncols_c, error)
300 subroutine elpa_hermitian_multiply_d_ptr_&
302 &_c(handle, uplo_a, uplo_c, ncb, a_p, b_p, nrows_b, &
303 ncols_b, c_p, nrows_c, ncols_c, error) &
305#ifdef DOUBLE_PRECISION_REAL
306 bind(C, name="elpa_hermitian_multiply_d_ptr_d")
308#ifdef SINGLE_PRECISION_REAL
309 bind(C, name="elpa_hermitian_multiply_d_ptr_f")
313#ifdef DOUBLE_PRECISION_COMPLEX
314 bind(C, name="elpa_hermitian_multiply_d_ptr_dc")
316#ifdef SINGLE_PRECISION_COMPLEX
317 bind(C, name="elpa_hermitian_multiply_d_ptr_fc")
321 type(c_ptr),
intent(in),
value :: handle, a_p, b_p, c_p
322 character(1,C_CHAR),
value :: uplo_a, uplo_c
323 integer(kind=c_int),
value :: ncb, nrows_b, ncols_b, nrows_c, ncols_c
324#ifdef USE_FORTRAN2008
325 integer(kind=c_int),
optional,
intent(in) :: error
327 integer(kind=c_int),
intent(in) :: error
329 type(elpa_impl_t),
pointer :: self
331 call c_f_pointer(handle, self)
334 call elpa_hermitian_multiply_d_ptr_&
336 & (self, uplo_a, uplo_c, ncb, a_p, b_p, nrows_b, &
337 ncols_b, c_p, nrows_c, ncols_c, error)
380 subroutine elpa_pxgemm_multiply_a_h_a_&
382 & (self, trans_a, trans_b, ncb, a, b, nrows_b, ncols_b, &
383 c, nrows_c, ncols_c, error)
384 class(elpa_impl_t) :: self
385 character*1 :: trans_a, trans_b
386 integer(kind=c_int),
intent(in) :: nrows_b, ncols_b, nrows_c, ncols_c, ncb
387#ifdef USE_ASSUMED_SIZE
388 math_datatype(kind=c_datatype_kind) :: a(self%local_nrows,*), b(nrows_b,*), c(nrows_c,*)
390 math_datatype(kind=c_datatype_kind) :: a(self%local_nrows,self%local_ncols), b(nrows_b,ncols_b), c(nrows_c,ncols_c)
392#ifdef USE_FORTRAN2008
393 integer,
optional :: error
400#if defined(INCLUDE_ROUTINES)
401 success_l = elpa_pxgemm_multiply_a_h_a_&
405 &_impl(self, trans_a, trans_b, ncb, a, b, nrows_b, ncols_b, c, nrows_c, ncols_c)
407#ifdef USE_FORTRAN2008
408 if (
present(error))
then
414 else if (.not. success_l)
then
415 write(error_unit,
'(a)')
"ELPA: Error in pxgemm_multiply() and you did not check for errors!"
462 subroutine elpa_pxgemm_multiply_d_ptr_&
464 & (self, trans_a, trans_b, ncb, a, b, nrows_b, ncols_b, &
465 c, nrows_c, ncols_c, error)
466 class(elpa_impl_t) :: self
467 character*1 :: trans_a, trans_b
468 integer(kind=c_int),
intent(in) :: nrows_b, ncols_b, nrows_c, ncols_c, ncb
469 type(c_ptr) :: a, b, c
470#ifdef USE_FORTRAN2008
471 integer,
optional :: error
478#if defined(INCLUDE_ROUTINES)
479 success_l = elpa_pxgemm_multiply_d_ptr_&
483 &_impl(self, trans_a, trans_b, ncb, a, b, nrows_b, ncols_b, c, nrows_c, ncols_c)
485#ifdef USE_FORTRAN2008
486 if (
present(error))
then
492 else if (.not. success_l)
then
493 write(error_unit,
'(a)')
"ELPA: Error in pxgemm_multiply() and you did not check for errors!"
522 subroutine elpa_pxgemm_multiply_a_h_a_&
524 &_c(handle, trans_a, trans_b, ncb, a_p, b_p, nrows_b, &
525 ncols_b, c_p, nrows_c, ncols_c, error) &
527#ifdef DOUBLE_PRECISION_REAL
528 bind(C, name="elpa_pxgemm_multiply_a_h_a_d")
530#ifdef SINGLE_PRECISION_REAL
531 bind(C, name="elpa_pxgemm_multiply_a_h_a_f")
535#ifdef DOUBLE_PRECISION_COMPLEX
536 bind(C, name="elpa_pxgemm_multiply_a_h_a_dc")
538#ifdef SINGLE_PRECISION_COMPLEX
539 bind(C, name="elpa_pxgemm_multiply_a_h_a_fc")
543 type(c_ptr),
intent(in),
value :: handle, a_p, b_p, c_p
544 character(1, c_char),
value :: trans_a, trans_b
545 integer(kind=c_int),
value :: ncb, nrows_b, ncols_b, nrows_c, ncols_c
546#ifdef USE_FORTRAN2008
547 integer(kind=c_int),
optional,
intent(in) :: error
549 integer(kind=c_int),
intent(in) :: error
551 math_datatype(kind=c_datatype_kind),
pointer :: a(:, :), b(:,:), c(:,:)
557 type(elpa_impl_t),
pointer :: self
559 call c_f_pointer(handle, self)
560 call c_f_pointer(a_p, a, [self%local_nrows, self%local_ncols])
561 call c_f_pointer(b_p, b, [nrows_b, ncols_b])
562 call c_f_pointer(c_p, c, [nrows_c, ncols_c])
564 call elpa_pxgemm_multiply_a_h_a_&
566 & (self, trans_a, trans_b, ncb, a, b, nrows_b, ncols_b, c, nrows_c, ncols_c, error)
585 subroutine elpa_pxgemm_multiply_d_ptr_&
587 &_c(handle, trans_a, trans_b, ncb, a_p, b_p, nrows_b, ncols_b, c_p, nrows_c, ncols_c, error) &
589#ifdef DOUBLE_PRECISION_REAL
590 bind(C, name="elpa_pxgemm_multiply_d_ptr_d")
592#ifdef SINGLE_PRECISION_REAL
593 bind(C, name="elpa_pxgemm_multiply_d_ptr_f")
597#ifdef DOUBLE_PRECISION_COMPLEX
598 bind(C, name="elpa_pxgemm_multiply_d_ptr_dc")
600#ifdef SINGLE_PRECISION_COMPLEX
601 bind(C, name="elpa_pxgemm_multiply_d_ptr_fc")
605 type(c_ptr),
intent(in),
value :: handle, a_p, b_p, c_p
606 character(1, c_char),
value :: trans_a, trans_b
607 integer(kind=c_int),
value :: ncb, nrows_b, ncols_b, nrows_c, ncols_c
608#ifdef USE_FORTRAN2008
609 integer(kind=c_int),
optional,
intent(in) :: error
611 integer(kind=c_int),
intent(in) :: error
613 type(elpa_impl_t),
pointer :: self
615 call c_f_pointer(handle, self)
618 call elpa_pxgemm_multiply_d_ptr_&
620 & (self, trans_a, trans_b, ncb, a_p, b_p, nrows_b, ncols_b, c_p, nrows_c, ncols_c, error)
704 subroutine elpa_choleksy_a_h_a_&
706 &_c(handle, a_p, error) &
708#ifdef DOUBLE_PRECISION_REAL
709 bind(C, name="elpa_cholesky_a_h_a_d")
711#ifdef SINGLE_PRECISION_REAL
712 bind(C, name="elpa_cholesky_a_h_a_f")
716#ifdef DOUBLE_PRECISION_COMPLEX
717 bind(C, name="elpa_cholesky_a_h_a_dc")
719#ifdef SINGLE_PRECISION_COMPLEX
720 bind(C, name="elpa_cholesky_a_h_a_fc")
724 type(c_ptr),
intent(in),
value :: handle, a_p
725#ifdef USE_FORTRAN2008
726 integer(kind=c_int),
optional,
intent(in) :: error
728 integer(kind=c_int),
intent(in) :: error
730 math_datatype(kind=c_datatype_kind),
pointer :: a(:, :)
731 type(elpa_impl_t),
pointer :: self
733 call c_f_pointer(handle, self)
734 call c_f_pointer(a_p, a, [self%local_nrows, self%local_ncols])
736 call elpa_cholesky_a_h_a_&
934 subroutine elpa_invert_trm_a_h_a_&
936 &_c(handle, a_p, error) &
938#ifdef DOUBLE_PRECISION_REAL
939 bind(C, name="elpa_invert_trm_a_h_a_d")
941#ifdef SINGLE_PRECISION_REAL
942 bind(C, name="elpa_invert_trm_a_h_a_f")
946#ifdef DOUBLE_PRECISION_COMPLEX
947 bind(C, name="elpa_invert_trm_a_h_a_dc")
949#ifdef SINGLE_PRECISION_COMPLEX
950 bind(C, name="elpa_invert_trm_a_h_a_fc")
954 type(c_ptr),
intent(in),
value :: handle, a_p
955#ifdef USE_FORTRAN2008
956 integer(kind=c_int),
optional,
intent(in) :: error
958 integer(kind=c_int),
intent(in) :: error
960 math_datatype(kind=c_datatype_kind),
pointer :: a(:, :)
961 type(elpa_impl_t),
pointer :: self
963 call c_f_pointer(handle, self)
964 call c_f_pointer(a_p, a, [self%local_nrows, self%local_ncols])
966 call elpa_invert_trm_a_h_a_&
1102 subroutine elpa_solve_tridiagonal_&
1104 & (self, d, e, q, error)
1107 class(elpa_impl_t) :: self
1108 real(kind=c_real_datatype) :: d(self%na), e(self%na)
1109#ifdef USE_ASSUMED_SIZE
1110 real(kind=c_real_datatype) :: q(self%local_nrows,*)
1112 real(kind=c_real_datatype) :: q(self%local_nrows,self%local_ncols)
1114#ifdef USE_FORTRAN2008
1115 integer,
optional :: error
1119 logical :: success_l
1121#if defined(INCLUDE_ROUTINES)
1122 success_l = elpa_solve_tridi_&
1124 &_impl(self, d, e, q)
1126 write(error_unit,*)
"ELPA is not compiled with single-precision support"
1127#ifdef USE_FORTRAN2008
1128 if (
present(error))
then
1139#ifdef USE_FORTRAN2008
1140 if (
present(error))
then
1146 else if (.not. success_l)
then
1147 write(error_unit,
'(a)')
"ELPA: Error in solve_tridiagonal() and you did not check for errors!"
1166 subroutine elpa_solve_tridiagonal_&
1168 &_c(handle, d_p, e_p, q_p, error) &
1170#ifdef DOUBLE_PRECISION_REAL
1171 bind(C, name="elpa_solve_tridiagonal_d")
1173#ifdef SINGLE_PRECISION_REAL
1174 bind(C, name="elpa_solve_tridiagonal_f")
1178#ifdef DOUBLE_PRECISION_COMPLEX
1181#ifdef SINGLE_PRECISION_COMPLEX
1186 type(c_ptr),
intent(in),
value :: handle, d_p, e_p, q_p
1187#ifdef USE_FORTRAN2008
1188 integer(kind=c_int),
optional,
intent(in) :: error
1190 integer(kind=c_int),
intent(in) :: error
1192 real(kind=c_real_datatype),
pointer :: d(:), e(:), q(:, :)
1193 type(elpa_impl_t),
pointer :: self
1195 call c_f_pointer(handle, self)
1196 call c_f_pointer(d_p, d, [self%na])
1197 call c_f_pointer(e_p, e, [self%na])
1198 call c_f_pointer(q_p, q, [self%local_nrows, self%local_ncols])
1200 call elpa_solve_tridiagonal_&
1202 & (self, d, e, q, error)