Intel® Threading Building Blocks

capping the number of threads used by tbb::flow::graph

Is it possible to impose a maximum on the number of threads spun up by tbb as the graph is generated and edges are made?

Right now, tbb creates a number of threads equal to task_scheduler_init::default_num_threads(), pretty much regardless of the complexity of my graph. Setting max_threads via tbb::task_scheduler_init() appears to have no effect on the number of threads started.

question about task scheduler

hi guys, i'm a newbie of TBB, and i'm intrested in a question, that is, how the task scheduler and the algorithms, such as parallel_for, parallel_invoke, parallel_reduce etc, work together? I mean, the task scheduler must be the heart of TBB runtime, and then, for different algorithms, the scheduler is designed well to suit them, so what's the key points of scheduler's desgin, and how does the scheduler suits these algorithms?

Pluggable default memory semantics for atomics

I am of the strong opinion that C++11 goofed when it decreed sequential consistency as the default memory semantics for all atomic operations. It is an excessive general penalty (either performance cost or coding overhead) just to prevent the occasional mishap (relatively few uses need sequential consistency at the level of the atomic operation).

TBB defaults are far more reasonable, although I still have my doubts about sequential consistency for read-modify-write operations, which seems to be inspired by Intel's own Architecture (x86) more than by typical needs.

tbb43_20140724oss fails tests with gcc4.8 on Ubuntu 14.04

Hi,

We are about to start using TBB in a software package with high requirements for portability, and in preparation for this we are checking the OSS version on a bunch of different platforms and compilers.

 

 

 

I'll get back with patches for a few new combinations, but while testing I realized that the latest open source version fails one built-in test when using gcc on Ubuntu 14.04. When building with "make" followed by "make test", the test_tbb_version.exe test fails with a segmentation fault, both for the release and debug flavors.

gcc 4.8.2 libs?

I'm trying to use tbb in Ubuntu.
I'm using gcc from Ubuntu repository, version 4.8.2
But I have found that lib/intel64 folder contains only gcc4.1 and gcc4.4 subfolders.

Should I just use gcc4.4? If it's compatible with gcc4.8.2?

Avoid "pauses" in game loop

   Hello,

   I've got an existing game engine that uses TBB

  What I'm trying to work around is that if too many tasks are spawned it hitches. 

Anyway the general layout is like this:

1. main loop: spawns a few tasks using task_group, then calls wait()

2. one of these tasks spawned in the task_group contains a flow graph, the graph is executed. 

is it reasonable to use thread_bound_filter

The use case is:

  There are global shared buffer among different stages, and I employ flag array to control accesses  to these buffers from different stages, which are usually the fi and fi+1 (producer and consumer)。

  tbb::atomic<int> BufIsFull[N];

tbb::atomic<unsinged int> WriteToBufNum, ReadToBufNum;

  Now, because the filter(serial) can be executed by different threads on different items, so I  have to make these flag array and index variable to these array are tbb::atomic(WriteToBufNum, ReadToBufNum).

Subscribe to Intel® Threading Building Blocks