Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion sycl/include/CL/sycl/handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,11 @@ class __SYCL_EXPORT handler {
static_cast<int>(AccessTarget), ArgIndex);
}

template <typename T> void setArgHelper(int ArgIndex, T &&Arg) {
template <typename T>
typename std::enable_if<std::is_trivially_copyable<T>::value &&
std::is_standard_layout<T>::value,
void>::type
setArgHelper(int ArgIndex, T &&Arg) {
void *StoredArg = (void *)storePlainArg(Arg);

if (!std::is_same<cl_mem, T>::value && std::is_pointer<T>::value) {
Expand Down