Enabling Intel® Cilk™ Plus in your Build Environment

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:

  1. In Solution Explorer, select (click) the name of one or more projects. To select multiple projects, hold down the Ctrl key.
  2. Select Project > Properties or right-click the project name and select Properties from the context menu.
  3. From the context menu, select Intel C++ Composer XE > Use Intel C++

  4. Specify the following Configuration Property:

    C/C++ > Language

    Under Intel specific, specify Disable all Intel Language Extensions as No.

  5. Click OK to save the specified properties.
  6. Repeat the steps above for other configurations.
  7. 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).

For more complete information about compiler optimizations, see our Optimization Notice.