MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Buffers::PopulationConfig Struct Reference

Parameters for GPU-local population dynamics: destruction and spawn-as-copy over a seed's fixed, over-allocated capacity. More...

#include <PopulationProcessor.hpp>

+ Collaboration diagram for MayaFlux::Buffers::PopulationConfig:

Public Member Functions

void declare_fields (const std::shared_ptr< NetworkGeometryBuffer > &buffer) const
 Declare the two state fields population dynamics needs.
 

Public Attributes

SpatialHashConfig hash
 
uint32_t live_count
 

Detailed Description

Parameters for GPU-local population dynamics: destruction and spawn-as-copy over a seed's fixed, over-allocated capacity.

hash.particle_count here is expected to already be live_count plus whatever reserve capacity SpatialFieldConfig::reserve_fraction asked for: the caller overrides SpatialHashConfig::particle_count to that total before constructing this, so every hash/claim stage already dispatches over the full reserve range. live_count is the boundary this struct itself adds: everything at or past it starts dead, and is the only region PopulationSpawnProcessor is allowed to write a new particle into.

This mechanism is not reflected to the CPU. Whatever PhysicsOperator simulates is the authoritative population; what exists here is GPU-local bookkeeping about which of the seed's records currently render as alive, rebuilt from scratch on the next reseed. ClaimAccumulateProcessor is the one enforcement point: it never lets anything past live_count reach PhysicsOperator's own bond/mass tracking, however far spawn has grown the live-looking population beyond it.

Definition at line 32 of file PopulationProcessor.hpp.


The documentation for this struct was generated from the following files: