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

◆ calculate_dispatch_size()

std::array< uint32_t, 3 > MayaFlux::Yantra::TextureExecutionContext::calculate_dispatch_size ( size_t  total_elements,
const DataStructureInfo structure_info 
) const
inlineoverrideprotectedvirtual

Derives dispatch size from the staged container dimensions when available; falls back to element-count dispatch otherwise.

Reimplemented from MayaFlux::Yantra::GpuDispatchCore.

Definition at line 448 of file TextureExecutionContext.hpp.

451 {
452 const auto& ws = gpu_config().workgroup_size;
454 const uint32_t w = m_output_dim_override->first;
455 const uint32_t h = m_output_dim_override->second;
456 return {
457 (w + ws[0] - 1) / ws[0],
458 (h + ws[1] - 1) / ws[1],
459 1U
460 };
461 }
463 const uint32_t w = m_pending_container->get_width();
464 const uint32_t h = m_pending_container->get_height();
465 return {
466 (w + ws[0] - 1) / ws[0],
467 (h + ws[1] - 1) / ws[1],
468 1U
469 };
470 }
471 return Base::calculate_dispatch_size(total_elements, structure_info);
472 }
uint32_t h
Definition InkPress.cpp:28
virtual std::array< uint32_t, 3 > calculate_dispatch_size(size_t total_elements, const DataStructureInfo &structure_info) const
Calculate workgroup dispatch counts from structure dimensions.
const GpuComputeConfig & gpu_config() const
std::shared_ptr< Kakshya::TextureContainer > m_pending_container
std::optional< std::pair< uint32_t, uint32_t > > m_output_dim_override

References h.