diff --git a/cpp/include/cugraph/mtmg/detail/per_device_edgelist.hpp b/cpp/include/cugraph/mtmg/detail/per_device_edgelist.hpp index a4d36034be3..8011146ee4f 100644 --- a/cpp/include/cugraph/mtmg/detail/per_device_edgelist.hpp +++ b/cpp/include/cugraph/mtmg/detail/per_device_edgelist.hpp @@ -53,9 +53,10 @@ namespace detail { template class per_device_edgelist_t { public: + per_device_edgelist_t() = delete; per_device_edgelist_t(per_device_edgelist_t const&) = delete; per_device_edgelist_t& operator=(per_device_edgelist_t const&) = delete; - per_device_edgelist_t& operator=(per_device_edgelist_t&&) = default; + per_device_edgelist_t& operator=(per_device_edgelist_t&&) = delete; per_device_edgelist_t(cugraph::mtmg::handle_t const& handle, size_t device_buffer_size, @@ -83,7 +84,7 @@ class per_device_edgelist_t { per_device_edgelist_t(per_device_edgelist_t&& other) : device_buffer_size_{other.device_buffer_size_}, - current_pos_{0}, + current_pos_{other.current_pos_}, src_{std::move(other.src_)}, dst_{std::move(other.dst_)}, wgt_{std::move(other.wgt_)}, @@ -260,13 +261,13 @@ class per_device_edgelist_t { mutable std::mutex lock_{}; size_t current_pos_{0}; - size_t device_buffer_size_; + size_t device_buffer_size_{0}; - std::vector> src_; - std::vector> dst_; - std::optional>> wgt_; - std::optional>> edge_id_; - std::optional>> edge_type_; + std::vector> src_{}; + std::vector> dst_{}; + std::optional>> wgt_{}; + std::optional>> edge_id_{}; + std::optional>> edge_type_{}; }; } // namespace detail diff --git a/cpp/include/cugraph/mtmg/per_thread_edgelist.hpp b/cpp/include/cugraph/mtmg/per_thread_edgelist.hpp index e90088bea1b..b672db48719 100644 --- a/cpp/include/cugraph/mtmg/per_thread_edgelist.hpp +++ b/cpp/include/cugraph/mtmg/per_thread_edgelist.hpp @@ -163,11 +163,11 @@ class per_thread_edgelist_t { private: detail::per_device_edgelist_t& edgelist_; size_t current_pos_{0}; - std::vector src_; - std::vector dst_; - std::optional> wgt_; - std::optional> edge_id_; - std::optional> edge_type_; + std::vector src_{}; + std::vector dst_{}; + std::optional> wgt_{}; + std::optional> edge_id_{}; + std::optional> edge_type_{}; }; } // namespace mtmg