• <i id='arHh9'><tr id='arHh9'><dt id='arHh9'><q id='arHh9'><span id='arHh9'><b id='arHh9'><form id='arHh9'><ins id='arHh9'></ins><ul id='arHh9'></ul><sub id='arHh9'></sub></form><legend id='arHh9'></legend><bdo id='arHh9'><pre id='arHh9'><center id='arHh9'></center></pre></bdo></b><th id='arHh9'></th></span></q></dt></tr></i><div id='arHh9'><tfoot id='arHh9'></tfoot><dl id='arHh9'><fieldset id='arHh9'></fieldset></dl></div>

    <small id='arHh9'></small><noframes id='arHh9'>

      <legend id='arHh9'><style id='arHh9'><dir id='arHh9'><q id='arHh9'></q></dir></style></legend>
        <bdo id='arHh9'></bdo><ul id='arHh9'></ul>

        <tfoot id='arHh9'></tfoot>
      1. 英特尔 TBB 的可扩展分配器如何工作?

        How does Intel TBB#39;s scalable_allocator work?(英特尔 TBB 的可扩展分配器如何工作?)
          <tbody id='BOxpE'></tbody>

        <small id='BOxpE'></small><noframes id='BOxpE'>

          • <i id='BOxpE'><tr id='BOxpE'><dt id='BOxpE'><q id='BOxpE'><span id='BOxpE'><b id='BOxpE'><form id='BOxpE'><ins id='BOxpE'></ins><ul id='BOxpE'></ul><sub id='BOxpE'></sub></form><legend id='BOxpE'></legend><bdo id='BOxpE'><pre id='BOxpE'><center id='BOxpE'></center></pre></bdo></b><th id='BOxpE'></th></span></q></dt></tr></i><div id='BOxpE'><tfoot id='BOxpE'></tfoot><dl id='BOxpE'><fieldset id='BOxpE'></fieldset></dl></div>
              <tfoot id='BOxpE'></tfoot>
                <legend id='BOxpE'><style id='BOxpE'><dir id='BOxpE'><q id='BOxpE'></q></dir></style></legend>
                  <bdo id='BOxpE'></bdo><ul id='BOxpE'></ul>
                • 本文介绍了英特尔 TBB 的可扩展分配器如何工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  英特尔线程构建块中的 tbb::scalable_allocator 实际上在幕后做了什么?

                  What does the tbb::scalable_allocator in Intel Threading Building Blocks actually do under the hood ?

                  它肯定是有效的.我刚刚使用它通过更改单个 std::vector< 将应用程序的执行时间减少了 25%(并且在 4 核系统上看到 CPU 利用率从 ~200% 增加到 350%).T>std::vector>.另一方面,在另一个应用程序中,我看到它使已经很大的内存消耗加倍并将事物发送到交换城市.

                  It can certainly be effective. I've just used it to take 25% off an apps' execution time (and see an increase in CPU utilization from ~200% to 350% on a 4-core system) by changing a single std::vector<T> to std::vector<T,tbb::scalable_allocator<T> >. On the other hand in another app I've seen it double an already large memory consumption and send things to swap city.

                  英特尔自己的文档并没有提供太多内容(例如,在此末尾的一小部分 常见问题解答).在我亲自深入研究它的代码之前,谁能告诉我它使用了什么技巧?

                  Intel's own documentation doesn't give a lot away (e.g a short section at the end of this FAQ). Can anyone tell me what tricks it uses before I go and dig into its code myself ?

                  更新:只是第一次使用 TBB 3.0,并且从可扩展分配器中看到了我迄今为止最好的加速.将单个 vector 更改为 vector> 将某些东西的运行时间从 85 秒减少到 35 秒(Debian Lenny、Core2、TBB 3.0 测试).

                  UPDATE: Just using TBB 3.0 for the first time, and seen my best speedup from scalable_allocator yet. Changing a single vector<int> to a vector<int,scalable_allocator<int> > reduced the runtime of something from 85s to 35s (Debian Lenny, Core2, with TBB 3.0 from testing).

                  推荐答案

                  有一篇关于分配器的好论文:英特尔线程构建模块中可扩展多核软件的基础

                  There is a good paper on the allocator: The Foundations for Scalable Multi-core Software in Intel Threading Building Blocks

                  我的有限经验:我使用 tbb::scalable_allocator 为我的 AI 应用程序重载了全局新建/删除.但是时间配置文件几乎没有变化.不过我没有比较内存使用情况.

                  My limited experience: I overloaded the global new/delete with the tbb::scalable_allocator for my AI application. But there was little change in the time profile. I didn't compare the memory usage though.

                  这篇关于英特尔 TBB 的可扩展分配器如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  What is the past-the-end iterator in STL C++?(STL C++ 中的最后迭代器是什么?)
                  vector::at vs. vector::operator[](vector::at 与 vector::operator[])
                  C++ equivalent of StringBuffer/StringBuilder?(C++ 等效于 StringBuffer/StringBuilder?)
                  Adding types to the std namespace(将类型添加到 std 命名空间)
                  Is the C++ std::set thread-safe?(C++ std::set 线程安全吗?)
                  How to use std::find/std::find_if with a vector of custom class objects?(如何将 std::find/std::find_if 与自定义类对象的向量一起使用?)

                      • <bdo id='opzaI'></bdo><ul id='opzaI'></ul>
                      • <i id='opzaI'><tr id='opzaI'><dt id='opzaI'><q id='opzaI'><span id='opzaI'><b id='opzaI'><form id='opzaI'><ins id='opzaI'></ins><ul id='opzaI'></ul><sub id='opzaI'></sub></form><legend id='opzaI'></legend><bdo id='opzaI'><pre id='opzaI'><center id='opzaI'></center></pre></bdo></b><th id='opzaI'></th></span></q></dt></tr></i><div id='opzaI'><tfoot id='opzaI'></tfoot><dl id='opzaI'><fieldset id='opzaI'></fieldset></dl></div>

                          <tbody id='opzaI'></tbody>
                        <legend id='opzaI'><style id='opzaI'><dir id='opzaI'><q id='opzaI'></q></dir></style></legend>
                          <tfoot id='opzaI'></tfoot>

                            <small id='opzaI'></small><noframes id='opzaI'>