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

◆ on_detach()

void MayaFlux::Buffers::DataWriteProcessor::on_detach ( const std::shared_ptr< Buffer > &  )
overrideprotectedvirtual

Called when this processor is detached from a buffer.

Parameters
bufferBuffer this processor is being detached from

Provides an opportunity for the processor to clean up buffer-specific state or release resources. With expanded processor capabilities, this method should also:

  • Release Hardware Resources: Clean up GPU memory, CUDA contexts, or other acceleration resources
  • Finalize Backend Operations: Ensure all pending backend operations are completed
  • Reset Processing State: Clear any buffer-specific optimization parameters or cached data
  • Restore Default Backend: Return to default processing backend if override was applied
  • Synchronize Operations: Ensure all parallel processing operations have completed

Default implementation does nothing, but proper resource management in derived classes is crucial for optimal performance and preventing resource leaks.

Reimplemented from MayaFlux::Buffers::BufferProcessor.

Definition at line 304 of file DataWriteProcessor.cpp.

305{
306 while (m_writes->pop()) {
307 }
308 m_write_staging.reset();
309 m_write_image_staging.reset();
310 m_staging.reset();
311 m_pending_texture.reset();
312 m_data_pending.clear();
313 m_active.clear();
314
315 m_pixel_pending = {};
316 m_pixel_active = {};
318
320}
std::vector< Kakshya::DataVariant > m_data_pending
std::shared_ptr< VKBuffer > m_write_staging
std::optional< PendingTexture > m_pending_texture
std::shared_ptr< VKBuffer > m_write_image_staging
std::unique_ptr< Memory::LockFreeQueue< WriteFn, k_write_queue_capacity > > m_writes
std::vector< Kakshya::DataVariant > m_active
@ UNKNOWN
Unknown or undefined modality.

References m_active, m_data_pending, m_modality, m_pending_texture, m_pixel_active, m_pixel_pending, m_staging, m_tex_binding_confirmed, m_write_image_staging, m_write_staging, m_writes, and MayaFlux::Kakshya::UNKNOWN.