mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
get rid of unused serialization template
This commit is contained in:
@@ -46,31 +46,6 @@ public:
|
|||||||
Mpi::unpack(data, buffer, pos, m_comm);
|
Mpi::unpack(data, buffer, pos, m_comm);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T>
|
|
||||||
void staticBroadcast()
|
|
||||||
{
|
|
||||||
if (m_comm.size() == 1)
|
|
||||||
return;
|
|
||||||
|
|
||||||
#if HAVE_MPI
|
|
||||||
if (m_comm.rank() == 0) {
|
|
||||||
size_t size = T::packSize(*this);
|
|
||||||
std::vector<char> buffer(size);
|
|
||||||
int position = 0;
|
|
||||||
T::pack(buffer, position, *this);
|
|
||||||
m_comm.broadcast(&position, 1, 0);
|
|
||||||
m_comm.broadcast(buffer.data(), position, 0);
|
|
||||||
} else {
|
|
||||||
int size;
|
|
||||||
m_comm.broadcast(&size, 1, 0);
|
|
||||||
std::vector<char> buffer(size);
|
|
||||||
m_comm.broadcast(buffer.data(), size, 0);
|
|
||||||
int position = 0;
|
|
||||||
T::unpack(buffer, position, *this);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
void broadcast(T& data)
|
void broadcast(T& data)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user