Cilk plus Programming Help by Programmers hub

Cilk Plus Programming Language

Cilk is a general-purpose Programming language designed for multithreaded parallel computing. The motivation of the design of cilk programming is the programmer should focus on structuring his program to expose parallelism and exploit locality. Cilk is a C/C++ extension to support nested and task parallelism in the Program. The Cilk run-time system takes care of details like load balancing, synchronization and communication protocols

Cilk Plus Programming Code Example

int fib (int n) {
if (n < 2) return 1;
else {
int rst = 0; 
rst += fib (n-1);
rst += fib (n-2);
return rst;
Clik Programming Language

Features of Cilk Plus Programming

  • Extends C/C++ languages with six new keywords
    • cilk, spawn & sync
    • inlet & abort
  • Has a serial semantics
  • Provides performance guarantees based on performance abstractions.
  • Automatically manages low-level aspects of parallel execution by Cilk’s runtime system