![]() |
NEURON
|
Classes | |
struct | index_of_type_helper |
struct | index_of_type_helper< T, std::tuple< T, Ts... > > |
struct | index_of_type_helper< T, std::tuple< U, Ts... > > |
struct | has_num_variables |
struct | has_num_variables< T, std::void_t< decltype(std::declval< T >().num_variables())> > |
struct | optional |
struct | optional< T, std::void_t< decltype(T::optional)> > |
struct | index_column_tag |
struct | field_data |
struct | field_data< Tag, FieldImplementation::RuntimeVariable > |
Storage manager for a tag type that implements num_variables(). More... | |
struct | storage_info_impl |
class | AccumulateMemoryUsage |
Enumerations | |
enum class | FieldImplementation { AlwaysSingle , OptionalSingle , RuntimeVariable } |
enum class | may_cause_reallocation { Yes , No } |
Functions | |
void | notify_handle_dying (non_owning_identifier_without_container p) |
Respond to the news that data_handles relying on p are now dead. More... | |
template<typename T > | |
std::ostream & | print_value_impl (std::ostream &os, T const &,...) |
template<typename T > | |
auto | print_value_impl (std::ostream &os, T const &val, std::nullptr_t) -> decltype(os<< val) |
template<typename T > | |
std::ostream & | print_value (std::ostream &os, T const &val) |
template<typename T > | |
auto | get_array_dimension (T const &t, std::nullptr_t) -> decltype(t.array_dimension(), 0) |
template<typename T > | |
auto | get_array_dimension (T const &t, int i) -> decltype(t.array_dimension(i), 0) |
template<typename T > | |
int | get_array_dimension (T const &,...) |
template<class T > | |
size_t | get_num_variables (T const &t) |
template<typename Tag > | |
auto | get_name_impl (Tag const &tag, int field_index, std::nullptr_t) -> decltype(static_cast< void >(tag.name(field_index)), std::string()) |
template<typename Tag > | |
std::string | get_name_impl (Tag const &tag, int field_index,...) |
template<typename Tag > | |
auto | get_name (Tag const &tag, int field_index) |
Get the nicest available name for the field_index-th instance of Tag. More... | |
template<typename Rng > | |
bool | check_permutation_vector (Rng const &range, std::size_t size) |
Check if the given range is a permutation of the first N integers. More... | |
VectorMemoryUsage | compute_defer_delete_storage_size () |
template<typename T > | |
void | defer_delete (std::unique_ptr< T[]> data) |
Storage for safe deletion of soa<...> containers. More... | |
template<class T > | |
VectorMemoryUsage | compute_defer_delete_storage_size (std::vector< T > const *const v, size_t per_element_size) |
Variables | |
template<typename T , typename... Ts> | |
constexpr bool | type_in_pack_v = std::disjunction_v<std::is_same<T, Ts>...> |
template<typename T , typename... Types> | |
constexpr bool | are_types_unique_v |
template<typename T > | |
constexpr bool | are_types_unique_v< T > = true |
template<typename T , typename... Ts> | |
constexpr std::size_t | index_of_type_v |
template<typename T , typename = void> | |
constexpr bool | has_default_value_v = false |
template<typename T > | |
constexpr bool | has_num_variables_v = has_num_variables<T>::value |
template<typename T > | |
constexpr bool | optional_v = optional<T>::value |
template<typename Tag > | |
constexpr FieldImplementation | field_impl_v |
std::vector< void * > * | defer_delete_storage {} |
Defer deleting pointers to deallocated memory. More... | |
|
strong |
Enumerator | |
---|---|
AlwaysSingle | |
OptionalSingle | |
RuntimeVariable |
Definition at line 107 of file soa_container.hpp.
Enumerator | |
---|---|
Yes | |
No |
Definition at line 192 of file soa_container.hpp.
bool neuron::container::detail::check_permutation_vector | ( | Rng const & | range, |
std::size_t | size | ||
) |
Check if the given range is a permutation of the first N integers.
A trivial permutation is one where i == range[i] for all i. An empty range is classed as trivial.
Definition at line 171 of file soa_container.hpp.
VectorMemoryUsage neuron::container::detail::compute_defer_delete_storage_size | ( | ) |
Definition at line 67 of file memory_usage.cpp.
VectorMemoryUsage neuron::container::detail::compute_defer_delete_storage_size | ( | std::vector< T > const *const | v, |
size_t | per_element_size | ||
) |
Definition at line 54 of file memory_usage.cpp.
void neuron::container::detail::defer_delete | ( | std::unique_ptr< T[]> | data | ) |
Storage for safe deletion of soa<...> containers.
This is intended to prevent deleting an instance of a soa<...>-based container from invalidating any existing data handles, by keeping certain (small) values alive. Deleting these containers is probably not common (e.g. deleting a mechanism type), and only small bookkeeping-related values have to be kept alive. Generally defer_delete_storage is non-null for the lifetime of the top level Model structure, and the Model destructor deallocates (using delete[]) the pointers that are stored inside defer_delete_storage.
Definition at line 215 of file soa_container.hpp.
int neuron::container::detail::get_array_dimension | ( | T const & | , |
... | |||
) |
Definition at line 75 of file soa_container.hpp.
auto neuron::container::detail::get_array_dimension | ( | T const & | t, |
int | i | ||
) | -> decltype(t.array_dimension(i), 0) |
Definition at line 71 of file soa_container.hpp.
auto neuron::container::detail::get_array_dimension | ( | T const & | t, |
std::nullptr_t | |||
) | -> decltype(t.array_dimension(), 0) |
Definition at line 66 of file soa_container.hpp.
auto neuron::container::detail::get_name | ( | Tag const & | tag, |
int | field_index | ||
) |
Get the nicest available name for the field_index-th instance of Tag.
This should elegantly handle field_index == -1 (=> the tag doesn't get have num_variables()) and field_index being out of range.
Definition at line 148 of file soa_container.hpp.
auto neuron::container::detail::get_name_impl | ( | Tag const & | tag, |
int | field_index, | ||
std::nullptr_t | |||
) | -> decltype(static_cast<void>(tag.name(field_index)), std::string()) |
Definition at line 122 of file soa_container.hpp.
std::string neuron::container::detail::get_name_impl | ( | Tag const & | tag, |
int | field_index, | ||
... | |||
) |
Definition at line 128 of file soa_container.hpp.
size_t neuron::container::detail::get_num_variables | ( | T const & | t | ) |
Definition at line 89 of file soa_container.hpp.
void neuron::container::detail::notify_handle_dying | ( | non_owning_identifier_without_container | p | ) |
Respond to the news that data_handles relying on p
are now dead.
The data_handle<T> and generic_data_handle wrappers ultimately hold something like vector_ptr
and p
, where p
is basically std::size_t*
, and yield vector_ptr->at(*p). When the relevant value gets deleted, *p
is set to a sentinel value, then this method is called, and then p
is transferred to a garbage heap.
std::ostream& neuron::container::detail::print_value | ( | std::ostream & | os, |
T const & | val | ||
) |
Definition at line 26 of file data_handle.hpp.
std::ostream& neuron::container::detail::print_value_impl | ( | std::ostream & | os, |
T const & | , | ||
... | |||
) |
Definition at line 18 of file data_handle.hpp.
auto neuron::container::detail::print_value_impl | ( | std::ostream & | os, |
T const & | val, | ||
std::nullptr_t | |||
) | -> decltype(os << val) |
Definition at line 22 of file data_handle.hpp.
|
inlineconstexpr |
Definition at line 24 of file soa_container.hpp.
|
inlineconstexpr |
Definition at line 27 of file soa_container.hpp.
std::vector< void * > * neuron::container::detail::defer_delete_storage {} |
Defer deleting pointers to deallocated memory.
The address of a pointer to the underlying storage of field_data
can escape the container. When deallocating the container the memory is deallocated but the pointer to the storage location is "leaked" into this vector.
Definition at line 95 of file container.cpp.
|
inlineconstexpr |
Definition at line 115 of file soa_container.hpp.
|
inlineconstexpr |
Definition at line 58 of file soa_container.hpp.
|
inlineconstexpr |
Definition at line 86 of file soa_container.hpp.
|
inlineconstexpr |
Definition at line 40 of file soa_container.hpp.
|
inlineconstexpr |
Definition at line 105 of file soa_container.hpp.
|
inlineconstexpr |
Definition at line 21 of file soa_container.hpp.