This repository contains sample codes used throughout the slides of the course. All samples are meant to be cross-platform (in terms of operating systems) and cross-vendor (in terms of GPU vendors). Should you have troubles building any of the samples in a given scenario, we accept pull requests to make both the code and build scripts more robust.
Build automation is done via CMake and should provide an out-of-the-box experience on most systems. Samples rely on ISO C++ conforming compilers of various versions.
All samples require:
- CMake version 3.0+
- ISO C++11/14 compiler
OpenCL samples require:
- OpenCL 1.2+ development files
- OpenCL 1.2+ implementation
- clFFT 2.12+
SYCL samples require:
- ComputeCpp SDK
- (triSYCL support inbound)
CUDA samples require:
- CUDA SDK 9.0+
OpenGL samples require:
- OpenGL 3.3+ implementation
- SFML 2.0+
- GLEW 2.0+
- GLM 0.9.0+
- Qt 5.7+
The build scripts by default build all the samples. One can selectively opt out of building specific sample suites via setting the following CMake options to OFF
:
BUILD_OPENCL
to disable all OpenCL samplesUSE_CLFFT
to disable only the clFFT samples
BUILD_SYCL
to disable all the SYCL samplesBUILD_OPENGL
to disable all OpenGL samplesUSE_SFML
to disable only the SFML based OpenGL samplesUSE_QT
to disable only the Qt based OpenGL samples
Leaving any of the compute APIs (OpenCL/SYCL/CUDA) and OpenGL enabled will result in building interop samples when available, using the remaining active windowing libraries.
Should you be confused on how to use CMake, please consult our CMake tutorial here.
Platform-specific build guidelines can be found in the docs: