1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
|
// REQUIRES: x86-registered-target
// REQUIRES: amdgpu-registered-target
// RUN: %clang_cc1 %s -x c++ -fopenmp -fsyntax-only -verify=host
// host-no-diagnostics
// RUN: %clang_cc1 %s -x hip -fopenmp -fsyntax-only -verify=device
// device-error@#01 {{HIP does not support OpenMP target directives}}
// device-error@#02 {{HIP does not support OpenMP target directives}}
// device-error@#03 {{HIP does not support OpenMP target directives}}
// device-error@#04 {{HIP does not support OpenMP target directives}}
// device-error@#05 {{HIP does not support OpenMP target directives}}
// device-error@#06 {{HIP does not support OpenMP target directives}}
// device-error@#07 {{HIP does not support OpenMP target directives}}
// device-error@#08 {{HIP does not support OpenMP target directives}}
// device-error@#09 {{HIP does not support OpenMP target directives}}
// device-error@#10 {{HIP does not support OpenMP target directives}}
// device-error@#11 {{HIP does not support OpenMP target directives}}
// device-error@#12 {{HIP does not support OpenMP target directives}}
// device-error@#13 {{HIP does not support OpenMP target directives}}
// device-error@#14 {{HIP does not support OpenMP target directives}}
// device-error@#15 {{HIP does not support OpenMP target directives}}
// device-error@#16 {{HIP does not support OpenMP target directives}}
// device-error@#17 {{HIP does not support OpenMP target directives}}
// device-error@#18 {{HIP does not support OpenMP target directives}}
// device-error@#19 {{HIP does not support OpenMP target directives}}
// device-error@#20 {{HIP does not support OpenMP target directives}}
// device-error@#21 {{HIP does not support OpenMP target directives}}
// device-error@#22 {{HIP does not support OpenMP target directives}}
// device-error@#23 {{HIP does not support OpenMP target directives}}
// device-error@#24 {{HIP does not support OpenMP target directives}}
void test01() {
#pragma omp target // #01
;
}
void test02() {
#pragma omp target parallel // #02
;
}
void test03() {
#pragma omp target parallel for // #03
for (int i = 0; i < 1; ++i);
}
void test04(int x) {
#pragma omp target data map(x) // #04
;
}
void test05(int * x, int n) {
#pragma omp target enter data map(to:x[:n]) // #05
}
void test06(int * x, int n) {
#pragma omp target exit data map(from:x[:n]) // #06
}
void test07(int * x, int n) {
#pragma omp target update to(x[:n]) // #07
}
#pragma omp declare target (test07) // #08
void test08() {
}
#pragma omp begin declare target // #09
void test09_1() {
}
void test09_2() {
}
#pragma omp end declare target
void test10(int n) {
#pragma omp target parallel // #10
for (int i = 0; i < n; ++i)
;
}
void test11(int n) {
#pragma omp target parallel for // #11
for (int i = 0; i < n; ++i)
;
}
void test12(int n) {
#pragma omp target parallel for simd // #12
for (int i = 0; i < n; ++i)
;
}
void test13(int n) {
#pragma omp target parallel loop // #13
for (int i = 0; i < n; ++i)
;
}
void test14(int n) {
#pragma omp target simd // #14
for (int i = 0; i < n; ++i)
;
}
void test15(int n) {
#pragma omp target teams // #15
for (int i = 0; i < n; ++i)
;
}
void test16(int n) {
#pragma omp target teams distribute // #16
for (int i = 0; i < n; ++i)
;
}
void test17(int n) {
#pragma omp target teams distribute simd // #17
for (int i = 0; i < n; ++i)
;
}
void test18(int n) {
#pragma omp target teams loop // #18
for (int i = 0; i < n; ++i)
;
}
void test19(int n) {
#pragma omp target teams distribute parallel for // #19
for (int i = 0; i < n; ++i)
;
}
void test20(int n) {
#pragma omp target teams distribute parallel for simd // #20
for (int i = 0; i < n; ++i)
;
}
void test21() {
#pragma omp target // #21
{
#pragma omp teams // #22
{}
}
}
void test22() {
#pragma omp target // #23
#pragma omp teams // #24
{}
}
void test23() {
// host code
#pragma omp teams
{}
}
|