File: udr11.f90

package info (click to toggle)
gcc-avr 1%3A5.4.0%2BAtmel3.6.1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 589,832 kB
  • sloc: ansic: 2,775,567; ada: 756,757; cpp: 723,977; f90: 117,673; asm: 66,896; makefile: 62,755; xml: 44,466; sh: 29,549; exp: 23,315; objc: 15,216; fortran: 10,901; pascal: 4,185; python: 4,093; perl: 2,969; awk: 2,811; ml: 2,385; cs: 879; yacc: 316; lex: 198; haskell: 112; lisp: 8
file content (95 lines) | stat: -rw-r--r-- 2,998 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
! { dg-do run }

module udr11
  type dt
    integer :: x = 0
  end type
end module udr11
  use udr11, only : dt
!$omp declare reduction(+:dt:omp_out%x=omp_out%x+omp_in%x)
!$omp declare reduction(-:dt:omp_out%x=omp_out%x+omp_in%x)
!$omp declare reduction(*:dt:omp_out%x=omp_out%x+omp_in%x)
!$omp declare reduction(.and.:dt:omp_out%x=omp_out%x+omp_in%x)
!$omp declare reduction(.or.:dt:omp_out%x=omp_out%x+3*omp_in%x)
!$omp declare reduction(.eqv.:dt:omp_out%x=omp_out%x+omp_in%x)
!$omp declare reduction(.neqv.:dt:omp_out%x=omp_out%x+omp_in%x)
!$omp declare reduction(min:dt:omp_out%x=omp_out%x+omp_in%x)
!$omp declare reduction(max:dt:omp_out%x=omp_out%x+omp_in%x)
!$omp declare reduction(iand:dt:omp_out%x=omp_out%x+omp_in%x)
!$omp declare reduction(ior:dt:omp_out%x=omp_out%x+omp_in%x)
!$omp declare reduction(ieor:dt:omp_out%x=omp_out%x+omp_in%x)
  interface operator(.and.)
    function addme1 (x, y)
      use udr11, only : dt
      type (dt), intent (in) :: x, y
      type(dt) :: addme1
    end function addme1
  end interface
  interface operator(.or.)
    function addme2 (x, y)
      use udr11, only : dt
      type (dt), intent (in) :: x, y
      type(dt) :: addme2
    end function addme2
  end interface
  interface operator(.eqv.)
    function addme3 (x, y)
      use udr11, only : dt
      type (dt), intent (in) :: x, y
      type(dt) :: addme3
    end function addme3
  end interface
  interface operator(.neqv.)
    function addme4 (x, y)
      use udr11, only : dt
      type (dt), intent (in) :: x, y
      type(dt) :: addme4
    end function addme4
  end interface
  interface operator(+)
    function addme5 (x, y)
      use udr11, only : dt
      type (dt), intent (in) :: x, y
      type(dt) :: addme5
    end function addme5
  end interface
  interface operator(-)
    function addme6 (x, y)
      use udr11, only : dt
      type (dt), intent (in) :: x, y
      type(dt) :: addme6
    end function addme6
  end interface
  interface operator(*)
    function addme7 (x, y)
      use udr11, only : dt
      type (dt), intent (in) :: x, y
      type(dt) :: addme7
    end function addme7
  end interface
  type(dt) :: j, k, l, m, n, o, p, q, r, s, t, u
  integer :: i
!$omp parallel do reduction(.and.:j) reduction(.or.:k) &
!$omp & reduction(.eqv.:l) reduction(.neqv.:m) &
!$omp & reduction(min:n) reduction(max:o) &
!$omp & reduction(iand:p) reduction(ior:q) reduction (ieor:r) &
!$omp & reduction(+:s) reduction(-:t) reduction(*:u)
  do i = 1, 100
    j%x = j%x + i
    k%x = k%x + 2 * i
    l%x = l%x + 3 * i
    m%x = m%x + i
    n%x = n%x + 2 * i
    o%x = o%x + 3 * i
    p%x = p%x + i
    q%x = q%x + 2 * i
    r%x = r%x + 3 * i
    s%x = s%x + i
    t%x = t%x + 2 * i
    u%x = u%x + 3 * i
  end do
  if (j%x /= 5050 .or. k%x /= 30300 .or. l%x /= 15150) call abort
  if (m%x /= 5050 .or. n%x /= 10100 .or. o%x /= 15150) call abort
  if (p%x /= 5050 .or. q%x /= 10100 .or. r%x /= 15150) call abort
  if (s%x /= 5050 .or. t%x /= 10100 .or. u%x /= 15150) call abort
end