Skip to content

Commit

Permalink
Merge pull request #557 from VerenaBeckham/verena/deprecate_selector_…
Browse files Browse the repository at this point in the history
…types

Deprecate device selector types.
  • Loading branch information
gmlueck authored May 30, 2024
2 parents a9cb5c2 + 30a18de commit 076b585
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions adoc/chapters/programming_interface.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ i.e. for the specific device [code]#dev#
and each aspect [code]#devAspect# from [code]#aspectList#
[code]#dev.has(devAspect)# equals [code]#true#.
If no aspects are passed in,
the generated selector behaves like [code]#default_selector#.
the generated selector behaves like [code]#default_selector_v#.

Required aspects can be passed in as a vector, as function arguments,
or as template parameters, depending on the function overload.
Expand Down Expand Up @@ -903,7 +903,7 @@ Examples of using [code]#aspect_selector#:
----
using namespace sycl; // (optional) avoids need for "sycl::" before SYCL names

// Unrestrained selection, equivalent to default_selector
// Unrestrained selection, equivalent to default_selector_v
auto dev0 = device{aspect_selector()};

// Pass aspects in a vector
Expand Down Expand Up @@ -933,7 +933,7 @@ In SYCL 1.2.1 the predefined device selectors were actually types that had to be
instantiated to be used.
Now they are just instances.
To simplify porting code using the old type instantiations, a
backward-compatible API is still provided, such as
backward-compatible API is still provided, though deprecated, such as
[code]#sycl::default_selector#.
The new predefined device selectors have their new names appended with "_v" to
avoid conflicts, thus following the naming style used by traits in the {cpp}
Expand Down
1 change: 1 addition & 0 deletions adoc/headers/deviceSelector.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ __unspecified__ gpu_selector_v;
__unspecified__ accelerator_selector_v;

// Predefined types for compatibility with old SYCL 1.2.1 device selectors
// Deprecated in SYCL 2020
using default_selector = __unspecified__;
using cpu_selector = __unspecified__;
using gpu_selector = __unspecified__;
Expand Down

0 comments on commit 076b585

Please sign in to comment.