A Brief History of Cilk

Cilk development at MIT

The Cilk programming language grew out of three separate projects at the MIT Laboratory for Computer Science:

  • Theoretical work on scheduling multi-threaded applications
  • StarTech – a parallel chess program built to run on the Thinking Machines Corporation's Connection Machine model CM-5
  • PCM/Threaded-C – a C-based package for scheduling continuation-passing-style threads on the CM-5

In April 1994 the three projects were combined and christened Cilk.  The name "Cilk" is not an acronym, but an allusion to "nice threads" (silk) and the C programming language.

The Cilk-1 system was released in September 1994. The current implementation, Cilk-5.3, is an extension of ANSI C and is implemented as a source-to-source translator.  Cilk-5.3 is available from the MIT Computer Science and Artificial Intelligence Laboratory (CSAIL), though it is no longer supported. Cilk-5 allocates the frame of a Cilk function on the heap, requiring the use of the spawn keyword to call a Cilk function, and the cilk keyword on Cilk function declarations.  The MIT releases are sometimes referred to as "MIT Cilk."

Cilk++

In 2006, Cilk Arts licensed the Cilk technology from MIT with the goal of developing a commercial C++ implementation.  Cilk++ v1.0 was released in December 2008 with support for both Windows* Visual Studio and GCC/C++ on Linux. Cilk++ differed from Cilk-5 in the following ways:
  • Full C++ support, including exceptions
  • C++ code can call Cilk code directly, as long as it is compiled with the Cilk++ compiler and has Cilk linkage
  • Renamed spawn and sync keywords to cilk_spawn and cilk_sync to avoid naming conflicts
  • Added cilk_for loops to parallelize loops over a fixed number of entries
  • Added "reducer hyperobjects" to help programmers deal with races caused by parallel accesses to global variables in a lock-free manner

Like Cilk-5, Cilk++ allocates Cilk function frames from the heap.  While a Cilk function can call or spawn Cilk, C or C++ functions, C or C++ functions compiled with a standard compiler cannot directly call a Cilk function.

The Cilk++ kit includes the Cilkscreen race-detection tool as well as the Cilkview scalability analyzer.

Intel Cilk Plus

In 2009, Intel Corporation acquired Cilk Arts.  The Cilk technology was merged with Array Notation to provide a comprehensive language extension to implement both task and vector parallelism.  Intel Cilk Plus was released by Intel in 2010 as part of the Intel C++ Composer XE compiler. Key features include:

  • Supports both C and C++
  • Compatibile with standard debuggers
  • Uses standard calling conventions - Cilk function frames are allocated on the stack so  C/C++ functions can call Cilk functions freely

Intel has made the Intel Cilk Plus specifications freely available on the web.

In 2011, Intel announced that it was implementing Intel Cilk Plus in the "cilkplus" branch of GCC.  The initial implementation was completed in 2012 and presented at the 2012 GCC Tools Cauldron conference.  Intel has also proposed Intel Cilk Plus as a standard to the C++ standard body.