Graph Algorithms#

Warning

doxygenfunction: Unable to resolve function “gunrock::bfs::run” with arguments None in doxygen xml output for project “gunrock” from directory: ./_doxygen/xml. Potential matches:

- template<typename graph_t> float run(graph_t &G, param_t<typename graph_t::vertex_type> &param, result_t<typename graph_t::vertex_type> &result, std::shared_ptr<gcuda::multi_context_t> context = std::shared_ptr<gcuda::multi_context_t>(new gcuda::multi_context_t(0)))
- template<typename graph_t> float run(graph_t &G, typename graph_t::vertex_type &single_source, typename graph_t::vertex_type *distances, typename graph_t::vertex_type *predecessors, std::shared_ptr<gcuda::multi_context_t> context = std::shared_ptr<gcuda::multi_context_t>(new gcuda::multi_context_t(0)))
template<typename graph_t>
float gunrock::bc::run(graph_t &G, typename graph_t::weight_type *bc_values)#

Run Betweenness Centrality algorithm on all vertices in the graph to compute BC values for the entire graph.

Template Parameters:

graph_t – Graph type.

Parameters:
  • G – Graph object.

  • bc_values – Output array of betweenness centrality values for each vertex.

Returns:

float Sum of execution times for running the algorithm on all vertices.

Warning

doxygenfunction: Unable to resolve function “gunrock::color::run” with arguments None in doxygen xml output for project “gunrock” from directory: ./_doxygen/xml. Potential matches:

- template<typename graph_t> float run(graph_t &G, param_t &param, result_t<typename graph_t::vertex_type> &result, std::shared_ptr<gcuda::multi_context_t> context = std::shared_ptr<gcuda::multi_context_t>(new gcuda::multi_context_t(0)))
- template<typename graph_t> float run(graph_t &G, typename graph_t::vertex_type *colors, std::shared_ptr<gcuda::multi_context_t> context = std::shared_ptr<gcuda::multi_context_t>(new gcuda::multi_context_t(0)))

Warning

doxygenfunction: Unable to resolve function “gunrock::geo::run” with arguments None in doxygen xml output for project “gunrock” from directory: ./_doxygen/xml. Potential matches:

- template<typename graph_t> float run(graph_t &G, coordinates_t *coordinates, const unsigned int total_iterations, const unsigned int spatial_iterations = 1000, std::shared_ptr<gcuda::multi_context_t> context = std::shared_ptr<gcuda::multi_context_t>(new gcuda::multi_context_t(0)))
- template<typename graph_t> float run(graph_t &G, param_t &param, result_t &result, std::shared_ptr<gcuda::multi_context_t> context = std::shared_ptr<gcuda::multi_context_t>(new gcuda::multi_context_t(0)))
template<typename graph_t, typename result_t>
float gunrock::hits::run(graph_t &G, unsigned int max_iterations, result_t &result, std::shared_ptr<gcuda::multi_context_t> context = std::shared_ptr<gcuda::multi_context_t>(new gcuda::multi_context_t(0)))

Run HITS (Hyperlink-Induced Topic Search) algorithm on a given graph to compute authority and hub scores for each vertex.

Template Parameters:
  • graph_t – Graph type.

  • result_t – Result type containing authority and hub score arrays.

Parameters:
  • G – Graph object.

  • max_iterations – Maximum number of iterations to run the algorithm.

  • result – Algorithm results containing authority and hub scores.

  • context – Device context.

Returns:

float Time taken to run the algorithm.

Warning

doxygenfunction: Unable to resolve function “gunrock::kcore::run” with arguments None in doxygen xml output for project “gunrock” from directory: ./_doxygen/xml. Potential matches:

- template<typename graph_t> float run(graph_t &G, int *k_cores, std::shared_ptr<gcuda::multi_context_t> context = std::shared_ptr<gcuda::multi_context_t>(new gcuda::multi_context_t(0)))
- template<typename graph_t> float run(graph_t &G, param_t &param, result_t<int> &result, std::shared_ptr<gcuda::multi_context_t> context = std::shared_ptr<gcuda::multi_context_t>(new gcuda::multi_context_t(0)))

Warning

doxygenfunction: Unable to resolve function “gunrock::mst::run” with arguments None in doxygen xml output for project “gunrock” from directory: ./_doxygen/xml. Potential matches:

- template<typename graph_t> float run(graph_t &G, param_t<typename graph_t::vertex_type> &param, result_t<typename graph_t::vertex_type, typename graph_t::weight_type> &result, std::shared_ptr<gcuda::multi_context_t> context = std::shared_ptr<gcuda::multi_context_t>(new gcuda::multi_context_t(0)))
- template<typename graph_t> float run(graph_t &G, typename graph_t::weight_type *mst_weight, std::shared_ptr<gcuda::multi_context_t> context = std::shared_ptr<gcuda::multi_context_t>(new gcuda::multi_context_t(0)))

Warning

doxygenfunction: Unable to resolve function “gunrock::ppr::run” with arguments None in doxygen xml output for project “gunrock” from directory: ./_doxygen/xml. Potential matches:

- template<typename graph_t> float run(graph_t &G, param_t<typename graph_t::vertex_type, typename graph_t::weight_type> &param, result_t<typename graph_t::weight_type> &result, std::shared_ptr<gcuda::multi_context_t> context = std::shared_ptr<gcuda::multi_context_t>(new gcuda::multi_context_t(0)))
- template<typename graph_t> float run(graph_t &G, typename graph_t::vertex_type &seed, typename graph_t::weight_type *p, typename graph_t::weight_type &alpha, typename graph_t::weight_type &epsilon, std::shared_ptr<gcuda::multi_context_t> context = std::shared_ptr<gcuda::multi_context_t>(new gcuda::multi_context_t(0)))

Warning

doxygenfunction: Unable to resolve function “gunrock::pr::run” with arguments None in doxygen xml output for project “gunrock” from directory: ./_doxygen/xml. Potential matches:

- template<typename graph_t> float run(graph_t &G, param_t<typename graph_t::weight_type> &param, result_t<typename graph_t::weight_type> &result, std::shared_ptr<gcuda::multi_context_t> context = std::shared_ptr<gcuda::multi_context_t>(new gcuda::multi_context_t(0)))
- template<typename graph_t> float run(graph_t &G, typename graph_t::weight_type alpha, typename graph_t::weight_type tol, typename graph_t::weight_type *p, std::shared_ptr<gcuda::multi_context_t> context = std::shared_ptr<gcuda::multi_context_t>(new gcuda::multi_context_t(0)))
template<typename a_graph_t, typename b_graph_t, typename csr_t>
float gunrock::spgemm::run(a_graph_t &A, b_graph_t &B, csr_t &C, std::shared_ptr<gcuda::multi_context_t> context = std::shared_ptr<gcuda::multi_context_t>(new gcuda::multi_context_t(0)))

Run Sparse Matrix-Matrix Multiplication (SpGEMM) algorithm to compute the product C = A * B where A and B are sparse matrices represented as graphs.

Template Parameters:
  • a_graph_t – Type of the first input graph (matrix A).

  • b_graph_t – Type of the second input graph (matrix B).

  • csr_t – Type of the output CSR matrix (result C).

Parameters:
  • A – First input graph representing sparse matrix A.

  • B – Second input graph representing sparse matrix B.

  • C – Output CSR matrix to store the result C = A * B.

  • context – Device context.

Returns:

float Time taken to run the algorithm.

Warning

doxygenfunction: Unable to resolve function “gunrock::spmv::run” with arguments None in doxygen xml output for project “gunrock” from directory: ./_doxygen/xml. Potential matches:

- template<typename graph_t> float run(graph_t &G, param_t<typename graph_t::weight_type> &param, result_t<typename graph_t::weight_type> &result, std::shared_ptr<gcuda::multi_context_t> context = std::shared_ptr<gcuda::multi_context_t>(new gcuda::multi_context_t(0)))
- template<typename graph_t> float run(graph_t &G, typename graph_t::weight_type *x, typename graph_t::weight_type *y, std::shared_ptr<gcuda::multi_context_t> context = std::shared_ptr<gcuda::multi_context_t>(new gcuda::multi_context_t(0)))

Warning

doxygenfunction: Unable to resolve function “gunrock::sssp::run” with arguments None in doxygen xml output for project “gunrock” from directory: ./_doxygen/xml. Potential matches:

- template<typename graph_t> float run(graph_t &G, param_t<typename graph_t::vertex_type> &param, result_t<typename graph_t::vertex_type, typename graph_t::weight_type> &result, std::shared_ptr<gcuda::multi_context_t> context = std::shared_ptr<gcuda::multi_context_t>(new gcuda::multi_context_t(0)))
- template<typename graph_t> float run(graph_t &G, typename graph_t::vertex_type &single_source, typename graph_t::weight_type *distances, typename graph_t::vertex_type *predecessors, std::shared_ptr<gcuda::multi_context_t> context = std::shared_ptr<gcuda::multi_context_t>(new gcuda::multi_context_t(0)))

Warning

doxygenfunction: Unable to resolve function “gunrock::tc::run” with arguments None in doxygen xml output for project “gunrock” from directory: ./_doxygen/xml. Potential matches:

- template<typename graph_t> float run(graph_t &G, bool reduce_all_triangles, typename graph_t::vertex_type *vertex_triangles_count, std::size_t *total_triangles_count, std::shared_ptr<gcuda::multi_context_t> context = std::shared_ptr<gcuda::multi_context_t>(new gcuda::multi_context_t(0)))
- template<typename graph_t> float run(graph_t &G, param_t<typename graph_t::vertex_type> &param, result_t<typename graph_t::vertex_type> &result, std::shared_ptr<gcuda::multi_context_t> context = std::shared_ptr<gcuda::multi_context_t>(new gcuda::multi_context_t(0)))