per_v_pair_src_dst_nbr_intersection.cuh#

namespace cugraph

Functions

template<typename GraphViewType, typename VertexPairIterator>
std::tuple<rmm::device_uvector<size_t>, rmm::device_uvector<typename GraphViewType::vertex_type>> per_v_pair_src_nbr_intersection(
raft::handle_t const &handle,
GraphViewType const &graph_view,
VertexPairIterator vertex_pair_first,
VertexPairIterator vertex_pair_last,
bool do_expensive_check = false
)

Iterate over each input vertex pair and returns the common source neighbor list pair in a CSC-like format.

Iterate over every vertex pair; intersect source neighbor lists of the two vertices in the pair and store the result in a CSC-like format

Template Parameters:
  • GraphViewType – Type of the passed non-owning graph object.

  • VertexPairIterator – Type of the iterator for input vertex pairs.

Parameters:
  • handle – RAFT handle object to encapsulate resources (e.g. CUDA stream, communicator, and handles to various CUDA libraries) to run graph algorithms.

  • graph_view – Non-owning graph object.

  • vertex_pair_first – Iterator pointing to the first (inclusive) input vertex pair.

  • vertex_pair_last – Iterator pointing to the last (exclusive) input vertex pair.

  • do_expensive_check – A flag to run expensive checks for input arguments (if set to true).

Returns:

std::tuple Tuple of intersection offsets and indices.

template<typename GraphViewType, typename VertexPairIterator>
std::tuple<rmm::device_uvector<size_t>, rmm::device_uvector<typename GraphViewType::vertex_type>> per_v_pair_dst_nbr_intersection(
raft::handle_t const &handle,
GraphViewType const &graph_view,
VertexPairIterator vertex_pair_first,
VertexPairIterator vertex_pair_last,
bool do_expensive_check = false
)

Iterate over each input vertex pair and returns the common destination neighbor list pair in a CSR-like format.

Iterate over every vertex pair; intersect destination neighbor lists of the two vertices in the pair and store the result in a CSR-like format

Template Parameters:
  • GraphViewType – Type of the passed non-owning graph object.

  • VertexPairIterator – Type of the iterator for input vertex pairs.

Parameters:
  • handle – RAFT handle object to encapsulate resources (e.g. CUDA stream, communicator, and handles to various CUDA libraries) to run graph algorithms.

  • graph_view – Non-owning graph object.

  • vertex_pair_first – Iterator pointing to the first (inclusive) input vertex pair.

  • vertex_pair_last – Iterator pointing to the last (exclusive) input vertex pair.

  • do_expensive_check – A flag to run expensive checks for input arguments (if set to true).

Returns:

std::tuple Tuple of intersection offsets and indices.