Skip to content

Commit

Permalink
Use Kokkos::numbers::pi instead of M_PI
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuuichi Asahi committed Oct 24, 2024
1 parent 3dd5776 commit 715cc0d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fft/unit_test/Test_Utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ void fft1(ViewType& in, ViewType& out) {
Kokkos::parallel_reduce(
Kokkos::TeamThreadRange(team_member, L),
[&](const int i, value_type& lsum) {
auto phase = -2 * I * M_PI * static_cast<real_value_type>(i) /
auto phase = -2 * I * Kokkos::numbers::pi *
static_cast<real_value_type>(i) /
static_cast<real_value_type>(L);

auto tmp_in = in(i);
Expand Down Expand Up @@ -145,7 +146,8 @@ void ifft1(ViewType& in, ViewType& out) {
Kokkos::parallel_reduce(
Kokkos::TeamThreadRange(team_member, L),
[&](const int i, value_type& lsum) {
auto phase = 2 * I * M_PI * static_cast<real_value_type>(i) /
auto phase = 2 * I * Kokkos::numbers::pi *
static_cast<real_value_type>(i) /
static_cast<real_value_type>(L);

auto tmp_in = in(i);
Expand Down

0 comments on commit 715cc0d

Please sign in to comment.