RTCGETSYCLDEVICEFUNCTIONPOINTER(3)
β¨ NAME β¨
rtcGetSYCLDeviceFunctionPointer β bestie, this one hands u a device side function pointer for some SYCL function π«Ά it's giving "gimme the address of that function, but, like, on the device"
πΈ SYNOPSIS πΈ
#include <embree4/rtcore.h>
template<auto F>
inline decltype(F) rtcGetSYCLDeviceFunctionPointer(sycl::queue& queue);
π DESCRIPTION π
okay so this function returns a device side function pointer</> for some function F. no cap. just hand it F and a sycl::queue& and it gives u back the pointer, slay β¨
β οΈ important bestie: that functionFmust be defined using theRTC_SYCL_INDIRECTLY_CALLABLEattribute. no attribute, no pointer, iykyk.
like, for real, here's the vibe:
RTC_SYCL_INDIRECTLY_CALLABLE void filter(
const RTCFilterFunctionNArguments* args) { ... }
RTCFilterFunctionN fptr = rtcGetSYCLDeviceFunctionPointer<filter>(queue);
so once u got that device side function pointer π β for some filter callbacks, specifically β u can assign it to a geometry using the rtcSetGeometryIntersectFilterFunction and rtcSetGeometryOccludedFilterFunction API functions. iconic behaviour honestly.
and further π device side function pointers for user geometry callbacks can be assigned to geometries using the rtcSetGeometryIntersectFunction and rtcSetGeometryOccludedFunction API calls. periodt.
π¨ heads up tho π¨ these geometry versions of the callback functions are disabled in SYCL by default, and we lowkey recommend not using them β for performance reasons. the way that they're just... not it, speed-wise. pls respect it π
π EXIT STATUS π
on failure an error code is set, and u can go query it with rtcGetDeviceError. not me having to check that every single time π
π¦ SEE ALSO π¦
- [
rtcSetGeometryIntersectFunction] - [
rtcSetGeometryOccludedFunction] - [
rtcSetGeometryIntersectFilterFunction] - [
rtcSetGeometryOccludedFilterFunction]
k that's the whole page bestie, mwah π this was Embree Ray Tracing Kernels 4, manual section 3, and yeah β that's the tea, go forth and slay ur SYCL device pointers πβπ
π¦ where this page comes from
- ubuntu stonking: libembree-dev 4.4.1+dfsg-2ubuntu1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms