Skip to content

Commit

Permalink
fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
jnke2016 committed Oct 22, 2024
1 parent a005a19 commit 11f9c40
Show file tree
Hide file tree
Showing 36 changed files with 949 additions and 1,010 deletions.
13 changes: 7 additions & 6 deletions cpp/include/cugraph/detail/shuffle_wrappers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,13 @@ shuffle_ext_vertex_value_pairs_to_local_gpu_by_vertex_partitioning(
* @return Tuple of vectors storing shuffled vertex & value pairs.
*/
template <typename vertex_t, typename value0_t, typename value1_t>
std::tuple<rmm::device_uvector<vertex_t>, rmm::device_uvector<value0_t>, rmm::device_uvector<value1_t>>
shuffle_ext_vertex_values_pairs_to_local_gpu_by_vertex_partitioning(
raft::handle_t const& handle,
rmm::device_uvector<vertex_t>&& vertices,
rmm::device_uvector<value0_t>&& values_0,
rmm::device_uvector<value1_t>&& values_1);
std::
tuple<rmm::device_uvector<vertex_t>, rmm::device_uvector<value0_t>, rmm::device_uvector<value1_t>>
shuffle_ext_vertex_values_pairs_to_local_gpu_by_vertex_partitioning(
raft::handle_t const& handle,
rmm::device_uvector<vertex_t>&& vertices,
rmm::device_uvector<value0_t>&& values_0,
rmm::device_uvector<value1_t>&& values_1);

/**
* @brief Permute a range.
Expand Down
1 change: 0 additions & 1 deletion cpp/include/cugraph/detail/utility_wrappers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ void sort(raft::handle_t const& handle, value_t* d_value, size_t size);
template <typename value_t>
size_t unique(raft::handle_t const& handle, value_t* d_value, size_t size);


/**
* @brief Increment the values of a buffer by a constant value
*
Expand Down
6 changes: 4 additions & 2 deletions cpp/include/cugraph/sampling_functions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,8 @@ struct sampling_flags_t {
* @param label_to_output_comm_rank Optional device span identifying which rank should get each
* vertex label. This should be the same on each rank.
* @param fan_out Host span defining branching out (fan-out) degree per source vertex for each
* level. The fanout value at hop x is given by the expression 'fanout[x*num_edge_types + edge_type_id]'
* level. The fanout value at hop x is given by the expression 'fanout[x*num_edge_types +
* edge_type_id]'
* @param num_edge_types Number of edge types where a value of 1 translates to homogeneous neighbor
* sample whereas a value greater than 1 translates to heterogeneous neighbor sample.
* @param flags A set of flags indicating which sampling features should be used.
Expand Down Expand Up @@ -405,7 +406,8 @@ heterogeneous_uniform_neighbor_sample(
* @param label_to_output_comm_rank Optional device span identifying which rank should get each
* vertex label. This should be the same on each rank.
* @param fan_out Host span defining branching out (fan-out) degree per source vertex for each
* level. The fanout value at hop x is given by the expression 'fanout[x*num_edge_types + edge_type_id]'
* level. The fanout value at hop x is given by the expression 'fanout[x*num_edge_types +
* edge_type_id]'
* @param num_edge_types Number of edge types where a value of 1 translates to homogeneous neighbor
* sample whereas a value greater than 1 translates to heterogeneous neighbor sample.
* @param flags A set of flags indicating which sampling features should be used.
Expand Down
59 changes: 27 additions & 32 deletions cpp/include/cugraph_c/sampling_algorithms.h
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,9 @@ void cugraph_sampling_options_free(cugraph_sampling_options_t* options);
* @brief Opaque neighborhood sampling heterogeneous fan_out type
*/


/**
* @brief Uniform Neighborhood Sampling
*
*
* @deprecated This API will be deleted, use cugraph_homogeneous_uniform_neighbor_sample
*
* Returns a sample of the neighborhood around specified start vertices. Optionally, each
Expand Down Expand Up @@ -362,8 +361,8 @@ void cugraph_sampling_options_free(cugraph_sampling_options_t* options);
* label_to_comm_rank[i]. If not specified then the output data will not be shuffled between ranks.
* @param [in] label_offsets Device array of the offsets for each label in the seed list. This
* parameter is only used with the retain_seeds option.
* @param [in] fan_out Host array defining the fan out at each step in the sampling algorithm.
* We only support fan_out values of type INT32
* @param [in] fan_out Host array defining the fan out at each step in the sampling
* algorithm. We only support fan_out values of type INT32
* @param [in,out] rng_state State of the random number generator, updated with each call
* @param [in] sampling_options
* Opaque pointer defining the sampling options.
Expand Down Expand Up @@ -391,9 +390,9 @@ cugraph_error_code_t cugraph_uniform_neighbor_sample(

/**
* @brief Biased Neighborhood Sampling
*
*
* @deprecated This API will be deleted, use cugraph_homogeneous_biased_neighbor_sample.
*
*
* Returns a sample of the neighborhood around specified start vertices. Optionally, each
* start vertex can be associated with a label, allowing the caller to specify multiple batches
* of sampling requests in the same function call - which should improve GPU utilization.
Expand Down Expand Up @@ -422,8 +421,8 @@ cugraph_error_code_t cugraph_uniform_neighbor_sample(
* label_to_comm_rank[i]. If not specified then the output data will not be shuffled between ranks.
* @param [in] label_offsets Device array of the offsets for each label in the seed list. This
* parameter is only used with the retain_seeds option.
* @param [in] fan_out Host array defining the fan out at each step in the sampling algorithm.
* We only support fan_out values of type INT32
* @param [in] fan_out Host array defining the fan out at each step in the sampling
* algorithm. We only support fan_out values of type INT32
* @param [in,out] rng_state State of the random number generator, updated with each call
* @param [in] sampling_options
* Opaque pointer defining the sampling options.
Expand Down Expand Up @@ -467,13 +466,12 @@ cugraph_error_code_t cugraph_biased_neighbor_sample(
* @param [in] graph Pointer to graph. NOTE: Graph might be modified if the storage
* needs to be transposed
* @param [in] start_vertices Device array of start vertices for the sampling
* @param [in] start_vertex_offsets Device array of the offsets for each label in the seed list. This
* parameter is only used with the retain_seeds option.
* @param [in] fan_out Host array defining the fan out at each step in the sampling algorithm.
* We only support fan_out values of type INT32
* @param [in] num_edge_types Number of edge types where a value of 1 translates to homogeneous neighbor
* sample whereas a value greater than 1 translates to heterogeneous neighbor
* sample.
* @param [in] start_vertex_offsets Device array of the offsets for each label in the seed list.
* This parameter is only used with the retain_seeds option.
* @param [in] fan_out Host array defining the fan out at each step in the sampling
* algorithm. We only support fan_out values of type INT32
* @param [in] num_edge_types Number of edge types where a value of 1 translates to homogeneous
* neighbor sample whereas a value greater than 1 translates to heterogeneous neighbor sample.
* @param [in] sampling_options
* Opaque pointer defining the sampling options.
* @param [in] do_expensive_check
Expand All @@ -496,7 +494,6 @@ cugraph_error_code_t cugraph_heterogeneous_uniform_neighbor_sample(
cugraph_sample_result_t** result,
cugraph_error_t** error);


/**
* @brief Heterogeneous Biased Neighborhood Sampling
*
Expand All @@ -516,13 +513,12 @@ cugraph_error_code_t cugraph_heterogeneous_uniform_neighbor_sample(
* @param [in] edge_biases Device array of edge biases to use for sampling. If NULL
* use the edge weight as the bias. If set to NULL, edges will be sampled uniformly.
* @param [in] start_vertices Device array of start vertices for the sampling
* @param [in] start_vertex_offsets Device array of the offsets for each label in the seed list. This
* parameter is only used with the retain_seeds option.
* @param [in] fan_out Host array defining the fan out at each step in the sampling algorithm.
* We only support fan_out values of type INT32
* @param [in] num_edge_types Number of edge types where a value of 1 translates to homogeneous neighbor
* sample whereas a value greater than 1 translates to heterogeneous neighbor
* sample.
* @param [in] start_vertex_offsets Device array of the offsets for each label in the seed list.
* This parameter is only used with the retain_seeds option.
* @param [in] fan_out Host array defining the fan out at each step in the sampling
* algorithm. We only support fan_out values of type INT32
* @param [in] num_edge_types Number of edge types where a value of 1 translates to homogeneous
* neighbor sample whereas a value greater than 1 translates to heterogeneous neighbor sample.
* @param [in] sampling_options
* Opaque pointer defining the sampling options.
* @param [in] do_expensive_check
Expand Down Expand Up @@ -563,10 +559,10 @@ cugraph_error_code_t cugraph_heterogeneous_biased_neighbor_sample(
* @param [in] graph Pointer to graph. NOTE: Graph might be modified if the storage
* needs to be transposed
* @param [in] start_vertices Device array of start vertices for the sampling
* @param [in] start_vertex_offsets Device array of the offsets for each label in the seed list. This
* parameter is only used with the retain_seeds option.
* @param [in] fan_out Host array defining the fan out at each step in the sampling algorithm.
* We only support fan_out values of type INT32
* @param [in] start_vertex_offsets Device array of the offsets for each label in the seed list.
* This parameter is only used with the retain_seeds option.
* @param [in] fan_out Host array defining the fan out at each step in the sampling
* algorithm. We only support fan_out values of type INT32
* @param [in] sampling_options
* Opaque pointer defining the sampling options.
* @param [in] do_expensive_check
Expand Down Expand Up @@ -607,10 +603,10 @@ cugraph_error_code_t cugraph_homogeneous_uniform_neighbor_sample(
* @param [in] edge_biases Device array of edge biases to use for sampling. If NULL
* use the edge weight as the bias. If set to NULL, edges will be sampled uniformly.
* @param [in] start_vertices Device array of start vertices for the sampling
* @param [in] start_vertex_offsets Device array of the offsets for each label in the seed list. This
* parameter is only used with the retain_seeds option.
* @param [in] fan_out Host array defining the fan out at each step in the sampling algorithm.
* We only support fan_out values of type INT32
* @param [in] start_vertex_offsets Device array of the offsets for each label in the seed list.
* This parameter is only used with the retain_seeds option.
* @param [in] fan_out Host array defining the fan out at each step in the sampling
* algorithm. We only support fan_out values of type INT32
* @param [in] sampling_options
* Opaque pointer defining the sampling options.
* @param [in] do_expensive_check
Expand All @@ -633,7 +629,6 @@ cugraph_error_code_t cugraph_homogeneous_biased_neighbor_sample(
cugraph_sample_result_t** result,
cugraph_error_t** error);


/**
* @deprecated This call should be replaced with cugraph_sample_result_get_majors
* @brief Get the source vertices from the sampling algorithm result
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/c_api/array.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
* Copyright (c) 2021-2024, 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 Down
Loading

0 comments on commit 11f9c40

Please sign in to comment.