| 339 | } |
| 340 | |
| 341 | AsyncEvent DeviceImpl::launchFrameOpKernel(const vec2ui &itemDims, |
| 342 | FrameOpKernel kernel, |
| 343 | const ispc::FrameBufferView *fbv) |
| 344 | { |
| 345 | // Create a command with event |
| 346 | auto eventImpl = std::make_shared<AsyncEventImpl>(); |
| 347 | CommandPtr cmd = std::unique_ptr<Command>( |
| 348 | new CommandLaunchFrameOpKernel(itemDims, kernel, fbv, eventImpl)); |
| 349 | |
| 350 | // Put the command into the queue and signal the worker thread |
| 351 | scheduleCommand(std::move(cmd)); |
| 352 | return AsyncEvent(eventImpl); |
| 353 | } |
| 354 | |
| 355 | AsyncEvent DeviceImpl::launchHostTask(const std::function<void()> &task) |
| 356 | { |