Open jasminmohnke opened 3 months ago
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.
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.