forked from Apress/data-parallel-CPP
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Michael Kinsner
committed
Oct 7, 2020
1 parent
1945f6c
commit a922c60
Showing
2 changed files
with
72 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,23 @@ | ||
Freeware License, some rights reserved | ||
|
||
Copyright (c) 2020 James Reinders, Ben Ashbaugh, James Brodman, Michael Kinsner, John Pennycook, Xinmin Tian | ||
|
||
|
||
Permission is hereby granted, free of charge, to anyone obtaining a copy | ||
of this software and associated documentation files (the "Software"), | ||
to work with the Software within the limits of freeware distribution and fair use. | ||
This includes the rights to use, copy, and modify the Software for personal use. | ||
Users are also allowed and encouraged to submit corrections and modifications | ||
to the Software for the benefit of other users. | ||
|
||
It is not allowed to reuse, modify, or redistribute the Software for | ||
commercial use in any way, or for a user’s educational materials such as books | ||
or blog articles without prior permission from the copyright holder. | ||
|
||
The above copyright notice and this permission notice need to be included | ||
in all copies or substantial portions of the software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS OR APRESS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
|
||
|
||
MIT License | ||
|
||
Copyright (C) 2020 Intel Corporation | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), | ||
to deal in the Software without restriction, including without limitation | ||
the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
and/or sell copies of the Software, and to permit persons to whom | ||
the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included | ||
in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES | ||
OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE | ||
OR OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
SPDX-License-Identifier: MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,60 @@ | ||
# Apress Source Code | ||
# Data Parallel C++ Book Source Samples | ||
|
||
This repository accompanies [*Data Parallel C++: Mastering DPC++ for Programming of Heterogeneous Systems using C++ and SYCL*](https://www.apress.com/9781484255735) by James Reinders, Ben Ashbaugh, James Brodman, Michael Kinsner, John Pennycook, Xinmin Tian (Apress, 2020). | ||
|
||
[comment]: #cover | ||
 | ||
|
||
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. | ||
|
||
## Releases | ||
## 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: | ||
|
||
```sh | ||
\path\to\inteloneapi\setvars.bat | ||
``` | ||
|
||
On Linux: | ||
|
||
```sh | ||
source /path/to/inteloneapi/setvars.sh | ||
``` | ||
|
||
2. Create build files using CMake, specifying the DPC++ toolchain. For example: | ||
|
||
```sh | ||
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` | ||
|
||
Release v1.0 corresponds to the code in the published book, without corrections or updates. | ||
```sh | ||
cmake -G Ninja -DNODPL=1 -DCMAKE_TOOLCHAIN_FILE=../dpcpp_toolchain.cmake .. | ||
``` | ||
|
||
## Contributions | ||
3. Build with the generated build files: | ||
|
||
See the file Contributing.md for more information on how you can contribute to this repository. | ||
```sh | ||
ninja install | ||
``` |