- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
I am trying to test some SYCL kernels in oneAPI DPC++ that have Bessel function calls inside the parallel_for loop of the kernel.
If I use either Boost or the Standard library, or the Intel mathimf.h library as shown below, I get compile time errors.
float f1 = boost::math::cyl_bessel_j(0.0f, 1.0f);
float f2 = std::cyl_bessel_j(0.0f, 1.0f);
float f3 = j0f(1.0f);
Is there support for Bessel functions in SYCL kernels.
The source file is a modification of vector-add-buffers.cpp in the samples, and the compiler output is attached in errors.txt.
Thanks
RCB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For your vector-add-buffers.cpp code, only "float f3 = j0f(1.0f)" can work, but the proper usage is "float f3 = ext::intel::math::j0(1.0f);" and you need to include "#include <sycl/ext/intel/math.hpp>"
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For your vector-add-buffers.cpp code, only "float f3 = j0f(1.0f)" can work, but the proper usage is "float f3 = ext::intel::math::j0(1.0f);" and you need to include "#include <sycl/ext/intel/math.hpp>"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Alex much appreciated - the sycl::ext::intel::math::j0(1.0f) works for me. Incidentally is it out of the question that the Boost or the STL Bessel functions may work at some point as there is some additional functionality that I am interested in those libraries?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
STL Bessel functions only work for host code but not SYCL kernels. We might file Boost and STL functions for feature requests if we get enough inquiries.

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