Graph Algorithms#
Run Breadth-First Search algorithm on a given graph, G, starting from the source node, single_source. The resulting distances are stored in the distances pointer. All data must be allocated by the user, on the device (GPU) and passed in to this function.
- Template Parameters:
graph_t – Graph type.
- Parameters:
G – Graph object.
single_source – A vertex in the graph (integral type).
distances – Pointer to the distances array of size number of vertices.
predecessors – Pointer to the predecessors array of size number of vertices. (optional, wip)
context – Device context.
- Returns:
float Time taken to run the algorithm.
-
template<typename graph_t>
float gunrock::bc::run(graph_t &G, typename graph_t::weight_type *bc_values)#