MCPcopy Create free account
hub / github.com/RenderKit/embree / main

Function main

tutorials/embree_info/embree_info.cpp:13–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11#endif
12
13RTC_NAMESPACE_USE
14
15int main() {
16
17#if defined(EMBREE_SYCL_SUPPORT)
18 try {
19 embree::check_raytracing_support();
20 } catch (std::exception& e) {
21 std::cerr << e.what() << std::endl;
22 return 1;
23 }
24
25 try {
26 sycl::device sycl_device(rtcSYCLDeviceSelector);
27 sycl::context sycl_context(sycl_device);
28 RTCDevice device = rtcNewSYCLDevice(sycl_context, "verbose=1");
29 embree::printAllSYCLDevices();
30 rtcReleaseDevice(device);
31 } catch (std::exception& e) {
32 std::cerr << "Failed to create a SYCL Embree GPU device. Reason: " << e.what() << std::endl;
33 embree::printAllSYCLDevices();
34 return 1;
35 }
36#else
37 RTCDevice device = rtcNewDevice("verbose=1");
38 rtcReleaseDevice(device);
39#endif
40
41 return 0;
42}

Callers

nothing calls this directly

Calls 6

check_raytracing_supportFunction · 0.85
rtcNewSYCLDeviceFunction · 0.85
printAllSYCLDevicesFunction · 0.85
rtcReleaseDeviceFunction · 0.85
rtcNewDeviceFunction · 0.85
whatMethod · 0.45

Tested by

no test coverage detected