1515 */
1616#pragma once
1717
18+ #include < cugraph/arithmetic_variant_types.hpp>
1819#include < cugraph/large_buffer_manager.hpp>
20+ #include < cugraph/utilities/dataframe_buffer.hpp>
1921
2022#include < raft/core/handle.hpp>
2123#include < raft/core/host_span.hpp>
@@ -75,51 +77,56 @@ shuffle_ext_vertex_value_pairs(raft::handle_t const& handle,
7577 * @brief Shuffle external edges to the owning GPUs (by edge partitioning)
7678 *
7779 * @tparam vertex_t Type of vertex identifiers. Needs to be an integral type.
78- * @tparam edge_t Type of edge identifiers. Needs to be an integral type.
79- * @tparam weight_t Type of edge weight. Currently float and double are supported.
80- * @tparam edge_type_t Type of edge type. Needs to be an integral type, currently only int32_t is
81- * supported.
82- * @tparam edge_time_t Type of edge time. Needs to be an integral type.
8380 *
8481 * @param handle RAFT handle object to encapsulate resources (e.g. CUDA stream, communicator, and
8582 * handles to various CUDA libraries) to run graph algorithms.
8683 * @param edge_srcs Vector of source vertex ids
8784 * @param edge_dsts Vector of destination vertex ids
88- * @param edge_weights Optional vector of edge weights
89- * @param edge_ids Optional vector of edge ids
90- * @param edge_types Optional vector of edge types
91- * @param edge_start_times Optional vector of edge start times
92- * @param edge_end_times Optional vector of edge end times
85+ * @param edge_properties Vector of edge properties, each element is an arithmetic device vector
9386 * @param store_transposed Should be true if shuffled edges will be used with a cugraph::graph_t
9487 * object with store_tranposed = true. Should be false otherwise.
95- * @return Tuple of vectors storing edge sources, destinations, optional weights,
96- * optional edge ids, optional edge types, optional edge start times, optional edge end
97- * times mapped to this GPU and a vector storing the number of edges received from each GPU.
88+ * @return Tuple of vectors storing edge sources, destinations, and edge properties
9889 */
99- template <typename vertex_t ,
100- typename edge_t ,
101- typename weight_t ,
102- typename edge_type_t ,
103- typename edge_time_t >
90+ template <typename vertex_t >
10491std::tuple<rmm::device_uvector<vertex_t >,
10592 rmm::device_uvector<vertex_t >,
106- std::optional<rmm::device_uvector<weight_t >>,
107- std::optional<rmm::device_uvector<edge_t >>,
108- std::optional<rmm::device_uvector<edge_type_t >>,
109- std::optional<rmm::device_uvector<edge_time_t >>,
110- std::optional<rmm::device_uvector<edge_time_t >>,
93+ std::vector<cugraph::arithmetic_device_uvector_t >,
11194 std::vector<size_t >>
11295shuffle_ext_edges (raft::handle_t const & handle,
11396 rmm::device_uvector<vertex_t >&& edge_srcs,
11497 rmm::device_uvector<vertex_t >&& edge_dsts,
115- std::optional<rmm::device_uvector<weight_t >>&& edge_weights,
116- std::optional<rmm::device_uvector<edge_t >>&& edge_ids,
117- std::optional<rmm::device_uvector<edge_type_t >>&& edge_types,
118- std::optional<rmm::device_uvector<edge_time_t >>&& edge_start_times,
119- std::optional<rmm::device_uvector<edge_time_t >>&& edge_end_times,
98+ std::vector<cugraph::arithmetic_device_uvector_t >&& edge_properties,
12099 bool store_transposed,
121100 std::optional<large_buffer_type_t > large_buffer_type = std::nullopt );
122101
102+ /* *
103+ * @ingroup graph_functions_cpp
104+ * @brief Shuffle internal edges to the owning GPUs (by edge partitioning)
105+ *
106+ * @tparam vertex_t Type of vertex identifiers. Needs to be an integral type.
107+ *
108+ * @param handle RAFT handle object to encapsulate resources (e.g. CUDA stream, communicator, and
109+ * handles to various CUDA libraries) to run graph algorithms.
110+ * @param edge_srcs Vector of source vertex ids
111+ * @param edge_dsts Vector of destination vertex ids
112+ * @param edge_properties Vector of edge properties, each element is an arithmetic device vector
113+ * @param store_transposed Should be true if shuffled edges will be used with a cugraph::graph_t
114+ * object with store_tranposed = true. Should be false otherwise.
115+ * @return Tuple of vectors storing edge sources, destinations, and edge properties
116+ */
117+ template <typename vertex_t >
118+ std::tuple<rmm::device_uvector<vertex_t >,
119+ rmm::device_uvector<vertex_t >,
120+ std::vector<cugraph::arithmetic_device_uvector_t >,
121+ std::vector<size_t >>
122+ shuffle_int_edges (raft::handle_t const & handle,
123+ rmm::device_uvector<vertex_t >&& majors,
124+ rmm::device_uvector<vertex_t >&& minors,
125+ std::vector<cugraph::arithmetic_device_uvector_t >&& edge_properties,
126+ bool store_transposed,
127+ raft::host_span<vertex_t const > vertex_partition_range_lasts,
128+ std::optional<large_buffer_type_t > large_buffer_type = std::nullopt );
129+
123130/* *
124131 * @brief Shuffle local edge sources (already placed by edge partitioning) to the owning GPUs (by
125132 * vertex partitioning).
@@ -129,7 +136,8 @@ shuffle_ext_edges(raft::handle_t const& handle,
129136 * @param handle RAFT handle object to encapsulate resources (e.g. CUDA stream, communicator, and
130137 * handles to various CUDA libraries) to run graph algorithms.
131138 * @param edge_srcs Vector of local edge source IDs
132- * @param vertex_partition_range_lasts Span of vertex partition range lasts (size = number of GPUs)
139+ * @param vertex_partition_range_lasts Span of vertex partition range lasts (size = number of
140+ * GPUs)
133141 * @param store_transposed Should be true if shuffled edges will be used with a cugraph::graph_t
134142 * object with store_tranposed = true. Should be false otherwise.
135143 * @return Vector of shuffled edge source vertex IDs (shuffled by vertex partitioning).
0 commit comments