From 14e7e84b8a1135c089cd508ddfe9db12adc03442 Mon Sep 17 00:00:00 2001 From: Yuuichi Asahi Date: Thu, 29 Aug 2024 19:00:08 +0900 Subject: [PATCH] modernize-type-traits --- common/src/KokkosFFT_layouts.hpp | 2 +- common/src/KokkosFFT_transpose.hpp | 2 +- fft/src/KokkosFFT_Plans.hpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/src/KokkosFFT_layouts.hpp b/common/src/KokkosFFT_layouts.hpp index 065b898c..4aaed717 100644 --- a/common/src/KokkosFFT_layouts.hpp +++ b/common/src/KokkosFFT_layouts.hpp @@ -92,7 +92,7 @@ auto get_extents(const InViewType& in, const OutViewType& out, } } - if (std::is_same::value) { + if (std::is_same_v) { std::reverse(_in_extents.begin(), _in_extents.end()); std::reverse(_out_extents.begin(), _out_extents.end()); std::reverse(_fft_extents.begin(), _fft_extents.end()); diff --git a/common/src/KokkosFFT_transpose.hpp b/common/src/KokkosFFT_transpose.hpp index d74e03cf..a05be798 100644 --- a/common/src/KokkosFFT_transpose.hpp +++ b/common/src/KokkosFFT_transpose.hpp @@ -40,7 +40,7 @@ auto get_map_axes(const ViewType& view, axis_type _axes) { map.reserve(rank); map_inv.reserve(rank); - if (std::is_same::value) { + if (std::is_same_v) { // Stack axes not specified by axes (0, 1, 4) for (int i = 0; i < rank; i++) { if (!is_found(axes, i)) { diff --git a/fft/src/KokkosFFT_Plans.hpp b/fft/src/KokkosFFT_Plans.hpp index a5793ba6..caeeb2ca 100644 --- a/fft/src/KokkosFFT_Plans.hpp +++ b/fft/src/KokkosFFT_Plans.hpp @@ -233,14 +233,14 @@ class Plan { "Plan::Plan: View rank must be larger than or equal to the " "Rank of FFT axes"); - if (std::is_floating_point::value && + if (KokkosFFT::Impl::is_real_v && m_direction != KokkosFFT::Direction::forward) { throw std::runtime_error( "Plan::Plan: real to complex transform is constrcuted with backward " "direction."); } - if (std::is_floating_point::value && + if (KokkosFFT::Impl::is_real_v && m_direction != KokkosFFT::Direction::backward) { throw std::runtime_error( "Plan::Plan: complex to real transform is constrcuted with forward "