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

◆ declare_fields()

void MayaFlux::Buffers::PopulationConfig::declare_fields ( const std::shared_ptr< NetworkGeometryBuffer > &  buffer) const

Declare the two state fields population dynamics needs.

Parameters
bufferBuffer to declare on. Already-present names are left untouched, matching every other declare_fields in this family.

Declares mutation_alive at hash.particle_count elements (the total seed + reserve capacity) and mutation_spawn_cursor as a single element. Neither is reset by any per-cycle stage: PopulationInitProcessor writes both exactly once, and every cycle after that only ClaimAccumulateProcessor (destroy) and PopulationSpawnProcessor (spawn) ever touch them again, forward-only, until the next reseed.

Definition at line 12 of file PopulationProcessor.cpp.

13{
14 buffer->declare_state("mutation_alive", hash.particle_count, sizeof(uint32_t), false);
15 buffer->declare_state("mutation_spawn_cursor", 1, sizeof(uint32_t), false);
16}

References hash, and MayaFlux::Buffers::SpatialHashConfig::particle_count.