Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

missing includes in tbb.h

edwinchenloo
Beginner
362 Views
Maybe this was known already but in the tbb.h from v 4.0 297 these are missing:
concurrent_unordered_set.h
concurrent_lru_cache.h
memory_pool.h
and maybe others. It would be nice if you guys could include any new tbb headers in tbb.h to help with pre-compilation and header maintenance in our projects whenever we switch to different versions of tbb.
There is also a define TBB_PREVIEW_CONCURRENT_PRIORITY_QUEUE that would be best to remove. it doesn't make sense to have something like that. If there is a new header, even if it is beta, just allow users to use it instead of having so many crazy defines. If the header is ever removed or renamed we can adjust our programs accordingly.
Edwin
0 Kudos
2 Replies
Vladimir_P_1234567890
362 Views
Hello Edwin,

All these headers correspond to community preview features so they should be out of production environment because their interface can be changed before their full-feature release and we support backward compatibility.
and these long-name 'TBB_PREVIEW_*' defines will be also removed during conversion to full feature.
thanks,
--Vladimir
0 Kudos
Alexey-Kukanov
Employee
362 Views

Thanks for reporting the missed headers.

As for the "crazy defines", they serve two purposes. First, as Vladimir already mentioned, by defining this users explicitly express that they want to use some preview feature which may later change; also, these macros may serve as a remainder about using a preview feature. Second, having a macro per feature instead of just a single "umbrella" one allows users to use CPFs selectively. Though perhaps support for an umbrella macro can also be implemented inside tbb.h for those who don't mind using all (current and future) preview features :)

0 Kudos
Reply