Skip to content

Source code for 'Data Parallel C++: Mastering DPC++ for Programming of Heterogeneous Systems using C++ and SYCL' by James Reinders, Ben Ashbaugh, James Brodman, Michael Kinsner, John Pennycook, Xinmin Tian (Apress, 2020).

License

Notifications You must be signed in to change notification settings

kgeorgen/data-parallel-CPP

 
 

Repository files navigation

Data Parallel C++ Book Source Samples

This repository accompanies Data Parallel C++: Mastering DPC++ for Programming of Heterogeneous Systems using C++ and SYCL by James Reinders, Ben Ashbaugh, James Brodman, Michael Kinsner, John Pennycook, Xinmin Tian (Apress, 2020).

Cover image

Many of the samples in the book are snips from the more complete files in this repository. The full files contain supporting code, such as header inclusions, which are not shown in every listing within the book. The complete listings are intended to compile and be modifiable for experimentation.

Download the files as a zip using the green button, or clone the repository to your machine using Git.

How to Build the Samples

To build and use these examples, you will need an installed DPC++ toolchain. For one such toolchain, please visit:

https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/dpc-compiler.html

Alternatively, much of the toolchain can be built directly from:

https://github.com/intel/llvm

Some of the Chapter 18 examples require an installation of oneDPL, which is available from:

https://github.com/oneapi-src/oneDPL

To build the samples:

  1. Setup oneAPI environment variables:

    On Windows:

    \path\to\inteloneapi\setvars.bat

    On Linux:

    source /path/to/inteloneapi/setvars.sh
  2. Create build files using CMake, specifying the DPC++ toolchain. For example:

    mkdir build && cd build
    cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=../dpcpp_toolchain.cmake ..

    NOTE: If you do not have oneDPL installed, you can disable compilation of those tests with the option NODPL

    cmake -G Ninja -DNODPL=1 -DCMAKE_TOOLCHAIN_FILE=../dpcpp_toolchain.cmake ..
  3. Build with the generated build files:

    ninja install

About

Source code for 'Data Parallel C++: Mastering DPC++ for Programming of Heterogeneous Systems using C++ and SYCL' by James Reinders, Ben Ashbaugh, James Brodman, Michael Kinsner, John Pennycook, Xinmin Tian (Apress, 2020).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CMake 100.0%