changed: handle all arrays in eclmpiserializer

thus we can remove support in MPIPacker
This commit is contained in:
Arne Morten Kvarving
2022-09-07 12:03:10 +02:00
parent 3164fa6154
commit 4cd9272a76
3 changed files with 13 additions and 39 deletions

View File

@@ -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)