-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
The C++ Programmer's Mindset
By :
This chapter covers writing code for computation devices such as GPUs, and thus requires additional library support to run. For CUDA programming, you will need to install the CUDA toolkit (https://developer.nvidia.com/cuda-toolkit). When configuring CMake, you may need to provide an environment variable or CMake variable to instruct CMake where to find this installed toolkit. You will not need an NVIDIA GPU to build the software, but you won’t be able to run the code as is. For AMD GPUs, one can use the hipify tool to convert CUDA-specific source to ROCm-HIP source, but this is not necessarily an error-free or complete process.
In the final section, we look at using SYCL to homogenize the process of writing code for various devices. The Intel OneAPI base toolkit includes a complete SYCL and the data-parallel C++ compiler (DPC++), but there are other distributions available.
The code for this chapter can be found in the Chapter-14 folder in the...