|
1 |
| -// RUN: %clangxx -fsycl --no-system-header-prefix=CL/sycl -fsyntax-only -Wall -Wextra -Wno-ignored-attributes -Wno-deprecated-declarations -Wpessimizing-move -Wunused-variable -Wmismatched-tags -Wunneeded-internal-declaration -Werror -Wno-unknown-cuda-version -Wno-unused-parameter %s -o %t.out |
2 |
| - |
| 1 | +// RUN: %clangxx -fsycl --no-system-header-prefix=CL/sycl -fsyntax-only -Wall -Wextra -Werror -Wno-ignored-attributes -Wno-deprecated-declarations -Wpessimizing-move -Wunused-variable -Wmismatched-tags -Wunneeded-internal-declaration -Wno-unknown-cuda-version -Wno-unused-parameter %s |
| 2 | +// RUN: %clangxx -fsycl -E --no-system-header-prefix=CL/sycl %s -o %t.ii |
| 3 | +// RUN: %clangxx -fsycl -fsyntax-only -Wall -Wextra -Werror -Wno-ignored-attributes -Wno-deprecated-declarations -Wpessimizing-move -Wunused-variable -Wmismatched-tags -Wunneeded-internal-declaration -Wno-unknown-cuda-version -Wno-unused-parameter %t.ii |
3 | 4 | #include <CL/sycl.hpp>
|
4 | 5 |
|
5 | 6 | using namespace cl::sycl;
|
6 | 7 | int main() {
|
7 | 8 | vec<long, 4> newVec;
|
8 | 9 | queue myQueue;
|
9 | 10 | buffer<vec<long, 4>, 1> resultBuf{&newVec, range<1>{1}};
|
10 |
| - myQueue.submit([&](handler &cgh) { |
| 11 | + auto event = myQueue.submit([&](handler &cgh) { |
11 | 12 | auto writeResult = resultBuf.get_access<access::mode::write>(cgh);
|
12 | 13 | cgh.single_task<class kernel_name>([=]() {
|
13 | 14 | writeResult[0] = (vec<int, 4>{1, 2, 3, 4}).template convert<long>();
|
14 | 15 | });
|
15 | 16 | });
|
| 17 | + (void)event; |
16 | 18 | return 0;
|
17 | 19 | }
|
| 20 | + |
| 21 | +// explicitly instantiate a few more classes to check if there are some issues |
| 22 | +// with them: |
| 23 | + |
| 24 | +namespace sycl { |
| 25 | + |
| 26 | +template class buffer<vec<int, 3>, 2>; |
| 27 | + |
| 28 | +template class accessor<int, 1>; |
| 29 | +template class accessor<vec<float, 2>, 2, access_mode::read>; |
| 30 | + |
| 31 | +template class marray<double, 7>; |
| 32 | +template class marray<short, 3>; |
| 33 | + |
| 34 | +template class kernel_bundle<bundle_state::input>; |
| 35 | +template class kernel_bundle<bundle_state::object>; |
| 36 | +template class kernel_bundle<bundle_state::executable>; |
| 37 | + |
| 38 | +template class device_image<bundle_state::input>; |
| 39 | +template class device_image<bundle_state::object>; |
| 40 | +template class device_image<bundle_state::executable>; |
| 41 | + |
| 42 | +} |
0 commit comments