NEURON
neuron::container Namespace Reference

Namespaces

 cache
 
 detail
 
 Mechanism
 
 Node
 
 utils
 

Classes

struct  do_not_search_t
 
struct  data_handle
 Stable handle to a generic value. More...
 
struct  data_handle< void >
 Explicit specialisation data_handle<void>. More...
 
struct  generic_data_handle
 Non-template stable handle to a generic value. More...
 
struct  VectorMemoryUsage
 Size and capacity in bytes. More...
 
struct  StorageMemoryUsage
 Memory usage of a storage/soa container. More...
 
struct  ModelMemoryUsage
 Memory usage of a neuron::Model. More...
 
struct  MemoryUsage
 Overall SoA datastructures related memory usage. More...
 
struct  MemoryUsageSummary
 
struct  MemoryStats
 
struct  field_index
 Struct used to index SoAoS data, such as array range variables. More...
 
struct  non_owning_identifier_without_container
 A non-owning permutation-stable identifier for an entry in a container. More...
 
struct  state_token
 Token whose lifetime manages the frozen state of a container. More...
 
struct  soa
 Utility for generating SOA data structures. More...
 
struct  non_owning_identifier
 A non-owning permutation-stable identifier for a entry in a container. More...
 
struct  owning_identifier
 An owning permutation-stable identifier for a entry in a container. More...
 
struct  handle_base
 Base class for neuron::container::soa<...> handles. More...
 

Functions

void notify_when_handle_dies (data_handle< double > dh, Observer *obs)
 Register that obs should be notified when dh dies. More...
 
cache::ModelMemoryUsage memory_usage (const std::optional< neuron::cache::Model > &model)
 
cache::ModelMemoryUsage memory_usage (const neuron::cache::Model &model)
 
MemoryUsage local_memory_usage ()
 Gather memory usage of this process. More...
 
std::string format_memory (size_t bytes)
 Utility to format memory as a human readable string. More...
 
std::string format_memory_usage (const VectorMemoryUsage &memory_usage)
 Aligned, human readable representation of memory_usage. More...
 
std::string format_memory_usage (const MemoryUsage &usage)
 Create a string representation of usage. More...
 
void print_memory_usage (const MemoryUsage &usage)
 
template<class Storage , class... Tags>
StorageMemoryUsage memory_usage (const soa< Storage, Tags... > &data)
 
neuron::container::ModelMemoryUsage memory_usage (const Model &model)
 
std::ostream & operator<< (std::ostream &os, generic_data_handle const &dh)
 

Variables

constexpr do_not_search_t do_not_search {}
 
constexpr std::size_t invalid_row = std::numeric_limits<std::size_t>::max()
 

Function Documentation

◆ format_memory()

std::string neuron::container::format_memory ( size_t  bytes)

Utility to format memory as a human readable string.

Format the memory sizes as human readable strings.

Note, this is currently tailored to it's use in format_memory_usage and is therefore very rigid in it's padding. Generalize when needed.

Currently, the intended use is in aligned tables in the memory usage report. Hence, the string has two digits and is 9 characters long (without the null char).

Definition at line 76 of file memory_usage.cpp.

◆ format_memory_usage() [1/2]

std::string neuron::container::format_memory_usage ( const MemoryUsage usage)

Create a string representation of usage.

Definition at line 99 of file memory_usage.cpp.

◆ format_memory_usage() [2/2]

std::string neuron::container::format_memory_usage ( const VectorMemoryUsage memory_usage)

Aligned, human readable representation of memory_usage.

Definition at line 95 of file memory_usage.cpp.

◆ local_memory_usage()

MemoryUsage neuron::container::local_memory_usage ( )

Gather memory usage of this process.

Definition at line 43 of file memory_usage.cpp.

◆ memory_usage() [1/4]

ModelMemoryUsage neuron::container::memory_usage ( const Model model)

Definition at line 7 of file memory_usage.cpp.

◆ memory_usage() [2/4]

cache::ModelMemoryUsage neuron::container::memory_usage ( const neuron::cache::Model model)

Definition at line 19 of file memory_usage.cpp.

◆ memory_usage() [3/4]

template<class Storage , class... Tags>
StorageMemoryUsage neuron::container::memory_usage ( const soa< Storage, Tags... > &  data)

Definition at line 1619 of file soa_container.hpp.

◆ memory_usage() [4/4]

cache::ModelMemoryUsage neuron::container::memory_usage ( const std::optional< neuron::cache::Model > &  model)

Definition at line 16 of file memory_usage.cpp.

◆ notify_when_handle_dies()

void neuron::container::notify_when_handle_dies ( data_handle< double >  dh,
Observer obs 
)

Register that obs should be notified when dh dies.

In general this should happen less often than before, as data_handle<double> can remain valid even when the pointed-to value changes address.

Definition at line 91 of file ivoc.cpp.

◆ operator<<()

std::ostream& neuron::container::operator<< ( std::ostream &  os,
generic_data_handle const &  dh 
)

Definition at line 62 of file container.cpp.

◆ print_memory_usage()

void neuron::container::print_memory_usage ( const MemoryUsage usage)

Definition at line 136 of file memory_usage.cpp.

Variable Documentation

◆ do_not_search

constexpr do_not_search_t neuron::container::do_not_search {}
inlineconstexpr

Definition at line 11 of file data_handle.hpp.

◆ invalid_row

constexpr std::size_t neuron::container::invalid_row = std::numeric_limits<std::size_t>::max()
inlineconstexpr

Definition at line 17 of file non_owning_soa_identifier.hpp.