| 26 | } |
| 27 | |
| 28 | void Progress::submitUpdate(Engine* engine, const Ref<Progress>& progress, size_t delta) |
| 29 | { |
| 30 | if (progress->isCancelled()) |
| 31 | throw Exception(Error::Cancelled, "execution was cancelled"); |
| 32 | |
| 33 | if (!progress->started || delta != 0) // always submit the first update |
| 34 | { |
| 35 | engine->submitHostFunc([progress, delta]() { progress->update(delta); }, progress); |
| 36 | progress->started = true; |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | OIDN_NAMESPACE_END |
nothing calls this directly
no test coverage detected