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

◆ dispatch_one_thread_per()

template<typename T >
void MayaFlux::Buffers::NetworkStateFieldProcessor::dispatch_one_thread_per ( uint32_t  element_count,
const T &  params 
)
inlineprotected

Configure manual dispatch for one thread per element, and stage the given push constant data.

Template Parameters
TTrivially copyable push constant struct.
Parameters
element_countElements the dispatch must cover. Group count is ceil(element_count / workgroup_x), floored at 1, reading workgroup_x from the compiled spec rather than a repeated literal, matching VertexFieldProcessor::calculate_dispatch_size.
paramsPush constant data to stage for the next dispatch.

For the common shape most stages share: element_count threads total, the compiled workgroup size per group, one dispatch per cycle. HashScanProcessor's fixed single-invocation dispatch doesn't fit this shape and configures itself directly instead.

Definition at line 236 of file SpatialHashProcessor.hpp.

237 {
238 const uint32_t local_x = std::max(1U, get_dispatch_config().workgroup_x);
239 const uint32_t groups = std::max(1U, (element_count + local_x - 1) / local_x);
240 set_manual_dispatch(groups, 1, 1);
242 }
const ShaderDispatchConfig & get_dispatch_config() const
Get current dispatch configuration.
void set_manual_dispatch(uint32_t x, uint32_t y=1, uint32_t z=1)
Set manual dispatch group counts.
void set_push_constant_data(const T &data)
Update push constant data (type-safe)

Referenced by MayaFlux::Buffers::ClaimInitProcessor::on_buffer_ready(), MayaFlux::Buffers::ClaimProcessor::on_buffer_ready(), MayaFlux::Buffers::ClaimFlattenProcessor::on_buffer_ready(), MayaFlux::Buffers::ClaimAccumulateProcessor::on_buffer_ready(), MayaFlux::Buffers::ClaimSwallowProcessor::on_buffer_ready(), MayaFlux::Buffers::ClaimTransferProcessor::on_buffer_ready(), MayaFlux::Buffers::PopulationInitProcessor::on_buffer_ready(), MayaFlux::Buffers::PopulationSpawnProcessor::on_buffer_ready(), MayaFlux::Buffers::HashClearProcessor::on_buffer_ready(), MayaFlux::Buffers::HashCountProcessor::on_buffer_ready(), MayaFlux::Buffers::HashScatterProcessor::on_buffer_ready(), and MayaFlux::Buffers::HashDensityColorProcessor::on_buffer_ready().

+ Here is the caller graph for this function: