Skip to content

Commit

Permalink
Fix typo with "accessor::get_pointer"
Browse files Browse the repository at this point in the history
It appears that we introduced a typo with KhronosGroup#432 with the return type of
`accessor::get_pointer`.  In the synopsis, we specified it as:

```
global_ptr<DataT> get_pointer() const noexcept
```

But in the description, it seems that we made a typo and said:

```
global_ptr<access::decorated::legacy> get_pointer() const noexcept
```

I believe these are both wrong, and it should be:

```
global_ptr<value_type> get_pointer() const noexcept
```

Using `value_type` is better than `DataT` because `value_type` is const
when the accessor is read-only.
  • Loading branch information
gmlueck committed Apr 16, 2024
1 parent 90a6694 commit 82bfd76
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion adoc/chapters/programming_interface.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6927,7 +6927,7 @@ accessor was constructed. For other accessors, returns the default constructed
a@
[source]
----
global_ptr<access::decorated::legacy> get_pointer() const noexcept
global_ptr<value_type> get_pointer() const noexcept
----
a@ Available only when [code]#(AccessTarget == target::device)#.

Expand Down
2 changes: 1 addition & 1 deletion adoc/headers/accessorBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class accessor {

/* Deprecated in SYCL 2020
Available only when: (AccessTarget == target::device) */
global_ptr<DataT> get_pointer() const noexcept;
global_ptr<value_type> get_pointer() const noexcept;

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

0 comments on commit 82bfd76

Please sign in to comment.