36 template <
typename Callable>
46 template <
typename Callable>
59 template <
typename... Args>
69 "): storage already exists");
72 std::make_unique<container::Mechanism::storage>(
type, std::forward<Args>(args)...);
85 "): refusing to delete storage that still hosts " +
118 void const* cont)
const;
129 "): type out of range");
134 "): data for type was null");
152 std::vector<std::unique_ptr<container::Mechanism::storage>>
m_mech_data{};
void move(Item *q1, Item *q2, Item *q3)
cache::ModelMemoryUsage memory_usage(const std::optional< neuron::cache::Model > &model)
In mechanism libraries, cannot use auto const token = nrn_ensure_model_data_are_sorted(); because the...
Model & model()
Access the global Model instance.
std::string to_string(const T &obj)
void delete_mechanism(int type)
Destroy the structure holding the data of a particular mechanism.
std::unique_ptr< container::utils::storage_info > find_container_info(void const *cont) const
Find some metadata about the given container.
std::vector< void * > m_ptrs_for_deferred_deletion
Backing storage for defer_delete helper.
container::Mechanism::storage & add_mechanism(int type, Args &&... args)
Create a structure to hold the data of a new Mechanism.
bool is_valid_mechanism(int type) const
container::Mechanism::storage const & mechanism_data(int type) const
Get the structure holding the data of a particular Mechanism.
void set_unsorted_callback(container::Mechanism::storage &mech_data)
std::vector< std::unique_ptr< container::Mechanism::storage > > m_mech_data
Storage for mechanism-specific data.
container::Mechanism::storage & mechanism_data(int type)
Get the structure holding the data of a particular Mechanism.
container::Node::storage const & node_data() const
Access the structure containing the data of all Nodes.
container::Node::storage m_node_data
One structure for all Nodes.
void apply_to_mechanisms(Callable const &callable)
Apply a function to each non-null Mechanism.
container::Node::storage & node_data()
Access the structure containing the data of all Nodes.
container::Mechanism::storage & mechanism_data_impl(int type) const
std::size_t mechanism_storage_size() const
void apply_to_mechanisms(Callable const &callable) const
std::vector< Mechanism > mechanism
std::vector< Thread > thread
Underlying storage for all instances of a particular Mechanism.
Memory usage of a neuron::Model.
Underlying storage for all Nodes.
Token whose lifetime manages the frozen state of a container.
model_sorted_token(cache::Model &cache, container::Node::storage::frozen_token_type node_data_token_)
std::vector< container::Mechanism::storage::frozen_token_type > mech_data_tokens
container::Node::storage::frozen_token_type node_data_token
cache::Thread & thread_cache(std::size_t i)
cache::Model const & cache() const
void set_cache(cache::Model &&cache)
cache::Mechanism const & mech_cache(std::size_t i) const
cache::Thread const & thread_cache(std::size_t i) const
std::reference_wrapper< cache::Model > m_cache
cache::Mechanism & mech_cache(std::size_t i)