From b6db05e1999b40a099532fdbf3f6d06973d22a72 Mon Sep 17 00:00:00 2001 From: Charles Hastings Date: Tue, 12 Sep 2023 18:33:08 -0700 Subject: [PATCH] another round of PR comments --- .../cugraph/mtmg/detail/per_device_edgelist.hpp | 17 +++++++++-------- .../cugraph/mtmg/per_thread_edgelist.hpp | 10 +++++----- 2 files changed, 14 insertions(+), 13 deletions(-) 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