forked from codeplaysoftware/syclacademy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsolution.cpp
34 lines (25 loc) · 777 Bytes
/
solution.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
/*
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/>.
*/
#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#if defined(SYCL_LANGUAGE_VERSION) && defined(__INTEL_LLVM_COMPILER)
#include <CL/sycl.hpp>
#else
#include <SYCL/sycl.hpp>
#endif
class hello_world;
TEST_CASE("hello_world", "hello_world_solution") {
auto defaultQueue = sycl::queue{};
defaultQueue
.submit([&](sycl::handler& cgh) {
auto os = sycl::stream{128, 128, cgh};
cgh.single_task<hello_world>([=]() { os << "Hello World!\n"; });
})
.wait();
REQUIRE(true);
}