mirror of
https://github.com/LCPQ/quantum_package
synced 2024-12-23 04:43:50 +01:00
MRCC optimizations
This commit is contained in:
parent
78198688ef
commit
05c88a79ba
@ -285,7 +285,9 @@ subroutine create_microlist(minilist, N_minilist, key_mask, microlist, idx_micro
|
|||||||
|
|
||||||
|
|
||||||
do i=1, N_minilist
|
do i=1, N_minilist
|
||||||
do j=1,Nint
|
mobileMask(1,1) = iand(key_mask_neg(1,1), minilist(1,1,i))
|
||||||
|
mobileMask(1,2) = iand(key_mask_neg(1,2), minilist(1,2,i))
|
||||||
|
do j=2,Nint
|
||||||
mobileMask(j,1) = iand(key_mask_neg(j,1), minilist(j,1,i))
|
mobileMask(j,1) = iand(key_mask_neg(j,1), minilist(j,1,i))
|
||||||
mobileMask(j,2) = iand(key_mask_neg(j,2), minilist(j,2,i))
|
mobileMask(j,2) = iand(key_mask_neg(j,2), minilist(j,2,i))
|
||||||
end do
|
end do
|
||||||
@ -296,7 +298,9 @@ subroutine create_microlist(minilist, N_minilist, key_mask, microlist, idx_micro
|
|||||||
|
|
||||||
if(n_element(1) + n_element(2) /= 4) then
|
if(n_element(1) + n_element(2) /= 4) then
|
||||||
idx_microlist(cur_microlist(0)) = i
|
idx_microlist(cur_microlist(0)) = i
|
||||||
do k=1,Nint
|
microlist(1,1,cur_microlist(0)) = minilist(1,1,i)
|
||||||
|
microlist(1,2,cur_microlist(0)) = minilist(1,2,i)
|
||||||
|
do k=2,Nint
|
||||||
microlist(k,1,cur_microlist(0)) = minilist(k,1,i)
|
microlist(k,1,cur_microlist(0)) = minilist(k,1,i)
|
||||||
microlist(k,2,cur_microlist(0)) = minilist(k,2,i)
|
microlist(k,2,cur_microlist(0)) = minilist(k,2,i)
|
||||||
enddo
|
enddo
|
||||||
@ -305,8 +309,10 @@ subroutine create_microlist(minilist, N_minilist, key_mask, microlist, idx_micro
|
|||||||
do j=1,n_element(1)
|
do j=1,n_element(1)
|
||||||
nt = list(j,1)
|
nt = list(j,1)
|
||||||
idx_microlist(cur_microlist(nt)) = i
|
idx_microlist(cur_microlist(nt)) = i
|
||||||
|
microlist(1,1,cur_microlist(nt)) = minilist(1,1,i)
|
||||||
|
microlist(1,2,cur_microlist(nt)) = minilist(1,2,i)
|
||||||
! TODO : Page faults
|
! TODO : Page faults
|
||||||
do k=1,Nint
|
do k=2,Nint
|
||||||
microlist(k,1,cur_microlist(nt)) = minilist(k,1,i)
|
microlist(k,1,cur_microlist(nt)) = minilist(k,1,i)
|
||||||
microlist(k,2,cur_microlist(nt)) = minilist(k,2,i)
|
microlist(k,2,cur_microlist(nt)) = minilist(k,2,i)
|
||||||
enddo
|
enddo
|
||||||
@ -316,7 +322,9 @@ subroutine create_microlist(minilist, N_minilist, key_mask, microlist, idx_micro
|
|||||||
do j=1,n_element(2)
|
do j=1,n_element(2)
|
||||||
nt = list(j,2) + mo_tot_num
|
nt = list(j,2) + mo_tot_num
|
||||||
idx_microlist(cur_microlist(nt)) = i
|
idx_microlist(cur_microlist(nt)) = i
|
||||||
do k=1,Nint
|
microlist(1,1,cur_microlist(nt)) = minilist(1,1,i)
|
||||||
|
microlist(1,2,cur_microlist(nt)) = minilist(1,2,i)
|
||||||
|
do k=2,Nint
|
||||||
microlist(k,1,cur_microlist(nt)) = minilist(k,1,i)
|
microlist(k,1,cur_microlist(nt)) = minilist(k,1,i)
|
||||||
microlist(k,2,cur_microlist(nt)) = minilist(k,2,i)
|
microlist(k,2,cur_microlist(nt)) = minilist(k,2,i)
|
||||||
enddo
|
enddo
|
||||||
|
@ -925,22 +925,29 @@ subroutine create_minilist(key_mask, fullList, miniList, idx_miniList, N_fullLis
|
|||||||
|
|
||||||
N_miniList = 0
|
N_miniList = 0
|
||||||
|
|
||||||
|
integer :: e_ab
|
||||||
|
e_ab = n_a+n_b
|
||||||
do i=1,N_fullList
|
do i=1,N_fullList
|
||||||
e_a = n_a - popcnt(iand(fullList(1, 1, i), key_mask(1, 1)))
|
e_a = e_ab - popcnt(iand(fullList(1, 1, i), key_mask(1, 1))) &
|
||||||
e_b = n_b - popcnt(iand(fullList(1, 2, i), key_mask(1, 2)))
|
- popcnt(iand(fullList(1, 2, i), key_mask(1, 2)))
|
||||||
do ni=2,nint
|
do ni=2,nint
|
||||||
e_a -= popcnt(iand(fullList(ni, 1, i), key_mask(ni, 1)))
|
e_a = e_a - popcnt(iand(fullList(ni, 1, i), key_mask(ni, 1))) &
|
||||||
e_b -= popcnt(iand(fullList(ni, 2, i), key_mask(ni, 2)))
|
- popcnt(iand(fullList(ni, 2, i), key_mask(ni, 2)))
|
||||||
end do
|
end do
|
||||||
|
|
||||||
if(e_a + e_b <= 2) then
|
if(e_a > 2) then
|
||||||
N_miniList = N_miniList + 1
|
cycle
|
||||||
do ni=1,Nint
|
endif
|
||||||
miniList(ni,1,N_miniList) = fullList(ni,1,i)
|
|
||||||
miniList(ni,2,N_miniList) = fullList(ni,2,i)
|
N_miniList = N_miniList + 1
|
||||||
enddo
|
miniList(1,1,N_miniList) = fullList(1,1,i)
|
||||||
idx_miniList(N_miniList) = i
|
miniList(1,2,N_miniList) = fullList(1,2,i)
|
||||||
end if
|
do ni=2,Nint
|
||||||
|
miniList(ni,1,N_miniList) = fullList(ni,1,i)
|
||||||
|
miniList(ni,2,N_miniList) = fullList(ni,2,i)
|
||||||
|
enddo
|
||||||
|
idx_miniList(N_miniList) = i
|
||||||
|
|
||||||
end do
|
end do
|
||||||
end subroutine
|
end subroutine
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user