Skip to content

Commit 2d312cf

Browse files
authored
[SYCL][Doc] Clarify device_global initialization ambiguity (#5203)
This is not meant to be a functional change to when initialization occurs; this was always out intent. I'm just trying to make the wording more clear.
1 parent 7a53ff6 commit 2d312cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sycl/doc/extensions/DeviceGlobal/SYCL_INTEL_device_global.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ _T_ is restricted to types that have a trivial destructor and a trivial default
183183

184184
Since _T_ is restricted to types with trivial default constructors in this version of the specification, there are no non-default `device_global` constructors, and therefore no initialization values may be specified for the content of a `device_global` allocation on a device.
185185

186-
The allocation of type _T_ is zero-initialized on each device prior to the first access to that `device_global` variable.
186+
The allocation of type _T_ for a given `device_global` is zero-initialized on a given device prior to the first access to that `device_global` on that device. For the purposes of this definition an access can be a direct access of the `device_global` in kernel code or a copy to or from that `device_global` enqueued to the given device.
187187

188188
Properties may be specified for a `device_global` to provide semantic
189189
modification or optimization hint information to the compiler. See the section

0 commit comments

Comments
 (0)