You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current version of the SYCL 2020 specification allows conversion of size_t to and from id<1> and all operators are defined with a variant taking a size_t RHS operand. However, the way this is defined, the following code would be ambiguous:
sycl::id<1> x{1};
x = x + 1; // Ambiguous: Should it use `int + int` or `id<1> + id<1>`?
Possible solution: Change the operators with size_t arguments to take T instead, where std::is_integral_v<T> is `true. For example, see https://godbolt.org/z/TcM8hrWzE.
The current version of the SYCL 2020 specification allows conversion of
size_t
to and fromid<1>
and all operators are defined with a variant taking asize_t
RHS operand. However, the way this is defined, the following code would be ambiguous:Possible solution: Change the operators with
size_t
arguments to takeT
instead, wherestd::is_integral_v<T>
is `true. For example, see https://godbolt.org/z/TcM8hrWzE.Inspired by KhronosGroup/SYCL-CTS#870.
The text was updated successfully, but these errors were encountered: