Skip to content

Commit

Permalink
Added explicit default destructor for ReactionNetwork
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipFackler committed Jan 22, 2025
1 parent efd625c commit 5c26600
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 2 additions & 0 deletions xolotl/core/include/xolotl/core/network/ReactionNetwork.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ class ReactionNetwork : public ReactionNetworkInterface<TImpl>::Type
ReactionNetwork(const std::vector<AmountType>& maxSpeciesAmounts,
IndexType gridSize, const options::IOptions& opts);

~ReactionNetwork();

KOKKOS_INLINE_FUNCTION
static constexpr std::size_t
getNumberOfSpecies() noexcept
Expand Down
13 changes: 9 additions & 4 deletions xolotl/core/include/xolotl/core/network/impl/ReactionNetwork.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace network
template <typename T>
DualViewWrapper<T>::DualViewWrapper(const std::string& label) :
_dualView(Kokkos::ViewAllocateWithoutInitializing(label)),
_hasInstance(true),
_hasInstance(true),
d_view(_dualView.d_view),
h_view(_dualView.h_view)
{
Expand All @@ -29,9 +29,9 @@ DualViewWrapper<T>::DualViewWrapper(const std::string& label) :
template <typename T>
DualViewWrapper<T>::~DualViewWrapper()
{
if (_hasInstance) {
h_view().~T();
}
if (_hasInstance) {
h_view().~T();
}
}

template <typename T>
Expand Down Expand Up @@ -167,6 +167,11 @@ ReactionNetwork<TImpl>::ReactionNetwork(
{
}

template <typename TImpl>
ReactionNetwork<TImpl>::~ReactionNetwork()
{
}

template <typename TImpl>
const std::string&
ReactionNetwork<TImpl>::getSpeciesLabel(SpeciesId id) const
Expand Down

0 comments on commit 5c26600

Please sign in to comment.