aether::cell_state< P > Class Template Reference

This is the state of the worker as it pertains to the manager. More...

#include <cell_state.hh>

Public Types

using cell_type = aether::morton::tree_cell< typename params_type::morton_type >
 

Public Member Functions

 cell_state (const P &args, const aether::worker_id &_worker, const std::optional< cell_type > &_cell, const region_type &_region, size_t idle, const aether::phases_profile_type &_profile, uint64_t _tick, uint32_t _flags)
 
const P & get_static_args () const
 
std::optional< cell_typeget_cell_opt () const
 
cell_type get_cell () const
 Return the cell, returns something arbitrary when there is no cell. More...
 
bool is_cell_dying () const
 
const region_type & get_region () const
 
size_t get_idle_ticks () const
 Tracks for how many ticks the cell has been idle, once an idle threshold is reached the cell will be deallocated. More...
 
uint64_t get_tick () const
 
aether::worker_id get_worker () const
 
const aether::phases_profile_type & get_tick_profile () const
 
uint32_t get_feature_flags () const
 

Detailed Description

template<typename P>
class aether::cell_state< P >

This is the state of the worker as it pertains to the manager.

This state can be used to determine where the worker is in simulation space, how large it is, how long it has been alive for, and if it is dying / idle. The state should be templated on the octree_params.

Member Typedef Documentation

template<typename P >
using aether::cell_state< P >::cell_type = aether::morton::tree_cell<typename params_type::morton_type>

Constructor & Destructor Documentation

template<typename P >
aether::cell_state< P >::cell_state ( const P &  args,
const aether::worker_id _worker,
const std::optional< cell_type > &  _cell,
const region_type &  _region,
size_t  idle,
const aether::phases_profile_type &  _profile,
uint64_t  _tick,
uint32_t  _flags 
)
inline

Member Function Documentation

template<typename P >
cell_type aether::cell_state< P >::get_cell ( ) const
inline

Return the cell, returns something arbitrary when there is no cell.

template<typename P >
std::optional<cell_type> aether::cell_state< P >::get_cell_opt ( ) const
inline
Returns
If cell is initialized, returns the morton cell id of this cell.
template<typename P >
uint32_t aether::cell_state< P >::get_feature_flags ( ) const
inline
Returns
the feature flags object, see aether::feature_flags
template<typename P >
size_t aether::cell_state< P >::get_idle_ticks ( ) const
inline

Tracks for how many ticks the cell has been idle, once an idle threshold is reached the cell will be deallocated.

template<typename P >
const region_type& aether::cell_state< P >::get_region ( ) const
inline
Returns
region in space the cell represents
template<typename P >
const P& aether::cell_state< P >::get_static_args ( ) const
inline
Returns
The static arguments the aether::octree was initialized with.
template<typename P >
uint64_t aether::cell_state< P >::get_tick ( ) const
inline
Returns
Current simulation tick
template<typename P >
const aether::phases_profile_type& aether::cell_state< P >::get_tick_profile ( ) const
inline
Returns
profiling data for the current tick
template<typename P >
aether::worker_id aether::cell_state< P >::get_worker ( ) const
inline
Returns
Reference to the worker which executes the cell's update loop
template<typename P >
bool aether::cell_state< P >::is_cell_dying ( ) const
inline
Returns
true when cell has stopped being active and is being deactivated, false otherwise.