cugraph.concurrent_bfs#
- cugraph.concurrent_bfs(Graphs, sources, depth_limit=None, offload=False)[source]#
Find the breadth first traversals of multiple graphs with multiple sources in each graph.
- Parameters:
- Graphslist of cugraph.Graph
The adjacency lists will be computed if not already present.
- sourceslist of cudf.Series
For each graph, subset of vertices from which the traversals start. A BFS is run in Graphs[i] for each source in the Series at sources[i]. The size of this list must match the size of the graph list. The size of each Series (ie. the number of sources per graph) is flexible, but cannot exceed the size of the corresponding graph.
- depth_limitInteger, optional, default=None
Limit the depth of the search. Terminates if no more vertices are reachable within the distance of depth_limit
- offloadboolean, optional, default=False
Indicates if output should be written to the disk. When not provided, the algorithms decides if offloading is needed based on the input parameters.
- Returns:
- Return type is decided based on the input parameters (size of
- sources, size of the graph, number of graphs and offload setting)
- If G is a cugraph.Graph and output fits in memory:
- BFS_edge_listscudf.DataFrame
GPU data frame containing all BFS edges
- source_offsets: cudf.Series
Series containing the starting offset in the returned edge list for each source.
- If offload is True, or if the output does not fit in memory
Writes csv files containing BFS output to the disk.