-
Notifications
You must be signed in to change notification settings - Fork 102
/
source.cpp
48 lines (40 loc) · 1.07 KB
/
source.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
SYCL Academy (c)
SYCL Academy is licensed under a Creative Commons
Attribution-ShareAlike 4.0 International License.
You should have received a copy of the license along with this
work. If not, see <http://creativecommons.org/licenses/by-sa/4.0/>.
*
* SYCL Quick Reference
* ~~~~~~~~~~~~~~~~~~~~
*
* // Include SYCL header
* #include <sycl/sycl.hpp>
*
*
* // Default construct a queue
* auto q = sycl::queue{};
*
* // Submit work to the queue
* q.submit([&](sycl::handler &cgh) {
* // COMMAND GROUP
* });
*
* // Within the command group you can
* // 1. Enqueue a command:
* cgh.single_task<class mykernel>([=] {
* // Do something
* });
*
* 2. Declare a sycl::stream for printing from device:
* auto os = sycl::stream{buf_size, wi_size, cgh};
*
*/
#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
TEST_CASE("hello_world", "hello_world_source") {
// Print "Hello World!\n"
std::cout << "Hello World!\n";
// Task: Have this message print from the SYCL device instead of the host
REQUIRE(true);
}