CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
117 lines
2.9 KiB
Fortran
117 lines
2.9 KiB
Fortran
! REQUIRES: openmp_runtime
|
|
|
|
! RUN: %flang_fc1 -emit-hlfir %openmp_flags -fopenmp-version=52 %s -o - | FileCheck %s
|
|
|
|
! CHECK-LABEL: func @_QPteams_simple
|
|
subroutine teams_simple()
|
|
! CHECK: omp.teams
|
|
!$omp teams
|
|
! CHECK: fir.call
|
|
call f1()
|
|
! CHECK: omp.terminator
|
|
!$omp end teams
|
|
end subroutine teams_simple
|
|
|
|
!===============================================================================
|
|
! `num_teams` clause
|
|
!===============================================================================
|
|
|
|
! CHECK-LABEL: func @_QPteams_numteams
|
|
subroutine teams_numteams(num_teams)
|
|
integer, intent(inout) :: num_teams
|
|
|
|
! CHECK: omp.teams
|
|
! CHECK-SAME: num_teams( to %{{.*}}: i32)
|
|
!$omp teams num_teams(4)
|
|
! CHECK: fir.call
|
|
call f1()
|
|
! CHECK: omp.terminator
|
|
!$omp end teams
|
|
|
|
! CHECK: omp.teams
|
|
! CHECK-SAME: num_teams( to %{{.*}}: i32)
|
|
!$omp teams num_teams(num_teams)
|
|
! CHECK: fir.call
|
|
call f2()
|
|
! CHECK: omp.terminator
|
|
!$omp end teams
|
|
|
|
end subroutine teams_numteams
|
|
|
|
!===============================================================================
|
|
! `if` clause
|
|
!===============================================================================
|
|
|
|
! CHECK-LABEL: func @_QPteams_if
|
|
subroutine teams_if(alpha)
|
|
integer, intent(in) :: alpha
|
|
logical :: condition
|
|
|
|
! CHECK: omp.teams
|
|
! CHECK-SAME: if(%{{.*}})
|
|
!$omp teams if(.false.)
|
|
! CHECK: fir.call
|
|
call f1()
|
|
! CHECK: omp.terminator
|
|
!$omp end teams
|
|
|
|
! CHECK: omp.teams
|
|
! CHECK-SAME: if(%{{.*}})
|
|
!$omp teams if(alpha .le. 0)
|
|
! CHECK: fir.call
|
|
call f2()
|
|
! CHECK: omp.terminator
|
|
!$omp end teams
|
|
|
|
! CHECK: omp.teams
|
|
! CHECK-SAME: if(%{{.*}})
|
|
!$omp teams if(condition)
|
|
! CHECK: fir.call
|
|
call f3()
|
|
! CHECK: omp.terminator
|
|
!$omp end teams
|
|
end subroutine teams_if
|
|
|
|
!===============================================================================
|
|
! `thread_limit` clause
|
|
!===============================================================================
|
|
|
|
! CHECK-LABEL: func @_QPteams_threadlimit
|
|
subroutine teams_threadlimit(thread_limit)
|
|
integer, intent(inout) :: thread_limit
|
|
|
|
! CHECK: omp.teams
|
|
! CHECK-SAME: thread_limit(%{{.*}}: i32)
|
|
!$omp teams thread_limit(4)
|
|
! CHECK: fir.call
|
|
call f1()
|
|
! CHECK: omp.terminator
|
|
!$omp end teams
|
|
|
|
! CHECK: omp.teams
|
|
! CHECK-SAME: thread_limit(%{{.*}}: i32)
|
|
!$omp teams thread_limit(thread_limit)
|
|
! CHECK: fir.call
|
|
call f2()
|
|
! CHECK: omp.terminator
|
|
!$omp end teams
|
|
|
|
end subroutine teams_threadlimit
|
|
|
|
!===============================================================================
|
|
! `allocate` clause
|
|
!===============================================================================
|
|
|
|
! CHECK-LABEL: func @_QPteams_allocate
|
|
subroutine teams_allocate()
|
|
use omp_lib
|
|
integer :: x
|
|
! CHECK: omp.teams
|
|
! CHECK-SAME: allocate(%{{.+}} : i64 -> %{{.+}} : !fir.ref<i32>)
|
|
!$omp teams allocate(omp_high_bw_mem_alloc: x) private(x)
|
|
! CHECK: arith.addi
|
|
x = x + 12
|
|
! CHECK: omp.terminator
|
|
!$omp end teams
|
|
end subroutine teams_allocate
|