4 implicit none (external, type)
13 d
= omp_get_default_device ()
14 id
= omp_get_initial_device ()
16 if (d
< 0 .or
. d
>= omp_get_num_devices ()) &
20 !$omp target data map(alloc: s, s%m2) device(d)
21 !$omp target map(from: p1, p2) map(alloc: s, s%m2) device(d)
26 if (.not
. c_associated (omp_get_mapped_ptr (c_loc (s
), d
), p1
) &
27 .or
. .not
. c_associated (omp_get_mapped_ptr (c_loc (s
%m2
), d
), p2
)) &
31 if (c_associated (omp_get_mapped_ptr (c_loc (s
), d
)) &
32 .or
. c_associated (omp_get_mapped_ptr (c_loc (s
%m2
), d
))) &
35 !$omp target enter data map (alloc: s, s%m2) device (d)
36 !$omp target map(from: p1, p2) map(alloc: s, s%m2) device(d)
41 if (.not
. c_associated (omp_get_mapped_ptr (c_loc (s
), d
), p1
) &
42 .or
. .not
. c_associated (omp_get_mapped_ptr (c_loc (s
%m2
), d
), p2
)) &
44 !$omp target exit data map (delete: s, s%m2) device (d)
46 if (c_associated (omp_get_mapped_ptr (c_loc (s
), d
)) &
47 .or
. c_associated (omp_get_mapped_ptr (c_loc (s
%m2
), d
))) &
52 !$omp target data map(alloc: s, s%m2) device(d)
53 !$omp target map(from: p1, p2) map(alloc: s, s%m2) device(d)
58 if (.not
. c_associated (omp_get_mapped_ptr (c_loc (s
), d
), c_loc (s
)) &
59 .or
. .not
. c_associated (omp_get_mapped_ptr (c_loc (s
%m2
), d
), c_loc (s
%m2
))) &
63 if (.not
. c_associated (omp_get_mapped_ptr (c_loc (s
), d
), c_loc (s
)) &
64 .or
. .not
. c_associated (omp_get_mapped_ptr (c_loc (s
%m2
), d
), c_loc (s
%m2
))) &
67 !$omp target enter data map (alloc: s, s%m2) device (d)
68 !$omp target map(from: p1, p2) map(alloc: s, s%m2) device(d)
73 if (.not
. c_associated (omp_get_mapped_ptr (c_loc (s
), d
), c_loc (s
)) &
74 .or
. .not
. c_associated (omp_get_mapped_ptr (c_loc (s
%m2
), d
), c_loc (s
%m2
))) &
77 !$omp target exit data map (delete: s, s%m2) device (d)
79 if (.not
. c_associated (omp_get_mapped_ptr (c_loc (s
), d
), c_loc (s
)) &
80 .or
. .not
. c_associated (omp_get_mapped_ptr (c_loc (s
%m2
), d
), c_loc (s
%m2
))) &