Remove static at namespace scope

it's a remnant when all this was a class
parent 8db06fcb
......@@ -23,7 +23,7 @@
namespace unsafe_mpi {
template <typename T>
static void allgatherv_serialize(const boost::mpi::communicator &comm, const std::vector<T> &in, std::vector<T> &out) {
void allgatherv_serialize(const boost::mpi::communicator &comm, const std::vector<T> &in, std::vector<T> &out) {
// Step 1: serialize input data
boost::mpi::packed_oarchive oa(comm);
if (!in.empty())
......@@ -84,7 +84,7 @@ static void allgatherv_serialize(const boost::mpi::communicator &comm, const std
template <typename T, typename transmit_type=uint64_t>
static void allgatherv_unsafe(const boost::mpi::communicator &comm, const std::vector<T> &in, std::vector<T> &out) {
void allgatherv_unsafe(const boost::mpi::communicator &comm, const std::vector<T> &in, std::vector<T> &out) {
static_assert((sizeof(T)/sizeof(transmit_type)) * sizeof(transmit_type) == sizeof(T),
"Invalid transmit_type for element type (sizeof(transmit_type) is not a multiple of sizeof(T))");
......@@ -119,7 +119,7 @@ static void allgatherv_unsafe(const boost::mpi::communicator &comm, const std::v
}
template <typename T, typename transmit_type=uint64_t>
static void allgatherv(const boost::mpi::communicator &comm, const std::vector<T> &in, std::vector<T> &out) {
void allgatherv(const boost::mpi::communicator &comm, const std::vector<T> &in, std::vector<T> &out) {
// Trivial (enough) datatypes can be transmit directly via MPI_Allgatherv
// For all others, we have to serialize them using boost::serialize
if (is_trivial_enough<T>::value) {
......
......@@ -22,7 +22,7 @@
namespace unsafe_mpi {
template <typename T, typename transmit_type = uint64_t>
static void gatherv_trivial(const boost::mpi::communicator &comm,
void gatherv_trivial(const boost::mpi::communicator &comm,
const std::vector<T> &in, std::vector<T> &out,
const int root) {
......@@ -65,7 +65,7 @@ static void gatherv_trivial(const boost::mpi::communicator &comm,
// UNTESTED, mostly copied from allgatherv
template <typename T>
static void gatherv_serialize(const boost::mpi::communicator &comm, const std::vector<T> &in, std::vector<T> &out, const int root) {
void gatherv_serialize(const boost::mpi::communicator &comm, const std::vector<T> &in, std::vector<T> &out, const int root) {
// Step 1: serialize input data
boost::mpi::packed_oarchive oa(comm);
if (!in.empty())
......@@ -145,7 +145,7 @@ static void gatherv_serialize(const boost::mpi::communicator &comm, const std::v
template <typename T, typename transmit_type = uint64_t>
static void gatherv(const boost::mpi::communicator &comm, const std::vector<T> &in, std::vector<T> &out, const int root) {
void gatherv(const boost::mpi::communicator &comm, const std::vector<T> &in, std::vector<T> &out, const int root) {
if (is_trivial_enough<T>::value) {
gatherv_trivial<T, transmit_type>(comm, in, out, root);
} else {
......
......@@ -12,7 +12,7 @@ namespace unsafe_mpi {
// Send `size` elements of type `T` starting at `data` to `dest` via `comm` with `tag`,
// using trivial type `transmit_type` if `T` is Standard Layout
template <typename T, typename transmit_type = uint64_t>
static void send(const boost::mpi::communicator &comm, int dest, int tag, const T *data, const size_t size) {
void send(const boost::mpi::communicator &comm, int dest, int tag, const T *data, const size_t size) {
const bool trivial = is_trivial_enough<T>::value;
static_assert(!trivial || (sizeof(T)/sizeof(transmit_type)) * sizeof(transmit_type) == sizeof(T),
"Invalid transmit_type for element type (sizeof(transmit_type) is not a multiple of sizeof(T))");
......@@ -33,13 +33,13 @@ static void send(const boost::mpi::communicator &comm, int dest, int tag, const
// convenience wrapper for vectors
template <typename T, typename transmit_type = uint64_t>
static void send(const boost::mpi::communicator &comm, int dest, int tag, const std::vector<T> &data) {
void send(const boost::mpi::communicator &comm, int dest, int tag, const std::vector<T> &data) {
send<T, transmit_type>(comm, dest, tag, data.data(), data.size());
}
template <typename T, typename transmit_type = uint64_t>
static void recv(const boost::mpi::communicator &comm, int src, int tag, std::vector<T> &data) {
void recv(const boost::mpi::communicator &comm, int src, int tag, std::vector<T> &data) {
const bool trivial = is_trivial_enough<T>::value;
static_assert(!trivial || (sizeof(T)/sizeof(transmit_type)) * sizeof(transmit_type) == sizeof(T),
"Invalid transmit_type for element type (sizeof(transmit_type) is not a multiple of sizeof(T))");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment