Get Started
Starting anything new can be a challenge. To lower the barrier of entry, we have designed this section to help you delve into SYCL, learn the basics and set yourself up for success.
Run Some Code
Before we jump into the nitty-gritty of the SYCL spec, let's try compiling some code. This code will run in parallel and, depending on setup, can run on GPU, CPU or more!
queue.submit([&] (sycl::handler& cgh) {
auto a_acc = a_sycl.get_access<sycl::access::mode::read>(cgh);
auto b_acc = b_sycl.get_access<sycl::access::mode::read>(cgh);
auto c_acc = c_sycl.get_access<sycl::access::mode::discard_write>(cgh);
cgh.single_task<class vector_addition>([=] () {
c_acc[0] = a_acc[0] + b_acc[0];
});
});
queue.submit([&] (sycl::handler& cgh) {
auto a_acc = a_sycl.get_access(cgh);
auto b_acc = b_sycl.get_access(cgh);
auto c_acc = c_sycl.get_access(cgh);
cgh.single_task([=] () {
c_acc[0] = a_acc[0] + b_acc[0];
});
});
sports_esportsplay_circle
Read the eBook
Download the FREE Data Parallel C++ eBook or order your hard-copy today! Teaches heterogeneous programming for CPU, GPU, FPGA, ASIC, etc.
cloud_downloadDownload FREE eBookDownload a SYCL Compiler
oneAPI DPC++
AdaptiveCpp
Intel® oneAPI™ DPC++
Create performance-optimized application code that takes advantage of more cores and built-in technologies in platforms based on Intel® processors. The compilers are part of the Intel® oneAPI Base Toolkit and the Intel® HPC Toolkit. The Intel® oneAPI DPC++/C++ Compiler does not support macOS.
Download Full oneAPI Toolkit
You can download the entire toolkit instead, rather than just the compiler. The toolkit contains tooling for AI, Fortran, HPC and much more!