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
94 lines
3.6 KiB
C++
94 lines
3.6 KiB
C++
// RUN: %clang_cc1 -verify=expected,omp60 -fopenmp -fopenmp-version=60 %s
|
|
// RUN: %clang_cc1 -verify=expected,omp51 -fopenmp -fopenmp-version=51 %s
|
|
// RUN: %clang_cc1 -verify=expected,omp60 -fopenmp-simd -fopenmp-version=60 %s
|
|
// RUN: %clang_cc1 -verify=expected,omp51 -fopenmp-simd -fopenmp-version=51 %s
|
|
|
|
|
|
void test_induction_basic() {
|
|
int i;
|
|
// omp60-warning@+4{{extra tokens at the end of '#pragma omp parallel for' are ignored}}
|
|
// omp60-error@+3{{unexpected OpenMP clause 'induction' in directive '#pragma omp parallel for'}}
|
|
// omp51-warning@+2{{extra tokens at the end of '#pragma omp parallel for' are ignored}}
|
|
// omp51-error@+1{{unexpected OpenMP clause 'induction' in directive '#pragma omp parallel for'}}
|
|
#pragma omp parallel for induction(i)
|
|
for (i = 0; i < 10; ++i)
|
|
;
|
|
}
|
|
|
|
void test_apply() {
|
|
// omp60-warning@+4{{extra tokens at the end of '#pragma omp tile' are ignored}}
|
|
// omp60-error@+3{{unexpected OpenMP clause 'apply' in directive '#pragma omp tile'}}
|
|
// omp51-error@+2{{unexpected OpenMP clause 'apply' in directive '#pragma omp tile'}}
|
|
// omp51-warning@+1{{extra tokens at the end of '#pragma omp tile' are ignored}}
|
|
#pragma omp tile sizes(10) apply(intratile: unroll)
|
|
for (int i = 0; i < 10; ++i)
|
|
;
|
|
}
|
|
|
|
void test_empty_apply() {
|
|
// omp60-warning@+4{{extra tokens at the end of '#pragma omp tile' are ignored}}
|
|
// omp60-error@+3{{unexpected OpenMP clause 'apply' in directive '#pragma omp tile'}}
|
|
// omp51-error@+2{{unexpected OpenMP clause 'apply' in directive '#pragma omp tile'}}
|
|
// omp51-warning@+1{{extra tokens at the end of '#pragma omp tile' are ignored}}
|
|
#pragma omp tile sizes(10) apply()
|
|
for (int i = 0; i < 10; ++i)
|
|
;
|
|
}
|
|
|
|
void test_nested_apply()
|
|
{
|
|
// omp60-error@+5{{unexpected OpenMP clause 'apply' in directive '#pragma omp tile'}}
|
|
// omp60-warning@+4{{extra tokens at the end of '#pragma omp tile' are ignored}}
|
|
//omp51-error@+3{{unexpected OpenMP clause 'apply' in directive '#pragma omp tile'}}
|
|
// omp51-warning@+2{{extra tokens at the end of '#pragma omp tile' are ignored}}
|
|
#pragma omp tile sizes(10) \
|
|
apply(intratile: unroll partial(2) apply(reverse))
|
|
for (int i = 0; i < 100; ++i)
|
|
;
|
|
}
|
|
|
|
void test_induction_with_following_clause() {
|
|
int i;
|
|
// omp60-warning@+4{{extra tokens at the end of '#pragma omp parallel for' are ignored}}
|
|
// omp60-error@+3{{unexpected OpenMP clause 'induction' in directive '#pragma omp parallel for'}}
|
|
// omp51-error@+2{{unexpected OpenMP clause 'induction' in directive '#pragma omp parallel for'}}
|
|
// omp51-warning@+1{{extra tokens at the end of '#pragma omp parallel for' are ignored}}
|
|
#pragma omp parallel for induction(i) num_threads(4)
|
|
for (i = 0; i < 10; ++i)
|
|
;
|
|
}
|
|
|
|
class Point {
|
|
float x, y, m;
|
|
char color;
|
|
|
|
};
|
|
|
|
void processPointsInLine() {
|
|
float separation;
|
|
// omp60-error@+4{{unexpected OpenMP clause 'induction' in directive '#pragma omp parallel for'}}
|
|
// omp60-warning@+3{{extra tokens at the end of '#pragma omp parallel for' are ignored}}
|
|
// omp51-error@+2{{unexpected OpenMP clause 'induction' in directive '#pragma omp parallel for'}}
|
|
// omp51-warning@+1{{extra tokens at the end of '#pragma omp parallel for' are ignored}}
|
|
#pragma omp parallel for induction(step(Separation))
|
|
for (int i = 0; i < 10; ++i) {
|
|
;
|
|
}
|
|
}
|
|
|
|
// Make sure test doesn't crash.
|
|
void test_tasgraph()
|
|
{
|
|
// omp60-error@+2{{unexpected OpenMP directive '#pragma omp taskgraph'}}
|
|
// omp51-error@+1{{unexpected OpenMP directive '#pragma omp taskgraph'}}
|
|
#pragma omp taskgraph
|
|
for (int i = 0; i < 10; ++i)
|
|
;
|
|
}
|
|
|
|
void test_implemented_clause() {
|
|
#pragma omp tile sizes(10)
|
|
for (int i = 0; i < 10; ++i)
|
|
;
|
|
}
|