MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ reset()

void MayaFlux::Yantra::VisionGpuExecutor::reset ( )

Abandon outstanding work and clear the resume point.

Waits on the fence before releasing it, then discards the retained working image and partial result. Call when the pixel source changes so the next run starts a fresh sequence. Safe with nothing outstanding.

Definition at line 1344 of file VisionGpuDispatch.cpp.

1345{
1346 if (!m_contexts)
1347 return;
1348
1349 auto& contexts = *m_contexts;
1350
1351 reap_ingest_fences(contexts);
1352
1353 if (contexts.suspended.is_active()) {
1354 auto& foundry = Portal::Graphics::get_shader_foundry();
1355 foundry.wait_for_fence(contexts.suspended.fence);
1356 foundry.release_fence(contexts.suspended.fence);
1357 contexts.suspended.fence = Portal::Graphics::INVALID_FENCE;
1358 }
1359
1360 contexts.pass.sequence = nullptr;
1361 contexts.pass.index = 0;
1362 contexts.pass.result = Kinesis::Vision::VisionResult {};
1363 contexts.pass.current.reset();
1364 contexts.pass.forget();
1365 contexts.pass.completed.clear();
1366
1367 contexts.source.reset();
1368 contexts.bound_staged.reset();
1369}
std::unique_ptr< VisionGpuContexts > m_contexts
constexpr FenceID INVALID_FENCE
MAYAFLUX_API ShaderFoundry & get_shader_foundry()
Get the global shader compiler instance.

References MayaFlux::Portal::Graphics::get_shader_foundry(), and MayaFlux::Portal::Graphics::INVALID_FENCE.

+ Here is the call graph for this function: