Contribution: STL Containers Wrapped for cache_aligned and scalable allocators

Contribution: STL Containers Wrapped for cache_aligned and scalable allocators

AJ的头像

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

1 条帖子 / 0 new
如需更全面地了解编译器优化,请参阅优化注意事项