| 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 | |
| 1090 | OIDN_API_NAMESPACE_END |
no test coverage detected