Sign up for our newsletter and get the latest HPC news and analysis.

CilkArts: The Voodoo that You Do

Matteo Frigo of CilkArts has posted a very detailed account of why certain idiosyncrasies exist in the Cilk language constructs as well as its C++ parent. For those not in the know, CilkArts distributes a commercially supported version of Cilk, the multicore programming paradigm.  Syntactically, Cilk follows the rules of standard C++, with the addition of a few additional constructs to induce parallelism.

Some users of Cilk++ do not like the fact that Cilk++ functions and C/C++ functions are distinct types. (We do not like this distinction either.) The purpose of this (somewhat nerdy) article is to explain why this distinction exists in the first place, and to show that bad things happen in systems that do not make such a distinction. Briefly, the source of the difficulty is that C and C++ are normally compiled on a linear stack, whereas parallel code really should target a cactus stack. I now explain what this means.

Speaking from experience, Cilk is actually quite easy to use.  Once you wrap your head around their language constructs, you don’t typically notice that you’re even operating in a multicore platform environment.  I won’t steal Matteo’s thunder too much, so you’ll have to head over to the CilkArts blog to read more.

Resource Links: