Graph construction and utilities#

Functions

cugraph_error_code_t cugraph_create_vertex_pairs(
const cugraph_resource_handle_t *handle,
cugraph_graph_t *graph,
const cugraph_type_erased_device_array_view_t *first,
const cugraph_type_erased_device_array_view_t *second,
cugraph_vertex_pairs_t **vertex_pairs,
cugraph_error_t **error
)#

Create vertex_pairs.

Input data will be shuffled to the proper GPU and stored in the output vertex_pairs.

Parameters:
  • handle[in] Handle for accessing resources

  • graph[in] Graph to operate on

  • first[in] Type erased array of vertex ids for the first vertex of the pair

  • second[in] Type erased array of vertex ids for the second vertex of the pair

  • vertex_pairs[out] Opaque pointer to vertex_pairs

  • error[out] Pointer to an error object storing details of any error. Will be populated if error code is not CUGRAPH_SUCCESS

Returns:

error code

cugraph_type_erased_device_array_view_t *cugraph_vertex_pairs_get_first(
cugraph_vertex_pairs_t *vertex_pairs
)#

Get the first vertex id array.

Parameters:

vertex_pairs[in] A vertex_pairs

Returns:

type erased array of vertex ids

cugraph_type_erased_device_array_view_t *cugraph_vertex_pairs_get_second(
cugraph_vertex_pairs_t *vertex_pairs
)#

Get the second vertex id array.

Parameters:

vertex_pairs[in] A vertex_pairs

Returns:

type erased array of vertex ids

void cugraph_vertex_pairs_free(cugraph_vertex_pairs_t *vertex_pairs)#

Free vertex pair.

Parameters:

vertex_pairs[in] The vertex pairs

cugraph_error_code_t cugraph_two_hop_neighbors(
const cugraph_resource_handle_t *handle,
cugraph_graph_t *graph,
const cugraph_type_erased_device_array_view_t *start_vertices,
bool_t do_expensive_check,
cugraph_vertex_pairs_t **result,
cugraph_error_t **error
)#

Find all 2-hop neighbors in the graph.

Parameters:
  • handle[in] Handle for accessing resources

  • graph[in] Pointer to graph

  • start_vertices[in] Optional type erased array of starting vertices If NULL use all, if specified compute two-hop neighbors for these starting vertices

  • do_expensive_check[in] A flag to run expensive checks for input arguments (if set to true)

  • result[out] Opaque pointer to resulting vertex pairs

  • error[out] Pointer to an error object storing details of any error. Will be populated if error code is not CUGRAPH_SUCCESS

Returns:

error code

cugraph_error_code_t cugraph_has_vertex(
const cugraph_resource_handle_t *handle,
cugraph_graph_t *graph,
cugraph_type_erased_device_array_view_t *vertices,
bool_t do_expensive_check,
cugraph_type_erased_device_array_t **result,
cugraph_error_t **error
)#

Verify if a vertex exists in the graph.

Parameters:
  • handle[in] Handle for accessing resources

  • graph[in] Pointer to graph

  • vertices[in] Vertices to be queried

  • do_expensive_check[in] A flag to run expensive checks for input arguments (if set to true)

  • result[out] Opaque pointer to resulting queried vertices

  • error[out] Pointer to an error object storing details of any error. Will be populated if error code is not CUGRAPH_SUCCESS

Returns:

error code

cugraph_type_erased_device_array_view_t *cugraph_induced_subgraph_get_sources(
cugraph_induced_subgraph_result_t *induced_subgraph
)#

Get the source vertex ids.

Deprecated:

This API will be deleted, use cugraph_edgelist_get_sources

Parameters:

induced_subgraph[in] Opaque pointer to induced subgraph

Returns:

type erased array view of source vertex ids

cugraph_type_erased_device_array_view_t *cugraph_induced_subgraph_get_destinations(
cugraph_induced_subgraph_result_t *induced_subgraph
)#

Get the destination vertex ids.

Deprecated:

This API will be deleted, use cugraph_edgelist_get_destinations

Parameters:

induced_subgraph[in] Opaque pointer to induced subgraph

Returns:

type erased array view of destination vertex ids

cugraph_type_erased_device_array_view_t *cugraph_induced_subgraph_get_edge_weights(
cugraph_induced_subgraph_result_t *induced_subgraph
)#

Get the edge weights.

Deprecated:

This API will be deleted, use cugraph_edgelist_get_edge_weights

Parameters:

induced_subgraph[in] Opaque pointer to induced subgraph

Returns:

type erased array view of edge weights

cugraph_type_erased_device_array_view_t *cugraph_induced_subgraph_get_edge_ids(
cugraph_induced_subgraph_result_t *induced_subgraph
)#

Get the edge ids.

Deprecated:

This API will be deleted, use cugraph_edgelist_get_edge_ids

Parameters:

induced_subgraph[in] Opaque pointer to induced subgraph

Returns:

type erased array view of edge ids

cugraph_type_erased_device_array_view_t *cugraph_induced_subgraph_get_edge_type_ids(
cugraph_induced_subgraph_result_t *induced_subgraph
)#

Get the edge types.

Deprecated:

This API will be deleted, use cugraph_edgelist_get_edge_type_ids

Parameters:

induced_subgraph[in] Opaque pointer to induced subgraph

Returns:

type erased array view of edge types

cugraph_type_erased_device_array_view_t *cugraph_induced_subgraph_get_subgraph_offsets(
cugraph_induced_subgraph_result_t *induced_subgraph
)#

Get the subgraph offsets.

Deprecated:

This API will be deleted, use cugraph_edgelist_get_edge_offsets

Parameters:

induced_subgraph[in] Opaque pointer to induced subgraph

Returns:

type erased array view of subgraph identifiers

void cugraph_induced_subgraph_result_free(
cugraph_induced_subgraph_result_t *induced_subgraph
)#

Free induced subgraph.

Deprecated:

This API will be deleted, use cugraph_edgelist_free

Parameters:

induced[in] subgraph Opaque pointer to induced subgraph

cugraph_error_code_t cugraph_extract_induced_subgraph(
const cugraph_resource_handle_t *handle,
cugraph_graph_t *graph,
const cugraph_type_erased_device_array_view_t *subgraph_offsets,
const cugraph_type_erased_device_array_view_t *subgraph_vertices,
bool_t do_expensive_check,
cugraph_induced_subgraph_result_t **result,
cugraph_error_t **error
)#

Extract induced subgraph(s).

Given a list of vertex ids, extract a list of edges that represent the subgraph containing only the specified vertex ids.

This function will do multiple subgraph extractions concurrently. The vertex ids are specified in CSR-style, with subgraph_vertices being a list of vertex ids and subgraph_offsets[i] identifying the start offset for each extracted subgraph

Parameters:
  • handle[in] Handle for accessing resources

  • graph[in] Pointer to graph

  • subgraph_offsets[in] Type erased array of subgraph offsets into subgraph_vertices

  • subgraph_vertices[in] Type erased array of vertices to include in extracted subgraph.

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

  • result[out] Opaque pointer to induced subgraph result

  • error[out] Pointer to an error object storing details of any error. Will be populated if error code is not CUGRAPH_SUCCESS

Returns:

error code

cugraph_error_code_t cugraph_allgather(
const cugraph_resource_handle_t *handle,
const cugraph_type_erased_device_array_view_t *src,
const cugraph_type_erased_device_array_view_t *dst,
const cugraph_type_erased_device_array_view_t *weights,
const cugraph_type_erased_device_array_view_t *edge_ids,
const cugraph_type_erased_device_array_view_t *edge_type_ids,
cugraph_induced_subgraph_result_t **result,
cugraph_error_t **error
)#

Gather edgelist.

This function collects the edgelist from all ranks and stores the combine edgelist in each rank

Parameters:
  • handle[in] Handle for accessing resources.

  • src[in] Device array containing the source vertex ids.

  • dst[in] Device array containing the destination vertex ids

  • weights[in] Optional device array containing the edge weights

  • edge_ids[in] Optional device array containing the edge ids for each edge.

  • edge_type_ids[in] Optional device array containing the edge types for each edge

  • result[out] Opaque pointer to gathered edgelist result

  • error[out] Pointer to an error object storing details of any error. Will be populated if error code is not CUGRAPH_SUCCESS

Returns:

error code

cugraph_error_code_t cugraph_count_multi_edges(
const cugraph_resource_handle_t *handle,
cugraph_graph_t *graph,
bool_t do_expensive_check,
size_t *result,
cugraph_error_t **error
)#

Count multi_edges.

Count the number of multi-edges in the graph

Parameters:
  • handle[in] Handle for accessing resources.

  • graph[in] Pointer to graph

  • do_expensive_check[in] A flag to run expensive checks for input arguments (if set to true)

  • result[out] Where to store the count of multi-edges

  • error[out] Pointer to an error object storing details of any error. Will be populated if error code is not CUGRAPH_SUCCESS

Returns:

error code

cugraph_error_code_t cugraph_in_degrees(
const cugraph_resource_handle_t *handle,
cugraph_graph_t *graph,
const cugraph_type_erased_device_array_view_t *source_vertices,
bool_t do_expensive_check,
cugraph_degrees_result_t **result,
cugraph_error_t **error
)#

Compute in degrees.

Compute the in degrees for the vertices in the graph.

Parameters:
  • handle[in] Handle for accessing resources.

  • graph[in] Pointer to graph

  • source_vertices[in] Device array of vertices we want to compute in degrees for.

  • do_expensive_check[in] A flag to run expensive checks for input arguments (if set to true)

  • result[out] Opaque pointer to degrees result

  • error[out] Pointer to an error object storing details of any error. Will be populated if error code is not CUGRAPH_SUCCESS

Returns:

error code

cugraph_error_code_t cugraph_out_degrees(
const cugraph_resource_handle_t *handle,
cugraph_graph_t *graph,
const cugraph_type_erased_device_array_view_t *source_vertices,
bool_t do_expensive_check,
cugraph_degrees_result_t **result,
cugraph_error_t **error
)#

Compute out degrees.

Compute the out degrees for the vertices in the graph.

Parameters:
  • handle[in] Handle for accessing resources.

  • graph[in] Pointer to graph

  • source_vertices[in] Device array of vertices we want to compute out degrees for.

  • do_expensive_check[in] A flag to run expensive checks for input arguments (if set to true)

  • result[out] Opaque pointer to degrees result

  • error[out] Pointer to an error object storing details of any error. Will be populated if error code is not CUGRAPH_SUCCESS

Returns:

error code

cugraph_error_code_t cugraph_degrees(
const cugraph_resource_handle_t *handle,
cugraph_graph_t *graph,
const cugraph_type_erased_device_array_view_t *source_vertices,
bool_t do_expensive_check,
cugraph_degrees_result_t **result,
cugraph_error_t **error
)#

Compute degrees.

Compute the degrees for the vertices in the graph.

Parameters:
  • handle[in] Handle for accessing resources.

  • graph[in] Pointer to graph

  • source_vertices[in] Device array of vertices we want to compute degrees for.

  • do_expensive_check[in] A flag to run expensive checks for input arguments (if set to true)

  • result[out] Opaque pointer to degrees result

  • error[out] Pointer to an error object storing details of any error. Will be populated if error code is not CUGRAPH_SUCCESS

Returns:

error code

cugraph_type_erased_device_array_view_t *cugraph_degrees_result_get_vertices(
cugraph_degrees_result_t *degrees_result
)#

Get the vertex ids.

Parameters:

degrees_result[in] Opaque pointer to degree result

Returns:

type erased array view of vertex ids

cugraph_type_erased_device_array_view_t *cugraph_degrees_result_get_in_degrees(
cugraph_degrees_result_t *degrees_result
)#

Get the in degrees.

Parameters:

degrees_result[in] Opaque pointer to degree result

Returns:

type erased array view of vertex ids

cugraph_type_erased_device_array_view_t *cugraph_degrees_result_get_out_degrees(
cugraph_degrees_result_t *degrees_result
)#

Get the out degrees.

If the graph is symmetric, in degrees and out degrees will be equal (and will be stored in the same memory).

Parameters:

degrees_result[in] Opaque pointer to degree result

Returns:

type erased array view of vertex ids

void cugraph_degrees_result_free(
cugraph_degrees_result_t *degrees_result
)#

Free degree result.

Parameters:

degrees_result[in] Opaque pointer to degree result

cugraph_type_erased_device_array_view_t *cugraph_edgelist_get_sources(
cugraph_edgelist_t *edgelist
)#

Get the source vertex ids.

Parameters:

edgelist[in] Opaque pointer to edgelist

Returns:

type erased array view of source vertex ids

cugraph_type_erased_device_array_view_t *cugraph_edgelist_get_destinations(
cugraph_edgelist_t *edgelist
)#

Get the destination vertex ids.

Parameters:

edgelist[in] Opaque pointer to edgelist

Returns:

type erased array view of destination vertex ids

cugraph_type_erased_device_array_view_t *cugraph_edgelist_get_edge_weights(
cugraph_edgelist_t *edgelist
)#

Get the edge weights.

Parameters:

edgelist[in] Opaque pointer to edgelist

Returns:

type erased array view of edge weights

cugraph_type_erased_device_array_view_t *cugraph_edgelist_get_edge_ids(
cugraph_edgelist_t *edgelist
)#

Get the edge ids.

Parameters:

edgelist[in] Opaque pointer to edgelist

Returns:

type erased array view of edge ids

cugraph_type_erased_device_array_view_t *cugraph_edgelist_get_edge_type_ids(
cugraph_edgelist_t *edgelist
)#

Get the edge types.

Parameters:

edgelist[in] Opaque pointer to edgelist

Returns:

type erased array view of edge types

cugraph_type_erased_device_array_view_t *cugraph_edgelist_get_edge_offsets(
cugraph_edgelist_t *edgelist
)#

Get the edge offsets.

Parameters:

edgelist[in] Opaque pointer to edgelist

Returns:

type erased array view of subgraph identifiers

void cugraph_edgelist_free(cugraph_edgelist_t *edgelist)#

Free edgelist.

Parameters:

edgelist[in] Opaque pointer to edgelist

cugraph_error_code_t cugraph_decompress_to_edgelist(
const cugraph_resource_handle_t *handle,
cugraph_graph_t *graph,
bool_t do_expensive_check,
cugraph_edgelist_t **result,
cugraph_error_t **error
)#

Construct the edge list from the graph view object.

Parameters:
  • handle[in] Handle for accessing resources

  • graph[in] Graph to operate on

  • do_expensive_check[in] A flag to run expensive checks for input arguments (if set to true)

  • result[out] Opaque pointer to edgelist

  • error[out] Pointer to an error object storing details of any error. Will be populated if error code is not CUGRAPH_SUCCESS

Returns:

error code

cugraph_error_code_t cugraph_extract_vertex_list(
const cugraph_resource_handle_t *handle,
cugraph_graph_t *graph,
bool_t do_expensive_check,
cugraph_type_erased_device_array_t **result,
cugraph_error_t **error
)#

Extract the vertex list from the graph view object.

Parameters:
  • handle[in] Handle for accessing resources

  • graph[in] Graph to operate on

  • do_expensive_check[in] A flag to run expensive checks for input arguments (if set to true)

  • result[out] Opaque pointer to vertex list

  • error[out] Pointer to an error object storing details of any error. Will be populated if error code is not CUGRAPH_SUCCESS

Returns:

error code

cugraph_error_code_t cugraph_renumber_arbitrary_edgelist(
const cugraph_resource_handle_t *handle,
const cugraph_type_erased_host_array_view_t *renumber_map,
cugraph_type_erased_device_array_view_t *srcs,
cugraph_type_erased_device_array_view_t *dsts,
cugraph_error_t **error
)#

Renumber arbitrary edgelist.

This function is designed to assist renumbering graph vertices in the case where the the global vertex id list exceeds the GPU memory. Renumbering is done in-place in the supplied src and dst parameters.

Parameters:
  • handle[in] Handle for accessing resources

  • renumber_map[in] Host array with the renumber map

  • [in/out] – srcs Device array of src vertices to renumber

  • [in/out] – dsts Device array of dst vertices to renumber

  • error[out] Pointer to an error object storing details of any error. Will be populated if error code is not CUGRAPH_SUCCESS

struct cugraph_vertex_pairs_t#
#include <graph_functions.h>

Opaque vertex pair type.

Public Members

int32_t align_#
struct cugraph_induced_subgraph_result_t#
#include <graph_functions.h>

Opaque induced subgraph type.

Deprecated:

This API will be deleted, use cugraph_edgelist_t

Public Members

int32_t align_#
struct cugraph_degrees_result_t#
#include <graph_functions.h>

Opaque degree result type.

Public Members

int32_t align_#
struct cugraph_edgelist_t#
#include <graph_functions.h>

Opaque edgelist type.

Public Members

int32_t align_#

Enums

enum cugraph_generator_distribution_t#

Values:

enumerator POWER_LAW#
enumerator UNIFORM#

Functions

cugraph_error_code_t cugraph_generate_rmat_edgelist(
const cugraph_resource_handle_t *handle,
cugraph_rng_state_t *rng_state,
size_t scale,
size_t num_edges,
double a,
double b,
double c,
bool_t clip_and_flip,
bool_t scramble_vertex_ids,
cugraph_coo_t **result,
cugraph_error_t **error
)#

Generate RMAT edge list.

Returns a COO containing edges generated from the RMAT generator.

Vertex types will be int32 if scale < 32 and int64 if scale >= 32

Parameters:
  • handle[in] Handle for accessing resources

  • rng_state[inout] State of the random number generator, updated with each call

  • scale[in] Scale factor to set the number of vertices in the graph. Vertex IDs have values in [0, V), where V = 1 << scale.

  • num_edges[in] Number of edges to generate.

  • a[in] a, b, c, d (= 1.0 - (a + b + c)) in the R-mat graph generator (vist https://graph500.org for additional details). a, b, c, d should be non-negative and a + b + c should be no larger than 1.0.

  • b[in] a, b, c, d (= 1.0 - (a + b + c)) in the R-mat graph generator (vist https://graph500.org for additional details). a, b, c, d should be non-negative and a + b + c should be no larger than 1.0.

  • c[in] a, b, c, d (= 1.0 - (a + b + c)) in the R-mat graph generator (vist https://graph500.org for additional details). a, b, c, d should be non-negative and a + b + c should be no larger than 1.0.

  • clip_and_flip[in] Flag controlling whether to generate edges only in the lower triangular part (including the diagonal) of the graph adjacency matrix (if set to true) or not (if set to false).

  • scramble_vertex_ids[in] Flag controlling whether to scramble vertex ID bits (if set to true) or not (if set to false); scrambling vertex ID bits breaks correlation between vertex ID values and vertex degrees.

  • result[out] Opaque pointer to generated coo

  • error[out] Pointer to an error object storing details of any error. Will be populated if error code is not CUGRAPH_SUCCESS

Returns:

error code

cugraph_error_code_t cugraph_generate_rmat_edgelists(
const cugraph_resource_handle_t *handle,
cugraph_rng_state_t *rng_state,
size_t n_edgelists,
size_t min_scale,
size_t max_scale,
size_t edge_factor,
cugraph_generator_distribution_t size_distribution,
cugraph_generator_distribution_t edge_distribution,
bool_t clip_and_flip,
bool_t scramble_vertex_ids,
cugraph_coo_list_t **result,
cugraph_error_t **error
)#

Generate RMAT edge lists.

Returns a COO list containing edges generated from the RMAT generator.

Vertex types will be int32 if scale < 32 and int64 if scale >= 32

Parameters:
  • handle[in] Handle for accessing resources

  • rng_state[inout] State of the random number generator, updated with each call

  • n_edgelists[in] Number of edge lists (graphs) to generate

  • min_scale[in] Scale factor to set the minimum number of verties in the graph.

  • max_scale[in] Scale factor to set the maximum number of verties in the graph.

  • edge_factor[in] Average number of edges per vertex to generate.

  • size_distribution[in] Distribution of the graph sizes, impacts the scale parameter of the R-MAT generator

  • edge_distribution[in] Edges distribution for each graph, impacts how R-MAT parameters a,b,c,d, are set.

  • clip_and_flip[in] Flag controlling whether to generate edges only in the lower triangular part (including the diagonal) of the graph adjacency matrix (if set to true) or not (if set to false).

  • scramble_vertex_ids[in] Flag controlling whether to scramble vertex ID bits (if set to true) or not (if set to false); scrambling vertex ID bits breaks correlation between vertex ID values and vertex degrees.

  • result[out] Opaque pointer to generated coo list

  • error[out] Pointer to an error object storing details of any error. Will be populated if error code is not CUGRAPH_SUCCESS

Returns:

error code

cugraph_error_code_t cugraph_generate_edge_weights(
const cugraph_resource_handle_t *handle,
cugraph_rng_state_t *rng_state,
cugraph_coo_t *coo,
cugraph_data_type_id_t dtype,
double minimum_weight,
double maximum_weight,
cugraph_error_t **error
)#

Generate edge weights and add to an rmat edge list.

Updates a COO to contain random edge weights

Parameters:
  • handle[in] Handle for accessing resources

  • rng_state[inout] State of the random number generator, updated with each call

  • coo[inout] Opaque pointer to the coo, weights will be added (overwriting any existing weights)

  • dtype[in] The type of weight to generate (FLOAT32 or FLOAT64), ignored unless include_weights is true

  • minimum_weight[in] Minimum weight value to generate

  • maximum_weight[in] Maximum weight value to generate

  • error[out] Pointer to an error object storing details of any error. Will be populated if error code is not CUGRAPH_SUCCESS

cugraph_error_code_t cugraph_generate_edge_ids(
const cugraph_resource_handle_t *handle,
cugraph_coo_t *coo,
bool_t multi_gpu,
cugraph_error_t **error
)#

Add edge ids to an COO.

Updates a COO to contain edge ids. Edges will be numbered from 0 to n-1 where n is the number of edges

Parameters:
  • handle[in] Handle for accessing resources

  • coo[inout] Opaque pointer to the coo, weights will be added (overwriting any existing weights)

  • multi_gpu[in] Flag if the COO is being created on multiple GPUs

  • error[out] Pointer to an error object storing details of any error. Will be populated if error code is not CUGRAPH_SUCCESS

cugraph_error_code_t cugraph_generate_edge_types(
const cugraph_resource_handle_t *handle,
cugraph_rng_state_t *rng_state,
cugraph_coo_t *coo,
int32_t min_edge_type,
int32_t max_edge_type,
cugraph_error_t **error
)#

Generate random edge types, add them to an COO.

Updates a COO to contain edge types. Edges types will be randomly generated.

Parameters:
  • handle[in] Handle for accessing resources

  • rng_state[inout] State of the random number generator, updated with each call

  • coo[inout] Opaque pointer to the coo, weights will be added (overwriting any existing weights)

  • max_edge_type[in] Edge types will be randomly generated between min_edge_type and max_edge_type

  • error[out] Pointer to an error object storing details of any error. Will be populated if error code is not CUGRAPH_SUCCESS

Functions

cugraph_error_code_t cugraph_build_edge_id_and_type_to_src_dst_lookup_map(
const cugraph_resource_handle_t *handle,
cugraph_graph_t *graph,
cugraph_lookup_container_t **lookup_container,
cugraph_error_t **error
)#

Build map to lookup source and destination using edge id and type.

Parameters:
  • handle[in] Handle for accessing resources

  • graph[in] Pointer to graph. NOTE: Graph might be modified if the storage needs to be transposed

  • lookup_container[out] Lookup map

  • error[out] Pointer to an error object storing details of any error. Will be populated if error code is not CUGRAPH_SUCCESS

Returns:

error code

cugraph_error_code_t cugraph_lookup_endpoints_from_edge_ids_and_single_type(
const cugraph_resource_handle_t *handle,
cugraph_graph_t *graph,
const cugraph_lookup_container_t *lookup_container,
const cugraph_type_erased_device_array_view_t *edge_ids_to_lookup,
int edge_type_to_lookup,
cugraph_lookup_result_t **result,
cugraph_error_t **error
)#

Lookup edge sources and destinations using edge ids and a single edge type.

Use this function to lookup endpoints of edges belonging to the same edge type.

Parameters:
  • handle[in] Handle for accessing resources

  • graph[in] Pointer to graph. NOTE: Graph might be modified if the storage needs to be transposed

  • lookup_container[in] Lookup map

  • edge_ids_to_lookup[in] Edge ids to lookup

  • edge_type_to_lookup[in] Edge types corresponding to edge ids in edge_ids_to_lookup

  • result[out] Output from the lookup call

  • error[out] Pointer to an error object storing details of any error. Will be populated if error code is not CUGRAPH_SUCCESS

Returns:

error code

cugraph_error_code_t cugraph_lookup_endpoints_from_edge_ids_and_types(
const cugraph_resource_handle_t *handle,
cugraph_graph_t *graph,
const cugraph_lookup_container_t *lookup_container,
const cugraph_type_erased_device_array_view_t *edge_ids_to_lookup,
const cugraph_type_erased_device_array_view_t *edge_types_to_lookup,
cugraph_lookup_result_t **result,
cugraph_error_t **error
)#

Lookup edge sources and destinations using edge ids and edge types.

Use this function to lookup endpoints of edges belonging to different edge types.

Parameters:
  • handle[in] Handle for accessing resources

  • graph[in] Pointer to graph. NOTE: Graph might be modified if the storage needs to be transposed

  • lookup_container[in] Lookup map

  • edge_ids_to_lookup[in] Edge ids to lookup

  • edge_types_to_lookup[in] Edge types corresponding to the edge ids in edge_ids_to_lookup

  • result[out] Output from the lookup call

  • error[out] Pointer to an error object storing details of any error. Will be populated if error code is not CUGRAPH_SUCCESS

Returns:

error code

struct cugraph_lookup_container_t#
#include <lookup_src_dst.h>

Opaque src-dst lookup container type.

Public Members

int32_t align_#
struct cugraph_lookup_result_t#
#include <lookup_src_dst.h>

Opaque src-dst lookup result type.

Public Members

int32_t align_#