Skip to content

Commit

Permalink
modernize-type-traits
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuuichi Asahi committed Aug 29, 2024
1 parent 614d243 commit 14e7e84
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion common/src/KokkosFFT_layouts.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ auto get_extents(const InViewType& in, const OutViewType& out,
}
}

if (std::is_same<array_layout_type, Kokkos::LayoutLeft>::value) {
if (std::is_same_v<array_layout_type, Kokkos::LayoutLeft>) {
std::reverse(_in_extents.begin(), _in_extents.end());
std::reverse(_out_extents.begin(), _out_extents.end());
std::reverse(_fft_extents.begin(), _fft_extents.end());
Expand Down
2 changes: 1 addition & 1 deletion common/src/KokkosFFT_transpose.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ auto get_map_axes(const ViewType& view, axis_type<DIM> _axes) {
map.reserve(rank);
map_inv.reserve(rank);

if (std::is_same<array_layout_type, Kokkos::LayoutRight>::value) {
if (std::is_same_v<array_layout_type, Kokkos::LayoutRight>) {
// Stack axes not specified by axes (0, 1, 4)
for (int i = 0; i < rank; i++) {
if (!is_found(axes, i)) {
Expand Down
4 changes: 2 additions & 2 deletions fft/src/KokkosFFT_Plans.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<in_value_type>::value &&
if (KokkosFFT::Impl::is_real_v<in_value_type> &&
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<out_value_type>::value &&
if (KokkosFFT::Impl::is_real_v<out_value_type> &&
m_direction != KokkosFFT::Direction::backward) {
throw std::runtime_error(
"Plan::Plan: complex to real transform is constrcuted with forward "
Expand Down

0 comments on commit 14e7e84

Please sign in to comment.