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

Apply traits to operations #120

Merged
merged 4 commits into from
Jul 23, 2024

Conversation

yasahi-hpc
Copy link
Collaborator

Improves #80

This PR aims at applying new traits from KokkosFFT_traits.hpp to unary (fftshift, ifftshift) and binary (Plan and fft functions) operations.

Static assertions are applied to Unary and Binary APIs.

  • Introduce is_view_operatable_v for Unary operation (Views can be accessible from Execspace and the base value types are float/double/Kokkos::complex<float>/Kokkos::complex<double>. In addition, layout is either Kokkos::LayoutLeft or Kokkos::LayoutRight.
  • Introduce are_views_operatable_v for Binary operation (Both Views are operatable and have the same precision, layout and rank)
  • Introduce have_same_base_floating_point_type_v for Binary operation (the values have the same base floating point type. For example, float and Kokkos::complex<float> have the same base floating point type)
  • Introduce have_same_layout_v for Binary operation
  • Introduce have_same_rank_v for Binary operation
  • Apply are_views_operatable_v to binary APIs. Exec space and memory space consistency, precision consistency, layout consistency and rank consistency.
  • Apply is_view_operatable_v to unary APIs. Exec space and memory space consistency.

@yasahi-hpc yasahi-hpc self-assigned this Jul 23, 2024
@yasahi-hpc yasahi-hpc merged commit 73b2c77 into kokkos:main Jul 23, 2024
19 checks passed
@yasahi-hpc yasahi-hpc deleted the apply-traits-to-operations branch July 23, 2024 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants