资源简介

该程序基于 Boost 和 MPI 实现了Cannon 算法实现对矩阵得并行求积。

资源截图

代码片段和文件信息

/* 
 * File:   auxiliary.cpp
 * Author: Bo Xiao
 * 
 * Created on September 5 2009 11:47 PM
 */

#include “auxiliary.hpp“
#include “prerequisites.hpp“

namespace exception {

    void log_exception_info(std::string& info) {
        boost::mpi::communicator world;
        if (world.rank() == 0) {
            std::cerr << info << std::endl;
        }
    }
    void log_exception_info(const char* info) {
        boost::mpi::communicator world;
        if (world.rank() == 0) {
            std::cerr << info << std::endl;
        }
    }
}
namespace statistics {

    void output_speedup(double ts double tp) {
        boost::mpi::communicator world;
        if (world.rank() == 0) {
            std::cout << “speed up : “ << ts / tp << “X“ << std::endl;
        }
    }
}


 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2009-09-10 11:10  parallel_matrix_multiply_demo\
     文件         144  2009-09-08 15:36  parallel_matrix_multiply_demo\.dep.inc
     文件       12292  2009-09-10 11:10  parallel_matrix_multiply_demo\.DS_Store
     目录           0  2009-09-10 11:10  __MACOSX\
     目录           0  2009-09-10 11:10  __MACOSX\parallel_matrix_multiply_demo\
     文件          82  2009-09-10 11:10  __MACOSX\parallel_matrix_multiply_demo\._.DS_Store
     目录           0  2009-09-08 15:36  parallel_matrix_multiply_demo\.svn\
     文件        3255  2009-09-08 15:36  parallel_matrix_multiply_demo\.svn\all-wcprops
     文件        4192  2009-09-08 15:36  parallel_matrix_multiply_demo\.svn\entries
     目录           0  2009-09-05 00:01  parallel_matrix_multiply_demo\.svn\prop-base\
     目录           0  2009-09-05 00:01  parallel_matrix_multiply_demo\.svn\props\
     目录           0  2009-09-08 15:36  parallel_matrix_multiply_demo\.svn\text-base\
     文件         144  2009-09-05 00:03  parallel_matrix_multiply_demo\.svn\text-base\.dep.inc.svn-base
     文件         777  2009-09-06 00:49  parallel_matrix_multiply_demo\.svn\text-base\auxiliary.cpp.netbeans-base
     文件         777  2009-09-06 00:49  parallel_matrix_multiply_demo\.svn\text-base\auxiliary.cpp.svn-base
     文件         393  2009-09-06 00:49  parallel_matrix_multiply_demo\.svn\text-base\auxiliary.hpp.netbeans-base
     文件         393  2009-09-06 00:49  parallel_matrix_multiply_demo\.svn\text-base\auxiliary.hpp.svn-base
     文件         431  2009-09-08 15:33  parallel_matrix_multiply_demo\.svn\text-base\common.hpp.netbeans-base
     文件         431  2009-09-08 15:33  parallel_matrix_multiply_demo\.svn\text-base\common.hpp.svn-base
     文件         928  2009-09-05 00:03  parallel_matrix_multiply_demo\.svn\text-base\compare_results.cpp.netbeans-base
     文件         928  2009-09-05 00:03  parallel_matrix_multiply_demo\.svn\text-base\compare_results.cpp.svn-base
     文件         316  2009-09-05 00:03  parallel_matrix_multiply_demo\.svn\text-base\compare_results.hpp.netbeans-base
     文件         316  2009-09-05 00:03  parallel_matrix_multiply_demo\.svn\text-base\compare_results.hpp.svn-base
     文件        1529  2009-09-08 15:36  parallel_matrix_multiply_demo\.svn\text-base\config.cpp.netbeans-base
     文件        1529  2009-09-08 15:36  parallel_matrix_multiply_demo\.svn\text-base\config.cpp.svn-base
     文件        3472  2009-09-05 00:03  parallel_matrix_multiply_demo\.svn\text-base\config.hpp.netbeans-base
     文件        3472  2009-09-05 00:03  parallel_matrix_multiply_demo\.svn\text-base\config.hpp.svn-base
     文件        1759  2009-09-06 00:49  parallel_matrix_multiply_demo\.svn\text-base\main.cpp.netbeans-base
     文件        1759  2009-09-06 00:49  parallel_matrix_multiply_demo\.svn\text-base\main.cpp.svn-base
     文件        3157  2009-09-05 00:03  parallel_matrix_multiply_demo\.svn\text-base\Makefile.svn-base
     文件        1403  2009-09-06 00:49  parallel_matrix_multiply_demo\.svn\text-base\matirx_randomize.hpp.netbeans-base
............此处省略100个文件信息

评论

共有 条评论