10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-12-25 05:43:47 +01:00

bug in blocked search - replaced with thesis version

This commit is contained in:
Yann Garniron 2018-08-31 15:52:16 +02:00
parent bb6e073cf1
commit 02893a419d

View File

@ -455,26 +455,21 @@ end subroutine
integer function dress_find_sample(v, w) integer function dress_find_sample(v, w)
implicit none implicit none
double precision, intent(in) :: v, w(0:N_det_generators) double precision, intent(in) :: v, w(0:N_det_generators)
integer :: i,l,h integer :: i,l,r
integer, parameter :: block=64
l = 0 l = 0
h = N_det_generators r = N_det_generators
do while(h-l >= block) do while(r-l > 1)
i = ishft(h+l,-1) i = (r+l) / 2
if(w(i+1) > v) then if(w(i) < v) then
h = i-1 l = i
else else
l = i+1 r = i
end if
end do
!DIR$ LOOP COUNT (64)
do dress_find_sample=l,h
if(w(dress_find_sample) >= v) then
exit
end if end if
end do end do
dress_find_sample = r
end function end function