- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have contributed another piece of YetiSim, the owning container. This container is used to store pointers to allocated objects, and the destructor will delete its held objects, and the user may delete objects from it themselves as well. The point of this class is to help enable exception safety in parallel code.
The ownership methods are wrapped with spin_mutex's. This construct isn't terribly TBB related, but it does use TBB mutexes and I found it useful in YetiSim where the performance of smart pointers was unacceptable, but I needed something to provide for exception safety, and parallel ownership giving/taking. It is available at http://code.google.com/p/tbbcommunity/
Note that this version is only useful for containers that support insert(), I usually find the version that uses vector more useful. I will be looking at doing a template specialization, or something and contribute that too.
AJ
The ownership methods are wrapped with spin_mutex's. This construct isn't terribly TBB related, but it does use TBB mutexes and I found it useful in YetiSim where the performance of smart pointers was unacceptable, but I needed something to provide for exception safety, and parallel ownership giving/taking. It is available at http://code.google.com/p/tbbcommunity/
Note that this version is only useful for containers that support insert(), I usually find the version that uses vector more useful. I will be looking at doing a template specialization, or something and contribute that too.
AJ
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It has been pointed out to me this is very similar to boost pointer container http://www.boost.org/libs/ptr_container/doc/ptr_container.html.
I didn't know about this earlier, however this contribution is still relevant because TBB mutexes are used. I will adjust this contribution to follow the convention of boost ptr container, and perhaps the API, however I will also add a template argument for the mutex type.
AJ
I didn't know about this earlier, however this contribution is still relevant because TBB mutexes are used. I will adjust this contribution to follow the convention of boost ptr container, and perhaps the API, however I will also add a template argument for the mutex type.
AJ


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