这篇教程C++ BOOST_MPI_CHECK_RESULT函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中BOOST_MPI_CHECK_RESULT函数的典型用法代码示例。如果您正苦于以下问题:C++ BOOST_MPI_CHECK_RESULT函数的具体用法?C++ BOOST_MPI_CHECK_RESULT怎么用?C++ BOOST_MPI_CHECK_RESULT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了BOOST_MPI_CHECK_RESULT函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: get_mpi_datatype // create and return the custom MPI data type MPI_Datatype get_mpi_datatype() { if (!is_committed) {#if defined(MPI_VERSION) && MPI_VERSION >= 2 BOOST_MPI_CHECK_RESULT(MPI_Type_create_struct, ( addresses.size(), boost::serialization::detail::get_data(lengths), boost::serialization::detail::get_data(addresses), boost::serialization::detail::get_data(types), &datatype_ ));#else BOOST_MPI_CHECK_RESULT(MPI_Type_struct, ( addresses.size(), boost::serialization::detail::get_data(lengths), boost::serialization::detail::get_data(addresses), boost::serialization::detail::get_data(types), &datatype_ ));#endif BOOST_MPI_CHECK_RESULT(MPI_Type_commit,(&datatype_)); is_committed = true; } return datatype_; }
开发者ID:13W,项目名称:icq-desktop,代码行数:31,
示例2: mpi_datatype_primitive mpi_datatype_primitive(void const* orig) : is_committed(false), origin() {#if defined(MPI_VERSION) && MPI_VERSION >= 2 BOOST_MPI_CHECK_RESULT(MPI_Get_address,(const_cast<void*>(orig), &origin));#else BOOST_MPI_CHECK_RESULT(MPI_Address,(const_cast<void*>(orig), &origin));#endif }
开发者ID:13W,项目名称:icq-desktop,代码行数:10,
示例3: save_impl void save_impl(void const * p, MPI_Datatype t, int l) { BOOST_ASSERT ( !is_committed ); // store address, type and length MPI_Aint a;#if defined(MPI_VERSION) && MPI_VERSION >= 2 BOOST_MPI_CHECK_RESULT(MPI_Get_address,(const_cast<void*>(p), &a));#else BOOST_MPI_CHECK_RESULT(MPI_Address,(const_cast<void*>(p), &a));#endif addresses.push_back(a-origin); types.push_back(t); lengths.push_back(l); }
开发者ID:13W,项目名称:icq-desktop,代码行数:16,
示例4: BOOST_MPI_CHECK_RESULTbool communicator::has_cartesian_topology() const{ int status; BOOST_MPI_CHECK_RESULT(MPI_Topo_test, ((MPI_Comm)*this, &status)); return status == MPI_CART;}
开发者ID:AsherBond,项目名称:PDAL,代码行数:7,
示例5: switchcommunicator::communicator(const MPI_Comm& comm, comm_create_kind kind){ if (comm == MPI_COMM_NULL) /* MPI_COMM_NULL indicates that the communicator is not usable. */ return; switch (kind) { case comm_duplicate: { MPI_Comm newcomm; BOOST_MPI_CHECK_RESULT(MPI_Comm_dup, (comm, &newcomm)); comm_ptr.reset(new MPI_Comm(newcomm), comm_free()); MPI_Errhandler_set(newcomm, MPI_ERRORS_RETURN); break; } case comm_take_ownership: comm_ptr.reset(new MPI_Comm(comm), comm_free()); break; case comm_attach: comm_ptr.reset(new MPI_Comm(comm)); break; }}
开发者ID:AsherBond,项目名称:PDAL,代码行数:25,
示例6: BOOST_MPI_CHECK_RESULTintcartesian_communicator::ndims() const { int n = -1; BOOST_MPI_CHECK_RESULT(MPI_Cartdim_get, (MPI_Comm(*this), &n)); return n;}
开发者ID:LocutusOfBorg,项目名称:poedit,代码行数:7,
示例7: communicatorcartesian_communicator::cartesian_communicator(const communicator& comm, const cartesian_topology& topology, bool reorder ) : communicator(MPI_COMM_NULL, comm_attach) { std::vector<int> dims(topology.size()); std::vector<int> periodic(topology.size()); int tsz = topology.size(); for(int i = 0; i < tsz; ++i) { dims[i] = topology[i].size; periodic[i] = topology[i].periodic; } // Fill the gaps, if any if (std::count(dims.begin(), dims.end(), 0) > 0) { cartesian_dimensions(comm, dims); } MPI_Comm newcomm; BOOST_MPI_CHECK_RESULT(MPI_Cart_create, ((MPI_Comm)comm, dims.size(), c_data(dims), c_data(periodic), int(reorder), &newcomm)); if(newcomm != MPI_COMM_NULL) { comm_ptr.reset(new MPI_Comm(newcomm), comm_free()); }}
开发者ID:LocutusOfBorg,项目名称:poedit,代码行数:25,
示例8: cbufstd::vector<int>cartesian_communicator::coordinates(int rk) const { std::vector<int> cbuf(ndims()); BOOST_MPI_CHECK_RESULT(MPI_Cart_coords, (MPI_Comm(*this), rk, cbuf.size(), c_data(cbuf) )); return cbuf;}
开发者ID:LocutusOfBorg,项目名称:poedit,代码行数:7,
示例9: BOOST_MPI_CHECK_RESULTcommunicator::communicator(const communicator& comm, const boost::mpi::group& subgroup){ MPI_Comm newcomm; BOOST_MPI_CHECK_RESULT(MPI_Comm_create, ((MPI_Comm)comm, (MPI_Group)subgroup, &newcomm)); comm_ptr.reset(new MPI_Comm(newcomm), comm_free());}
开发者ID:darwin,项目名称:boost,代码行数:8,
示例10: rstd::pair<int, int>cartesian_communicator::shifted_ranks(int dim, int disp) const { std::pair<int, int> r(-1,-1); assert(0 <= dim && dim < ndims()); BOOST_MPI_CHECK_RESULT(MPI_Cart_shift, (MPI_Comm(*this), dim, disp, &(r.first), &(r.second))); return r;}
开发者ID:LocutusOfBorg,项目名称:poedit,代码行数:8,
示例11: user_op explicit user_op(Op& op) { BOOST_MPI_CHECK_RESULT(MPI_Op_create, (&user_op<Op, T>::perform, is_commutative<Op, T>::value, &mpi_op)); op_ptr = &op; }
开发者ID:SCUSIT,项目名称:PDAL,代码行数:9,
示例12: BOOST_MPI_CHECK_RESULTstatus communicator::probe(int source, int tag) const{ typedef optional<status> result_type; status stat; BOOST_MPI_CHECK_RESULT(MPI_Probe, (source, tag, MPI_Comm(*this), &stat.m_status)); return stat;}
开发者ID:vbudovski,项目名称:mpi,代码行数:9,
示例13: all_gather_implvoidall_gather_impl(const communicator& comm, const T* in_values, int n, T* out_values, mpl::true_){ MPI_Datatype type = get_mpi_datatype<T>(*in_values); BOOST_MPI_CHECK_RESULT(MPI_Allgather, (const_cast<T*>(in_values), n, type, out_values, n, type, comm));}
开发者ID:LocutusOfBorg,项目名称:poedit,代码行数:9,
示例14: scatter_impl void scatter_impl(const communicator& comm, const T* in_values, T* out_values, int n, int root, mpl::true_) { MPI_Datatype type = get_mpi_datatype<T>(*in_values); BOOST_MPI_CHECK_RESULT(MPI_Scatter, (const_cast<T*>(in_values), n, type, out_values, n, type, root, comm)); }
开发者ID:Niko-r,项目名称:geofeatures,代码行数:9,
示例15: assertintcartesian_communicator::rank(const std::vector<int>& coords ) const { int r = -1; assert(int(coords.size()) == ndims()); BOOST_MPI_CHECK_RESULT(MPI_Cart_rank, (MPI_Comm(*this), c_data(const_cast<std::vector<int>&>(coords)), &r)); return r;}
开发者ID:LocutusOfBorg,项目名称:poedit,代码行数:9,
示例16: scan_impl void scan_impl(const communicator& comm, const T* in_values, int n, T* out_values, Op op, mpl::true_ /*is_mpi_op*/, mpl::true_ /*is_mpi_datatype*/) { BOOST_MPI_CHECK_RESULT(MPI_Scan, (const_cast<T*>(in_values), out_values, n, boost::mpi::get_mpi_datatype<T>(*in_values), (is_mpi_op<Op, T>::op()), comm)); }
开发者ID:0xDEC0DE8,项目名称:mcsema,代码行数:9,
示例17: broadcast_impl void broadcast_impl(const communicator& comm, T* values, int n, int root, mpl::true_) { BOOST_MPI_CHECK_RESULT(MPI_Bcast, (values, n, boost::mpi::get_mpi_datatype<T>(*values), root, MPI_Comm(comm))); }
开发者ID:imos,项目名称:icfpc2015,代码行数:9,
示例18: reduce_impl void reduce_impl(const communicator& comm, const T* in_values, int n, Op op, int root, mpl::true_ /*is_mpi_op*/, mpl::true_/*is_mpi_datatype*/) { BOOST_MPI_CHECK_RESULT(MPI_Reduce, (const_cast<T*>(in_values), 0, n, boost::mpi::get_mpi_datatype<T>(*in_values), (is_mpi_op<Op, T>::op()), root, comm)); }
开发者ID:8573,项目名称:anura,代码行数:9,
注:本文中的BOOST_MPI_CHECK_RESULT函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ BOOST_PP_ENUM_PARAMS函数代码示例 C++ BOOST_LOG_SEV函数代码示例 |