Skip to content
Collection of samples and utilities for using ComputeCpp, Codeplay's SYCL implementation
C C++ CMake Python Cuda Makefile Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis Update SDK to ComputeCpp v1.2.0 (#221) Dec 24, 2019
cmake Fix handling of $PATH in FindComputeCpp.cmake Sep 2, 2019
demos Translate Asciidoc to Markdown (#205) Oct 16, 2019
samples Update SDK to ComputeCpp v1.1.6 (#219) Dec 4, 2019
tests Update formatting to clang-format-6 (#174) Jan 23, 2019
tools Translate Asciidoc to Markdown (#205) Oct 16, 2019
utils/cuda_to_sycl/converter Translate Asciidoc to Markdown (#205) Oct 16, 2019
.clang-format Update formatting to clang-format-6 (#174) Jan 23, 2019
.travis.yml Update SDK to ComputeCpp v1.1.3 (#201) Jun 10, 2019
APACHE-LICENSE-2.0.txt Initial commit of the ComputeCpp SDK to Github Sep 8, 2016
CMakeLists.txt Add explicit tests option to CMakeLists.txt Oct 30, 2018
CONTRIBUTING Initial commit of the ComputeCpp SDK to Github Sep 8, 2016
LICENSE.txt Initial commit of the ComputeCpp SDK to Github Sep 8, 2016 Translate Asciidoc to Markdown (#205) Oct 16, 2019

ComputeCpp SDK Readme



Build Status

This is the README for the ComputeCpp SDK, a collection of sample code, utilities and tools for Codeplay’s ComputeCpp, an implementation of the SYCL programming standard. You can find more information at:


  • CMakeLists.txt
    • The entry point for this project’s CMake configuration. Adds samples/ subdirectory and optionally adds tests.
  • LICENSE.txt
    • The license this package is available under: Apache 2.0
    • This readme file
  • cmake/
    • Contains a CMake module for integrating ComputeCpp with existing projects. See later in this document for a description of the CMake module provided. There are also toolchains for generic GCC-like setups as well as the poky toolchain.
  • include/
    • add this directory to your include search path to be able to use SDK code in your own projects (for example, the virtual pointer utility).
  • samples/
    • A collection of sample SYCL code, tested on ComputeCpp, provided as a learning resource and starting point for new SYCL software. The samples are built with CMake.
  • tests/
    • Tests for the utilities in the SDK.
  • tools/
    • Useful tools for working with SYCL code and ComputeCpp. Includes a simple driver script for compiling SYCL code with ComputeCpp, an example Makefile and other utilities.
  • util/
    • Example utility code that we expect will be useful for other projects as a starting point.


CMake files are provided as a build system for this software. CMake version 3.4.3 is required at minimum, though later versions of CMake should continue to be compatible.

At minimum, one CMake variable is required to get the sample code building - ComputeCpp_DIR. This variable should point to the root directory of the ComputeCpp install (i.e. the directory with the the folders bin, include, lib and so on). You can also specify COMPUTECPP_SDK_BUILD_TESTS to add the tests/ subdirectory to the build, which will build Gtest-based programs testing the legacy pointer and virtual pointer classes. Some samples have optional OpenMP support. You can enable it by setting COMPUTECPP_SDK_USE_OPENMP to ON in CMake.

You can additionally specify CMAKE_BUILD_TYPE and CMAKE_INSTALL_PREFIX to choose a Debug or Release build and the location you’d like to be used when the "install" target is built. The install target currently will copy all the sample binaries to the directory of your choosing.

Lastly, the SDK will build targeting spir64 IR by default. This will work on most devices, but won’t work on NVIDIA (for example). To that end, you can specify -DCOMPUTECPP_BITCODE=target, which can be any of spir[64], spirv[64] or ptx64.

If you would like to crosscompile the SDK targeting some other platform, there are toolchain files available in the cmake/toolchains directory. They require certain variables pointing to the root of the toolchain you are using to be set in the environment. They cannot be specificed in the CMake cache. The toolchains will identify which variables have not been set when used.

On the Codeplay website there is a getting started guide that serves as an introduction to SYCL and ComputeCpp. Additionally, there is an Integration guide should you wish to add ComputeCpp to existing projects.


  • The samples should work with any SYCL 1.2.1 implementation, though have only been tested with the ComputeCpp CE Public Beta
  • OpenCL 1.2-capable hardware and drivers with SPIR 1.2/SPIR-V support
  • C++11-compliant compiler and libstdc++ on GNU/Linux (GCC 4.9+, Clang 3.6+)
  • Microsoft Visual C++ 2015 on Windows
  • CMake 3.4.3 and newer


The sample code should compile without error on our supported platforms. If you run into trouble, or think you have found a bug, we have a JIRA Service Desk available through the ComputeCpp website.

Frequently Asked Questions

We have a FAQ page available on our website.


This SDK is maintained by Codeplay Software Ltd. If you have any problems, please contact


This repository contains code written by Sean Barrett (stb_image code in the Gaussian blur sample) and Charles Salvia (the stack allocator used in the smart pointer sample). Please see the files for their respective licences.


This SDK is licensed under the Apache 2.0 license. Patches are very welcome! If you have an idea for a new sample, different build system integration or even a fix for something that is broken, please get in contact.

You can’t perform that action at this time.