- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am a new TBB user. Is it possible to extend the concurrent_queue to a concurrent_deque having push and pop operations from both front and back?
--Kannan.
I am a new TBB user. Is it possible to extend the concurrent_queue to a concurrent_deque having push and pop operations from both front and back?
--Kannan.
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, that's completely different containers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the reply. I am looking to migrate an existing library using pthreads which has a concurrent_deque to use TBB. Is there any plans to implement the concurrent_deque container in TBB? If not, can you tell me if there is any existing TBB container that could be adapted to mimic the functionality?
--Kannan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I need a dequeue, too. What existing container did you use before? maybe we can use it parallel to intel tbb.
lg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For now, there is no concurrent container in TBB that would allow push() and pop() from two "ends", and no near-term plans to add such. I can only suggest the obvious "use a deque protected with a lock".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It would be interesting to know whether the container being referred to currently provides better performance than a locked deque, or just locking sugar (wrapping each call with a call to the lock).
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page