- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is it a problem if I compile an application without TBB that uses a dll that is linked with the TBB libraries? Or is it necessary that all parts of an application is set to use TBB if a single parts needs that?
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
TBB may conflict with use of OpenMP or /Qparallel (and libraries such as mkl_thread which incorporate those). Other than that, I don't see a concern.
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
TBB may conflict with use of OpenMP or /Qparallel (and libraries such as mkl_thread which incorporate those). Other than that, I don't see a concern.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the insights.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
there won't be 'conflict'. there might be oversubscription when there are heavy calculation at the same time in code using openmp and tbb.
--Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Answer on the1st Question:
I don'texpect any problems. If a DLL with TBB has some functions declared as exported any applications could call these functions.
The only difference between an application with integrated TBB functionalityvs. an application that uses a DLLwith TBB functionality is that in the 2nd caseTBB functionality will be loaded by OS loaderin a different address space.
You understand the main idea of aDLL, right? That is,a DLLcould beloaded by an application andthe DLL's functionality ( codes, data, etc )could be shared between different applications.
Answer on the 2nd Question:
In case of template-based libraries it is a common approach to includea template-based librarycompletely. Let's say a template-based library has classes A, B and C, and only class B is used in some application. In that case only codes for the class B will be compiled andused inthe application! Codes for classes A and C won't be included inthe application.It makes theapplication more compact.
I don'tknow if somebody uses an STL library througha DLL,but it is possible.
I don'texpect any problems. If a DLL with TBB has some functions declared as exported any applications could call these functions.
The only difference between an application with integrated TBB functionalityvs. an application that uses a DLLwith TBB functionality is that in the 2nd caseTBB functionality will be loaded by OS loaderin a different address space.
You understand the main idea of aDLL, right? That is,a DLLcould beloaded by an application andthe DLL's functionality ( codes, data, etc )could be shared between different applications.
Answer on the 2nd Question:
In case of template-based libraries it is a common approach to includea template-based librarycompletely. Let's say a template-based library has classes A, B and C, and only class B is used in some application. In that case only codes for the class B will be compiled andused inthe application! Codes for classes A and C won't be included inthe application.It makes theapplication more compact.
I don'tknow if somebody uses an STL library througha DLL,but it is possible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sergey,
Thanks for your answer. Yes I understand the main idea of a DLL that is the reason why I use them. I would not recommended using STL over DLL boundaries since you can never be sure that the same version of the STL library is used or that the DLL uses a custom allocator. That might end up with some resource leaks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>>...I would not recommended using STL over DLL boundaries since you can never be sure that the same version of the STL library is used...
Hi Daniel, I agree with you regarding anSTL in a DLL. That breaks amain idea oftemplate based programming.
>>...That might end up with some resource leaks...
Yes, especially when a developer creates an object with 'new' C++ operator and never calls 'delete' C++ operator... :)
Best regards,
Sergey
Hi Daniel, I agree with you regarding anSTL in a DLL. That breaks amain idea oftemplate based programming.
>>...That might end up with some resource leaks...
Yes, especially when a developer creates an object with 'new' C++ operator and never calls 'delete' C++ operator... :)
Best regards,
Sergey

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