Skip to content

Commit

Permalink
Address minor comments
Browse files Browse the repository at this point in the history
  • Loading branch information
aprokop committed Oct 23, 2023
1 parent bfa6054 commit 07b8449
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/details/ArborX_MinimumSpanningTree.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ void computeParents(ExecutionSpace const &space, Edges const &edges,

using MemorySpace = typename SidedParents::memory_space;

auto num_edges = edges.size();
int num_edges = edges.size();

// Encode both a sided parent and an edge weight into long long.
// This way, once we sort based on this value, edges with the same sided
Expand Down Expand Up @@ -619,8 +619,8 @@ void computeParents(ExecutionSpace const &space, Edges const &edges,
// signbit instead of >= 0 just as an extra precaution against negative
// floating zeros.
static_assert(sizeof(int) == sizeof(float));
assert(Kokkos::isfinite(edge.weight) &&
Kokkos::signbit(edge.weight) == 0);
KOKKOS_ASSERT(Kokkos::isfinite(edge.weight) &&
Kokkos::signbit(edge.weight) == 0);
keys(e) = (key << shift) + KokkosExt::bit_cast<int>(edge.weight);
});

Expand Down Expand Up @@ -660,7 +660,7 @@ void computeParents(ExecutionSpace const &space, Edges const &edges,
// Find the index of the smallest edge with the same weight in
// this chain
int m = i;
for (int k = i + 1; k < (int)num_edges && keys(k) == key; ++k)
for (int k = i + 1; k < num_edges && keys(k) == key; ++k)
if (edges(permute(k)) < edges(permute(m)))
m = k;

Expand All @@ -675,7 +675,7 @@ void computeParents(ExecutionSpace const &space, Edges const &edges,
Kokkos::RangePolicy<ExecutionSpace>(space, 0, num_edges),
KOKKOS_LAMBDA(int const i) {
int e = permute(i);
if (i == (int)num_edges - 1)
if (i == num_edges - 1)
{
// The parent of the root node is set to -1
parents(e) = -1;
Expand Down
2 changes: 1 addition & 1 deletion test/tstDendrogram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(dendrogram_boruvka_same_weights, DeviceType,
Kokkos::atomic_inc(&counts(mst.dendrogram_parents(i)));
});

int wrong_counts = 0;
int wrong_counts;
Kokkos::parallel_reduce(
"Testing::check_counts",
Kokkos::RangePolicy<ExecutionSpace>(space, 0, 2 * n - 1),
Expand Down

0 comments on commit 07b8449

Please sign in to comment.