Skip to content

Commit 98418af

Browse files
committed
Accessor aliases
In order to reduce the verbosity of programming with SYCL accessors, this proposal aims to reduce the number of template parameters to just 2 from the current 4 (placeholders accessors even have 5). It achieves this by adding aliases to accessors based on the access target and slightly revised rules for access modes. 1. Added aliases to accessors * `buffer_accessor`, * `constant_buffer_accessor * `host_accessor` 2. Deduce access mode based on constness of data type * `access::mode::read` for `const dataT` * `access::mode::read_write` for `dataT` 3. Allow conversions to new aliases 4. Return aliases from buffer access * `get_device_access` * `get_device_constant_access` * `get_host_access` 5. Allow any accessor to be registered with `handler::require` 6. Overload for `handler::require` that also takes an access mode * Hint to the scheduler 7. Type traits to help with deducing access modes * `access_mode_from_type` * `type_from_access_mode` 8. Default all accessor template parameters * Expect the data type * Default to an accessor to global buffer with read-write access * Assumes any accessor can be a placeholder 9. Discussed some considerations and alternatives 10. Examples of reduced verbosity
1 parent c9c87e8 commit 98418af

File tree

3 files changed

+592
-0
lines changed

3 files changed

+592
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,4 @@ from this registry in the future.
6262
| CP019 | [On-chip Memory Allocation](onchip-memory/index.md) | SYCL 1.2.1 vendor extension | 03 December 2018 | 03 December 2018 | _Available since CE 1.0.3_ |
6363
| CP020 | [Interop Task](interop_task/interop_task.md) | SYCL 1.2.1 | 16 January 2019 | 16 January 2019 | _Available since CE 1.0.5_ |
6464
| CP021 | [Default-Constructed Buffers](default-constructed-buffers/default-constructed-buffers.md) | SYCL 1.2.1 | 27 August 2019 | 5 September 2019 | _Draft_ |
65+
| CP023 | [Accessor aliases](accessor-alias/index.md) | SYCL 1.2.1 vendor extension | 22 September 2019 | 22 September 2019 | _Work in Progress_ |

accessor-alias/index.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Accessor aliases
2+
3+
| Proposal ID | CP023 |
4+
|-------------|--------|
5+
| Name | Accessor aliases |
6+
| Date of Creation | 22 September 2019 |
7+
| Target | SYCL 1.2.1 vendor extension |
8+
| Current Status | _Work in Progress_ |
9+
| Reply-to | Peter Žužek <[email protected]> |
10+
| Original author | Peter Žužek <[email protected]> |
11+
| Contributors | |
12+
13+
## Overview
14+
15+
This paper proposes the addition of target specific aliases to accessors
16+
in order to reduce accessor verbosity.
17+
18+
## Versions
19+
20+
[Version 1](sycl-2.2/index.md)

0 commit comments

Comments
 (0)