Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

identity tests on odd numbers #21

Merged
merged 1 commit into from
Jan 8, 2024
Merged

identity tests on odd numbers #21

merged 1 commit into from
Jan 8, 2024

Conversation

yasahi-hpc
Copy link
Collaborator

In this PR, I have added tests of 1D FFT over odd numbers. It worked correctly.

const int maxlen     = 32;
for (int i = 1; i < maxlen; i++) {
  ComplexView1DType a("a", i), _a("_a", i), a_ref("a_ref", i);
  ComplexView1DType out("out", i), outr("outr", i / 2 + 1);
  RealView1DType ar("ar", i), _ar("_ar", i), ar_ref("ar_ref", i);

  KokkosFFT::fft(execution_space(), a, out);
  KokkosFFT::ifft(execution_space(), out, _a);

  KokkosFFT::rfft(execution_space(), ar, outr);
  KokkosFFT::irfft(execution_space(), outr, _ar);

  EXPECT_TRUE(allclose(_a, a_ref, 1.e-5, atol));
  EXPECT_TRUE(allclose(_ar, ar_ref, 1.e-5, atol));
}

@yasahi-hpc yasahi-hpc merged commit 3800bc2 into main Jan 8, 2024
4 checks passed
@yasahi-hpc yasahi-hpc deleted the fft-on-odd-numbers branch January 8, 2024 15:45
@yasahi-hpc yasahi-hpc mentioned this pull request Jan 8, 2024
31 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant