Debian Codegraph @

llvm-project/llvm/projects/opencl-clang/tests/Manual/testsuite/channels.cl

raw
1 // RUN: %occ-cli %s %cfg_path --cl-device=%cl_device --output=%t.bc
2 // RUN: %occ-cli %s %cfg_path --cl-options="-DUSE_CHANNELS -cl-std=CL2.0" --cl-version=200 --use-channels --cl-device=%cl_device --output=%t.bc
3 // XFAIL: *
4
5 #ifndef cl_intel_channels
6
7 #ifdef USE_CHANNELS
8 #error "cl_intel_channels expected to be enabled"
9 #endif
10
11 __kernel void foo() { int channel = 1; }
12
13 #else // cl_intel_channels
14
15 #ifndef USE_CHANNELS
16 #error "cl_intel_channels should NOT be enabled"
17 #endif
18
19 #pragma OPENCL EXTENSION cl_intel_channels : enable
20 channel int ch;
21 __kernel void foo() { int i = read_channel_intel(ch); }
22 #endif // cl_intel_channels