From 77969d13545e4c011418b8719842f8aebfff66b7 Mon Sep 17 00:00:00 2001 From: Daniel Seemaier Date: Thu, 25 Jan 2024 14:09:56 +0100 Subject: [PATCH] [KaMinPar] Fix compile warnings when building with 64 bit weights --- kaminpar-shm/context_io.cc | 6 ++++-- kaminpar-shm/refinement/gains/hybrid_gain_cache.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/kaminpar-shm/context_io.cc b/kaminpar-shm/context_io.cc index e3a86006..364823d4 100644 --- a/kaminpar-shm/context_io.cc +++ b/kaminpar-shm/context_io.cc @@ -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({p_ctx.n, p_ctx.m, max_block_weight}); + const auto max_block_weight = static_cast(p_ctx.block_weights.max(0)); + const auto size = std::max( + {static_cast(p_ctx.n), static_cast(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; diff --git a/kaminpar-shm/refinement/gains/hybrid_gain_cache.h b/kaminpar-shm/refinement/gains/hybrid_gain_cache.h index 828dfa82..ab657fcd 100644 --- a/kaminpar-shm/refinement/gains/hybrid_gain_cache.h +++ b/kaminpar-shm/refinement/gains/hybrid_gain_cache.h @@ -297,7 +297,7 @@ template class HybridGainCache { NodeID _high_degree_threshold = kInvalidNodeID; NodeID _n = kInvalidNodeID; - BlockID _k = kInvalidEdgeID; + BlockID _k = kInvalidBlockID; StaticArray _gain_cache; StaticArray _weighted_degrees;