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

Contribution: STL Containers Wrapped for cache_aligned and scalable allocators

New Contributor I

It can be cumbersome to define STL containers with scalable or cache_aligned allocators over and over. So, I have contributed some more code from YetiSim which wraps standard STL containers with appropriate allocators.

For example, to define an STL vector you can do:
tcc::cache_aligned_vector::vector myVector;
tcc::scalable_vector::vector myVector2;

When you have to write a lot of these, it becomes less cumbersome to remember this convention than to write out allocator arguments.

You can get the code from here:

0 Kudos
0 Replies