Optimize prolong3: hoist bounds check out of inner loop
(cherry picked from commit 3046a0ccde)
This commit is contained in:
@@ -1951,6 +1951,7 @@
|
||||
|
||||
integer::imini,imaxi,jmini,jmaxi,kmini,kmaxi
|
||||
integer::imino,imaxo,jmino,jmaxo,kmino,kmaxo
|
||||
integer::maxcx,maxcy,maxcz
|
||||
|
||||
real*8,dimension(3) :: CD,FD
|
||||
|
||||
@@ -2056,6 +2057,14 @@
|
||||
endif
|
||||
enddo
|
||||
|
||||
maxcx = maxval(cix(imino:imaxo))
|
||||
maxcy = maxval(ciy(jmino:jmaxo))
|
||||
maxcz = maxval(ciz(kmino:kmaxo))
|
||||
if(maxcx+3 > extc(1) .or. maxcy+3 > extc(2) .or. maxcz+3 > extc(3))then
|
||||
write(*,*)"error in prolong"
|
||||
return
|
||||
endif
|
||||
|
||||
call symmetry_bd(3,extc,func,funcc,SoA)
|
||||
|
||||
!~~~~~~> prolongation start...
|
||||
@@ -2068,8 +2077,6 @@
|
||||
px = pix(i)
|
||||
py = piy(j)
|
||||
pz = piz(k)
|
||||
|
||||
if(any(cxI+3 > extc)) write(*,*)"error in prolong"
|
||||
#if 0
|
||||
if(ii/2*2==ii)then
|
||||
if(jj/2*2==jj)then
|
||||
|
||||
Reference in New Issue
Block a user