From f99030d3ede8fd9db97810771c25a542d5e9de7b Mon Sep 17 00:00:00 2001 From: Richard Barnes Date: Wed, 16 Oct 2024 19:40:15 -0700 Subject: [PATCH] Fix shadowed variable in spdl/src/libspdl/core/detail/nvjpeg/decoding.cpp Differential Revision: D64398711 Pull Request resolved: https://github.com/facebookresearch/spdl/pull/248 --- src/libspdl/core/detail/nvjpeg/decoding.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libspdl/core/detail/nvjpeg/decoding.cpp b/src/libspdl/core/detail/nvjpeg/decoding.cpp index 3958c321..d860dcf1 100644 --- a/src/libspdl/core/detail/nvjpeg/decoding.cpp +++ b/src/libspdl/core/detail/nvjpeg/decoding.cpp @@ -58,13 +58,13 @@ std::tuple get_output( std::optional batch_size = std::nullopt) { auto [num_channels, interleaved] = get_shape(out_fmt); - auto buffer = [&](const size_t ch, bool interleaved) { + auto buffer = [&](const size_t ch, bool interleaved_2) { return batch_size - ? (interleaved + ? (interleaved_2 ? cuda_buffer({*batch_size, height, width, ch}, cuda_config) : cuda_buffer({*batch_size, ch, height, width}, cuda_config)) - : (interleaved ? cuda_buffer({height, width, ch}, cuda_config) - : cuda_buffer({ch, height, width}, cuda_config)); + : (interleaved_2 ? cuda_buffer({height, width, ch}, cuda_config) + : cuda_buffer({ch, height, width}, cuda_config)); }(num_channels, interleaved); return {