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. 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:
set of keywords, for expression of task parallelism. For more information on supplied keywords, see 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.
array notations, which provide data parallelism for sections of arrays or whole arrays. For more information on array notations, see Array Notations Overview.
elemental functions, which enable data parallelism of whole functions or operations which can then be applied to whole or parts of arrays or scalars. For more information on elemental functions, see Elemental Functions.
the simd pragma, which lets you express vector parallelism for utilizing hardware SIMD parallelism while writing standard compliant C/C++ code with an Intel compiler. For more information on #pragma simd, see simd pragma.
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.
Copyright © 1996-2011, Intel Corporation. All rights reserved.