NEURON
neuron::mechanism Namespace Reference

Namespaces

 _get
 
 detail
 

Classes

struct  field
 

Functions

template<>
int const * get_array_dims< double > (int mech_type)
 
template<>
double *const * get_data_ptrs< double > (int mech_type)
 
template<>
int get_field_count< double > (int mech_type)
 
template<typename... Fields>
static void register_data_fields (int mech_type, Fields const &... fields)
 Type- and array-aware version of hoc_register_prop_size. More...
 
template<typename >
int get_field_count (int mech_type)
 Get the number of fields (some of which may be arrays) of the given type. More...
 
template<typename T >
T *const * get_data_ptrs (int mech_type)
 Pointer to a range of pointers to the start of contiguous storage ranges. More...
 
template<typename >
int const * get_array_dims (int mech_type)
 Get the array dimensions for fields of the given type. More...
 

Function Documentation

◆ get_array_dims()

template<typename >
int const* neuron::mechanism::get_array_dims ( int  mech_type)

Get the array dimensions for fields of the given type.

This forms part of the API used by translated MOD file code to access the mechanism data managed by NEURON. It serves to help hide the implementation of the mechanism data storage from translated MOD file code and reduce ABI compatibility issues arising from Python wheel support.

If the given mechanism type is negative, nullptr will be returned.

◆ get_array_dims< double >()

template<>
int const* neuron::mechanism::get_array_dims< double > ( int  mech_type)

Definition at line 921 of file init.cpp.

◆ get_data_ptrs()

template<typename T >
T* const* neuron::mechanism::get_data_ptrs ( int  mech_type)

Pointer to a range of pointers to the start of contiguous storage ranges.

If the given mechanism type is negative, nullptr will be returned.

◆ get_data_ptrs< double >()

template<>
double* const* neuron::mechanism::get_data_ptrs< double > ( int  mech_type)

Definition at line 930 of file init.cpp.

◆ get_field_count()

template<typename >
int neuron::mechanism::get_field_count ( int  mech_type)

Get the number of fields (some of which may be arrays) of the given type.

If the given mechanism type is negative, -1 will be returned.

◆ get_field_count< double >()

template<>
int neuron::mechanism::get_field_count< double > ( int  mech_type)

Definition at line 939 of file init.cpp.

◆ register_data_fields()

template<typename... Fields>
static void neuron::mechanism::register_data_fields ( int  mech_type,
Fields const &...  fields 
)
static

Type- and array-aware version of hoc_register_prop_size.

hoc_register_prop_size did not propagate enough information to know which parts of the "data" size were ranges corresponding to a single array variable. This also aims to be ready for supporting multiple variable data types in MOD files.

Definition at line 235 of file membfunc.h.