33 lines · plain
1! RUN: %flang_fc1 -emit-fir -fopenmp -fopenmp-version=60 %s -o - | FileCheck %s2 3! CHECK-LABEL: func @_QPtarget_teams_workdistribute4! CHECK: omp.target_data map_entries({{.*}})5! CHECK: omp.target thread_limit({{.*}}) host_eval({{.*}}) map_entries({{.*}})6! CHECK: omp.teams num_teams({{.*}})7! CHECK: omp.parallel8! CHECK: omp.distribute9! CHECK: omp.wsloop10! CHECK: omp.loop_nest11 12subroutine target_teams_workdistribute()13 use iso_fortran_env14 real(kind=real32) :: a15 real(kind=real32), dimension(10) :: x16 real(kind=real32), dimension(10) :: y17 integer :: i18 19 a = 2.0_real3220 x = [(real(i, real32), i = 1, 10)]21 y = [(real(i * 0.5, real32), i = 1, 10)]22 23 !$omp target teams workdistribute &24 !$omp& num_teams(4) &25 !$omp& thread_limit(8) &26 !$omp& default(shared) &27 !$omp& private(i) &28 !$omp& map(to: x) &29 !$omp& map(tofrom: y)30 y = a * x + y31 !$omp end target teams workdistribute32end subroutine target_teams_workdistribute33