Skip to content

Commit

Permalink
fixing warnings (#494)
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett authored Jul 18, 2023
1 parent a05a1b4 commit e558ef6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 25 deletions.
22 changes: 10 additions & 12 deletions src/drstemplates.F90
Original file line number Diff line number Diff line change
Expand Up @@ -211,17 +211,15 @@ subroutine extdrstemplate(number, list, nummap, map)
! No implemented DRS templates need extensions.
if (.not. templates(index)%needext) return

! Uncomment the code below if we ever implement a template that
! needs extension.
! nummap = templates(index)%mapdrslen
! map(1 : nummap) = templates(index)%mapdrs(1 : nummap)

! if (number .eq. 1) then
! N = list(11) + list(13)
! do i = 1, N
! map(nummap + i)=4
! enddo
! nummap = nummap + N
! endif
nummap = templates(index)%mapdrslen
map(1 : nummap) = templates(index)%mapdrs(1 : nummap)

if (number .eq. 1) then
N = list(11) + list(13)
do i = 1, N
map(nummap + i)=4
enddo
nummap = nummap + N
endif
end subroutine extdrstemplate
end module drstemplates
26 changes: 13 additions & 13 deletions src/intmath.f
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function i1log2_2(ival)
implicit none
integer(kind=2), value :: ival
integer(kind=2)::i1log2_2
integer(kind=2), parameter :: one=1
integer(kind=2), parameter :: one = 1_2
if(ival+one<ival) then
i1log2_2=ilog2_2(ival)
else
Expand All @@ -100,7 +100,7 @@ function i1log2_1(ival)
implicit none
integer(kind=1), value :: ival
integer(kind=1)::i1log2_1
integer(kind=1), parameter :: one=1
integer(kind=1), parameter :: one = 1_1
if(ival+one<ival) then
i1log2_1=ilog2_1(ival)
else
Expand Down Expand Up @@ -205,30 +205,30 @@ function ilog2_2(i_in)
implicit none
integer(kind=2), value :: i_in
integer(kind=2)::ilog2_2,i
ilog2_2=0
ilog2_2 = 0_2
i=i_in
if(i<=0) return
if(iand(i,int(i-1,kind=2))/=0) then
!write(0,*) 'iand i-1'
ilog2_2=1
ilog2_2 = 1_2
endif
if(iand(i,Z'FF00')/=0) then
ilog2_2=ilog2_2+8
ilog2_2 = ilog2_2 + 8_2
i=ishft(i,-8)
!write(0,*) 'iand ff',i,ilog2_2
endif
if(iand(i,Z'00F0')/=0) then
ilog2_2=ilog2_2+4
ilog2_2 = ilog2_2 + 4_2
i=ishft(i,-4)
!write(0,*) 'iand f',i,ilog2_2
endif
if(iand(i,Z'000C')/=0) then
ilog2_2=ilog2_2+2
ilog2_2 = ilog2_2 + 2_2
i=ishft(i,-2)
!write(0,*) 'iand c',i,ilog2_2
endif
if(iand(i,Z'0002')/=0) then
ilog2_2=ilog2_2+1
ilog2_2 = ilog2_2 + 1_2
i=ishft(i,-1)
!write(0,*) 'iand 2',i,ilog2_2
endif
Expand All @@ -242,25 +242,25 @@ function ilog2_1(i_in)
implicit none
integer(kind=1), value :: i_in
integer(kind=1)::ilog2_1,i
ilog2_1=0
ilog2_1 = 0_1
i=i_in
if(i<=0) return
if(iand(i,int(i-1,kind=1))/=0) then
!write(0,*) 'iand i-1'
ilog2_1=1
ilog2_1 = 1_1
endif
if(iand(i,Z'F0')/=0) then
ilog2_1=ilog2_1+4
ilog2_1 = ilog2_1 + 4_1
i=ishft(i,-4)
!write(0,*) 'iand f',i,ilog2_1
endif
if(iand(i,Z'0C')/=0) then
ilog2_1=ilog2_1+2
ilog2_1 = ilog2_1 + 2_1
i=ishft(i,-2)
!write(0,*) 'iand c',i,ilog2_1
endif
if(iand(i,Z'02')/=0) then
ilog2_1=ilog2_1+1
ilog2_1 = ilog2_1 + 1_1
i=ishft(i,-1)
!write(0,*) 'iand 2',i,ilog2_1
endif
Expand Down

0 comments on commit e558ef6

Please sign in to comment.