<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 中的并行化

        时间:2023-09-26

        <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 中的并行化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:使用 openmp &amp; 并行化 for 循环替换 push_back 下一篇:错误 C3017:OpenMP 'for' 语句中的终止测试形式不正确

                  相关文章

                • <tfoot id='aQa8D'></tfoot>

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

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

                  1. <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>
                    <legend id='aQa8D'><style id='aQa8D'><dir id='aQa8D'><q id='aQa8D'></q></dir></style></legend>