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

std::is_trivially_copyable constraint on kernel arguments and functions #2367

Open
jasminmohnke opened this issue Aug 21, 2024 · 1 comment

Comments

@jasminmohnke
Copy link

As previously talked about, the std::is_trivially_copyable constraint enforcement for kernel arguments and kernel functions that were introduced with release version 0.9.0 lead to some issues for us. While the traits introduced with #2198 and #2302 help mitigate this, in practice it is not very sustainable for us to declare IsKernelTriviallyCopyable for each templated kernel that requires this. It would be helpful to have something like a compile-time option that makes it possible to avoid this std::is_trivially_copyable check alltogether giving the responsibility that this is the case back to the user if they choose so.

@psychocoderHPC
Copy link
Member

psychocoderHPC commented Aug 26, 2024

It should be possible that you implement a specialization in your user code but with the same possible side affects a flag will have where the check is disabled.

namespace alpaka::trait
{
  template<typename T>
  struct IsKernelArgumentTriviallyCopyable<T,void>
      : std::true_type
  {
  };
}

This will evaluate for any kernel to true and therefore disable the check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants