Intel® Cilk™ Plus

Cilk™ Plus并行程序的串行等价程序的执行过程

    C++社区的趋势近年来主要是通过以添加更多的库而不是语言关键字来实现增加程序的功能性,比如Threading Building Blocks以及Parallel Patterns库,但与主流发展趋势不同的是,Intel的Cilk™ Plus的实现方式则是以后者的形式——语言关键字来增加程序功能的,本文将就此给出分析。


    每一个使用关键字来定义并行Cilk™ Plus的程序都有一个已在编译器实现中定义好的串行语义。 通过将每一个cilk_sync及cilk_spawn替换为空,且将每一个cilk_for以for关键字来替代,编译器由此将并行的Cilk™ Plus程序处理为一个有效的串行C/C++程序。 当两个逻辑并行的线程同时访问同一内存位置且至少一个为写内存操作时,程序行为此时出现竞态,如果一个Cilk™ Plus并行程序没有竞态发生的话,此时它将产生与其串行等价程序相同的结果。编译器是如何保证其串行等价的结果一致的?考虑以下的代码:

  • Desarrolladores
  • C/C++
  • Intel® Cilk™ Plus
  • Contrato de licencia: 


    I've been trying to understand what the implicit_index intrinsic may be intended for.  It's tricky to get adequate performance from it, and apparently not possible in some of the more obvious contexts (unless the goal is only to get a positive vectorization report).

    It seems to be competitive for the usage of setting up an identity matrix.

    In the context of dividing its result by 2, different treatments are required on MIC and host:

    Optimizing Big Data processing with Haswell 256-bit Integer SIMD instructions

    Big Data requires processing huge amounts of data. Intel Advanced Vector Extensions 2 (aka AVX2) promoted most Intel AVX 128-bits integer SIMD instruction sets to 256-bits. Intel AVX brought 256-bits floating-point SIMD instructions, but it didn't include 256-bits integer SIMD instructions. Intel AVX2 allows you to operate with the AVX 256-bits wide YMM register for integer data types. In this post, I’ll explain how developers can speedup big data processing with the new 256-bits integer SIMD instructions.

    Less performance on 16 core than on 4 ?!

    Hi there,

    I evaluated my cilk application using "taskset -c 0-(x-1) MYPROGRAM) to analyze scaling behavior.


    I was very suprised to see, that the performances increases up to a number of cores but decreases afterwards.

    for 2 Cores, I gain a speedup of 1,85. for 4, I gain 3.15. for 8 4.34 - but with 12 cores the performance drops down
    to a speedup close to the speedup gained by 2 cores (1.99).
    16 cores performe slightly better (2.11)

    Exception when run project at debug mode using cilk_for

    Dear all,

    I have used cilk_plus to make parallel processing into my source code with visual studio 2008 IDE.

    But when I build it at debug mode, the project throw an exception below:

    "Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function pointer declared with a different calling convention"

    How can  I resolve it to make debug mode operated ?

    Thanks of all,

    Tam Nguyen


    Cilk Tools error while loading shared libraries

    I have successfully compiled cilkplus for gcc (4.8 branch) on Ubuntu 14.04 LTS and compiled the example program fib on the cilkplus website.  I would like to run cilkview and cilkscreen on it, and so I downloaded cilk tools from the website as well.  However, when I try to run cilkview, I get the following error:

    Cilkview: Generating scalability data
    -t: error while loading shared libraries: -t: cannot open shared object file: No such file or directory
    Suscribirse a Intel® Cilk™ Plus