cilk-plus

Intel Cilk Plus code example with cilk_for keyword


cilk_for is a keyword of Intel Cilk Plus, and we can use it following way:

cilk_for (int i = 0; i < 8; ++i)
{
    do_work(i);
}

I need some more example codes of Intel Cilk Plus with cilk_for keyword.


Solution

  • That's pretty much all there is. A cilk_for loop is one of the easiest ways you can parallelize your code. Things to watch out for:

    Barry Tannenbaum, Intel Cilk Plus Development