Skip to content

Commit

Permalink
[KaMinPar] Fix compile warnings when building with 64 bit weights
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielSeemaier committed Jan 25, 2024
1 parent c00e98d commit 77969d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions kaminpar-shm/context_io.cc
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,10 @@ void print(const RefinementContext &r_ctx, std::ostream &out) {
}

void print(const PartitionContext &p_ctx, std::ostream &out) {
const std::int64_t max_block_weight = p_ctx.block_weights.max(0);
const std::int64_t size = std::max<std::int64_t>({p_ctx.n, p_ctx.m, max_block_weight});
const auto max_block_weight = static_cast<std::int64_t>(p_ctx.block_weights.max(0));
const auto size = std::max<std::int64_t>(
{static_cast<std::int64_t>(p_ctx.n), static_cast<std::int64_t>(p_ctx.m), max_block_weight}
);
const std::size_t width = std::ceil(std::log10(size));

out << " Number of nodes: " << std::setw(width) << p_ctx.n;
Expand Down
2 changes: 1 addition & 1 deletion kaminpar-shm/refinement/gains/hybrid_gain_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ template <bool iterate_exact_gains = true> class HybridGainCache {

NodeID _high_degree_threshold = kInvalidNodeID;
NodeID _n = kInvalidNodeID;
BlockID _k = kInvalidEdgeID;
BlockID _k = kInvalidBlockID;

StaticArray<EdgeWeight> _gain_cache;
StaticArray<EdgeWeight> _weighted_degrees;
Expand Down

0 comments on commit 77969d1

Please sign in to comment.