[oneDPL] Fixing zip_iterator for value_type
and base()
return
#605
+6
−6
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.
The existing
zip_iterator
class specification usesstd::tuple
as thevalue_type
and also the return ofbase()
.This is problematic for device copyability for dpcpp device backend and is not how oneDPL has implemented
zip_iterator
for quite some time.std::tuple
is not required to be trivially copyable, which causes pain when dealing withzip_iterator
and SYCL kernels, requiringis_device_copyable
specializations for any types which are composed ofzip_iterator::value_type
.We currently leave
pointer
asstd::tuple
(it is still astd::tuple
in our implementation), but could consider changing it in this PR to be more broad in case of future changes.pointer
seems less of an issue from a device copyable standpoint, but it still may be nice to use a consistent unspecified tuple across the type, and changing it here would give more freedom in the future.I view this as a bugfix for the specification, rather than a breaking change, but that is of course up for discussion.