- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I fail to understand how should I use TBB for my needs.
My code is (obviously) divided among several classes. Such a class has inputs, outputs, internal memory and (at least) one member function that processes the input using some of the internal memory.
Would like to create a pipeline using flow graph (to be able to generalize in the future) something like A->B.
Suppose A 's output is a pointer to float array of length N. B processes this array using an internal array of length N.
I create the classes, connect the nodes. I do not understand what happens when it runs. Are new instances of objects for A and B created, depending on the concurrency? If not - what should I do to enable parallel access to different segments of memory?
Thank you,
Sorin
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you're talking about a node's Body, there's one operational instance for the node, copied at construction time, and it is accessed concurrently. That means that you are responsible for synchronising access to any shared internal state. You can also use TLS if it does not matter that the number of parallel states may exceed the concurrency level of the node.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Raf Schietekat wrote:
If you're talking about a node's Body, there's one operational instance for the node, copied at construction time, and it is accessed concurrently. That means that you are responsible for synchronising access to any shared internal state. You can also use TLS if it does not matter that the number of parallel states may exceed the concurrency level of the node.
So does this mean that if I need such a node to be operated n times in parallel I should generate n nodes and operate each one serially?
What TLS stands for?
Thanks
Sorin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Raf Schietekat wrote:
If you're talking about a node's Body, there's one operational instance for the node, copied at construction time, and it is accessed concurrently. That means that you are responsible for synchronising access to any shared internal state. You can also use TLS if it does not matter that the number of parallel states may exceed the concurrency level of the node.
Does this mean that if a class has internal memory that is used for r/w I need to create a new object for each concurrent usage ?
Thank you
Sorin
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page