Skip to content

Commit

Permalink
better naming
Browse files Browse the repository at this point in the history
  • Loading branch information
divyegala committed Oct 27, 2020
1 parent fc77980 commit 0000c94
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions cpp/include/raft/sparse/mst/detail/mst_kernels.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ namespace mst {
namespace detail {

template <typename vertex_t, typename edge_t, typename weight_t>
__global__ void kernel_min_edge_per_color(const vertex_t* offsets,
const edge_t* indices,
const weight_t* weights,
vertex_t* color, vertex_t* successor,
bool* mst_edge, const vertex_t v) {
__global__ void kernel_min_edge_per_vertex(const vertex_t* offsets,
const edge_t* indices,
const weight_t* weights,
vertex_t* color, vertex_t* successor,
bool* mst_edge, const vertex_t v) {
edge_t tid = threadIdx.x + blockIdx.x * blockDim.x;

unsigned warp_id = tid / 32;
Expand Down
6 changes: 3 additions & 3 deletions cpp/include/raft/sparse/mst/detail/mst_solver_inl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void MST_solver<vertex_t, edge_t, weight_t>::solve() {
RAFT_EXPECTS(indices != nullptr, "Null indices.");
RAFT_EXPECTS(weights != nullptr, "Null weights.");

min_edge_per_color();
min_edge_per_vertex();

detail::printv(successor);

Expand Down Expand Up @@ -136,15 +136,15 @@ void MST_solver<vertex_t, edge_t, weight_t>::label_prop() {
}

template <typename vertex_t, typename edge_t, typename weight_t>
void MST_solver<vertex_t, edge_t, weight_t>::min_edge_per_color() {
void MST_solver<vertex_t, edge_t, weight_t>::min_edge_per_vertex() {
auto stream = handle.get_stream();
int n_threads = 32;

vertex_t* color_ptr = thrust::raw_pointer_cast(color.data());
vertex_t* successor_ptr = thrust::raw_pointer_cast(successor.data());
bool* mst_edge_ptr = thrust::raw_pointer_cast(mst_edge.data());

detail::kernel_min_edge_per_color<<<v, n_threads, 0, stream>>>(
detail::kernel_min_edge_per_vertex<<<v, n_threads, 0, stream>>>(
offsets, indices, weights, color_ptr, successor_ptr, mst_edge_ptr, v);
}

Expand Down
2 changes: 1 addition & 1 deletion cpp/include/raft/sparse/mst/mst_solver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class MST_solver {
rmm::device_vector<edge_t> min_edge_color; // minimum incident edge per color

void label_prop();
void min_edge_per_color();
void min_edge_per_vertex();
};

} // namespace mst
Expand Down

0 comments on commit 0000c94

Please sign in to comment.