4 use iso_c_binding
, only
: c_int
, c_intptr_t
6 private
:: c_int
, c_intptr_t
7 integer, parameter :: omp_allocator_handle_kind
= c_intptr_t
9 integer (kind
=omp_allocator_handle_kind
), &
10 parameter :: omp_null_allocator
= 0
11 integer (kind
=omp_allocator_handle_kind
), &
12 parameter :: omp_default_mem_alloc
= 1
13 integer (kind
=omp_allocator_handle_kind
), &
14 parameter :: omp_large_cap_mem_alloc
= 2
15 integer (kind
=omp_allocator_handle_kind
), &
16 parameter :: omp_const_mem_alloc
= 3
17 integer (kind
=omp_allocator_handle_kind
), &
18 parameter :: omp_high_bw_mem_alloc
= 4
19 integer (kind
=omp_allocator_handle_kind
), &
20 parameter :: omp_low_lat_mem_alloc
= 5
21 integer (kind
=omp_allocator_handle_kind
), &
22 parameter :: omp_cgroup_mem_alloc
= 6
23 integer (kind
=omp_allocator_handle_kind
), &
24 parameter :: omp_pteam_mem_alloc
= 7
25 integer (kind
=omp_allocator_handle_kind
), &
26 parameter :: omp_thread_mem_alloc
= 8
29 subroutine bar (a
, b
, c
)
37 subroutine bar2 (a
, b
, c
)
51 integer, dimension(15) :: y
54 integer c1
, c2
, c3
, c4
55 integer (kind
=omp_allocator_handle_kind
) :: h
60 h
= omp_default_mem_alloc
;
63 !$omp parallel private(/B1/, c3, c4) allocate(/B1/, /B2/)
66 !$omp parallel private(/B1/, /B2/) allocate(h:/B1/, /B2/)
69 !$omp parallel private(/B1/, /B2/) allocate(omp_large_cap_mem_alloc:/B1/, c3, c4)
72 !$omp parallel allocate (x) allocate (h : y) &
73 !$omp allocate (omp_large_cap_mem_alloc:z) firstprivate (x, y, z)
77 !$omp task private (x) firstprivate (z) allocate (omp_low_lat_mem_alloc:x,z)
81 !$omp target teams distribute parallel do private (x) firstprivate (y) &
82 !$omp allocate ((omp_default_mem_alloc + 0):z) allocate &
83 !$omp (omp_default_mem_alloc: x, y) allocate (h: r) lastprivate (z) reduction(+:r)
88 !$omp end target teams distribute parallel do
90 !$omp single private (x) allocate (omp_low_lat_mem_alloc:x)
94 !$omp single allocate (omp_low_lat_mem_alloc:x) private (x)
98 !$omp do allocate (x) private (x)
104 !$omp sections private (x) allocate (omp_low_lat_mem_alloc: x)
112 !$omp taskgroup task_reduction(+:r) allocate (omp_default_mem_alloc : r)
116 !$omp teams private (x) firstprivate (y) allocate (h : x, y)
120 !$omp taskloop lastprivate (x) reduction (+:r) allocate (h : x, r)
127 !$omp taskgroup task_reduction(+:r) allocate (omp_default_mem_alloc : r)
128 !$omp taskloop firstprivate (x) in_reduction (+:r) &
129 !$omp allocate (omp_default_mem_alloc : x, r)