MulticoreInfo.com header image 2

Running your code in parallel with tbb::parallel_invoke

April 3rd, 2009 · No Comments




By Alexey Murashov
Here is an introduction to a new template function recently added to TBB – tbb::parallel_invoke. It provides TBB users a simple way to run several functions in parallel. So, for example, if you have three functions that do some work and you would like to run them simultaneously, you may write the following TBB code.

void Function1();
void Function2();
void Function3();
void RunFunctions() {
    tbb::parallel_invoke(Function1, Function2, Function3);
}

Full Story

  • Share/Save/Bookmark

Tags: MulticoreInfo · Programming

Like what you're reading? Come back every day for multicore news, or subscribe to RSS updates.



Stumble It!