-
Notifications
You must be signed in to change notification settings - Fork 3
/
defvar.hoc
35 lines (33 loc) · 924 Bytes
/
defvar.hoc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{load_file("stdlib.hoc")}
proc default_var() {localobj s, pc
s = new String()
if (name_declared($s1) == 0) {
if (argtype(2) == 2) {
sprint(s.s, "~strdef %s", $s1)
execute(s.s)
sprint(s.s, "%s = \"%s\"", $s1, $s2)
}else{
hoc_ac_ = $2
sprint(s.s, "%s = hoc_ac_", $s1)
}
execute(s.s)
}
pc = new ParallelContext()
if (pc.id == 0) {
sprint(s.s, "print \"%s \", %s", $s1, $s1)
execute(s.s)
}
}
default_var("arg_tstop", 10)
default_var("arg_coreneuron", 0)
default_var("arg_coreneuron_filemode", 0)
default_var("arg_dump_coreneuron_model", 0)
default_var("arg_coreneuron_gpu", 0)
default_var("arg_pattern", "")
default_var("arg_psolve_test_mode", 0)
use_coreneuron = arg_coreneuron
use_coreneuron_filemode = arg_coreneuron_filemode
dump_coreneuron_model = arg_dump_coreneuron_model
use_coreneuron_gpu = arg_coreneuron_gpu
use_coreneuron_psolve_test_mode = arg_psolve_test_mode
tstop = arg_tstop