From 173563d37389ad8e972aea98c5aafb5d96a89aa0 Mon Sep 17 00:00:00 2001 From: Bernhard Manfred Gruber Date: Thu, 30 Jun 2022 01:26:08 +0200 Subject: [PATCH] Fix a warning on an unused variable --- include/llama/mapping/SoA.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/llama/mapping/SoA.hpp b/include/llama/mapping/SoA.hpp index 99bc5fb62a..8515f07eb7 100644 --- a/include/llama/mapping/SoA.hpp +++ b/include/llama/mapping/SoA.hpp @@ -81,8 +81,6 @@ namespace llama::mapping typename Base::ArrayIndex ad, RecordCoord = {}) const -> NrAndOffset { - const auto subArrayOffset = LinearizeArrayDimsFunctor{}(ad, Base::extents()) - * static_cast(sizeof(GetType>)); if constexpr(SeparateBuffers) { constexpr auto blob = flatRecordCoord>; @@ -92,6 +90,8 @@ namespace llama::mapping } else { + const auto subArrayOffset = LinearizeArrayDimsFunctor{}(ad, Base::extents()) + * static_cast(sizeof(GetType>)); constexpr std::size_t flatFieldIndex = #ifdef __NVCC__ *& // mess with nvcc compiler state to workaround bug