Getting Started with ComputeCpp for Windows®
You can download the Windows version of ComputeCpp CE from the downloads page.
Windows 7 or Windows 10 (with elevated privileges)
- OpenCL driver that supports SPIR
- There is experimental support for SPIR-V OpenCL drivers (your hardware vendor may be able to provide support information)
- Visual Studio 2019
Your Visual Studio install may be missing the required C++ tools and configurations, you can check this by modifying your install from add/remove programs.
If you are not using the Visual Studio user interface but are using the Visual Studio compiler please make sure to run through the Visual Studio native tools command prompt (in particular if using CMake)
Checking ComputeCpp Hardware Support
You can use the "computecpp_info" tool provided to find out what devices on your machine are supported by ComputeCpp. Run the executable by opening a command prompt and typing
This will list any devices on your machine that can be used to run SYCL applications.
The output will look something like this:
Setting Up A Windows SYCL Project
To start a new SYCL project follow these steps:
- Open Visual Studio 2019
- Select “create a new project” from the landing page or file menu
- Select the option for Visual C++ from the templates option on the left
- Select ComputeCpp Project from the available templates and fill in the required fields
- Open main.cpp once the solution loads to view a very basic SYCL application
- Build and run the application
ComputeCpp Sample Code on Windows
There is sample code that accompanies ComputeCpp that is hosted on GitHub. All you need to do is clone the repository https://github.com/codeplaysoftware/computecpp-sdk.
In the root directory create a
where you can perform the instructions in the following subsections.
Visual Studio 2019
cmake .. -G "Visual Studio 16 2019" -A x64 -DComputeCpp_DIR="C:\Program Files\Codeplay\ComputeCpp"
This will generate a solution file for Visual Studio 2019 that can be used to compile and run the samples.