Questions tagged [tbb-flow-graph]

The Flow Graph interface extends capabilities of TBB to allow fast, efficient implementations of dependency graph and data flow algorithms, enabling developers to exploit parallelism at higher levels in their application.

The Flow Graph interface extends capabilities of Intel Threading Building Blocks (TBB) to allow fast, efficient implementations of dependency graph and data flow algorithms, enabling developers to exploit parallelism at higher levels in their application.

47 questions
6
votes
1 answer

How to make Intel TBB multifunction_node with dynamic number of ports?

I'm new with Intel TBB library. As you can see my question is related to tbb::flow::graph. I need to implement logic like: User draws graph with some logic blocks. Every block(node) could have unlimited connections(edges) so every block(node) could…
Max Pashkov
  • 404
  • 1
  • 3
  • 12
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
2 answers

how to abort execution of a node and its children in tbb flowgraph

I'm currently testing the flow graph feature of tbb. In order to use it, I must be able to abort execution of some node in the graph, including all children which depend on it but leave other children which do not depend on it, executing. Throwing…
user678269
3
votes
1 answer

How to remove/cancel a message from tbb::flow::graph?

I have constructed a tbb::flow::graph that consists of several function_node objects. During execution I'm passing multiple messages into the graph (from ~10 to ~100000). Sometimes one of the nodes throws an exception. If that's the case, the…
Timo
  • 9,269
  • 2
  • 28
  • 58
3
votes
3 answers

Intel TBB flowgraph overhead

Here is my attempt to benchmark the performance of Intel TBB flow graph. Here is the setup: One broadcast node sending continue_msg to N successor nodes ( a broadcast_node ) Each successor node performs a computation that takes t…
3
votes
2 answers

thread building blocks and graphical processing unit

can we execute thread building blocks threads on a Nvidia graphical processing unit? I want to have multiple threads for my tbb code so what should be optimum number for the same and can i use gpu threads instead of cpu threads?
3
votes
1 answer

Is there any method to send "heavy" types between nodes in tbb::flow::graph?

I need to send some "heavy" types between nodes in tbb::flow::graph (Intel TBB library), ie structure with dynamic arrays within. If I try to create an instance of such structure in one node and send a pointer on it to the other node, I get Access…
Max Pashkov
  • 404
  • 1
  • 3
  • 12
2
votes
2 answers

Dead Lock in TBB

Could please someone explain to me how did I end up in a dead lock situation below: This is a reprensatative example of what I was doing. #include #include #include class node_maker { public: using node =…
Vero
  • 313
  • 2
  • 9
2
votes
0 answers

Which is faster for OpenCV: PThreads, OpenMP or TBB?

I'm using OpenCV on my Raspberry Pi 3 which has 4 cores. Right now it is compiled with PThreads. Would OpenMP or TBB perform better? Or does it depend? I'm mostly doing things like color conversions, median blurs, cascade trackers and median flow…
ovg
  • 1,486
  • 1
  • 18
  • 30
2
votes
0 answers

Using tbb::flow::graph with an embarrassingly parallel portion

I'm new to using tbb::flow and was looking to create a graph that had a portion of it that is embarrassingly parallel. So the idea is to have a message come in to a node that does some pre-processing and then can formulate a set of tasks that can be…
Matt Price
  • 43,887
  • 9
  • 38
  • 44
2
votes
1 answer

TBB function_node with member function

Imagine, I have a class MyClass and want to implement multi-threading with Intel TBB: class MyClass { public: tbb::flow::function_node* _fnode; private: tbb::flow::graph* _graph; double fbody(int inp); } Is it possible to…
Jimmy_st
  • 61
  • 1
  • 10
2
votes
2 answers

How to create a tuple of N integers in runtime

I need a generic way to create a tuple of N integers in runtime where N is the size of a vector (not more than 20). For example: int main() { vector vec; vec.push_back(31); vec.push_back(24); auto x = MakeTuple(vec.size()); …
Diggy
  • 230
  • 2
  • 11
1
vote
0 answers

How to achieve pipeline parallelism in TBB flow graph

I am working on an image processing application which is built with tbb::flow_graph. The input comes from a video file or a camera. Each image processing node is wrapped in a multifunction_node (I need the multifunction_node's ability to selectively…
Michael
  • 11
  • 1
1
vote
1 answer

Async input/output and non-uniform output from TBB nodes

I am at the very start of a project where I plan to use the Intel Threading Building Block library in particular the Flow Graph part. In that respect I have two questions: Is it possible to have nodes that have asynchronous input/output relations?…
1
vote
1 answer

How to start all TBB continue_nodes which have no dependencies

With TBB you can make a nice DAG of tasks and it can automatically run them in parallel. Example from the documentation: typedef continue_node< continue_msg > node_t; typedef const continue_msg & msg_t; int main() { tbb::flow::graph g; node_t…
Timmmm
  • 88,195
  • 71
  • 364
  • 509
1
2 3 4