alpaka-group / alpaka

Abstraction Library for Parallel Kernel Acceleration :llama:
https://alpaka.readthedocs.io
Mozilla Public License 2.0
337 stars 69 forks source link

std::is_trivially_copyable constraint on kernel type #2248

Closed jasminmohnke closed 12 hours ago

jasminmohnke commented 3 months ago

While #2198 clears the issue we had with the check on kernel arguments being trivially copyable as discussed in #2195, unfortunately I am running into a comparable issue with the check done on the kernel itself in

https://github.com/alpaka-group/alpaka/blob/a4142d3feb7686d803e1ec5f25d7b2278337f455/include/alpaka/kernel/Traits.hpp#L269-L271

If, for instance, a user kernel has a member that is of a type such as described previously (#2195), std::is_trivially_copyable evaluates to false as well. A trait similarly to the one you introduced for the kernel argument would be helpful to have for the kernel as well.

psychocoderHPC commented 3 months ago

Thanks for opening the issue, we will have a look into it.

psychocoderHPC commented 12 hours ago

fixed with #2302