Skip to content

Commit 8126990

Browse files
authored
Added more doxygen groups and fixed some existing ones (#4870)
Added more doxygen groups and fixed some existing ones Authors: - Don Acosta (https://github.com/acostadon) Approvers: - Seunghwa Kang (https://github.com/seunghwak) URL: #4870
1 parent 9026ae5 commit 8126990

File tree

5 files changed

+62
-29
lines changed

5 files changed

+62
-29
lines changed

cpp/include/cugraph/detail/collect_comm_wrapper.hpp

+1-4
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,8 @@ namespace detail {
2828
/** @defgroup collect_comm_wrapper_cpp C++ Shuffle Wrappers
2929
*/
3030

31-
/** @ingroup collect_comm_wrapper_cpp
32-
* @{
33-
*/
34-
3531
/**
32+
* @ingroup collect_comm_wrapper_cpp
3633
* @brief Gather the span of data from all ranks and broadcast the combined data to all ranks.
3734
*
3835
* @param[in] handle RAFT handle object to encapsulate resources (e.g. CUDA stream, communicator,

cpp/include/cugraph/detail/shuffle_wrappers.hpp

+9-8
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,8 @@ namespace detail {
2828
/** @defgroup shuffle_wrappers_cpp C++ Shuffle Wrappers
2929
*/
3030

31-
/** @ingroup shuffle_wrappers_cpp
32-
* @{
33-
*/
34-
3531
/**
32+
* @ingroup shuffle_wrappers_cpp
3633
* @brief Shuffle external (i.e. before renumbering) vertex pairs (which can be edge end points) to
3734
* their local GPUs based on edge partitioning.
3835
*
@@ -82,6 +79,7 @@ shuffle_ext_vertex_pairs_with_values_to_local_gpu_by_edge_partitioning(
8279
std::optional<rmm::device_uvector<edge_time_t>>&& edge_end_times);
8380

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

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

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

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

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

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

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

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

318323
} // namespace detail
319324
} // namespace cugraph
320-
321-
/**
322-
* @}
323-
*/

cpp/include/cugraph/detail/utility_wrappers.hpp

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021-2024, NVIDIA CORPORATION.
2+
* Copyright (c) 2021-2025, NVIDIA CORPORATION.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -26,7 +26,11 @@
2626
namespace cugraph {
2727
namespace detail {
2828

29+
/** @defgroup utility_wrappers_cpp C++ Utility Wrappers
30+
*/
31+
2932
/**
33+
* @ingroup utility_wrappers_cpp
3034
* @brief Fill a buffer with uniformly distributed random values
3135
*
3236
* Fills a buffer with uniformly distributed random values between
@@ -51,6 +55,7 @@ void uniform_random_fill(rmm::cuda_stream_view const& stream_view,
5155
raft::random::RngState& rng_state);
5256

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

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

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

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

110118
/**
119+
* @ingroup utility_wrappers_cpp
111120
* @brief Fill a buffer with a sequence of values
112121
*
113122
* Fills the buffer with the sequence:
@@ -130,6 +139,7 @@ void sequence_fill(rmm::cuda_stream_view const& stream_view,
130139
value_t start_value);
131140

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

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

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

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

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

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

241256
/**
257+
* @ingroup utility_wrappers_cpp
242258
* @brief Count the number of times a value appears in a span
243259
*
244260
* @tparam data_t type of data in span

cpp/include/cugraph/graph_generators.hpp

+15-8
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,10 @@
2727
/** @defgroup graph_generators_cpp C++ Graph Generators
2828
*/
2929

30-
/** @ingroup graph_generators_cpp
31-
* @{
32-
*/
33-
3430
namespace cugraph {
3531

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

545556
} // namespace cugraph
546-
547-
/**
548-
* @}
549-
*/

0 commit comments

Comments
 (0)