Skip to content

Commit 46a0669

Browse files
committed
Improve the wording. Add a note about exceptions.
1 parent 6e0d20a commit 46a0669

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

source/elements/oneDPL/source/parallel_api/execution_policies.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,13 @@ It is a global immutable (``const``) instance of type ``device_policy<>``.
168168
[*Note*: ``dpcpp_default`` can be copied but cannot be moved. -- *end note*]
169169

170170
``dpdefault``, ``dpgpu``, and `dpcpu`` are variable templates for creating ``device_policy`` objects,
171-
possibly with user-provided kernel names, to run algorithms on the default SYCL device, a GPU device,
172-
and a CPU device, respectively. A policy object instantiated from one of these templates is associated
173-
with a SYCL queue constructed with the device selector appropriate for the template used.
171+
possibly with explicit kernel names, to run algorithms on the default SYCL device, a GPU device,
172+
and a CPU device, respectively. An object instantiated from one of these templates is a global
173+
immutable ``device_policy`` object. It is associated with a SYCL queue constructed with
174+
the SYCL device selector that corresponds to the used variable template.
174175
[*Example*: ``dpgpu<>`` is associated with a queue created by ``sycl::gpu_selector_v``. -- *end example*]
175176

176-
177+
Creation or use of a `dpgpu` or a `dpcpu` policy object can throw ``sycl::exception`` if no appropriate device is found.
177178

178179
make_device_policy Function
179180
^^^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)