NEURON
ion_semantics.h
Go to the documentation of this file.
1 #pragma once
2 
3 inline int nrn_semantics_from_ion(int type, int i) {
4  return 2 * type + i;
5 }
6 inline bool nrn_semantics_is_ion(int i) {
7  return i >= 0 && (i & 1) == 0;
8 }
9 inline bool nrn_semantics_is_ionstyle(int i) {
10  return i >= 0 && (i & 1) == 1;
11 }
12 inline int nrn_semantics_ion_type(int i) {
13  return i / 2;
14 }
#define i
Definition: md1redef.h:19
bool nrn_semantics_is_ion(int i)
Definition: ion_semantics.h:6
int nrn_semantics_from_ion(int type, int i)
Definition: ion_semantics.h:3
bool nrn_semantics_is_ionstyle(int i)
Definition: ion_semantics.h:9
int nrn_semantics_ion_type(int i)
Definition: ion_semantics.h:12
short type
Definition: cabvars.h:10