OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [vect/] [vect-gems.f90] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! { dg-require-effective-target vect_double }
3
 
4
MODULE UPML_mod
5
 
6
IMPLICIT NONE
7
 
8
PUBLIC UPMLupdateE
9
 
10
PRIVATE
11
 
12
real(kind=8), dimension(:,:,:), allocatable :: Dx_ilow
13
 
14
real(kind=8), dimension(:), allocatable :: aye, aze
15
real(kind=8), dimension(:), allocatable :: bye, bze
16
real(kind=8), dimension(:), allocatable :: fxh, cxh
17
 
18
real(kind=8) :: epsinv
19
real(kind=8) :: dxinv, dyinv, dzinv
20
 
21
integer :: xstart, ystart, zstart, xstop, ystop, zstop
22
 
23
CONTAINS
24
 
25
SUBROUTINE UPMLupdateE(nx,ny,nz,Hx,Hy,Hz,Ex,Ey,Ez)
26
 
27
integer, intent(in) :: nx, ny, nz
28
real(kind=8), intent(inout),                                                &
29
         dimension(xstart:xstop+1,ystart:ystop+1,zstart:zstop+1) :: Ex, Ey, Ez
30
real(kind=8), intent(inout),                                                &
31
         allocatable :: Hx(:,:,:), Hy(:,:,:), Hz(:,:,:)
32
 
33
integer :: i, j, k
34
real(kind=8) :: Dxold, Dyold, Dzold
35
 
36
do k=zstart+1,zstop
37
  do j=ystart+1,ystop
38
    do i=xstart+1,0
39
 
40
      Dxold = Dx_ilow(i,j,k)
41
 
42
      Dx_ilow(i,j,k) = aye(j) * Dx_ilow(i,j,k) +                              &
43
                       bye(j) * ((Hz(i,j,k  )-Hz(i,j-1,k))*dyinv +            &
44
                                 (Hy(i,j,k-1)-Hy(i,j,k  ))*dzinv)
45
 
46
      Ex(i,j,k) = aze(k) * Ex(i,j,k) +                                        &
47
                  bze(k) * (cxh(i)*Dx_ilow(i,j,k) - fxh(i)*Dxold) * epsinv
48
    end do
49
  end do
50
end do
51
 
52
END SUBROUTINE UPMLupdateE
53
 
54
END MODULE UPML_mod
55
 
56
! { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect"  } }
57
! { dg-final { cleanup-tree-dump "vect" } }
58
! { dg-final { cleanup-modules "upml_mod" } }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.