File tree Expand file tree Collapse file tree 5 files changed +45
-5
lines changed Expand file tree Collapse file tree 5 files changed +45
-5
lines changed Original file line number Diff line number Diff line change 1+ // ==--------- default_device.cpp - SYCL device default ctor test -----------==//
2+ //
3+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+ // See https://llvm.org/LICENSE.txt for license information.
5+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+ //
7+ // ===----------------------------------------------------------------------===//
8+
9+ // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
10+ // RUN: %HOST_RUN_PLACEHOLDER %t.out
11+ // RUN: %CPU_RUN_PLACEHOLDER %t.out
12+ // RUN: %GPU_RUN_PLACEHOLDER %t.out
13+ // RUN: %ACC_RUN_PLACEHOLDER %t.out
14+
15+ #include < sycl/sycl.hpp>
16+
17+ int main () {
18+ sycl::device Dev;
19+ assert (Dev == sycl::device{sycl::default_selector_v});
20+ return 0 ;
21+ }
Original file line number Diff line number Diff line change 1+ // ==------- default_platform.cpp - SYCL platform default ctor test ---------==//
2+ //
3+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+ // See https://llvm.org/LICENSE.txt for license information.
5+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+ //
7+ // ===----------------------------------------------------------------------===//
8+
9+ // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
10+ // RUN: %HOST_RUN_PLACEHOLDER %t.out
11+ // RUN: %CPU_RUN_PLACEHOLDER %t.out
12+ // RUN: %GPU_RUN_PLACEHOLDER %t.out
13+ // RUN: %ACC_RUN_PLACEHOLDER %t.out
14+
15+ #include < sycl/sycl.hpp>
16+
17+ int main () {
18+ sycl::platform Plt;
19+ assert (Plt == sycl::platform{sycl::default_selector_v});
20+ return 0 ;
21+ }
Original file line number Diff line number Diff line change @@ -37,8 +37,8 @@ int main() {
3737 assert ((dev1 == dev2) && " Device 1 == Device 2" );
3838 assert ((plat1 == plat2) && " Platform 1 == Platform 2" );
3939
40- device h1;
41- device h2;
40+ device h1{host_selector{}} ;
41+ device h2{host_selector{}} ;
4242
4343 assert (h1.is_host () && " Device h1 is host" );
4444 assert (h2.is_host () && " Device h2 is host" );
Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ int main() {
2323 std::vector<device> GPUs;
2424 std::vector<device> Accels;
2525 std::vector<device> Devs;
26- device host;
2726
2827 CPUs = device::get_devices (info::device_type::cpu);
2928 GPUs = device::get_devices (info::device_type::gpu);
Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ int main() {
2929 return 0 ;
3030
3131 usm::alloc Kind;
32- device D;
3332
3433 // Test device allocs
3534 array = (int *)malloc_device (N * sizeof (int ), q);
@@ -48,7 +47,7 @@ int main() {
4847 return 3 ;
4948 }
5049 }
51- D = get_pointer_device (array, ctxt);
50+ device D = get_pointer_device (array, ctxt);
5251 if (D != dev) {
5352 return 4 ;
5453 }
You can’t perform that action at this time.
0 commit comments