![]() |
NEURON
|
#include <soa_container.hpp>
Public Types | |
using | data_type = typename Tag::type |
Public Member Functions | |
field_data (Tag tag) | |
~field_data () | |
Tag const & | tag () const |
Return a reference to the tag instance. More... | |
template<may_cause_reallocation might_reallocate, typename Callable > | |
Callable | for_each_vector (Callable callable) |
template<typename Callable > | |
Callable | for_each_vector (Callable callable) const |
bool | active () const |
void | set_active (bool enable, std::size_t size) |
data_type *const * | data_ptrs () const |
int const * | array_dims () const |
int const * | array_dim_prefix_sums () const |
Private Attributes | |
Tag | m_tag |
Tag type instance. More... | |
std::vector< data_type > | m_storage |
Storage for the data associated with Tag . More... | |
std::unique_ptr< data_type *[]> | m_data_ptr |
Storage where we maintain an up-to-date cache of m_storage.data() . More... | |
int | m_array_dim |
Array dimension of the data associated with Tag . More... | |
Definition at line 223 of file soa_container.hpp.
using neuron::container::detail::field_data< Tag, impl >::data_type = typename Tag::type |
Definition at line 226 of file soa_container.hpp.
|
inline |
Definition at line 228 of file soa_container.hpp.
|
inline |
Definition at line 236 of file soa_container.hpp.
|
inline |
Definition at line 277 of file soa_container.hpp.
|
inline |
Definition at line 317 of file soa_container.hpp.
|
inline |
Definition at line 313 of file soa_container.hpp.
|
inline |
Definition at line 309 of file soa_container.hpp.
|
inline |
Definition at line 249 of file soa_container.hpp.
|
inline |
Definition at line 265 of file soa_container.hpp.
|
inline |
Definition at line 282 of file soa_container.hpp.
|
inline |
Return a reference to the tag instance.
Definition at line 244 of file soa_container.hpp.
|
private |
Array dimension of the data associated with Tag
.
m_array_dim
is equal to m_tag.array_dimension()
, if that function exists, or 1. Definition at line 361 of file soa_container.hpp.
|
private |
Storage where we maintain an up-to-date cache of m_storage.data()
.
m_storage.data()
is equal to m_data_ptr
. This is declared as an array (of size 1) to simplify the implementation of defer_delete. For FieldImplementation::OptionalSingle then whether or not this is null encodes whether or not the field is active. For FieldImplementation::AlwaysSingle it is never null.
Definition at line 353 of file soa_container.hpp.
|
private |
Storage for the data associated with Tag
.
This is one of the "large" data arrays holding the model data. Because this specialisation of field_data
is for Tag
types that don't have num_variables()
members, such as Node::field::Voltage
, there is exactly one vector per instance of field_data
. Because the fields in Node::storage
all have array dimension 1, in that case the size of this vector is the number of Node instances in the program.
Definition at line 342 of file soa_container.hpp.
|
private |
Tag type instance.
An instance of soa
contains an instance of field_data
for each tag type in its Tags
... pack. The instance of the tag type contains the metadata about the field it represents, and field_data
adds the actual data for that field. For example, with Tag
= Node::field::Voltage
, which represents the voltage in a given Node, m_tag
is just an empty type that defines the data_type
and default value of voltages.
Definition at line 331 of file soa_container.hpp.