Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add minor fixes to accessor/multi_ptr wording #437

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
10 changes: 6 additions & 4 deletions adoc/chapters/programming_interface.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6994,10 +6994,12 @@ a@
template <access::decorated IsDecorated>
accessor_ptr<IsDecorated> get_multi_ptr() const noexcept
----
a@ Returns a [code]#multi_ptr# to the start of this accessor's underlying
buffer, even if this is a <<ranged-accessor>> whose range does not start
at the beginning of the buffer. The return value is unspecified if the
accessor is empty.
a@ Available only when [code]#(AccessTarget == target::device)#.

Returns a [code]#multi_ptr# to the start of this accessor's underlying buffer,
even if this is a <<ranged-accessor>> whose range does not start at the
beginning of the buffer. The return value is unspecified if the accessor is
empty.

This function may only be called from within a <<command>>.

Expand Down
3 changes: 2 additions & 1 deletion adoc/headers/accessorBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,10 @@ class accessor {
Available only when: (AccessTarget == target::device) */
global_ptr<DataT> get_pointer() const noexcept;

/* Available only when (AccessTarget == target::host_task) */
/* Available only when: (AccessTarget == target::host_task) */
std::add_pointer_t<value_type> get_pointer() const noexcept;

/* Available only when: (AccessTarget == target::device) */
template <access::decorated IsDecorated>
accessor_ptr<IsDecorated> get_multi_ptr() const noexcept;

Expand Down
6 changes: 6 additions & 0 deletions adoc/headers/multipointerlegacy.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace sycl {
template <typename ElementType, access::address_space Space>
class [[deprecated]] multi_ptr<ElementType, Space, access::decorated::legacy> {
public:
using value_type = ElementType;
using element_type = ElementType;
using difference_type = std::ptrdiff_t;

Expand Down Expand Up @@ -149,6 +150,7 @@ class [[deprecated]] multi_ptr<ElementType, Space, access::decorated::legacy> {
template <access::address_space Space>
class [[deprecated]] multi_ptr<VoidType, Space, access::decorated::legacy> {
public:
using value_type = VoidType;
using element_type = VoidType;
using difference_type = std::ptrdiff_t;

Expand Down Expand Up @@ -191,6 +193,10 @@ class [[deprecated]] multi_ptr<VoidType, Space, access::decorated::legacy> {
// Returns the underlying OpenCL C pointer
pointer_t get() const;

std::add_pointer_t<value_type> get_raw() const;

pointer_t get_decorated() const;

// Implicit conversion to the underlying pointer type
operator VoidType*() const;

Expand Down