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;
224224
225225SYCL_EXT_ONEAPI_FUNCTION_PROPERTY((syclexp::nd_range_kernel<1>))
226226void 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();
228228 ptr[id] = start + static_cast<float>(id);
229229}
230230
231- void main() {
231+ int main() {
232232 sycl::device d;
233233 sycl::queue q{d};
234234 sycl::context ctxt = q.get_context();
235235
236236 // 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>();
238238 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 });
240240
241241 std::vector<std::byte> bytes;
242- for (auto& img: bundle ) {
242+ for (auto& img: exe_bndl ) {
243243 // 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 )) {
245245 bytes = img.ext_oneapi_get_backend_content();
246246 break;
247247 }
You can’t perform that action at this time.
0 commit comments