@@ -116,16 +116,12 @@ inline constexpr range_type_key::value_t<T> range_type;
116116|Property|Description
117117
118118|`range_type`
119- |The `range_type` property adds the requirement that the kernel must be
120- compatible with kernel launches where the linear index of a work-item lies
121- in the range [0, `std::numeric_limits<T>::max()`).
122-
123- If the implementation cannot satisfy this requirement, the implementation
124- must throw an `exception` with the `errc::kernel_not_supported` error code,
125- regardless of launch configuration.
126- If the implementation can satisfy this requirement, but the kernel is
127- launched with an incompatible configuration, the implementation must throw
128- an `exception` with the `errc::nd_range` error code.
119+ |The `range_type` property is an assertion by the application that the kernel
120+ will never be launched with more than `std::numeric_limits<T>::max()`
121+ work-items.
122+ If the kernel is launched with more than this many work-items, the
123+ implementation must throw a synchronous `exception` with the `errc::nd_range`
124+ error code.
129125
130126`T` must be an integral type.
131127
@@ -138,29 +134,17 @@ namespace syclex = sycl::ext::oneapi::experimental;
138134
139135struct SmallKernel
140136{
141- // Declare that this kernel supports [0, 2^31-1) work-items.
137+ // Declare that this kernel supports at most 2^31-1 work-items.
142138 auto get(syclex::properties_tag) const {
143139 return syclex::properties{syclex::range_type<int>};
144140 }
145141};
146142
147- struct LargeKernel
148- {
149- // Declare that this kernel supports [0, 2^64-1) work-items.
150- auto get(syclex::properties_tag) const {
151- return syclex::properties{syclex::range_type<size_t>};
152- }
153- };
154-
155143...
156144
157145// Throws an exception with errc::nd_range error code.
158146// (because 2147483648 > 2147483647)
159147q.parallel_for(2147483648, SmallKernel());
160-
161- // May throw an exception with errc::kernel_not_supported error code.
162- // (if implementation/device doesn't support 64-bit ranges)
163- q.parallel_for(2147483648, LargeKernel());
164148```
165149
166150== Issues
0 commit comments