rtcSYCLDeviceSelector(3)

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

✨ rtcSYCLDeviceSelector ✨</p> (section 3, bestie)

okay so real talk, this one lives in the Embree Ray Tracing Kernels 4 manual, and it's genuinely one of the cutest little helpers in the whole SYCL situation. πŸ¦‹


NAME πŸ’…

rtcSYCLDeviceSelector β€” it's the SYCL device selector function, aka the little guy whose whole job is picking out the devices that Embree can actually support. πŸ‘‘


SYNOPSIS 🌸

#include <embree4/rtcore.h>

int rtcSYCLDeviceSelector(const sycl::device sycl_device);

DESCRIPTION πŸŽ€

So this function does exactly one thing and does it flawlessly, no notes: you hand it a SYCL device (that's the sycl_device argument), and it checks whether Embree supports that device or not. That's it. That's the whole vibe check. ✨

And here's the slay part β€” you can use it directly as your SYCL device selector function, like just pass it straight in and let it cook. It'll pick out some supported SYCL device for you. Iconic behaviour, honestly. πŸ’–

For instance, this little sequence right here selects an Embree-supported SYCL device and then builds an Embree device out of it:

sycl::device sycl_device(rtcSYCLDeviceSelector);
sycl::queue sycl_queue(sycl_device);
sycl::context(sycl_device);
RTCDevice device = rtcNewSYCLDevice(sycl_context,nullptr);

no cap, that's the whole flow. 🫢


EXIT STATUS ⭐

  • If the SYCL device is supported by Embree, the function returns -1. yes really, negative means good here, she's quirky like that. πŸ™ˆ
  • Otherwise β€” meaning it's not supported β€” it returns 1.
heads up bestie πŸ’€ on failure an error code gets set, and you can go query it using rtcGetDeviceError. so like, always check, don't just assume, fr fr.

SEE ALSO πŸ¦‹

  • [rtcIsSYCLDeviceSupported]

and that's the whole page, mwah πŸ’‹ this was rtcSYCLDeviceSelector(3) from the Embree Ray Tracing Kernels 4 docs β€” same manual section, same source and version, same date as always. go forth and select your devices, you absolute main character. periodt. πŸ‘‘πŸŒˆ

πŸ“¦ where this page comes from