Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.

Additions to atomic

yamahacfd
Beginner
149 Views

Hi

We want to try TBB, and we know we have lot of allocations above 8K.

How to use this new library?

Additions to atomic

how to build/install it?

thanks

yamaha

0 Kudos
2 Replies
RafSchietekat
Black Belt
149 Views

I would suggest that you first try TBB without the patch to see if it already does what you need, and to compare results with the patched version. Note that TBB's overhead is between about 0 and 16 kB above about 8 kB, so the relative savings would be most important in the beginning of that range. Also, if you have more information than just the pointer at deallocation time you can use that information to directly go to malloc/free instead.

To try the patch anyway, ask yourself if you can build TBB from the source distribution. If you feel up to that, get the patch version of 2008-10-12, unpack, inspect ./README.atomic, get the indicated base version, merge and build. The result should work as a drop-in replacement, i.e., your program should continue to work without changes.

Note that the patch aims to offer the following: more memory semantics for atomics, more hardware architectures (nine for g++ if you don't distinguish between, e.g., x86 and x64), more operating systems, some memory relief.

RafSchietekat
Black Belt
149 Views

Sorry, I was too quick there: TBB's overhead above about 8 kB is always about 16 kB. If I remember correctly, with the current settings the patch tries to get that down to about 4 kB plus some wasted space for smaller allocation sizes, but I have not measured it myself.

Reply