![]() |
NEURON
|
Specialised version of MechanismRange for a single instance. More...
#include <mechanism_range.hpp>
Public Types | |
using | base_type = MechanismRange< NumFloatingPointFields, NumDatumFields > |
Shorthand for the MechanismRange base class. More... | |
Public Member Functions | |
MechanismInstance (Prop *prop) | |
Construct from a single mechanism instance. More... | |
MechanismInstance (MechanismInstance const &other) | |
Copy constructor. More... | |
MechanismInstance & | operator= (MechanismInstance const &other) |
Copy assignment. More... | |
![]() | |
MechanismRange (neuron::model_sorted_token const &cache_token, Memb_list &ml) | |
Construct a MechanismRange from sorted model data. More... | |
MechanismRange (neuron::model_sorted_token const &cache_token, NrnThread &, Memb_list &ml, int type) | |
Deprecated. More... | |
template<int variable, int array_size> | |
double * | data_array (std::size_t instance) |
Get the range of values for an array RANGE variable. More... | |
template<int variable, int array_size> | |
double * | data_array_ptr () |
template<int variable> | |
double & | fpfield (std::size_t instance) |
Get a RANGE variable value. More... | |
template<int variable> | |
double * | fpfield_ptr () |
double & | data (std::size_t instance, container::field_index ind) |
Get a RANGE variable value. More... | |
template<int variable> | |
double * | dptr_field (std::size_t instance) |
Get a POINTER variable. More... | |
template<int variable> | |
double *const * | dptr_field_ptr () |
Private Attributes | |
std::array< double *, NumDatumFields > | m_dptr_cache {} |
Cached double* values for this instance, calculated from Datum. More... | |
std::array< double *const *, NumDatumFields > | m_dptr_datums {} |
Pointers to m_dptr_cache needed to satisfy MechanismRange's requirements. More... | |
Additional Inherited Members | |
![]() | |
MechanismRange (int mech_type, std::size_t offset) | |
Calls MechanismRange(mech_type, offset, offset) . More... | |
MechanismRange (int mech_type, std::size_t data_offset, std::size_t dptr_offset) | |
Sets up the pointers for data (not pdata) and the offsets. More... | |
![]() | |
double *const * | m_data_ptrs {} |
Pointer to a range of pointers to the start of RANGE variable storage. More... | |
int const * | m_data_array_dims {} |
Pointer to a range of array dimensions for the RANGE variables in this mechanism. More... | |
double *const *const * | m_pdata_ptrs {} |
Pointer to a range of pointers to the start of POINTER variable caches. More... | |
std::size_t | m_data_offset {} |
Offset of this contiguous range of mechanism instances into the global range. More... | |
std::size_t | m_dptr_offset {} |
Specialised version of MechanismRange for a single instance.
This is used inside generated code that takes a single mechanism instance (Prop) instead of a range of instances (Memb_list). A key feature of methods that take Prop is that they should not require a call to nrn_ensure_model_data_are_sorted(). This is conceptually fine, as if we are only concerned with a single mechanism instance then it doesn't matter where it lives in the global storage vectors. In this case, m_dptr_cache contains an array of pointers that m_dptr_datums can refer to.
Definition at line 209 of file mechanism_range.hpp.
using neuron::cache::MechanismInstance< NumFloatingPointFields, NumDatumFields >::base_type = MechanismRange<NumFloatingPointFields, NumDatumFields> |
Shorthand for the MechanismRange base class.
Definition at line 213 of file mechanism_range.hpp.
|
inline |
Construct from a single mechanism instance.
prop | Handle to a single mechanism instance. |
Definition at line 219 of file mechanism_range.hpp.
|
inline |
Copy constructor.
Definition at line 238 of file mechanism_range.hpp.
|
inline |
Copy assignment.
This has to be implemented manually because the base class (MechanismInstance) member m_pdata_ptrs has to be updated to point at the derived class (MechanismInstance) member m_dptr_datums.
Definition at line 249 of file mechanism_range.hpp.
|
private |
Cached double*
values for this instance, calculated from Datum.
Definition at line 268 of file mechanism_range.hpp.
|
private |
Pointers to m_dptr_cache needed to satisfy MechanismRange's requirements.
i
. MechanismInstance::m_pdata_ptrs
is equal to m_dptr_datums.data(). Definition at line 275 of file mechanism_range.hpp.