mirror of
https://gitlab.com/scemama/qmcchem.git
synced 2024-12-22 04:13:31 +01:00
Optimized det (mod1)
This commit is contained in:
parent
5c872ed2aa
commit
56cd62957a
@ -434,20 +434,20 @@ subroutine det_update$n(n,LDS,m,l,S,S_inv,d)
|
||||
!DIR$ ASSUME (mod(LDS,$IRP_ALIGN/8) == 0)
|
||||
!DIR$ ASSUME (LDS >= $n)
|
||||
integer :: i,j
|
||||
double precision :: zl, ui
|
||||
|
||||
!DIR$ VECTOR ALIGNED
|
||||
do i=1,$n
|
||||
u(i) = m(i) - S(i,l)
|
||||
enddo
|
||||
|
||||
z(l) = S_inv($n,l)*u($n)
|
||||
zl = 0.d0
|
||||
!DIR$ VECTOR ALIGNED
|
||||
do i=1,$n-1
|
||||
z(l) = z(l) + S_inv(i,l)*u(i)
|
||||
ui = m(i) - S(i,l)
|
||||
u(i) = ui
|
||||
zl = zl + S_inv(i,l)*ui
|
||||
enddo
|
||||
|
||||
u($n) = m($n) - S($n,l)
|
||||
zl = zl + S_inv($n,l)*u($n)
|
||||
|
||||
d_inv = 1.d0/d
|
||||
d = d+z(l)
|
||||
d = d+zl
|
||||
lambda = d*d_inv
|
||||
if (dabs(lambda) < 1.d-3) then
|
||||
d = 0.d0
|
||||
@ -456,10 +456,10 @@ subroutine det_update$n(n,LDS,m,l,S,S_inv,d)
|
||||
|
||||
!DIR$ VECTOR ALIGNED
|
||||
do j=1,$n-1,4
|
||||
z(j ) = S_inv($n,j )*u($n)
|
||||
z(j+1) = S_inv($n,j+1)*u($n)
|
||||
z(j+2) = S_inv($n,j+2)*u($n)
|
||||
z(j+3) = S_inv($n,j+3)*u($n)
|
||||
z(j ) = 0.d0
|
||||
z(j+1) = 0.d0
|
||||
z(j+2) = 0.d0
|
||||
z(j+3) = 0.d0
|
||||
!DIR$ VECTOR ALIGNED
|
||||
do i=1,$n-1
|
||||
z(j ) = z(j ) + S_inv(i,j )*u(i)
|
||||
@ -467,11 +467,15 @@ subroutine det_update$n(n,LDS,m,l,S,S_inv,d)
|
||||
z(j+2) = z(j+2) + S_inv(i,j+2)*u(i)
|
||||
z(j+3) = z(j+3) + S_inv(i,j+3)*u(i)
|
||||
enddo
|
||||
z(j ) = z(j ) + S_inv($n,j )*u($n)
|
||||
z(j+1) = z(j+1) + S_inv($n,j+1)*u($n)
|
||||
z(j+2) = z(j+2) + S_inv($n,j+2)*u($n)
|
||||
z(j+3) = z(j+3) + S_inv($n,j+3)*u($n)
|
||||
enddo
|
||||
|
||||
z($n) = S_inv($n,$n)*u($n)
|
||||
z($n) = 0.d0
|
||||
!DIR$ VECTOR ALIGNED
|
||||
do i=1,$n-1
|
||||
do i=1,$n
|
||||
z($n) = z($n) + S_inv(i,$n)*u(i)
|
||||
enddo
|
||||
!DIR$ VECTOR ALIGNED
|
||||
@ -488,14 +492,10 @@ subroutine det_update$n(n,LDS,m,l,S,S_inv,d)
|
||||
S_inv(j,i+2) = S_inv(j,i+2)*lambda - w(j)*z(i+2)
|
||||
S_inv(j,i+3) = S_inv(j,i+3)*lambda - w(j)*z(i+3)
|
||||
enddo
|
||||
enddo
|
||||
|
||||
!DIR$ VECTOR ALIGNED
|
||||
do i=1,$n-1,4
|
||||
S_inv($n,i ) = S_inv($n,i )*lambda - w($n)*z(i )
|
||||
S_inv($n,i+1) = S_inv($n,i+1)*lambda - w($n)*z(i+1)
|
||||
S_inv($n,i+2) = S_inv($n,i+2)*lambda - w($n)*z(i+2)
|
||||
S_inv($n,i+3) = S_inv($n,i+3)*lambda - w($n)*z(i+3)
|
||||
S_inv($n,i ) = S_inv($n,i )*lambda - w($n)*z(i )
|
||||
S_inv($n,i+1) = S_inv($n,i+1)*lambda - w($n)*z(i+1)
|
||||
S_inv($n,i+2) = S_inv($n,i+2)*lambda - w($n)*z(i+2)
|
||||
S_inv($n,i+3) = S_inv($n,i+3)*lambda - w($n)*z(i+3)
|
||||
enddo
|
||||
|
||||
!DIR$ VECTOR ALIGNED
|
||||
|
Loading…
Reference in New Issue
Block a user