libpressio 0.93.0
Loading...
Searching...
No Matches
serializable.h
Go to the documentation of this file.
1
5#ifndef LIBPRESSIO_SERIALIZABLE_H
6#define LIBPRESSIO_SERIALIZABLE_H
7
8#include <libdistributed/libdistributed_comm.h>
9#include <pressio_dtype.h>
10#include <pressio_compressor.h>
11
12struct pressio_data;
13struct pressio_option;
14struct pressio_options;
15
16
17namespace distributed {
18namespace comm {
19namespace serializer {
20
24template <>
25struct serializer<pressio_thread_safety> {
27 using mpi_type = std::false_type;
29 static MPI_Datatype dtype() { return MPI_INT; }
31 static std::string name() { return "pressio_thread_safety"; }
40 static int send(pressio_thread_safety const& dtype, int dest, int tag, MPI_Comm comm);
50 static int recv(pressio_thread_safety& dtype, int source, int tag, MPI_Comm comm, MPI_Status* status);
58 static int bcast(pressio_thread_safety& dtype, int root, MPI_Comm comm);
59};
60
64template <>
65struct serializer<pressio_dtype> {
67 using mpi_type = std::false_type;
69 static MPI_Datatype dtype() { return MPI_INT; }
71 static std::string name() { return "pressio_data"; }
80 static int send(pressio_dtype const& dtype, int dest, int tag, MPI_Comm comm);
90 static int recv(pressio_dtype& dtype, int source, int tag, MPI_Comm comm, MPI_Status* status);
98 static int bcast(pressio_dtype& dtype, int root, MPI_Comm comm);
99};
100
104template <>
105struct serializer<pressio_data> {
107 using mpi_type = std::false_type;
109 static MPI_Datatype dtype() { return MPI_INT; }
111 static std::string name() { return "pressio_data"; }
120 static int send(pressio_data const& data, int dest, int tag, MPI_Comm comm);
130 static int recv(pressio_data& data, int source, int tag, MPI_Comm comm, MPI_Status* status);
138 static int bcast(pressio_data& data, int root, MPI_Comm comm);
139};
140
144template <>
145struct serializer<pressio_option> {
147 using mpi_type = std::false_type;
149 static MPI_Datatype dtype() { return MPI_INT; }
151 static std::string name() { return "pressio_data"; }
160 static int send(pressio_option const& data, int dest, int tag, MPI_Comm comm);
170 static int recv(pressio_option& data, int source, int tag, MPI_Comm comm, MPI_Status* status);
178 static int bcast(pressio_option& data, int root, MPI_Comm comm);
179};
180
184template <>
185struct serializer<pressio_options> {
187 using mpi_type = std::false_type;
189 static MPI_Datatype dtype() { return MPI_INT; }
191 static std::string name() { return "pressio_data"; }
200 static int send(pressio_options const& data, int dest, int tag, MPI_Comm comm);
210 static int recv(pressio_options& data, int source, int tag, MPI_Comm comm, MPI_Status* status);
218 static int bcast(pressio_options& data, int root, MPI_Comm comm);
219};
220
221}
222}
223}
224
225
226#endif /* end of include guard: LIBPRESSIO_SERIALIZABLE_H */
Compress, decompress, and configure pressio and lossless compressors.
pressio_thread_safety
Definition: pressio_compressor.h:268
Information on types used by libpressio.
pressio_dtype
Definition: pressio_dtype.h:16
static int recv(pressio_data &data, int source, int tag, MPI_Comm comm, MPI_Status *status)
static int send(pressio_data const &data, int dest, int tag, MPI_Comm comm)
std::false_type mpi_type
Definition: serializable.h:107
static std::string name()
Definition: serializable.h:111
static int bcast(pressio_data &data, int root, MPI_Comm comm)
static MPI_Datatype dtype()
Definition: serializable.h:109
static int recv(pressio_dtype &dtype, int source, int tag, MPI_Comm comm, MPI_Status *status)
static int send(pressio_dtype const &dtype, int dest, int tag, MPI_Comm comm)
static int bcast(pressio_dtype &dtype, int root, MPI_Comm comm)
static std::string name()
Definition: serializable.h:71
std::false_type mpi_type
Definition: serializable.h:67
static MPI_Datatype dtype()
Definition: serializable.h:69
static int bcast(pressio_option &data, int root, MPI_Comm comm)
static int recv(pressio_option &data, int source, int tag, MPI_Comm comm, MPI_Status *status)
static int send(pressio_option const &data, int dest, int tag, MPI_Comm comm)
static std::string name()
Definition: serializable.h:151
static MPI_Datatype dtype()
Definition: serializable.h:149
std::false_type mpi_type
Definition: serializable.h:147
static int send(pressio_options const &data, int dest, int tag, MPI_Comm comm)
static MPI_Datatype dtype()
Definition: serializable.h:189
static int recv(pressio_options &data, int source, int tag, MPI_Comm comm, MPI_Status *status)
std::false_type mpi_type
Definition: serializable.h:187
static std::string name()
Definition: serializable.h:191
static int bcast(pressio_options &data, int root, MPI_Comm comm)
static int bcast(pressio_thread_safety &dtype, int root, MPI_Comm comm)
static MPI_Datatype dtype()
Definition: serializable.h:29
static std::string name()
Definition: serializable.h:31
std::false_type mpi_type
Definition: serializable.h:27
static int recv(pressio_thread_safety &dtype, int source, int tag, MPI_Comm comm, MPI_Status *status)
static int send(pressio_thread_safety const &dtype, int dest, int tag, MPI_Comm comm)
Definition: data.h:52
Definition: options.h:80
Definition: options.h:352