[SYCL 2020] Add accessor simplifications/deduction guides, host_accessor #490
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.
(cc @tomdeakin)
Initial implementation of
no_init
propertyproperty_list
which was required by the new accessor interface.Allows code patterns such as
Note: This PR does not yet contain additional changes/additions to the members of accessors, such as the iterator interface.
The only thing I'm not sure about is the pattern:
I think originally the intent was to allow this pattern in order to make read-write/read-only expressible only with accessor const-ness, but I don't see how the interface in the spec allows for that, and the wording in the spec appears pretty vague to me.
The spec hardcodes that the buffer arguments to the
accessor<T>
constructors is of typebuffer<T>
.We would need additional
accessor(buffer<std::remove_const_t<T>>&)
constructors to make constructingaccessor<const T>
frombuffer<T>
work, which the spec does not seem to anticipate (which would also double the number of constructors because we don't have enough yet ;-) )