From e08a0cd503f9782ae86f632635c6d1cd813b75a6 Mon Sep 17 00:00:00 2001 From: Josh Romero Date: Fri, 31 Jan 2025 14:43:28 -0800 Subject: [PATCH] Address narrowing conversion errors/warnings. --- include/internal/halo.h | 4 ++-- src/autotune.cc | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/internal/halo.h b/include/internal/halo.h index 1b02943..1058c05 100644 --- a/include/internal/halo.h +++ b/include/internal/halo.h @@ -153,7 +153,7 @@ void cudecompUpdateHalos_(int ax, const cudecompHandle_t handle, const cudecompG memcpy_params.ncopies = 2; cudecomp_batched_d2d_memcpy_3d(memcpy_params, stream); - std::array counts{halo_size, halo_size}; + std::array counts{static_cast(halo_size), static_cast(halo_size)}; std::array offsets{}; offsets[1] = halo_size; @@ -200,7 +200,7 @@ void cudecompUpdateHalos_(int ax, const cudecompHandle_t handle, const cudecompG std::array lx{}; size_t halo_size = shape_g_h[(dim + 1) % 3] * shape_g_h[(dim + 2) % 3] * halo_extents[dim]; - std::array counts{halo_size, halo_size}; + std::array counts{static_cast(halo_size), static_cast(halo_size)}; std::array send_offsets; std::array recv_offsets; diff --git a/src/autotune.cc b/src/autotune.cc index 959009f..88eb010 100644 --- a/src/autotune.cc +++ b/src/autotune.cc @@ -79,7 +79,8 @@ template static std::vector processTimings(cudecompHandle_t hand t_var /= handle->nranks; double t_std = std::sqrt(t_var); - return {t_min * scale, t_max * scale, t_avg * scale, t_std * scale}; + return {static_cast(t_min) * scale, static_cast(t_max) * scale, static_cast(t_avg) * scale, + static_cast(t_std) * scale}; } } // namespace