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

      <legend id='ZvZGn'><style id='ZvZGn'><dir id='ZvZGn'><q id='ZvZGn'></q></dir></style></legend>
    1. <small id='ZvZGn'></small><noframes id='ZvZGn'>

          <bdo id='ZvZGn'></bdo><ul id='ZvZGn'></ul>

        Armadillo 中的并行化

        Parallelisation in Armadillo(Armadillo 中的并行化)

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

      1. <legend id='P0NMB'><style id='P0NMB'><dir id='P0NMB'><q id='P0NMB'></q></dir></style></legend>

              <tbody id='P0NMB'></tbody>

            • <i id='P0NMB'><tr id='P0NMB'><dt id='P0NMB'><q id='P0NMB'><span id='P0NMB'><b id='P0NMB'><form id='P0NMB'><ins id='P0NMB'></ins><ul id='P0NMB'></ul><sub id='P0NMB'></sub></form><legend id='P0NMB'></legend><bdo id='P0NMB'><pre id='P0NMB'><center id='P0NMB'></center></pre></bdo></b><th id='P0NMB'></th></span></q></dt></tr></i><div id='P0NMB'><tfoot id='P0NMB'></tfoot><dl id='P0NMB'><fieldset id='P0NMB'></fieldset></dl></div>
              • <tfoot id='P0NMB'></tfoot>
                • <bdo id='P0NMB'></bdo><ul id='P0NMB'></ul>
                  本文介绍了Armadillo 中的并行化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  Armadillo C++ 线性代数库文档 陈述了用 C++ 开发库的原因之一成为通过现代 C++ 编译器中存在的 OpenMP 轻松实现并行化",但 Armadillo 代码没有使用 OpenMP.我如何获得与犰狳并行化的好处?这是通过使用高速LAPACK 和BLAS 替代品 之一来实现的吗?我的平台是 Linux、Intel 处理器,但我怀疑这个问题有一个通用的答案.

                  The Armadillo C++ linear algebra library documentation states one of the reasons for developing the library in C++ to be "ease of parallelisation via OpenMP present in modern C++ compilers", but the Armadillo code does not use OpenMP. How can I gain the benefits of parallelisation with Armadillo? Is this achieved by using one of the high-speed LAPACK and BLAS replacements? My platform is Linux, Intel processor but I suspect there is a generic answer to this question.

                  推荐答案

                  好吧,看来并行化确实是通过使用高速 LAPACK 和 BLAS 替代品来实现的.在 Ubuntu 12.04 上,我使用包管理器安装了 OpenBLAS 并从源代码构建了 Armadillo 库.examples 文件夹中的示例构建并运行,我可以使用 OPENBLAS_NUM_THREADS 环境变量控制内核数量.

                  Okay so it appears that parallelisation is indeed achieved by using the high-speed LAPACK and BLAS replacements. On Ubuntu 12.04 I installed OpenBLAS using the package manager and built the Armadillo library from the source. The examples in the examples folder built and run and I can control the number of cores using the OPENBLAS_NUM_THREADS environment variable.

                  我创建了一个小项目 openblas-benchmark 用于测量 Armadillo 在计算 a 时的性能提升矩阵乘积 C=AxB 用于各种大小的矩阵,但到目前为止我只能在 2 核机器上对其进行测试.

                  I created a small project openblas-benchmark which measures the performance increase of Armadillo when computing a matrix product C=AxB for various size matrices but I could only test it on a 2-core machine so far.

                  性能图显示,对于大于 512x512 的矩阵,执行时间减少了近 50%.请注意,两个轴都是对数的;y 轴上的每条网格线代表执行时间加倍.

                  The performance plot shows nearly 50% reduction in execution time for matrices larger than 512x512. Note that both axes are logarithmic; each grid line on the y axis represents a doubling in execution time.

                  这篇关于Armadillo 中的并行化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Constructor initialization Vs assignment(构造函数初始化 Vs 赋值)
                  Is a `=default` move constructor equivalent to a member-wise move constructor?(`=default` 移动构造函数是否等同于成员移动构造函数?)
                  Has the new C++11 member initialization feature at declaration made initialization lists obsolete?(声明时新的 C++11 成员初始化功能是否使初始化列表过时了?)
                  Order of constructor call in virtual inheritance(虚继承中构造函数调用的顺序)
                  How to use sfinae for selecting constructors?(如何使用 sfinae 选择构造函数?)
                  Initializing a union with a non-trivial constructor(使用非平凡的构造函数初始化联合)
                • <tfoot id='aQa8D'></tfoot>

                      <bdo id='aQa8D'></bdo><ul id='aQa8D'></ul>

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

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

                        <legend id='aQa8D'><style id='aQa8D'><dir id='aQa8D'><q id='aQa8D'></q></dir></style></legend>