11 auto nof_threads_range = std::vector<int>(1 +
static_cast<int>(std::log2(
MAX_PROCESSORS - 1)),
13 std::generate(nof_threads_range.begin() + 1, nof_threads_range.end(), [
n = 1]()
mutable {
16 return nof_threads_range;
23 public init, topol, basic_shape, subsets, geom, biophys, geom_nseg, biophys_inhomo
24 public synlist, x, y, z, position, connect2target
42 x = y = z = 0 // only change via position
43 soma {icl = new IClamp(0.5)}
49 proc topol() { local i
50 connect dend(0), soma(1)
54 soma {pt3dclear() pt3dadd(0, 0, 0, 1) pt3dadd(15, 0, 0, 1)}
55 dend {pt3dclear() pt3dadd(15, 0, 0, 1) pt3dadd(90, 0, 0, 1)}
59 proc subsets() { local i
61 all = new SectionList()
87 proc biophys_inhomo(){}
88 proc position() { local i
89 soma for i = 0, n3d()-1 {
90 pt3dchange(i, $1-x+x3d(i), $2-y+y3d(i), $3-z+z3d(i), diam3d(i))
94 obfunc connect2target() { localobj nc //$o1 target point process, optional $o2 returned NetCon
95 soma nc = new NetCon(&v(1), $o1)
97 if (numarg() == 2) { $o2 = nc } // for backward compatibility
109 load_file("nrngui.hoc")
110 load_file("stdlib.hoc")
111 func prun() {local runtime
116 batch_run(tstop, tstop)
117 runtime=startsw()-runtime
124 std::string
operator"" _pas_cells(
unsigned long long nof_cells) {
129 cell[i] = new PasCell()
130 cell[i].icl.amp = i/ncell
131 cell[i].position(0, 100*i, 0)
std::string to_string(const T &obj)
auto make_available_threads_range()
int const size_t const size_t n
constexpr auto pass_cell_template
constexpr auto prun
prun requires a parallel context to be created before -> pc