edge_bucket.cuh#

namespace cugraph
template<typename vertex_t, typename edge_t, bool src_major = false, bool multi_gpu = false, bool sorted_unique = false>
class edge_bucket_t

Public Functions

inline edge_bucket_t(raft::handle_t const &handle, bool multigraph)#
inline edge_bucket_t(
raft::handle_t const &handle,
rmm::device_uvector<vertex_t> &&srcs,
rmm::device_uvector<vertex_t> &&dsts,
std::optional<rmm::device_uvector<edge_t>> &&multi_edge_indices
)#
inline void insert(
vertex_t src,
vertex_t dst,
std::optional<edge_t> multi_edge_index
)

@ brief insert an edge to the bucket

Parameters:
  • src – edge source vertex.

  • dst – edge destination vertex.

  • multi_edge_index – multi-edge index (for multi-graphs).

template<typename VertexIterator, typename MultiEdgeIndexIterator>
inline void insert(
VertexIterator src_first,
VertexIterator src_last,
VertexIterator dst_first,
std::optional<MultiEdgeIndexIterator> multi_edge_index_first
)

@ brief insert a list of edges to the bucket

Parameters:
  • src_first – Iterator pointing to the first (inclusive) element of the edge source vertices in device memory.

  • src_last – Iterator pointing to the last (exclusive) element of the edge source vertices stored in device memory.

  • dst_first – Iterator pointing to the first (inclusive) element of the edge destination vertices in device memory.

  • multi_edge_index_first – Iterator pointing to the first (inclusive) element of the multi-edge indices in device memory (for multi-graphs).

inline size_t size() const#
template<bool do_aggregate = multi_gpu>
inline std::enable_if_t<do_aggregate, size_t> aggregate_size(
) const#
template<bool do_aggregate = multi_gpu>
inline std::enable_if_t<!do_aggregate, size_t> aggregate_size(
) const#
inline void resize(size_t size)#
inline void clear()#
inline void shrink_to_fit()#
inline auto const src_begin() const#
inline auto src_begin()#
inline auto const src_end() const#
inline auto src_end()#
inline vertex_t const *src_data() const#
inline vertex_t *src_data()#
inline auto const dst_begin() const#
inline auto dst_begin()#
inline auto const dst_end() const#
inline auto dst_end()#
inline vertex_t const *dst_data() const#
inline vertex_t *dst_data()#
inline auto const multi_edge_index_begin() const#
inline auto multi_edge_index_begin()#
inline auto const multi_edge_index_end() const#
inline auto multi_edge_index_end()#
inline std::optional<edge_t const*> multi_edge_index_data() const#
inline std::optional<edge_t*> multi_edge_index_data()#

Public Static Attributes

static bool constexpr is_src_major = src_major#
static bool constexpr is_sorted_unique = sorted_unique#

Private Members

raft::handle_t const *handle_ptr_ = {nullptr}#
rmm::device_uvector<vertex_t> majors_#
rmm::device_uvector<vertex_t> minors_#
std::optional<rmm::device_uvector<edge_t>> multi_edge_indices_ = {std::nullopt}#