The Elk Code
 
Loading...
Searching...
No Matches
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
6subroutine zmctmu(l,n,a,b,ld,c)
7use modomp
8implicit none
9! arguments
10integer, intent(in) :: l,n
11! pass in complex arrays as real
12real(8), intent(in) :: a(2*l,n),b(2*l,n)
13integer, intent(in) :: ld
14complex(8), intent(inout) :: c(ld,*)
15! local variables
16integer i,j,nthd
17! external functions
18complex(8), external :: zdotc
19call holdthd(n,nthd)
20!$OMP PARALLEL DO DEFAULT(SHARED) &
21!$OMP PRIVATE(i) &
22!$OMP SCHEDULE(DYNAMIC) &
23!$OMP NUM_THREADS(nthd)
24do 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))
29end do
30!$OMP END PARALLEL DO
31call freethd(nthd)
32end subroutine
33
subroutine holdthd(nloop, nthd)
Definition modomp.f90:78
subroutine freethd(nthd)
Definition modomp.f90:106
subroutine zmctmu(l, n, a, b, ld, c)
Definition zmctmu.f90:7