update boost
This commit is contained in:
@@ -57,8 +57,8 @@ all_gather_impl(const communicator& comm, const T* in_values, int n,
|
||||
std::vector<int> oasizes(nproc);
|
||||
int oasize = oa.size();
|
||||
BOOST_MPI_CHECK_RESULT(MPI_Allgather,
|
||||
(&oasize, 1, MPI_INTEGER,
|
||||
c_data(oasizes), 1, MPI_INTEGER,
|
||||
(&oasize, 1, MPI_INT,
|
||||
c_data(oasizes), 1, MPI_INT,
|
||||
MPI_Comm(comm)));
|
||||
// Gather the archives, which can be of different sizes, so
|
||||
// we need to use allgatherv.
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace detail {
|
||||
// implementation in this case.
|
||||
// it's not clear how/if we can avoid the copy.
|
||||
std::vector<T> tmp_in( out_values, out_values + n);
|
||||
reduce(comm, &(tmp_in[0]), n, out_values, op, 0);
|
||||
reduce(comm, detail::c_data(tmp_in), n, out_values, op, 0);
|
||||
} else {
|
||||
reduce(comm, in_values, n, out_values, op, 0);
|
||||
}
|
||||
|
||||
@@ -91,10 +91,10 @@ namespace detail {
|
||||
|
||||
// Transmit the actual data
|
||||
BOOST_MPI_CHECK_RESULT(MPI_Alltoallv,
|
||||
(&outgoing[0], &send_sizes[0],
|
||||
&send_disps[0], MPI_PACKED,
|
||||
&incoming[0], &recv_sizes[0],
|
||||
&recv_disps[0], MPI_PACKED,
|
||||
(detail::c_data(outgoing), detail::c_data(send_sizes),
|
||||
detail::c_data(send_disps), MPI_PACKED,
|
||||
detail::c_data(incoming), detail::c_data(recv_sizes),
|
||||
detail::c_data(recv_disps), MPI_PACKED,
|
||||
comm));
|
||||
|
||||
// Deserialize data from the iarchive
|
||||
@@ -126,7 +126,7 @@ all_to_all(const communicator& comm, const std::vector<T>& in_values,
|
||||
{
|
||||
BOOST_ASSERT((int)in_values.size() == comm.size());
|
||||
out_values.resize(comm.size());
|
||||
::boost::mpi::all_to_all(comm, &in_values[0], &out_values[0]);
|
||||
::boost::mpi::all_to_all(comm, detail::c_data(in_values), detail::c_data(out_values));
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
@@ -143,7 +143,7 @@ all_to_all(const communicator& comm, const std::vector<T>& in_values, int n,
|
||||
{
|
||||
BOOST_ASSERT((int)in_values.size() == comm.size() * n);
|
||||
out_values.resize(comm.size() * n);
|
||||
::boost::mpi::all_to_all(comm, &in_values[0], n, &out_values[0]);
|
||||
::boost::mpi::all_to_all(comm, detail::c_data(in_values), n, detail::c_data(out_values));
|
||||
}
|
||||
|
||||
} } // end namespace boost::mpi
|
||||
|
||||
@@ -69,8 +69,8 @@ gather_impl(const communicator& comm, const T* in_values, int n, T* out_values,
|
||||
std::vector<int> oasizes(is_root ? nproc : 0);
|
||||
int oasize = oa.size();
|
||||
BOOST_MPI_CHECK_RESULT(MPI_Gather,
|
||||
(&oasize, 1, MPI_INTEGER,
|
||||
c_data(oasizes), 1, MPI_INTEGER,
|
||||
(&oasize, 1, MPI_INT,
|
||||
c_data(oasizes), 1, MPI_INT,
|
||||
root, MPI_Comm(comm)));
|
||||
// Gather the archives, which can be of different sizes, so
|
||||
// we need to use gatherv.
|
||||
|
||||
@@ -87,7 +87,7 @@ gatherv(const communicator& comm, const T* in_values, int in_size,
|
||||
{
|
||||
if (comm.rank() == root)
|
||||
detail::gatherv_impl(comm, in_values, in_size,
|
||||
out_values, &sizes[0], &displs[0],
|
||||
out_values, detail::c_data(sizes), detail::c_data(displs),
|
||||
root, is_mpi_datatype<T>());
|
||||
else
|
||||
detail::gatherv_impl(comm, in_values, in_size, root, is_mpi_datatype<T>());
|
||||
@@ -99,7 +99,7 @@ gatherv(const communicator& comm, const std::vector<T>& in_values,
|
||||
T* out_values, const std::vector<int>& sizes, const std::vector<int>& displs,
|
||||
int root)
|
||||
{
|
||||
::boost::mpi::gatherv(comm, &in_values[0], in_values.size(), out_values, sizes, displs, root);
|
||||
::boost::mpi::gatherv(comm, detail::c_data(in_values), in_values.size(), out_values, sizes, displs, root);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
@@ -113,7 +113,7 @@ template<typename T>
|
||||
void gatherv(const communicator& comm, const std::vector<T>& in_values, int root)
|
||||
{
|
||||
BOOST_ASSERT(comm.rank() != root);
|
||||
detail::gatherv_impl(comm, &in_values[0], in_values.size(), root, is_mpi_datatype<T>());
|
||||
detail::gatherv_impl(comm, detail::c_data(in_values), in_values.size(), root, is_mpi_datatype<T>());
|
||||
}
|
||||
|
||||
///////////////////////
|
||||
@@ -139,7 +139,7 @@ void
|
||||
gatherv(const communicator& comm, const std::vector<T>& in_values,
|
||||
T* out_values, const std::vector<int>& sizes, int root)
|
||||
{
|
||||
::boost::mpi::gatherv(comm, &in_values[0], in_values.size(), out_values, sizes, root);
|
||||
::boost::mpi::gatherv(comm, detail::c_data(in_values), in_values.size(), out_values, sizes, root);
|
||||
}
|
||||
|
||||
} } // end namespace boost::mpi
|
||||
|
||||
@@ -335,7 +335,7 @@ void
|
||||
reduce(const communicator & comm, std::vector<T> const & in_values, Op op,
|
||||
int root)
|
||||
{
|
||||
reduce(comm, &in_values.front(), in_values.size(), op, root);
|
||||
reduce(comm, detail::c_data(in_values), in_values.size(), op, root);
|
||||
}
|
||||
|
||||
template<typename T, typename Op>
|
||||
@@ -344,7 +344,7 @@ reduce(const communicator & comm, std::vector<T> const & in_values,
|
||||
std::vector<T> & out_values, Op op, int root)
|
||||
{
|
||||
if (root == comm.rank()) out_values.resize(in_values.size());
|
||||
reduce(comm, &in_values.front(), in_values.size(), &out_values.front(), op,
|
||||
reduce(comm, detail::c_data(in_values), in_values.size(), detail::c_data(out_values), op,
|
||||
root);
|
||||
}
|
||||
|
||||
|
||||
@@ -100,8 +100,8 @@ dispatch_scatter_sendbuf(const communicator& comm,
|
||||
// Distribute the sizes
|
||||
int myarchsize;
|
||||
BOOST_MPI_CHECK_RESULT(MPI_Scatter,
|
||||
(non_const_data(archsizes), 1, MPI_INTEGER,
|
||||
&myarchsize, 1, MPI_INTEGER, root, comm));
|
||||
(non_const_data(archsizes), 1, MPI_INT,
|
||||
&myarchsize, 1, MPI_INT, root, comm));
|
||||
std::vector<int> offsets;
|
||||
if (root == comm.rank()) {
|
||||
sizes2offsets(archsizes, offsets);
|
||||
@@ -188,7 +188,7 @@ void
|
||||
scatter(const communicator& comm, const std::vector<T>& in_values,
|
||||
T* out_values, int n, int root)
|
||||
{
|
||||
::boost::mpi::scatter(comm, &in_values[0], out_values, n, root);
|
||||
::boost::mpi::scatter(comm, detail::c_data(in_values), out_values, n, root);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
||||
@@ -101,7 +101,7 @@ scatterv(const communicator& comm, const T* in_values,
|
||||
T* out_values, int out_size, int root)
|
||||
{
|
||||
using detail::c_data;
|
||||
scatterv_impl(comm, in_values, out_values, out_size, c_data(sizes), c_data(displs),
|
||||
detail::scatterv_impl(comm, in_values, out_values, out_size, c_data(sizes), c_data(displs),
|
||||
root, is_mpi_datatype<T>());
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ void
|
||||
scatterv(const communicator& comm, const std::vector<T>& in_values,
|
||||
const std::vector<int>& sizes, T* out_values, int root)
|
||||
{
|
||||
::boost::mpi::scatterv(comm, &in_values[0], sizes, out_values, root);
|
||||
::boost::mpi::scatterv(comm, detail::c_data(in_values), sizes, out_values, root);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
@@ -159,7 +159,7 @@ void
|
||||
scatterv(const communicator& comm, const std::vector<T>& in_values,
|
||||
T* out_values, int out_size, int root)
|
||||
{
|
||||
::boost::mpi::scatterv(comm, &in_values[0], out_values, out_size, root);
|
||||
::boost::mpi::scatterv(comm, detail::c_data(in_values), out_values, out_size, root);
|
||||
}
|
||||
|
||||
} } // end namespace boost::mpi
|
||||
|
||||
Reference in New Issue
Block a user