![]() |
NEURON
|
Underlying storage for all instances of a particular Mechanism. More...
#include <mechanism_data.hpp>
Public Types | |
| using | base_type = soa< storage, field::FloatingPoint > |
Public Types inherited from neuron::container::soa< storage, field::FloatingPoint > | |
| using | frozen_token_type = state_token< storage > |
| Return type of issue_frozen_token() More... | |
Public Member Functions | |
| storage (short mech_type, std::string name, std::vector< Variable > floating_point_fields={}) | |
| double & | fpfield (std::size_t instance, int field, int array_index=0) |
| Access floating point values. More... | |
| double const & | fpfield (std::size_t instance, int field, int array_index=0) const |
| Access floating point values. More... | |
| data_handle< double > | fpfield_handle (non_owning_identifier_without_container id, int field, int array_index=0) |
| Access floating point values. More... | |
| std::string_view | name () const |
| The name of this mechanism. More... | |
| short | type () const |
| The type of this mechanism. More... | |
Public Member Functions inherited from neuron::container::soa< storage, field::FloatingPoint > | |
| soa () | |
| Construct with default-constructed tag type instances. More... | |
| soa (Tags... tag_instances) | |
| Construct with specific tag instances. More... | |
| soa (soa &&)=delete | |
| soa is not movable More... | |
| soa (soa const &)=delete | |
| soa is not copiable More... | |
| soa & | operator= (soa &&)=delete |
| soa is not move assignable More... | |
| soa & | operator= (soa const &)=delete |
| soa is not copy assignable More... | |
| std::size_t | size () const |
| Get the size of the container. More... | |
| bool | empty () const |
| Test if the container is empty. More... | |
| void | shrink_to_fit () |
| frozen_token_type | issue_frozen_token () |
| Create a token guaranteeing the container is in "frozen" state. More... | |
| void | mark_as_sorted (frozen_token_type &write_token) |
| Tell the container it is sorted. More... | |
| void | mark_as_unsorted () |
| Tell the container it is no longer sorted. More... | |
| void | set_unsorted_callback (std::function< void()> unsorted_callback) |
| Set the callback that is invoked when the container becomes unsorted. More... | |
| bool | is_sorted () const |
| Query if the underlying vectors are still "sorted". More... | |
| frozen_token_type | apply_reverse_permutation (Arg &&permutation) |
| Permute the SoA-format data using an arbitrary range of integers. More... | |
| void | apply_reverse_permutation (Range permutation, frozen_token_type &sorted_token) |
| Permute the SoA-format data using an arbitrary range of integers. More... | |
| non_owning_identifier< storage > | at (std::size_t offset) const |
| Get a non-owning identifier to the offset-th entry. More... | |
| constexpr Tag const & | get_tag () const |
| Get the instance of the given tag type. More... | |
| Tag::type & | get (std::size_t offset) |
| Get the offset-th element of the column named by Tag. More... | |
| Tag::type const & | get (std::size_t offset) const |
| Get the offset-th element of the column named by Tag. More... | |
| data_handle< typename Tag::type > | get_handle (non_owning_identifier_without_container id, int array_index=0) const |
| Get a handle to the given element of the column named by Tag. More... | |
| data_handle< typename Tag::type > | get_field_instance_handle (non_owning_identifier_without_container id, int field_index, int array_index=0) const |
| Get a handle to the given element of the field_index-th column named by Tag. More... | |
| Tag::type & | get_field_instance (std::size_t offset, int field_index, int array_index=0) |
| Get the offset-th element of the field_index-th instance of the column named by Tag. More... | |
| Tag::type const & | get_field_instance (std::size_t offset, int field_index, int array_index=0) const |
| Get the offset-th element of the field_index-th instance of the column named by Tag. More... | |
| non_owning_identifier_without_container | get_identifier (std::size_t offset) const |
| Get the offset-th identifier. More... | |
| neuron::container::generic_data_handle | find_data_handle (neuron::container::generic_data_handle input_handle) const |
| Return a permutation-stable handle if ptr is inside us. More... | |
| bool | is_storage_pointer (typename Tag::type const *ptr) const |
| Query whether the given pointer-to-vector is the one associated to Tag. More... | |
| std::unique_ptr< utils::storage_info > | find_container_info (void const *cont) const |
Check if cont refers to a field in this container. More... | |
| Tag::type *const * | get_data_ptrs () const |
| Get a pointer to a range of pointers that always point to the start of the contiguous storage. More... | |
| int const * | get_array_dims () const |
| Get a pointer to an array holding the array dimensions of the fields associated with this tag. More... | |
| int | get_array_dims (int field_index) const |
| size_t | get_num_variables () const |
| int const * | get_array_dim_prefix_sums () const |
| Get a pointer to an array holding the prefix sum of array dimensions for this tag. More... | |
| field_index | translate_legacy_index (int legacy_index) const |
| bool | field_active () const |
| Query whether the field associated with the given tag is active. More... | |
| void | set_field_status (bool enabled) |
| Enable/disable the fields associated with the given tags. More... | |
| StorageMemoryUsage | memory_usage () const |
Private Attributes | |
| short | m_mech_type {} |
| std::string | m_mech_name {} |
Friends | |
| std::ostream & | operator<< (std::ostream &os, storage const &data) |
| Pretty printing for mechanism data structures. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from neuron::container::soa< storage, field::FloatingPoint > | |
| static constexpr bool | has_tag_v |
Underlying storage for all instances of a particular Mechanism.
To mitigate Python wheel ABI issues, a basic set of methods are defined in .cpp code that is compiled as part of NEURON.
Definition at line 14 of file mechanism_data.hpp.
Definition at line 15 of file mechanism_data.hpp.
| neuron::container::Mechanism::storage::storage | ( | short | mech_type, |
| std::string | name, | ||
| std::vector< Variable > | floating_point_fields = {} |
||
| ) |
Definition at line 98 of file container.cpp.
| double & neuron::container::Mechanism::storage::fpfield | ( | std::size_t | instance, |
| int | field, | ||
| int | array_index = 0 |
||
| ) |
Access floating point values.
Definition at line 102 of file container.cpp.
| double const & neuron::container::Mechanism::storage::fpfield | ( | std::size_t | instance, |
| int | field, | ||
| int | array_index = 0 |
||
| ) | const |
Access floating point values.
Definition at line 105 of file container.cpp.
| data_handle< double > neuron::container::Mechanism::storage::fpfield_handle | ( | non_owning_identifier_without_container | id, |
| int | field, | ||
| int | array_index = 0 |
||
| ) |
Access floating point values.
Definition at line 108 of file container.cpp.
| std::string_view neuron::container::Mechanism::storage::name | ( | ) | const |
The name of this mechanism.
Definition at line 113 of file container.cpp.
| short neuron::container::Mechanism::storage::type | ( | ) | const |
The type of this mechanism.
Definition at line 116 of file container.cpp.
|
friend |
Pretty printing for mechanism data structures.
Definition at line 119 of file container.cpp.
|
private |
Definition at line 47 of file mechanism_data.hpp.
|
private |
Definition at line 46 of file mechanism_data.hpp.