The Elk Code
zmctmu.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2019 J. K. Dewhurst, S. Sharma and E. K. U. Gross.
3 ! This file is distributed under the terms of the GNU General Public License.
4 ! See the file COPYING for license details.
5 
6 subroutine zmctmu(l,n,a,b,ld,c)
7 use modomp
8 implicit none
9 ! arguments
10 integer, intent(in) :: l,n
11 ! pass in complex arrays as real
12 real(8), intent(in) :: a(2*l,n),b(2*l,n)
13 integer, intent(in) :: ld
14 complex(8), intent(inout) :: c(ld,*)
15 ! local variables
16 integer i,j,nthd
17 ! external functions
18 complex(8), external :: zdotc
19 call holdthd(n,nthd)
20 !$OMP PARALLEL DO DEFAULT(SHARED) &
21 !$OMP PRIVATE(i) &
22 !$OMP SCHEDULE(DYNAMIC) &
23 !$OMP NUM_THREADS(nthd)
24 do j=1,n
25  do i=1,j-1
26  c(i,j)=c(i,j)+zdotc(l,a(1,i),1,b(1,j),1)
27  end do
28  c(j,j)=c(j,j)+dot_product(a(:,j),b(:,j))
29 end do
30 !$OMP END PARALLEL DO
31 call freethd(nthd)
32 end subroutine
33 
Definition: modomp.f90:6
subroutine zmctmu(l, n, a, b, ld, c)
Definition: zmctmu.f90:7
subroutine freethd(nthd)
Definition: modomp.f90:106
subroutine holdthd(nloop, nthd)
Definition: modomp.f90:78