Getting Started with ComputeCpp for Windows®
You can download the Windows version of ComputeCpp CE from the downloads page.
Platform Requirements
Windows 7 or Windows 10 (with elevated privileges)
OpenCL Drivers
- OpenCL driver that supports SPIR
- There is experimental support for SPIR-V OpenCL drivers (your hardware vendor may be able to provide support information)
IDE
- Visual Studio 2015
- Visual Studio 2017 (experimental support)
Usage Notes
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
C:\Program Files\Codeplay\ComputeCpp\bin\computecpp_info.exe
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 Studios 2015
- 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 create a "build" folder and in that folder call the following depending on your Visual Studio version. At the moment you need to have the VS2015 tool set installed.
Visual Studio 2015
cmake .. -G "Visual Studio 14 Win64" -DComputeCpp_DIR="C:\Program Files\Codeplay\ComputeCpp"
Visual Studio 2017
cmake .. -G "Visual Studio 15 2017 Win64" -T v140 -DComputeCpp_DIR="C:\Program Files\Codeplay\ComputeCpp"
This will generate a solution file for Visual Studio 2015 that can be used to compile and run the samples.