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.
Contribution: STL Containers Wrapped for cache_aligned and scalable allocators
Hi,
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:
http://code.google.com/p/tbbcommunity/
AJ