2
0
mirror of https://github.com/boostorg/mpi.git synced 2026-01-19 04:22:10 +00:00

More symbols need to be exported from Boost::mpi (maybe a change in the CMake build system?).

Add the BOOST_MPI_DECL where needed.
This commit is contained in:
Alain Miniussi
2025-05-05 21:35:30 +02:00
parent c548d5e726
commit 9478ab6d30
6 changed files with 19 additions and 15 deletions

View File

@@ -81,7 +81,7 @@ operator!=(cartesian_dimension const& d1, cartesian_dimension const& d2) {
/**
* @brief Pretty printing of a cartesian dimension (size, periodic)
*/
std::ostream& operator<<(std::ostream& out, cartesian_dimension const& d);
BOOST_MPI_DECL std::ostream& operator<<(std::ostream& out, cartesian_dimension const& d);
/**
* @brief Describe the topology of a cartesian grid.
@@ -235,7 +235,7 @@ operator!=(cartesian_topology const& t1, cartesian_topology const& t2) {
/**
* @brief Pretty printing of a cartesian topology
*/
std::ostream& operator<<(std::ostream& out, cartesian_topology const& t);
BOOST_MPI_DECL std::ostream& operator<<(std::ostream& out, cartesian_topology const& t);
/**
* @brief An MPI communicator with a cartesian topology.

View File

@@ -57,7 +57,7 @@ broadcast<const packed_skeleton_oarchive>(const communicator& comm,
* INTERNAL ONLY
*/
template<>
void
BOOST_MPI_DECL void
broadcast<packed_skeleton_oarchive>(const communicator& comm,
packed_skeleton_oarchive& oa, int root);
@@ -65,7 +65,7 @@ broadcast<packed_skeleton_oarchive>(const communicator& comm,
* INTERNAL ONLY
*/
template<>
void
BOOST_MPI_DECL void
broadcast<packed_skeleton_iarchive>(const communicator& comm,
packed_skeleton_iarchive& ia, int root);
@@ -73,13 +73,15 @@ broadcast<packed_skeleton_iarchive>(const communicator& comm,
* INTERNAL ONLY
*/
template<>
void broadcast<content>(const communicator& comm, content& c, int root);
BOOST_MPI_DECL void
broadcast<content>(const communicator& comm, content& c, int root);
/**
* INTERNAL ONLY
*/
template<>
void broadcast<const content>(const communicator& comm, const content& c,
BOOST_MPI_DECL void
broadcast<const content>(const communicator& comm, const content& c,
int root);
/************************************************************************

View File

@@ -9,6 +9,8 @@
#ifndef BOOST_MPI_COMPUTATION_TREE_HPP
#define BOOST_MPI_COMPUTATION_TREE_HPP
#include <boost/mpi/config.hpp>
namespace boost { namespace mpi { namespace detail {
/**
@@ -16,7 +18,7 @@ namespace boost { namespace mpi { namespace detail {
*
* Objects of this type
*/
class computation_tree
class BOOST_MPI_DECL computation_tree
{
public:
computation_tree(int rank, int size, int root, int branching_factor = -1);

View File

@@ -26,7 +26,7 @@ BOOST_MPI_DECL void sizes2offsets(std::vector<int> const& sizes, std::vector<int
// to each process in a scater) and a sequence of displacements (typically the
// slot index at with those record starts), convert the later to a number
// of skipped slots.
void offsets2skipped(int const* sizes, int const* offsets, int* skipped, int n);
BOOST_MPI_DECL void offsets2skipped(int const* sizes, int const* offsets, int* skipped, int n);
// Reconstruct offsets from sizes assuming no padding.
// Only takes place if on the root process and if
@@ -40,7 +40,7 @@ BOOST_MPI_DECL int* make_offsets(communicator const& comm, int const* sizes, int
// displs are provided.
// If memory was allocated, returns a pointer to it
// otherwise null.
int* make_skipped_slots(communicator const& comm, int const* sizes, int const* displs, int root = -1);
BOOST_MPI_DECL int* make_skipped_slots(communicator const& comm, int const* sizes, int const* displs, int root = -1);
}
}}// end namespace boost::mpi

View File

@@ -52,10 +52,10 @@ enum level {
};
/** Formated output for threading level. */
std::ostream& operator<<(std::ostream& out, level l);
BOOST_MPI_DECL std::ostream& operator<<(std::ostream& out, level l);
/** Formated input for threading level. */
std::istream& operator>>(std::istream& in, level& l);
BOOST_MPI_DECL std::istream& operator>>(std::istream& in, level& l);
} // namespace threading
/** @brief Initialize, finalize, and query the MPI environment.
*

View File

@@ -418,7 +418,7 @@ inline int target(const std::pair<int, int>& edge, const graph_communicator&)
* outgoing from the given vertex in a graph topology of a
* communicator.
*/
std::pair<detail::comm_out_edge_iterator, detail::comm_out_edge_iterator>
BOOST_MPI_DECL std::pair<detail::comm_out_edge_iterator, detail::comm_out_edge_iterator>
out_edges(int vertex, const graph_communicator& comm);
@@ -426,7 +426,7 @@ out_edges(int vertex, const graph_communicator& comm);
* @brief Returns the out-degree of a vertex in the graph topology of
* a communicator.
*/
int out_degree(int vertex, const graph_communicator& comm);
BOOST_MPI_DECL int out_degree(int vertex, const graph_communicator& comm);
// Adjacency Graph requirements
@@ -464,14 +464,14 @@ inline int num_vertices(const graph_communicator& comm) { return comm.size(); }
* @brief Returns an iterator range that contains all of the edges
* with the communicator's graph topology.
*/
std::pair<detail::comm_edge_iterator, detail::comm_edge_iterator>
BOOST_MPI_DECL std::pair<detail::comm_edge_iterator, detail::comm_edge_iterator>
edges(const graph_communicator& comm);
/**
* @brief Returns the number of edges in the communicator's graph
* topology.
*/
int num_edges(const graph_communicator& comm);
BOOST_MPI_DECL int num_edges(const graph_communicator& comm);
// Property Graph requirements