Skip to content

Commit

Permalink
fix a compiler warning
Browse files Browse the repository at this point in the history
  • Loading branch information
seunghwak committed Jan 30, 2025
1 parent 63401b7 commit 481ab04
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cpp/src/community/k_truss_impl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,16 @@ struct extract_low_to_high_degree_edges_from_endpoints_t {
} else if (dst_out_degree < src_out_degree) {
return cuda::std::optional<thrust::tuple<vertex_t, vertex_t, edge_t>>{
thrust::make_tuple(dst, src, count[idx])};
} else {
if ((src_out_degree == dst_out_degree) && (src < dst) /* tie-breaking using vertex ID */) {
} else { // src_out_degree == dst_out_degree
if (src < dst /* tie-breaking using vertex ID */) {
return cuda::std::optional<thrust::tuple<vertex_t, vertex_t, edge_t>>{
thrust::make_tuple(src, dst, count[idx])};
} else if ((src_out_degree == dst_out_degree) &&
(src > dst) /* tie-breaking using vertex ID */) {
} else if (src > dst /* tie-breaking using vertex ID */) {
return cuda::std::optional<thrust::tuple<vertex_t, vertex_t, edge_t>>{
thrust::make_tuple(dst, src, count[idx])};
} else { // src == dst (self-loop)
assert(false); // should not be reached as we pre-excluded self-loops
return cuda::std::nullopt;
}
}
} else {
Expand Down

0 comments on commit 481ab04

Please sign in to comment.