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

◆ processing_function()

void MayaFlux::Buffers::BufferDownloadProcessor::processing_function ( std::shared_ptr< Buffer buffer)
overridevirtual

The core processing function that must be implemented by derived classes.

Parameters
bufferBuffer to process

This method is where the actual transformation logic is implemented. It should contain the algorithmic details of how the buffer's data is transformed, analyzed, or processed. The implementation can utilize any backend capabilities available to the processor, including:

  • Parallel Processing: Using multi-threading or GPU compute for large datasets
  • Data Transformations: Applying mathematical operations, filters, or effects
  • Feature Extraction: Analyzing data characteristics for further processing

Derived classes must override this method to provide specific processing behavior.

Implements MayaFlux::Buffers::BufferProcessor.

Definition at line 23 of file BufferDownloadProcessor.cpp.

24{
25 auto vk_buffer = std::dynamic_pointer_cast<VKBuffer>(buffer);
26 if (!vk_buffer) {
28 "BufferDownloadProcessor requires VKBuffer");
29 return;
30 }
31
32 if (!vk_buffer->is_initialized()) {
34 "VKBuffer not initialized - register with BufferManager first");
35 return;
36 }
37
38 auto target_it = m_target_map.find(buffer);
39 if (target_it == m_target_map.end() || !target_it->second) {
41 "BufferDownloadProcessor has no target configured for this buffer");
42 return;
43 }
44
45 if (vk_buffer->is_host_visible()) {
46 download_host_visible(vk_buffer);
47 } else {
48 download_device_local(vk_buffer);
49 }
50}
#define MF_RT_ERROR(comp, ctx,...)
void download_device_local(const std::shared_ptr< VKBuffer > &source)
std::unordered_map< std::shared_ptr< Buffer >, std::shared_ptr< Buffer > > m_target_map
void download_host_visible(const std::shared_ptr< VKBuffer > &source)
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains)
@ Buffers
Buffers, Managers, processors and processing chains.

References MayaFlux::Journal::BufferProcessing, MayaFlux::Journal::Buffers, download_device_local(), download_host_visible(), m_target_map, and MF_RT_ERROR.

+ Here is the call graph for this function: