- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm writing a library where I'm linking to the open source version of tbb built as a static lib. This works fine but when I static link my library into a program it asks for the tbb library and I want my library to be self contained so people can use it without needing to link against tbb themselves. I've had a similar thing with boost where you can use a preprocessor definition to make your library self contained. I'm wondering how I can achieve this with tbb?
Thanks a lot!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You shouldn't try to do that, unless you want to do your users a great disservice. Oversubscription hurts performance, so TBB is presented as a dynamically linked library partly to get all parts of a program to coordinate through shared constructs and thus help achieve composability.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm aware of the issue of multiple tbb schedulers being active and my thought was to let the user disable the scheduler in the library and supply their own if they are using tbb themselves (although I admit I haven't looked into that possibility yet). Would that not work?
I don't see how having tbb as a dynamic library would stop an oversubscription situation if the user is managing threads themselves or using something like openmp in their program?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm sorry, but I don't see the point of that.
And TBB indeed can't magically cure externally caused oversubscription.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page