Questions tagged [tbb]

Intel Threading Building Blocks (also known as TBB) is an open-source portable C++ template library for writing software programs that take advantage of multi-core processors.

From Wikipedia:

Intel Threading Building Blocks (also known as TBB) is a C++ template library developed by Intel Corporation for writing software programs that take advantage of multi-core processors. The library consists of data structures and algorithms that allow a programmer to avoid some complications arising from the use of native threading packages such as POSIX threads, Windows threads, or the portable Boost Threads in which individual threads of execution are created, synchronized, and terminated manually.

Instead the library abstracts access to the multiple processors by allowing the operations to be treated as "tasks", which are allocated to individual cores dynamically.

Threading Building Blocks Homepage

Intel® Threading Building Blocks Tutorial

770 questions
4
votes
1 answer

Building/Linking to TBB under MinGW

I am building TBB under MinGW32 (on Windows 7 64 bit) and linking a simple program to it successfully. Unfortunately, my colleague is unable to do link successfully. We are both running the same version of Windows, the same version of MinGW…
user992113
  • 163
  • 1
  • 9
4
votes
9 answers

tbb: parallel find first element

I have got this problem: Find the first element in a list, for which a given condition holds. Unfortunately, the list is quite long (100.000 elements), and evaluation the condition for each element takes in total about 30 seconds using one single…
martinus
  • 17,736
  • 15
  • 72
  • 92
4
votes
2 answers

TBB concurrent_vector with openmp

Can we use TBB concurrent_vector with openmp? Will concurrent updates be allowed?
Abhishek
  • 87
  • 5
4
votes
1 answer

Intel TBB Parallelization Overhead

Why does Intel Threading Building Blocks (TBB) parallel_for have such a large overhead? According to section 3.2.2 Automatic Chunking in the Tutorial.pdf its around half a millisecond. This is an exert from the tutorial: CAUTION: Typically a loop…
Nordlöw
  • 11,838
  • 10
  • 52
  • 99
4
votes
2 answers

Thread ID reuse between std::thread and tbb::task_group causing deadlock in OpenMP

*** UPDATE: changing code to a real case that reproduces the problem *** I'm working in some preexisting code that uses a number of multi-threading techniques; std::thread, plus Intel TBB TaskGroup, plus OpenMP. It looks like I've hit a race…
Sue Loh
  • 83
  • 1
  • 9
4
votes
2 answers

ffmpeg(-mt) and TBB

I just started using the latest build of ffmpeg into which ffmpeg-mt has been merged. However, since my application uses TBB (Intel Threading Building Blocks), the ffmpeg-mt imlementation with new thread creation and synchronization does not quite…
ronag
  • 49,529
  • 25
  • 126
  • 221
4
votes
1 answer

Concurrent_hash_map implementation throwing SIGSEGV

I am trying to use tbb’s concurrent_hash_map to increase my application’s concurrent performance. Read up about it and implemented it according to my application but I am seeing crashes.. So, my application is a multi-threadedd application where I…
Hemant Bhargava
  • 3,251
  • 4
  • 24
  • 45
4
votes
3 answers

Using malloc instead of new, and calling the copy constructor when the object is created

I wanted to try out TBB's scalable_allocator, but was confused when I had to replace some of my code. This is how allocation is done with the allocator: SomeClass* s = scalable_allocator().allocate( sizeof(SomeClass) ); EDIT: What's…
Nav
  • 19,885
  • 27
  • 92
  • 135
4
votes
1 answer

Aggregation node in TBB

I am new to TBB, so my apologies, if this question is obvious... but how do I set up an aggregating node with TBB? Out of all pre-made nodes I cannot find the right type for it. Imagine I have a stream of incoming images. I want a node that keeps…
Jonn Dove
  • 477
  • 2
  • 11
4
votes
1 answer

How to set allocator for dynamically allocated stl container?

I am using TBB custom memory allocator. tbb::memory_pool> shortTermPool; typedef tbb::memory_pool_allocator custom_allocator; std::vector* results…
user1432882
  • 1,126
  • 4
  • 14
  • 29
4
votes
1 answer

TBB thread pool unexpectedly increasing

We have a piece of code that utilises TBB to spawn tasks to perform some processing this is done using the following TBB code to initialise the TBB thread pool: tbb::task_scheduler_init(8); Then for each task we want to spawn we use the following…
4
votes
2 answers

TBB Intel Threading Building Blocks for Raspberry Pi 3

So I am trying to compile Intel's TBB C++ library which enables parallelisms in programs. I am particularly needing this to use C++ React, which is a library which provides reactive library (e.g. asynchronous loops) for a project I am doing. I have…
4
votes
2 answers

-mimplicit-it compiler flag not recognized

I am attempting to compile a C++ library for a Tegra TK1. The library links to TBB, which I pulled using the package manager. During compilation I got the following error /tmp/cc4iLbKz.s: Assembler messages: /tmp/cc4iLbKz.s:9541: Error: thumb…
dmagree
  • 265
  • 1
  • 2
  • 10
4
votes
3 answers

Threadsafe, ordered mapping/hash in C++?

What's the best way to implement a threadsafe ordered(note1) mapping/hash in C++? Aka, a fast-lookup data structure (aka, not a queue) that different threads can iterate across, occasionally inserting or deleting elements without interfering with…
KarenRei
  • 589
  • 6
  • 13
4
votes
1 answer

Constructing a grouped data structure with/for TBB

Recently I've been looking at using TBB rather than boost.threads to speed up development. Generally the parallel_for works in most cases but I have a situation here that is a bit more complex. There is an array of structs that needs computation…
josh247
  • 155
  • 1
  • 13