Skip to content

Commit ae4c648

Browse files
Modify the semantics of no_alias to be consistent with C99 restrict. (#3112)
The purpose is to allow no_alias to be applied to multiple read-only accessors that refer to the same memory locations.
1 parent 3f95465 commit ae4c648

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

sycl/doc/extensions/accessor_properties/SYCL_ONEAPI_accessor_properties.asciidoc

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ Joe Garvey, Intel +
1111
Roland Schulz, Intel +
1212
Ilya Burylov, Intel +
1313
Michael Kinsner, Intel +
14-
John Pennycook, Intel
14+
John Pennycook, Intel +
15+
Jessica Davies, Intel
1516

1617
== Notice
17-
Copyright (c) 2019-2020 Intel Corporation. All rights reserved.
18+
Copyright (c) 2019-2021 Intel Corporation. All rights reserved.
1819

1920
== Status
2021

@@ -23,7 +24,7 @@ Working Draft - *DO NOT SHIP*
2324
== Version
2425

2526
Built On: {docdate} +
26-
Revision: 1
27+
Revision: 3
2728

2829
== Dependencies
2930

@@ -51,7 +52,7 @@ Adding a new compile-time-constant property consists of adding a class for it, e
5152

5253
This extension introduces two compile-time-constant properties: no_offset and no_alias.
5354
no_offset indicates that the corresponding accessor will never contain an offset.
54-
no_alias indicates that the corresponding accessor will not alias with any other accessor or USM pointer used in the kernel.
55+
no_alias indicates that all modifications to the memory locations accessed (directly or indirectly) by this accessor, that occur during kernel execution, will be done through this accessor (directly or indirectly) and no other accessor or USM pointer in the kernel.
5556

5657
=== Examples
5758
Due to type deduction, users should rarely need to specify the template parameters of accessor_property_list or accessor directly.
@@ -474,7 +475,7 @@ Rewrite Table 4.50: Properties supported by the SYCL accessor class as follows,
474475
| Property | Description | Compile-time Constant
475476
| sycl::property::noinit | The noinit property notifies the SYCL runtime that previous contents of a buffer can be discarded. Replaces deprecated discard_write and discard_read_write access modes. | No
476477
| ONEAPI::property::no_offset | The no_offset property notifies the SYCL device compiler that the accessor will never contain an offset. This may enable the compiler to make assumptions about the alignment of the accessor that it couldn't make otherwise. | Yes
477-
| ONEAPI::property::no_alias | The no_alias property notifies the SYCL device compiler that the accessor will not alias with any other accessors or USM pointers accessed in the same kernel. This is an unchecked assertion by the programmer and results in undefined behaviour if it is violated. | Yes
478+
| ONEAPI::property::no_alias | The no_alias property notifies the SYCL device compiler that all modifications to the memory locations accessed (directly or indirectly) by this accessor, that occur during kernel execution, will be done through this accessor (directly or indirectly) and no other accessor or USM pointer in the kernel. This is an unchecked assertion by the programmer and results in undefined behaviour if it is violated. | Yes
478479
|====
479480
--
480481

@@ -487,6 +488,7 @@ NOTE: The constructors for no_offset and no_alias are unspecified as users must
487488
[options="header"]
488489
|========================================
489490
|Rev|Date|Author|Changes
490-
|A|2020-06-18|Joe Garvey|Initial public draft
491-
|B|2020-09-08|Joe Garvey|Rewrote as a vendor extension in the ONEAPI namespace.
491+
|1|2020-06-18|Joe Garvey|Initial public draft
492+
|2|2020-09-08|Joe Garvey|Rewrote as a vendor extension in the ONEAPI namespace.
493+
|3|2021-01-28|Jessica Davies|Modify semantics of no_alias
492494
|========================================

0 commit comments

Comments
 (0)