Intel® Cilk™ Plus

Потоки — это Goto параллельного программирования

Сразу раскрою мысль, вынесенную в заголовок. Использование потоков (также именуемых нити, треды, англ. threads) и средств прямой манипуляции ими (создание, уничтожение, синхронизация) для написания параллельных приложений оказывает столь же пагубное влияние на сложность алгоритмов, качество кода и скорость его отладки, какое вносило использование оператора Goto в последовательных программах.

A Parallel Stable Sort Using C++11 for TBB, Cilk Plus, and OpenMP

This article describes a parallel merge sort code, and why it is more scalable than parallel quicksort or parallel samplesort. The code relies on the C++11 “move” semantics. It also points out a scalability trap to watch out for with C++. The attached code has implementations in Intel® Threading Building Blocks (Intel® TBB), Intel® Cilk™ Plus, and OpenMP*.

  • Developers
  • Professors
  • Students
  • C/C++
  • Intermediate
  • Intel® Cilk™ Plus
  • Intel® Threading Building Blocks
  • parallel
  • Merge Sort
  • Cilk Plus
  • tbb
  • openmp
  • OpenMP*
  • Parallel Computing
  • Question on reducers

    In my search application there are globally variables defined outside any function that I would like to use the cilk reducers on.

    Specifically I have code like this:

    #include "search.h"
    
    static int total_users = 0;
    static int total_matches = 0;

    These total_x variables are incremented throughout the application on different functions.

    I tried adding the following for total_users and received the following error:

    How to use the cilkview?

    I have a C search application  on a centos 6.x 64 bit linux server that I just installed the cilkplus compiler on to take advantage of more cpu/cores. I've added the cilk_spawn function to some recursive scanning functions in my program.  After re-compiling the search application with the cilkplus gcc compiler, the search program is working as intended without any seg faults or any other errors.

    My question is how do I use the cilkview analyzer? I want to if cilkplus/spawning is helping my search application and if so by how much?

    Thanks!

    Lawrence

     

     

    developer documents for Cilk Plus

    Hi,

    First I would like to thank you all for the awesome cilk plus tools you have open source in GCC and LLVM.

    I am trying to study the runtime library and finding it a bit difficult to follow the execution in a sample application.

    Are there any developer documents available? A wiki perhaps.

    Specifically, I am trying to trace the execution path for cilk_spawn which is a key word. Any helpful links to get me started would be really great!

    Thanks,

    Arya

    Question about steal-continuation semantics in Cilk Plus, Global counter slowing down computation, return value of functions

    1)
    What I understood about steal-continuation is, that every idle thread does not actually steal work, but the continuation which generates a new working item.
    Does that mean, that inter-spawn execution time is crucial? If 2 threads are idle at the same time, from what I understand only one can steal the continuation and create its working unit, the other thread stays idle during that time?!

    2)
    As a debugging artefact, I had a global counter incremented on every function call of a function used within every working item.

    Subscribe to Intel® Cilk™ Plus