TBB does not provide a parallel_find(), which would act similar to std::find(): find the first element in a range meeting a given condition/predicate. I think those who know the tbb library well should be able to implement this as follows: a range is split into a first and second half with the first half searched at higher priority (put on the stack last). If the first child task succeeds (finds a match), the second task is cancelled. This is done recursively, of course.
I wanted to report a "bug" which might appear when using the flow-graph.
In flow_graph.h(and probably all the other impl files) all the fake variadic-templates are being written using arguments B0-BN. The problem is that the old UNIX file termios.h defines B0 as 0. Now, when simply compiling you get a lot of compile errors because the B0 argument in the templates was replaced with 0.
I recognized this when using boost::asio together with the flow-graph.
I am trying to initialize a 2D concurrent_hash_map, a container available in the Intel TBB library. Compilation passes and there is no error at runtime. However, not all initialized values are available in the container leading to incorrect behavior.
The hash map is defined as
The recursive task-based parallelism of TBB is usually working very well for me. However, occasionally there is a situation where a simple static split of the work into n_thread equal-sized parts, one per thread, is beneficial
here is a use case:
I am new to Intel TBB. I am using concurrent_queue in order to achieve fine-grained parallelism in my project. I got few doubts. This is how i am implementing.
operation on v; //each thread executes its own operation(seperate v for each thread)
fill the concurrent_queue;
create win32 threads and pass concurrent_queue as an argument; //using _beginthreadex
I'm stuck with a problem I quite don't understand and that involve either boost::future/promise or tbb::concurrent_queue,
or my understanding of using both.
I think there is a high probability that someone here will point to the problem, but I will report too to the tbb forum
- I'm using VS2012 Update 2
- it's 32 bit DEBUG mode
- I use Boost.Thread V4 (in CMake I set "add_definitions( -DBOOST_THREAD_VERSION=4 )" to force it )
- I use TBB 4.1 Update 2
Hi All ,
I have written an image processing related code. I used TBB for parallel implementation of computationally intensive for loops. The program runs fine on Linux. I am trying to port it on windows. When I try to build the executable , I get following linker error:
Suppose there are some worker objects which contains some internal resource such as socket. Those worker objects are created at the program startup and destroyed at program exit. The main thread will pass an object ID to one of the worker object. Then the worker will process it and send the result throght socket. What I want is those workers run parallely. Is there any of TBB component that can serve for this purpose?
At the moment I am testing some parallel scheduling libraries like TBB, OpenMP, XKAAPI and so on. To get a first quick impression I implemented a naive matrix-matrix multiplication, first for floating point entries, then for uint64 entries. The tests I run on a NUMA with 4 nodes of 8 cores of Intel Xeon CPU E5-4620 0 @ 2.20GHz. Each node has 96 GB of RAM.