| 1 |
program main |
| 2 |
implicit none |
| 3 |
contains |
| 4 |
function f6 (x, y, z) |
| 5 |
real (kind = 8) :: f6 |
| 6 |
integer, intent(in) :: x |
| 7 |
integer (kind = 8), intent(in) :: y |
| 8 |
real (kind = 4), intent(in) :: z |
| 9 |
|
| 10 |
interface |
| 11 |
function f1 (x, y, z) |
| 12 |
real (kind = 8) :: f1 |
| 13 |
integer, intent(in) :: x |
| 14 |
integer (kind = 8), intent(in) :: y |
| 15 |
real (kind = 4), intent(in) :: z |
| 16 |
end function |
| 17 |
|
| 18 |
function f2 (x, y, z) |
| 19 |
real (kind = 8) :: f2 |
| 20 |
integer, intent(in) :: x |
| 21 |
integer (kind = 8), intent(in) :: y |
| 22 |
real (kind = 4), intent(in) :: z |
| 23 |
end function |
| 24 |
|
| 25 |
function f3 (x, y, z) |
| 26 |
real (kind = 8) :: f3 |
| 27 |
integer, intent(in) :: x |
| 28 |
integer (kind = 8), intent(in) :: y |
| 29 |
real (kind = 4), intent(in) :: z |
| 30 |
end function |
| 31 |
|
| 32 |
function f4 (x, y, z) |
| 33 |
real (kind = 8) :: f4 |
| 34 |
integer, intent(in) :: x |
| 35 |
integer (kind = 8), intent(in) :: y |
| 36 |
real (kind = 4), intent(in) :: z |
| 37 |
end function |
| 38 |
|
| 39 |
function f5 (x, y, z) |
| 40 |
real (kind = 8) :: f5 |
| 41 |
integer, intent(in) :: x |
| 42 |
integer (kind = 8), intent(in) :: y |
| 43 |
real (kind = 4), intent(in) :: z |
| 44 |
end function |
| 45 |
end interface |
| 46 |
|
| 47 |
!$omp declare variant (f1) match (user={condition(.true.)}) |
| 48 |
!$omp declare variant (f2) match (user={condition(score(1):.true.)}) |
| 49 |
!$omp declare variant (f3) match (user={condition(score(3):.true.)}) |
| 50 |
!$omp declare variant (f4) match (user={condition(score(2):.true.)}) |
| 51 |
!$omp declare variant (f5) match (implementation={vendor(gnu)}) |
| 52 |
|
| 53 |
f6 = z + x + y |
| 54 |
end function |
| 55 |
|
| 56 |
function test (x) |
| 57 |
real (kind = 8) :: test |
| 58 |
integer, intent(in) :: x |
| 59 |
|
| 60 |
test = f6 (x, int (x, kind = 8), 3.5) |
| 61 |
end function |
| 62 |
end program |