Intel® Cilk™ Plus is supported by the Intel® C++ Compiler, which is part of the Intel® C++ Composer XE. It is also supported by the gcc compiler with the Intel Cilk Plus branch. To use Intel Cilk Plus, you must use one of these compilers so they recognize the Intel Cilk Plus keywords.
The use of Intel Cilk Plus is enabled when using the Intel® C++ Compiler. Follow these steps to ensure that your project has Intel Cilk Plus support on a Windows* OS system:
- In Solution Explorer, select (click) the name of one or more projects. To select multiple projects, hold down the Ctrl key.
- Select Project > Properties or right-click the project name and select Properties from the context menu.
- From the context menu, select Intel C++ Composer XE > Use Intel C++
- Specify the following Configuration Property:
- Click OK to save the specified properties.
- Repeat the steps above for other configurations.
- You should check your startup project properties before a starting a build.
You can now use the features of Intel C++ Compiler or gcc compiler, including using the Intel Cilk Plus keywords.
Intel Cilk Plus normally uses one worker thread per CPU core or hardware thread on your system. If you want to change the number of worker threads, set the environment variable CILK_NWORKERS to the desired number of worker threads before running your program (see the Intel Cilk Plus help).