diff --git a/Lesson_Materials/Fast_Track/index.html b/Lesson_Materials/Fast_Track/index.html index c2abe9a9..13c6e8fb 100644 --- a/Lesson_Materials/Fast_Track/index.html +++ b/Lesson_Materials/Fast_Track/index.html @@ -87,9 +87,7 @@
A first example of SYCL code.
-
- ![SYCL](../common-revealjs/images/sycl_first_sample_code.png "SYCL") -
+
diff --git a/Lesson_Materials/What_is_SYCL/index.html b/Lesson_Materials/What_is_SYCL/index.html index cc22e157..7695d7ac 100644 --- a/Lesson_Materials/What_is_SYCL/index.html +++ b/Lesson_Materials/What_is_SYCL/index.html @@ -87,9 +87,7 @@
A first example of SYCL code. Elements will be explained in coming sections!
-
- ![SYCL](../common-revealjs/images/sycl_first_sample_code.png "SYCL") -
+
diff --git a/Lesson_Materials/common-revealjs/images/sycl_first_sample_code.png b/Lesson_Materials/common-revealjs/images/sycl_first_sample_code.png deleted file mode 100644 index 948dbc58..00000000 Binary files a/Lesson_Materials/common-revealjs/images/sycl_first_sample_code.png and /dev/null differ diff --git a/Lesson_Materials/common-revealjs/images/sycl_first_sample_code.svg b/Lesson_Materials/common-revealjs/images/sycl_first_sample_code.svg new file mode 100644 index 00000000..17943017 --- /dev/null +++ b/Lesson_Materials/common-revealjs/images/sycl_first_sample_code.svg @@ -0,0 +1,2171 @@ + + + +1234567891011121314151617181920212223242526272829303132#include <sycl/sycl.hpp>#include <vector>intmain(){constexpr static size_t N{10000};std::vector<float> a(N, 1.0f);std::vector<float> b(N, 2.0f);std::vector<float> c(N, 0.0f);sycl::queue q{};{sycl::buffer buf_a{a};sycl::buffer buf_b{b};sycl::buffer buf_c{c};sycl::accessor acc_a{buf_a, h, sycl::read_write};sycl::accessor acc_b{buf_b, h, sycl::read_only};sycl::accessor acc_c{buf_c, h, sycl::write_only, sycl::no_init};acc_a[id] += acc_b[id];acc_c[id] = 2.0f * acc_a[id];h.parallel_for<class my_kernel>(N, [=](sycl::id<1> id){});q.submit([&](sycl::handler& h){}).wait();}for (float x : c) {std::cout << x << " ";}std::cout << std::endl;return 0;}Device management with queuesMemory management with buffersSubmit a workunit to a queueExecute codeon a device