- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My question is if there is a way to call a function within the kernel with its parameters and if this is not possible, what options would be available to successfully do this?
I have toyed around with the idea of stripping the function down to its barebones and running that through the kernel though I do not know of that approach would work.
Any advice would be greatly appreciated.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for reaching out to us.
Yes, you can call a function within the kernel. SYCL supports multiple ways to express a kernel.
You can create a function within the source code and can access that inside the kernel or create a function in different file and include that file in your main program and then call the function inside a kernel with proper arguments.
There is also another way where you can call a function from within the kernel is by using “Interoperability with API-Defined Source Languages or kernel objects” which means , the contents of the kernel are described as source code or using an intermediate representation that is not defined by SYCL, but the kernel objects are still created using SYCL API calls.
Please follow the below link in which you can get a clear idea on different ways of calling a function inside kernel and some samples are also provided on how to call a function from within the kernel.
Let us know if it helps.
Regards,
Vidya.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Reminder:
Could you please confirm whether your issue is resolved? If yes let us know if we can close this thread from our end.
Regards,
Vidya.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
As we have not heard back from you, we assume that your issue has been resolved. We will no longer respond to this thread. If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only.
Regards,
Vidya.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page