|
6 | 6 | // REQUIRES: cuda
|
7 | 7 |
|
8 | 8 | #include <stdlib.h>
|
9 |
| -#include <sycl.hpp> |
| 9 | +#include <sycl/sycl.hpp> |
10 | 10 |
|
11 | 11 | sycl::event add(sycl::queue q, sycl::buffer<int> buff, int *usm,
|
12 | 12 | sycl::event e) {
|
@@ -41,22 +41,22 @@ int main() {
|
41 | 41 | sycl::buffer<int> buff1(&a, 1);
|
42 | 42 | sycl::buffer<int> buff2(&b, 1);
|
43 | 43 |
|
44 |
| - // test copying usm |
| 44 | + // Test copying usm. |
45 | 45 | int *usm1 = sycl::malloc_device<int>(1, q1);
|
46 | 46 | int *usm2 = sycl::malloc_device<int>(1, q2);
|
47 | 47 | sycl::event e1 = q1.memcpy(usm1, &c, 1);
|
48 | 48 | sycl::event e2 = q2.memcpy(usm2, &d, 1);
|
49 | 49 |
|
50 |
| - // test combination of usm and buffers in a kernel |
| 50 | + // Test combination of usm and buffers in a kernel. |
51 | 51 | sycl::event e3 = add(q1, buff1, usm1, e1);
|
52 | 52 | sycl::event e4 = add(q2, buff2, usm2, e2);
|
53 | 53 |
|
54 |
| - // change values in usm to ensure results are distinct |
| 54 | + // Change values in usm to ensure results are distinct. |
55 | 55 | sycl::event e5 = q1.memcpy(usm1, &d, 1, e3);
|
56 | 56 | sycl::event e6 = q2.memcpy(usm2, &c, 1, e4);
|
57 | 57 |
|
58 |
| - // use each buffer on the other device than before - tests that copying |
59 |
| - // between devices works |
| 58 | + // Use each buffer on the other device than before - tests that copying |
| 59 | + // between devices works. |
60 | 60 | add(q1, buff2, usm1, e5);
|
61 | 61 | add(q2, buff1, usm2, e6);
|
62 | 62 | }
|
|
0 commit comments