Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.
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
3 changes: 2 additions & 1 deletion SYCL/Basic/device_implicitly_copyable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ template <> struct sycl::is_device_copyable<ACopyable> : std::true_type {};
template <typename DataT, size_t ArrSize>
void CaptureAndCopy(const DataT *data_arr, const DataT &data_scalar,
DataT *result_arr, DataT *result_scalar, sycl::queue &q) {
// We need to copy data_arr, otherwise when using a device it tries to use the host memory
// We need to copy data_arr, otherwise when using a device it tries to use the
// host memory

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// host memory
// host memory.

To align with LLVM code style.

DataT cpy_data_arr[ArrSize];
std::memcpy(cpy_data_arr, data_arr, sizeof(cpy_data_arr));
sycl::buffer<DataT, 1> buf_arr{result_arr, sycl::range<1>(ArrSize)};
Expand Down