NEURON
data_layout.cpp
Go to the documentation of this file.
1 /*
2 # =============================================================================
3 # Copyright (c) 2016 - 2021 Blue Brain Project/EPFL
4 #
5 # See top-level LICENSE file for details.
6 # =============================================================================
7 */
8 
14 
15 namespace coreneuron {
16 /*
17  * Return the index to mechanism variable based Original input files are organized in AoS
18  */
19 int get_data_index(int node_index, int variable_index, int mtype, Memb_list* ml) {
20  int layout = corenrn.get_mech_data_layout()[mtype];
21  nrn_assert(layout == SOA_LAYOUT);
22  return variable_index * ml->_nodecount_padded + node_index;
23 }
24 } // namespace coreneuron
int node_index(Section *sec, double x)
returns nearest index to x
Definition: cabcode.cpp:1406
#define SOA_LAYOUT
Definition: data_layout.hpp:11
THIS FILE IS AUTO GENERATED DONT MODIFY IT.
int get_data_index(int node_index, int variable_index, int mtype, Memb_list *ml)
Definition: data_layout.cpp:19
CoreNeuron corenrn
Definition: multicore.cpp:53
#define nrn_assert(x)
assert()-like macro, independent of NDEBUG status
Definition: nrn_assert.h:33