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() {
37
37
assert ((dev1 == dev2) && " Device 1 == Device 2" );
38
38
assert ((plat1 == plat2) && " Platform 1 == Platform 2" );
39
39
40
- device h1;
41
- device h2;
40
+ device h1{host_selector{}} ;
41
+ device h2{host_selector{}} ;
42
42
43
43
assert (h1.is_host () && " Device h1 is host" );
44
44
assert (h2.is_host () && " Device h2 is host" );
Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ int main() {
23
23
std::vector<device> GPUs;
24
24
std::vector<device> Accels;
25
25
std::vector<device> Devs;
26
- device host;
27
26
28
27
CPUs = device::get_devices (info::device_type::cpu);
29
28
GPUs = device::get_devices (info::device_type::gpu);
Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ int main() {
29
29
return 0 ;
30
30
31
31
usm::alloc Kind;
32
- device D;
33
32
34
33
// Test device allocs
35
34
array = (int *)malloc_device (N * sizeof (int ), q);
@@ -48,7 +47,7 @@ int main() {
48
47
return 3 ;
49
48
}
50
49
}
51
- D = get_pointer_device (array, ctxt);
50
+ device D = get_pointer_device (array, ctxt);
52
51
if (D != dev) {
53
52
return 4 ;
54
53
}
You can’t perform that action at this time.
0 commit comments