Giter VIP home page Giter VIP logo

wellalbuquerque / data-parallel-cpp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from apress/data-parallel-cpp

0.0 0.0 0.0 233 KB

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).

Home Page: https://www.apress.com/9781484255735

License: Other

CMake 100.00%

data-parallel-cpp's Introduction

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.

⚠️ Samples in this repository are updated to align with the most recent changes to the language and toolchains, and are more current than captured in the book text due to lag between finalization and actual publication of a print book. If experimenting with the code samples, start with the versions in this repository. DPC++ and SYCL are evolving to be more powerful and easier to use, and updates to the sample code in this repository are a good sign of forward progress!

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

How to Build the Samples

⚠️ The samples in this repository are intended to compile with the open source project toolchain linked below, or with the Beta 10 release or newer of the DPC++ toolchain. If you have an older toolchain installed, you may encounter compilation errors due to evolution of the features and extensions.

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 Ninja installed, you can use another Makefile generator such as 'Unix Makefiles'.

    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

data-parallel-cpp's People

Contributors

bashbaug avatar breyerml avatar dm-vodopyanov avatar jamesreinders avatar jessicavakili avatar piotrfusik avatar vinmierlak avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.