Skip to content

Commit cecab45

Browse files
authored
Merge pull request KhronosGroup#275 from gmlueck/gmlueck/selector-callable
Clarify device selector
2 parents 4f7334e + bb887e3 commit cecab45

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

adoc/chapters/programming_interface.adoc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -820,16 +820,16 @@ an integer ranking value to all the devices on the system.
820820
[[sec:device-selector]]
821821
==== Device selector
822822

823-
The actual interface for a <<device-selector>> is a callable
824-
taking a [code]#const device# reference and returning a
825-
value implicitly convertible to an [code]#int#.
826-
827-
At any point where the <<sycl-runtime>> needs to select a SYCL
828-
[code]#device# using a <<device-selector>>, the system will query
829-
all available SYCL [code]#devices# from all <<backend, SYCL backends>> in the
830-
system, will call the <<device-selector>> on each device and select the one
831-
which returns the highest score. If the highest value is strictly
832-
negative no device is selected.
823+
The interface for a <<device-selector>> is any object that meets the C++ named
824+
requirement [code]#Callable#, taking a parameter of type [code]#const device &#
825+
and returning a value that is implicitly convertible to [code]#int#.
826+
827+
At any point where the <<sycl-runtime>> needs to select a SYCL [code]#device#
828+
using a <<device-selector>>, the system queries all
829+
<<root-device, root devices>> from all <<backend, SYCL backends>> in the
830+
system, calls the <<device-selector>> on each device and selects the one
831+
which returns the highest score. If the highest value is strictly negative no
832+
device is selected.
833833

834834
In places where only one device has to be picked and the high score is
835835
obtained by more than one device, then one of the tied devices will be

0 commit comments

Comments
 (0)