RTCGETSYCLDEVICEFUNCTIONPOINTER(3)

πŸ“¦
version 4.4.1 Β· 3 versions
, in ubuntu stonking

✨ 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 function F must be defined using the RTC_SYCL_INDIRECTLY_CALLABLE attribute. 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