NEURON
node_permute.h
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 #pragma once
10 
11 #if CORENRN_BUILD
13 #else
14 #include "nrnoc/multicore.h"
15 #endif
16 
17 #if CORENRN_BUILD
18 namespace coreneuron {
19 #else
20 namespace neuron {
21 #endif
22 // determine ml->_permute and permute the ml->nodeindices accordingly
24 
25 #if CORENRN_BUILD
26 // vec values >= 0 updated according to permutation
27 void node_permute(int* vec, int n, int* permute);
28 #else // not CORENRN_BUILD
29 // sort ml fields in increasing node index order
30 void sort_ml(Memb_list* ml);
31 
32 /*
33  * Update indices vector so that the parent-child relation is kept valid
34  * after applying a permutation to the vector `vec`.
35  * This is done by updating vec values >= 0 according to the permutation.
36  */
37 void update_parent_index(int* vec, int vec_size, const std::vector<int>& permute);
38 #endif // not CORENRN_BUILD
39 
40 // moves values to new location but does not change those values
41 void permute_ptr(int* vec, int n, int* permute);
42 
43 void permute_data(double* vec, int n, int* permute);
44 void permute_ml(Memb_list* ml, int type, NrnThread& nt);
45 
46 int* inverse_permute(int* p, int n);
47 
48 int type_of_ntdata(NrnThread&, int index, bool reset);
49 } // namespace coreneuron
THIS FILE IS AUTO GENERATED DONT MODIFY IT.
int * inverse_permute(int *p, int n)
static int permute(int i, NrnThread &nt)
Definition: prcellstate.cpp:28
In mechanism libraries, cannot use auto const token = nrn_ensure_model_data_are_sorted(); because the...
Definition: tnode.hpp:17
void permute_nodeindices(Memb_list *ml, int *permute)
void permute_ml(Memb_list *ml, int type, NrnThread &nt)
void permute_data(double *vec, int n, int *p)
void update_parent_index(int *vec, int vec_size, const std::vector< int > &permute)
void sort_ml(Memb_list *ml)
void permute_ptr(int *vec, int n, int *p)
int type_of_ntdata(NrnThread &, int index, bool reset)
int const size_t const size_t n
Definition: nrngsl.h:10
size_t p
short type
Definition: cabvars.h:10
A view into a set of mechanism instances.
Definition: nrnoc_ml.h:34
Represent main neuron object computed by single thread.
Definition: multicore.h:58