MCPcopy Create free account
hub / github.com/RenderKit/oidn / oidnExecuteSYCLFilterAsync

Function oidnExecuteSYCLFilterAsync

api/api.cpp:1066–1088  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1064 }
1065
1066 OIDN_API void oidnExecuteSYCLFilterAsync(OIDNFilter filterC,
1067 const sycl::event* depEvents, int numDepEvents,
1068 sycl::event* doneEvent)
1069 {
1070 Filter* filter = reinterpret_cast<Filter*>(filterC);
1071 OIDN_TRY
1072 checkHandle(filterC);
1073 OIDN_LOCK_DEVICE(filter);
1074
1075 // Check whether the filter belongs to a SYCL device
1076 if (filter->getDevice()->getType() != DeviceType::SYCL)
1077 throw Exception(Error::InvalidOperation, "filter does not belong to a SYCL device");
1078 SYCLDeviceBase* device = static_cast<SYCLDeviceBase*>(filter->getDevice());
1079
1080 // Execute the filter
1081 device->setDepEvents(depEvents, numDepEvents);
1082 filter->execute(SyncMode::Async);
1083
1084 // Output the completion event (optional)
1085 if (doneEvent != nullptr)
1086 device->getDoneEvent(*doneEvent);
1087 OIDN_CATCH_DEVICE(filter)
1088 }
1089
1090OIDN_API_NAMESPACE_END

Callers 1

executeAsyncFunction · 0.85

Calls 6

ExceptionFunction · 0.85
setDepEventsMethod · 0.80
getDoneEventMethod · 0.80
getTypeMethod · 0.45
getDeviceMethod · 0.45
executeMethod · 0.45

Tested by

no test coverage detected