Intel® Cilk™ Plus – an extension to the C and C++ languages to support data and task parallelism – is being deprecated in the 2018 release of Intel® Software Development Tools. It will remain in deprecation mode in the Intel® C++ Compiler for an extended period of two years. It is highly recommended that you start migrating to standard parallelization models such as OpenMP* and Intel® Threading Building Blocks (Intel® TBB). For more information see Migrate Your Application to use OpenMP* or Intel® TBB Instead of Intel® Cilk™ Plus.

Intel® Cilk™ Plus, included in the Intel® C++ Compiler, allows you to improve performance by adding parallelism to new or existing C or C++ programs.

Most of the information pertains to all platforms; differences are noted in the text.

For a description of Intel® Cilk™ Plus features, see the section:Intel® Cilk™ Plus.

Target Audience

Application developers who use Intel® Cilk™ Plus need at least a working knowledge of C or C++ programming: expert-level knowledge of C or C++ is optimal.

Intel® Cilk™ Plus is a deprecated feature. Use OpenMP* or Intel® Threading Building Blocks instead. For more information see Migrate Your Application to use OpenMP* or Intel® TBB Instead of Intel® Cilk™ Plus.

Getting Started

Intel® Cilk™ Plus adds fine-grained task support to C and C++, making it easy to add parallelism to both new and existing software to efficiently exploit multiple processors and the vector instructions available on modern CPUs. It provides simple language extensions to express data and task parallelism to the C and C++ language implemented by the Intel® C++ Compiler.

Intel® Cilk™ Plus is made up of these main features:

  • Task Parallelism
    • keywords, for expression of task parallelism. For more information on supplied keywords, see Introduction to Keywords.

    • reducers, which eliminate contention for shared variables among tasks by automatically creating views of them for each task and reducing them back to a shared value after task completion. For more information on reducers, see Introduction to Reducers.

  • Data Parallelism
    • array notations, which provide data parallelism for sections of arrays or whole arrays. For more information on array notations, see C/C++ Extensions for Array Notations Overview.

    • SIMD-enabled functions, which enable data parallelism of whole functions or operations which can then be applied to whole or parts of arrays or scalars. SIMD-enabled functions were formerly called elemental functions. For more information on SIMD-enabled functions, see SIMD-Enabled Functions.

    • the simd pragma, which is used to guide the compiler to vectorize more loops. Vectorization using the simd pragma complements (but does not replace) the fully automatic approach. For more information on #pragma simd, see simd.

Intel® Cilk™ Plus is particularly well suited for, but not limited to,"divide and conquer" algorithms. This strategy solves problems by breaking them into sub-problems (tasks) that can be solved independently, then combining the results. Recursive functions are often used for divide and conquer algorithms, and are well supported.

Tasks can either be implemented in separate functions or in iterations of a loop. Certain keywords identify function calls and loops that can run in parallel. The runtime schedules these tasks to run efficiently on the available processors.

In the following sections, the term worker is used to mean an operating system thread used to execute a task in a program.

Para obtener información más completa sobre las optimizaciones del compilador, consulte nuestro Aviso de optimización.