mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-09-05 04:40:19 -05:00
Merge pull request #4092 from akva2/serializer_handle_arrays
changed: handle all arrays in eclmpiserializer
This commit is contained in:
@@ -153,12 +153,6 @@ std::size_t packSize(const std::string& str, Opm::Parallel::MPIComm comm)
|
||||
return packSize(str.c_str(), comm);
|
||||
}
|
||||
|
||||
template<class T, std::size_t N>
|
||||
std::size_t packSize(const std::array<T,N>& data, Opm::Parallel::MPIComm comm)
|
||||
{
|
||||
return N*packSize(data[0], comm);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
struct Packing
|
||||
{
|
||||
@@ -284,14 +278,6 @@ void pack(const std::unordered_set<T,H,KE,A>& data,
|
||||
}
|
||||
}
|
||||
|
||||
template<class T, size_t N>
|
||||
void pack(const std::array<T,N>& data, std::vector<char>& buffer, int& position,
|
||||
Opm::Parallel::MPIComm comm)
|
||||
{
|
||||
for (const T& entry : data)
|
||||
pack(entry, buffer, position, comm);
|
||||
}
|
||||
|
||||
template<class A>
|
||||
void pack(const std::vector<bool,A>& data, std::vector<char>& buffer, int& position,
|
||||
Opm::Parallel::MPIComm comm)
|
||||
@@ -492,14 +478,6 @@ void unpack(std::unordered_set<T,H,KE,A>& data,
|
||||
}
|
||||
}
|
||||
|
||||
template<class T, size_t N>
|
||||
void unpack(std::array<T,N>& data, std::vector<char>& buffer, int& position,
|
||||
Opm::Parallel::MPIComm comm)
|
||||
{
|
||||
for (T& entry : data)
|
||||
unpack(entry, buffer, position, comm);
|
||||
}
|
||||
|
||||
void unpack(char* str, std::size_t length, std::vector<char>& buffer, int& position,
|
||||
Opm::Parallel::MPIComm comm)
|
||||
{
|
||||
@@ -564,7 +542,6 @@ INSTANTIATE_PACK_VECTOR(unsigned int)
|
||||
INSTANTIATE_PACK_VECTOR(unsigned long int)
|
||||
INSTANTIATE_PACK_VECTOR(unsigned long long int)
|
||||
INSTANTIATE_PACK_VECTOR(std::time_t)
|
||||
INSTANTIATE_PACK_VECTOR(std::array<double, 3>)
|
||||
INSTANTIATE_PACK_VECTOR(std::pair<bool,double>)
|
||||
INSTANTIATE_PACK_VECTOR(std::pair<std::string,std::vector<size_t>>)
|
||||
INSTANTIATE_PACK_VECTOR(std::pair<int,std::vector<int>>)
|
||||
@@ -593,11 +570,6 @@ INSTANTIATE_PACK(unsigned char)
|
||||
INSTANTIATE_PACK(unsigned int)
|
||||
INSTANTIATE_PACK(unsigned long int)
|
||||
INSTANTIATE_PACK(unsigned long long int)
|
||||
INSTANTIATE_PACK(std::array<short,3>)
|
||||
INSTANTIATE_PACK(std::array<bool,3>)
|
||||
INSTANTIATE_PACK(std::array<int,3>)
|
||||
INSTANTIATE_PACK(std::array<double,4>)
|
||||
INSTANTIATE_PACK(std::array<double,5>)
|
||||
INSTANTIATE_PACK(std::pair<double, double>)
|
||||
INSTANTIATE_PACK(std::unordered_set<std::string>)
|
||||
INSTANTIATE_PACK(std::set<std::string>)
|
||||
|
||||
@@ -97,9 +97,6 @@ std::size_t packSize(const std::vector<bool,A>& data, Opm::Parallel::MPIComm com
|
||||
template<class... Ts>
|
||||
std::size_t packSize(const std::tuple<Ts...>& data, Opm::Parallel::MPIComm comm);
|
||||
|
||||
template<class T, std::size_t N>
|
||||
std::size_t packSize(const std::array<T,N>& data, Opm::Parallel::MPIComm comm);
|
||||
|
||||
std::size_t packSize(const char* str, Opm::Parallel::MPIComm comm);
|
||||
|
||||
template<std::size_t Size>
|
||||
@@ -174,10 +171,6 @@ void pack(const std::unordered_set<T,H,KE,A>& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Opm::Parallel::MPIComm comm);
|
||||
|
||||
template<class T, size_t N>
|
||||
void pack(const std::array<T,N>& data, std::vector<char>& buffer, int& position,
|
||||
Opm::Parallel::MPIComm comm);
|
||||
|
||||
void pack(const char* str, std::vector<char>& buffer, int& position,
|
||||
Opm::Parallel::MPIComm comm);
|
||||
|
||||
@@ -255,10 +248,6 @@ void unpack(std::unordered_set<T,H,KE,A>& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Opm::Parallel::MPIComm comm);
|
||||
|
||||
template<class T, size_t N>
|
||||
void unpack(std::array<T,N>& data, std::vector<char>& buffer, int& position,
|
||||
Opm::Parallel::MPIComm comm);
|
||||
|
||||
void unpack(char* str, std::size_t length, std::vector<char>& buffer, int& position,
|
||||
Opm::Parallel::MPIComm comm);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user