mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
changed: handle all arrays in eclmpiserializer
thus we can remove support in MPIPacker
This commit is contained in:
@@ -92,6 +92,8 @@ public:
|
||||
optional(data);
|
||||
} else if constexpr (is_map<T>::value) {
|
||||
map(const_cast<T&>(data));
|
||||
} else if constexpr (is_array<T>::value) {
|
||||
array(const_cast<T&>(data));
|
||||
} else {
|
||||
if (m_op == Operation::PACKSIZE)
|
||||
m_packSize += Mpi::packSize(data, m_comm);
|
||||
@@ -503,6 +505,17 @@ protected:
|
||||
constexpr static bool value = true;
|
||||
};
|
||||
|
||||
//! \brief Predicate for arrays
|
||||
template<class T>
|
||||
struct is_array {
|
||||
constexpr static bool value = false;
|
||||
};
|
||||
|
||||
template<class T, std::size_t N>
|
||||
struct is_array<std::array<T,N>> {
|
||||
constexpr static bool value = true;
|
||||
};
|
||||
|
||||
//! Detect existence of \c serializeOp member function
|
||||
//!
|
||||
//! Base case (no \c serializeOp member function)
|
||||
|
||||
Reference in New Issue
Block a user