per_v_pair_transform_src_dst_nbr_intersection.cuh#

namespace cugraph

Functions

template<typename GraphViewType, typename VertexPairIterator, typename VertexValueInputIterator, typename EdgeValueInputWrapper, typename IntersectionOp, typename VertexPairValueOutputIterator>
void per_v_pair_transform_src_nbr_intersection(
raft::handle_t const &handle,
GraphViewType const &graph_view,
EdgeValueInputWrapper edge_value_input,
VertexPairIterator vertex_pair_first,
VertexPairIterator vertex_pair_last,
VertexValueInputIterator vertex_value_input_first,
IntersectionOp intersection_op,
VertexPairValueOutputIterator vertex_pair_value_output_first,
bool do_expensive_check = false
)

Iterate over each input vertex pair and apply a functor to the common source neighbor list of the pair.

Iterate over every vertex pair; intersect source neighbor lists of the two vertices in the pair; invoke a user-provided functor, and store the functor output.

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

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

  • VertexValueInputIterator – Type of the iterator for vertex property values.

  • EdgeValueInputIterator – Type of the iterator for edge property values.

  • IntersectionOp – Type of the quinary per intersection operator.

  • VertexPairValueOutputIterator – Type of the iterator for vertex pair output property variables.

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.

  • edge_value_input – Wrapper used to access edge input property values (for the edges assigned to this process in multi-GPU). Use either cugraph::edge_property_t::view() (if e_op needs to access edge property values) or cugraph::edge_dummy_property_t::view() (if e_op does not access edge property values).

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

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

  • vertex_value_input_first – Iterator pointing to the vertex property value for the first (inclusive) vertex (of the vertex partition assigned to this process in multi-GPU). vertex_value_input_last (exclusive) is deduced as vertex_value_input_first + graph_view.local_vertex_partition_range_size().

  • intersection_op – quinary operator takes first vertex of the pair, second vertex of the pair, property values for the first vertex, property values for the second vertex, and a list of vertices in the intersection of the first & second vertices’ source neighbors and returns an output value for the input pair.

  • vertex_pair_value_output_first – Iterator pointing to the vertex pair property variables for the first vertex pair (inclusive). vertex_pair_value_output_last (exclusive) is deduced as vertex_pair_value_output_first + cuda::std::distance(vertex_pair_first, vertex_pair_last).

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

template<typename GraphViewType, typename VertexPairIterator, typename VertexValueInputIterator, typename EdgeValueInputWrapper, typename IntersectionOp, typename VertexPairValueOutputIterator>
void per_v_pair_transform_dst_nbr_intersection(
raft::handle_t const &handle,
GraphViewType const &graph_view,
EdgeValueInputWrapper edge_value_input,
VertexPairIterator vertex_pair_first,
VertexPairIterator vertex_pair_last,
VertexValueInputIterator vertex_value_input_first,
IntersectionOp intersection_op,
VertexPairValueOutputIterator vertex_pair_value_output_first,
bool do_expensive_check = false
)

Iterate over each input vertex pair and apply a functor to the common destination neighbor list of the pair.

Iterate over every vertex pair; intersect destination neighbor lists of the two vertices in the pair; invoke a user-provided functor, and store the functor output.

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

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

  • VertexValueInputIterator – Type of the iterator for vertex property values.

  • EdgeValueInputIterator – Type of the iterator for edge property values.

  • IntersectionOp – Type of the quinary per intersection operator.

  • VertexPairValueOutputIterator – Type of the iterator for vertex pair output property variables.

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.

  • edge_value_input – Wrapper used to access edge input property values (for the edges assigned to this process in multi-GPU). Use either cugraph::edge_property_t::view() (if e_op needs to access edge property values) or cugraph::edge_dummy_property_t::view() (if e_op does not access edge property values).

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

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

  • vertex_value_input_first – Iterator pointing to the vertex property value for the first (inclusive) vertex (of the vertex partition assigned to this process in multi-GPU). vertex_value_input_last (exclusive) is deduced as vertex_value_input_first + graph_view.local_vertex_partition_range_size().

  • intersection_op – quinary operator takes first vertex of the pair, second vertex of the pair, property values for the first vertex, property values for the second vertex, and a list of vertices in the intersection of the first & second vertices’ destination neighbors and returns an output value for the input pair.

  • vertex_pair_value_output_first – Iterator pointing to the vertex pair property variables for the first vertex pair (inclusive). vertex_pair_value_output_last (exclusive) is deduced as vertex_pair_value_output_first + cuda::std::distance(vertex_pair_first, vertex_pair_last).

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

namespace detail

Functions

template<typename GraphViewType, typename VertexPairIterator, typename VertexValueInputIterator, typename EdgeValueInputWrapper, typename IntersectionOp, typename VertexPairValueOutputIterator>
void per_v_pair_transform_minor_nbr_intersection(
raft::handle_t const &handle,
GraphViewType const &graph_view,
EdgeValueInputWrapper edge_value_input,
VertexPairIterator vertex_pair_first,
VertexPairIterator vertex_pair_last,
VertexValueInputIterator vertex_value_input_first,
IntersectionOp intersection_op,
VertexPairValueOutputIterator vertex_pair_value_output_first,
bool do_expensive_check = false
)
template<typename GraphViewType, typename VertexValueInputIterator, typename EdgeValueInputIterator, typename IntersectionOp, typename VertexPairIndexIterator, typename VertexPairIterator, typename VertexPairValueOutputIterator>
struct call_intersection_op_t

Public Functions

inline __device__ void operator() (size_t i) const

Public Members

edge_partition_device_view_t<typename GraphViewType::vertex_type, typename GraphViewType::edge_type, GraphViewType::is_multi_gpu> edge_partition = {}#
cuda::std::optional<raft::device_span<typename GraphViewType::vertex_type const>> unique_vertices#
VertexValueInputIterator vertex_property_first#
IntersectionOp intersection_op = {}#
size_t const *nbr_offsets = {nullptr}#
GraphViewType::vertex_type const *nbr_indices = {nullptr}#
EdgeValueInputIterator nbr_intersection_property_values0 = {nullptr}#
EdgeValueInputIterator nbr_intersection_property_values1 = {nullptr}#
VertexPairIndexIterator major_minor_pair_index_first = {}#
VertexPairIterator major_minor_pair_first = {}#
VertexPairValueOutputIterator major_minor_pair_value_output_first = {}#
template<typename VertexPairIterator>
struct compute_chunk_id_t

Public Functions

inline __device__ int operator() (size_t i) const

Public Members

VertexPairIterator vertex_pair_first = {}#
size_t num_chunks = {}#
template<typename VertexPairIterator>
struct compute_local_edge_partition_id_t

Public Types

using vertex_t = cuda::std::tuple_element_t<0, typename thrust::iterator_traits<VertexPairIterator>::value_type>#

Public Functions

inline __device__ int operator() (size_t i) const

Public Members

VertexPairIterator vertex_pair_first = {}#
size_t num_local_edge_partitions = {}#
raft::device_span<vertex_t const> edge_partition_major_range_lasts = {}#
template<typename VertexPairIterator>
struct indirection_compare_less_t

Public Functions

inline __device__ bool operator() (size_t i, size_t j) const

Public Members

VertexPairIterator vertex_pair_first = {}#