Skip to content

Commit

Permalink
Fixes #321: Weakening requirement of kernel parameters from `std::is_…
Browse files Browse the repository at this point in the history
…trivially_copyable` to `std::is_trivially_copy_cosntructible`.
  • Loading branch information
eyalroz committed Jun 20, 2022
1 parent d44c0db commit d25ad9b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/cuda/api/kernel_launch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,8 @@ void enqueue_launch(
KernelParameters&&... parameters)
{
static_assert(
detail_::all_true<
::std::is_trivially_copyable<detail_::kernel_parameter_decay_t<KernelParameters>>::value...
>::value,
"All kernel parameter types must be of a trivially copyable (decayed) type." );
detail_::all_true<::std::is_trivially_copy_constructible<detail_::kernel_parameter_decay_t<KernelParameters>>::value...>::value,
"All kernel parameter types must be of a trivially copy-constructible (decayed) type." );
constexpr const bool wrapped_kernel = ::std::is_base_of<kernel_t, typename ::std::decay<Kernel>::type>::value;
// We would have liked an "if constexpr" here, but that is unsupported by C++11, so we have to
// use tagged dispatch for the separate behavior for raw and wrapped kernels - although the enqueue_launch
Expand Down

0 comments on commit d25ad9b

Please sign in to comment.