fixed: do not handle GuideRateConfig::GroupTarget as POD

valgrind is not happy
This commit is contained in:
Arne Morten Kvarving
2020-01-16 12:27:39 +01:00
parent 446af27a42
commit 1d68e37763

View File

@@ -447,7 +447,6 @@ HANDLE_AS_POD(data::Rates)
HANDLE_AS_POD(data::Segment)
HANDLE_AS_POD(DENSITYRecord)
HANDLE_AS_POD(Eqldims)
HANDLE_AS_POD(GuideRateConfig::GroupTarget);
HANDLE_AS_POD(MLimits)
HANDLE_AS_POD(PVTWRecord)
HANDLE_AS_POD(PVCDORecord)
@@ -1949,6 +1948,13 @@ std::size_t packSize(const GuideRateConfig::WellTarget& data,
packSize(data.scaling_factor, comm);
}
std::size_t packSize(const GuideRateConfig::GroupTarget& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.guide_rate, comm) +
packSize(data.target, comm);
}
////// pack routines
template<class T>
@@ -3799,6 +3805,14 @@ void pack(const GuideRateConfig::WellTarget& data,
pack(data.scaling_factor, buffer, position, comm);
}
void pack(const GuideRateConfig::GroupTarget& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.guide_rate, buffer, position, comm);
pack(data.target, buffer, position, comm);
}
/// unpack routines
template<class T>
@@ -6448,6 +6462,14 @@ void unpack(GuideRateConfig::WellTarget& data,
unpack(data.scaling_factor, buffer, position, comm);
}
void unpack(GuideRateConfig::GroupTarget& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
unpack(data.guide_rate, buffer, position, comm);
unpack(data.target, buffer, position, comm);
}
#define INSTANTIATE_PACK_VECTOR(T) \
template std::size_t packSize(const std::vector<T>& data, \
Dune::MPIHelper::MPICommunicator comm); \