[SYCL] Add a nice error message to sycl::buffer to std::string #4973
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since sycl::vec is not a trivially copyable class, even though we
have defined a specialization for sycl::is_device_copyable template
for the sycl::vec class itself, it doesn't make any classes that have
members of the sycl::vec type device copyable since those classes aren't
trivially copyable yet. For example, a class from SYCL-CTS:
template
struct image_accessor_failure_item {
bool triggered;
T value;
T expected;
image_accessor_failure_item() :
triggered(false),
value(0),
expected(0) {}
};
is not trivially copyable since it has two fields: value and expected of
type sycl::vec; therefore, the class is not device copyable and a
compilation error occurs when a sycl::buffer is created for this class
instances.
The regression makes us to revert the commit and delay adding the general
check until the sycl::vec class is modified to be trivially copyable. Instead a particular
check for the std::string class only was added.