File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
sycl/doc/extensions/experimental Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -224,24 +224,24 @@ namespace syclexp = sycl::ext::oneapi::experimental;
224
224
225
225
SYCL_EXT_ONEAPI_FUNCTION_PROPERTY((syclexp::nd_range_kernel<1>))
226
226
void iota(float start, float *ptr) {
227
- size_t id = syclext::this_work_item::get_nd_item().get_global_linear_id();
227
+ size_t id = syclext::this_work_item::get_nd_item<1> ().get_global_linear_id();
228
228
ptr[id] = start + static_cast<float>(id);
229
229
}
230
230
231
- void main() {
231
+ int main() {
232
232
sycl::device d;
233
233
sycl::queue q{d};
234
234
sycl::context ctxt = q.get_context();
235
235
236
236
// Get a kernel bundle that contains the kernel "iota".
237
- sycl::kernel_id iota = syclexp::get_kernel_id<iota>();
237
+ sycl::kernel_id iota_id = syclexp::get_kernel_id<iota>();
238
238
auto exe_bndl =
239
- sycl::get_kernel_bundle<sycl::bundle_state::executable>(ctxt, {iota });
239
+ sycl::get_kernel_bundle<sycl::bundle_state::executable>(ctxt, {iota_id });
240
240
241
241
std::vector<std::byte> bytes;
242
- for (auto& img: bundle ) {
242
+ for (auto& img: exe_bndl ) {
243
243
// Search for the device image that contains "iota" for this device.
244
- if (img.has_kernel(iota, dev )) {
244
+ if (img.has_kernel(iota_id, d )) {
245
245
bytes = img.ext_oneapi_get_backend_content();
246
246
break;
247
247
}
You can’t perform that action at this time.
0 commit comments