Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added more doxygen groups and fixed some existing ones #4870

Merged
merged 2 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions cpp/include/cugraph/detail/collect_comm_wrapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,8 @@ namespace detail {
/** @defgroup collect_comm_wrapper_cpp C++ Shuffle Wrappers
*/

/** @ingroup collect_comm_wrapper_cpp
* @{
*/

/**
* @ingroup collect_comm_wrapper_cpp
* @brief Gather the span of data from all ranks and broadcast the combined data to all ranks.
*
* @param[in] handle RAFT handle object to encapsulate resources (e.g. CUDA stream, communicator,
Expand Down
17 changes: 9 additions & 8 deletions cpp/include/cugraph/detail/shuffle_wrappers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,8 @@ namespace detail {
/** @defgroup shuffle_wrappers_cpp C++ Shuffle Wrappers
*/

/** @ingroup shuffle_wrappers_cpp
* @{
*/

/**
* @ingroup shuffle_wrappers_cpp
* @brief Shuffle external (i.e. before renumbering) vertex pairs (which can be edge end points) to
* their local GPUs based on edge partitioning.
*
Expand Down Expand Up @@ -82,6 +79,7 @@ shuffle_ext_vertex_pairs_with_values_to_local_gpu_by_edge_partitioning(
std::optional<rmm::device_uvector<edge_time_t>>&& edge_end_times);

/**
* @ingroup shuffle_wrappers_cpp
* @brief Shuffle internal (i.e. renumbered) vertex pairs (which can be edge end points) to their
* local GPUs based on edge partitioning.
*
Expand Down Expand Up @@ -135,6 +133,7 @@ shuffle_int_vertex_pairs_with_values_to_local_gpu_by_edge_partitioning(
std::vector<vertex_t> const& vertex_partition_range_lasts);

/**
* @ingroup shuffle_wrappers_cpp
* @brief Shuffle external (i.e. before renumbering) vertices to their local GPU based on vertex
* partitioning.
*
Expand All @@ -151,6 +150,7 @@ rmm::device_uvector<vertex_t> shuffle_ext_vertices_to_local_gpu_by_vertex_partit
raft::handle_t const& handle, rmm::device_uvector<vertex_t>&& vertices);

/**
* @ingroup shuffle_wrappers_cpp
* @brief Shuffle external (i.e. before renumbering) vertex & value pairs to their local GPU based
* on vertex partitioning.
*
Expand All @@ -172,6 +172,7 @@ shuffle_ext_vertex_value_pairs_to_local_gpu_by_vertex_partitioning(
rmm::device_uvector<value_t>&& values);

/**
* @ingroup shuffle_wrappers_cpp
* @brief Permute a range.
*
* @tparam vertex_t Type of vertex identifiers. Needs to be an integral type.
Expand All @@ -194,6 +195,7 @@ rmm::device_uvector<vertex_t> permute_range(raft::handle_t const& handle,
bool do_expensive_check = false);

/**
* @ingroup shuffle_wrappers_cpp
* @brief Shuffle internal (i.e. renumbered) vertices to their local GPUs based on vertex
* partitioning.
*
Expand All @@ -214,6 +216,7 @@ rmm::device_uvector<vertex_t> shuffle_int_vertices_to_local_gpu_by_vertex_partit
std::vector<vertex_t> const& vertex_partition_range_lasts);

/**
* @ingroup shuffle_wrappers_cpp
* @brief Shuffle vertices using the internal vertex key function which returns the target GPU ID.
*
* @tparam vertex_t Type of vertex identifiers. Needs to be an integral type.
Expand All @@ -236,6 +239,7 @@ shuffle_int_vertex_value_pairs_to_local_gpu_by_vertex_partitioning(
std::vector<vertex_t> const& vertex_partition_range_lasts);

/**
* @ingroup shuffle_wrappers_cpp
* @brief Groupby and count edgelist using the key function which returns the target local partition
* ID for an edge.
*
Expand Down Expand Up @@ -282,6 +286,7 @@ rmm::device_uvector<size_t> groupby_and_count_edgelist_by_local_partition_id(
bool groupby_and_count_local_partition_by_minor = false);

/**
* @ingroup shuffle_wrappers_cpp
* @brief Collect vertex values (represented as k/v pairs across cluster) and return
* local value arrays on the GPU responsible for each vertex.
*
Expand Down Expand Up @@ -317,7 +322,3 @@ rmm::device_uvector<value_t> collect_local_vertex_values_from_ext_vertex_value_p

} // namespace detail
} // namespace cugraph

/**
* @}
*/
18 changes: 17 additions & 1 deletion cpp/include/cugraph/detail/utility_wrappers.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2024, NVIDIA CORPORATION.
* Copyright (c) 2021-2025, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -26,7 +26,11 @@
namespace cugraph {
namespace detail {

/** @defgroup utility_wrappers_cpp C++ Utility Wrappers
*/

/**
* @ingroup utility_wrappers_cpp
* @brief Fill a buffer with uniformly distributed random values
*
* Fills a buffer with uniformly distributed random values between
Expand All @@ -51,6 +55,7 @@ void uniform_random_fill(rmm::cuda_stream_view const& stream_view,
raft::random::RngState& rng_state);

/**
* @ingroup utility_wrappers_cpp
* @brief Fill a buffer with a constant value
*
* @tparam value_t type of the value to operate on
Expand All @@ -66,6 +71,7 @@ template <typename value_t>
void scalar_fill(raft::handle_t const& handle, value_t* d_value, size_t size, value_t value);

/**
* @ingroup utility_wrappers_cpp
* @brief Sort a device span
*
* @tparam value_t type of the value to operate on. Must be either int32_t or int64_t.
Expand All @@ -79,6 +85,7 @@ template <typename value_t>
void sort_ints(raft::handle_t const& handle, raft::device_span<value_t> values);

/**
* @ingroup utility_wrappers_cpp
* @brief Keep unique element from a device span
*
* @tparam value_t type of the value to operate on. Must be either int32_t or int64_t.
Expand All @@ -93,6 +100,7 @@ template <typename value_t>
size_t unique_ints(raft::handle_t const& handle, raft::device_span<value_t> values);

/**
* @ingroup utility_wrappers_cpp
* @brief Increment the values of a device span by a constant value
*
* @tparam value_t type of the value to operate on. Must be either int32_t or int64_t.
Expand All @@ -108,6 +116,7 @@ void transform_increment_ints(raft::device_span<value_t> values,
rmm::cuda_stream_view const& stream_view);

/**
* @ingroup utility_wrappers_cpp
* @brief Fill a buffer with a sequence of values
*
* Fills the buffer with the sequence:
Expand All @@ -130,6 +139,7 @@ void sequence_fill(rmm::cuda_stream_view const& stream_view,
value_t start_value);

/**
* @ingroup utility_wrappers_cpp
* @brief Fill a buffer with a sequence of values with the input stride
*
* Fills the buffer with the sequence with the input stride:
Expand All @@ -152,6 +162,7 @@ void stride_fill(rmm::cuda_stream_view const& stream_view,
value_t stride);

/**
* @ingroup utility_wrappers_cpp
* @brief Compute the maximum vertex id of an edge list
*
* max(d_edgelist_srcs.max(), d_edgelist_dsts.max())
Expand All @@ -172,6 +183,7 @@ vertex_t compute_maximum_vertex_id(rmm::cuda_stream_view const& stream_view,
size_t num_edges);

/**
* @ingroup utility_wrappers_cpp
* @brief Compute the maximum vertex id of an edge list
*
* max(d_edgelist_srcs.max(), d_edgelist_dsts.max())
Expand All @@ -194,6 +206,7 @@ vertex_t compute_maximum_vertex_id(rmm::cuda_stream_view const& stream_view,
}

/**
* @ingroup utility_wrappers_cpp
* @brief Filter zero degree vertices from this frontier
*
* @tparam vertex_t vertex type
Expand All @@ -211,6 +224,7 @@ std::tuple<rmm::device_uvector<vertex_t>, rmm::device_uvector<edge_t>> filter_de
rmm::device_uvector<edge_t>&& d_out_degs);

/**
* @ingroup utility_wrappers_cpp
* @brief Check if device span is sorted
*
* @tparam data_t type of data in span
Expand All @@ -223,6 +237,7 @@ template <typename data_t>
bool is_sorted(raft::handle_t const& handle, raft::device_span<data_t> span);

/**
* @ingroup utility_wrappers_cpp
* @brief Check if two device spans are equal. Returns true if every element in the spans are
* equal.
*
Expand All @@ -239,6 +254,7 @@ bool is_equal(raft::handle_t const& handle,
raft::device_span<data_t> span2);

/**
* @ingroup utility_wrappers_cpp
* @brief Count the number of times a value appears in a span
*
* @tparam data_t type of data in span
Expand Down
23 changes: 15 additions & 8 deletions cpp/include/cugraph/graph_generators.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,10 @@
/** @defgroup graph_generators_cpp C++ Graph Generators
*/

/** @ingroup graph_generators_cpp
* @{
*/

namespace cugraph {

/**
* @ingroup graph_generators_cpp
* @brief generate an edge list for an R-mat graph.
* @deprecated This function will be deprectated and should be replaced with the version that takes
* raft::random::RngState as a parameter
Expand Down Expand Up @@ -92,6 +89,7 @@ std::tuple<rmm::device_uvector<vertex_t>, rmm::device_uvector<vertex_t>> generat
bool scramble_vertex_ids = false);

/**
* @ingroup graph_generators_cpp
* @brief generate an edge list for an R-mat graph.
*
* This function allows multi-edges and self-loops similar to the Graph 500 reference
Expand Down Expand Up @@ -143,6 +141,7 @@ std::tuple<rmm::device_uvector<vertex_t>, rmm::device_uvector<vertex_t>> generat
bool scramble_vertex_ids = false);

/**
* @ingroup graph_generators_cpp
* @brief generate an edge list for a bipartite R-mat graph.
*
* The source vertex IDs will be in the range of [0, 2^src_scale) and the destination vertex IDs
Expand Down Expand Up @@ -184,6 +183,7 @@ generate_bipartite_rmat_edgelist(raft::handle_t const& handle,
enum class generator_distribution_t { POWER_LAW = 0, UNIFORM };

/**
* @ingroup graph_generators_cpp
* @brief generate multiple edge lists using the R-mat graph generator.
* @deprecated This function will be deprectated and should be replaced with the version that takes
*raft::random::RngState as a parameter
Expand Down Expand Up @@ -236,6 +236,7 @@ generate_rmat_edgelists(
bool scramble_vertex_ids = false);

/**
* @ingroup graph_generators_cpp
* @brief generate multiple edge lists using the R-mat graph generator.
*
* This function allows multi-edges and self-loops similar to the Graph 500 reference
Expand Down Expand Up @@ -286,6 +287,7 @@ generate_rmat_edgelists(
bool scramble_vertex_ids = false);

/**
* @ingroup graph_generators_cpp
* @brief generate an edge list for path graph
*
* A path graph of size n connects the vertices from 0 to (n - 1)
Expand Down Expand Up @@ -315,6 +317,7 @@ generate_path_graph_edgelist(
std::vector<std::tuple<vertex_t, vertex_t>> const& component_parameters_v);

/**
* @ingroup graph_generators_cpp
* @brief generate an edge list for a 2D Mesh Graph
*
* A sequence of 2D mesh graphs will be constructed according to the
Expand All @@ -340,6 +343,7 @@ generate_2d_mesh_graph_edgelist(
std::vector<std::tuple<vertex_t, vertex_t, vertex_t>> const& component_parameters_v);

/**
* @ingroup graph_generators_cpp
* @brief generate an edge list for a 3D Mesh Graph
*
* A sequence of 3D mesh graphs will be constructed according to the
Expand All @@ -365,6 +369,7 @@ generate_3d_mesh_graph_edgelist(
std::vector<std::tuple<vertex_t, vertex_t, vertex_t, vertex_t>> const& component_parameters_v);

/**
* @ingroup graph_generators_cpp
* @brief generate an edge lists for some complete graphs
*
* A sequence of complete graphs will be constructed according to the
Expand All @@ -390,6 +395,7 @@ generate_complete_graph_edgelist(
std::vector<std::tuple<vertex_t, vertex_t>> const& component_parameters_v);

/**
* @ingroup graph_generators_cpp
* @brief generate an edge lists for an Erdos-Renyi graph
*
* This API supports the G(n,p) model which requires O(n^2) work.
Expand Down Expand Up @@ -417,6 +423,7 @@ generate_erdos_renyi_graph_edgelist_gnp(raft::handle_t const& handle,
uint64_t seed = 0);

/**
* @ingroup graph_generators_cpp
* @brief generate an edge lists for an Erdos-Renyi graph
*
* This API supports the G(n,m) model
Expand Down Expand Up @@ -444,6 +451,7 @@ generate_erdos_renyi_graph_edgelist_gnm(raft::handle_t const& handle,
uint64_t seed = 0);

/**
* @ingroup graph_generators_cpp
* @brief symmetrize an edgelist from the edges in the lower (or upper but not both) triangular part
* of a graph adjacency matrix
*
Expand Down Expand Up @@ -471,6 +479,7 @@ symmetrize_edgelist_from_triangular(
bool check_diagonal = false);

/**
* @ingroup graph_generators_cpp
* @brief scramble vertex IDs in a graph
*
* Given a vertex list for a graph, scramble the input vertex IDs.
Expand All @@ -491,6 +500,7 @@ rmm::device_uvector<vertex_t> scramble_vertex_ids(raft::handle_t const& handle,
size_t lgN);

/**
* @ingroup graph_generators_cpp
* @brief scramble vertex ids in a graph
*
* Given an edge list for a graph, scramble the input vertex IDs.
Expand All @@ -515,6 +525,7 @@ std::tuple<rmm::device_uvector<vertex_t>, rmm::device_uvector<vertex_t>> scrambl
size_t lgN);

/**
* @ingroup graph_generators_cpp
* @brief Combine edgelists from multiple sources into a single edgelist
*
* If executed in a multi-gpu context (handle comms has been initialized)
Expand Down Expand Up @@ -543,7 +554,3 @@ combine_edgelists(raft::handle_t const& handle,
bool remove_multi_edges = true);

} // namespace cugraph

/**
* @}
*/
Loading
Loading