From e3454ae0f1d56e66f4575fd5ce863245fca6775e Mon Sep 17 00:00:00 2001 From: yasahi-hpc <57478230+yasahi-hpc@users.noreply.github.com> Date: Fri, 2 Aug 2024 10:47:16 +0200 Subject: [PATCH] Improve check functions (#125) * Add a trait to extract the base value type from a container * extend check functions to work on std::array or std::vector * Avoid throw from a check function * remove uunnecessary check from are_valid_axes and add overlaped axes tests * rename: key to value for find function * fix: remove a variable rank which is no longer used --------- Co-authored-by: Yuuichi Asahi --- common/src/KokkosFFT_traits.hpp | 25 ++++ common/src/KokkosFFT_utils.hpp | 72 +++++++++--- common/unit_test/Test_Traits.cpp | 49 ++++++++ common/unit_test/Test_Utils.cpp | 190 +++++++++++++++++++++++++++---- 4 files changed, 300 insertions(+), 36 deletions(-) diff --git a/common/src/KokkosFFT_traits.hpp b/common/src/KokkosFFT_traits.hpp index 312797bd..284e65f8 100644 --- a/common/src/KokkosFFT_traits.hpp +++ b/common/src/KokkosFFT_traits.hpp @@ -215,6 +215,31 @@ inline constexpr bool are_operatable_views_v = // Other traits +template +struct base_container_value; + +template