CoreNEURON
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
9
#include "
coreneuron/coreneuron.hpp
"
10
#include "
coreneuron/permute/data_layout.hpp
"
11
#include "
coreneuron/mechanism/mechanism.hpp
"
12
#include "
coreneuron/permute/node_permute.h
"
13
#include "
coreneuron/mechanism/membfunc.hpp
"
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
coreneuron::CoreNeuron::get_mech_data_layout
auto & get_mech_data_layout()
Definition:
coreneuron.hpp:174
mechanism.hpp
membfunc.hpp
SOA_LAYOUT
#define SOA_LAYOUT
Definition:
data_layout.hpp:11
coreneuron::Memb_list
Definition:
mechanism.hpp:131
coreneuron.hpp
coreneuron
THIS FILE IS AUTO GENERATED DONT MODIFY IT.
Definition:
corenrn_parameters.cpp:12
coreneuron::get_data_index
int get_data_index(int node_index, int variable_index, int mtype, Memb_list *ml)
Definition:
data_layout.cpp:19
node_permute.h
coreneuron::corenrn
CoreNeuron corenrn
Definition:
multicore.cpp:53
data_layout.hpp
coreneuron::Memb_list::_nodecount_padded
int _nodecount_padded
Definition:
mechanism.hpp:145
nrn_assert
#define nrn_assert(x)
assert()-like macro, independent of NDEBUG status
Definition:
nrn_assert.h:33
coreneuron
permute
data_layout.cpp