From 067e11332dc2feb22033c11d7e00f87b60eff2b5 Mon Sep 17 00:00:00 2001 From: Olli Lupton Date: Wed, 18 May 2022 11:17:04 +0200 Subject: [PATCH 1/3] ProbAMPA.mod --- ProbAMPA.mod | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ProbAMPA.mod b/ProbAMPA.mod index 5ab89a4..0c1ff9b 100644 --- a/ProbAMPA.mod +++ b/ProbAMPA.mod @@ -48,8 +48,13 @@ VERBATIM #include #include +#ifndef NRN_VERSION_GTEQ_8_2_0 double nrn_random_pick(void* r); void* nrn_random_arg(int argpos); +#define RANDCAST +#else +#define RANDCAST (Rand*) +#endif ENDVERBATIM @@ -186,7 +191,7 @@ VERBATIM : each instance. However, the corresponding hoc Random : distribution MUST be set to Random.negexp(1) */ - value = nrn_random_pick(_p_rng); + value = nrn_random_pick(RANDCAST _p_rng); //fi = fopen("RandomStreamMCellRan4.txt", "w"); //fprintf(fi,"random stream for this simulation = %lf\n",value); //printf("random stream for this simulation = %lf\n",value); @@ -202,4 +207,4 @@ VERBATIM } ENDVERBATIM erand = value -} \ No newline at end of file +} From 27731a3c6fc01e3601822b1ddb2208463640999f Mon Sep 17 00:00:00 2001 From: Olli Lupton Date: Wed, 18 May 2022 11:17:51 +0200 Subject: [PATCH 2/3] ProbUDFsyn2_lark.mod --- ProbUDFsyn2_lark.mod | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ProbUDFsyn2_lark.mod b/ProbUDFsyn2_lark.mod index 9a49ccb..ceb726a 100644 --- a/ProbUDFsyn2_lark.mod +++ b/ProbUDFsyn2_lark.mod @@ -43,8 +43,13 @@ VERBATIM #include #include +#ifndef NRN_VERSION_GTEQ_8_2_0 double nrn_random_pick(void* r); void* nrn_random_arg(int argpos); +#define RANDCAST +#else +#define RANDCAST (Rand*) +#endif ENDVERBATIM @@ -153,7 +158,7 @@ VERBATIM : each instance. However, the corresponding hoc Random : distribution MUST be set to Random.negexp(1) */ - value = nrn_random_pick(_p_rng); + value = nrn_random_pick(RANDCAST _p_rng); //fi = fopen("RandomStreamMCellRan4.txt", "w"); //fprintf(fi,"random stream for this simulation = %lf\n",value); //printf("random stream for this simulation = %lf\n",value); From b1a7cf0c5abac9d3b8865a1c9d9bfb75a5fdfb4f Mon Sep 17 00:00:00 2001 From: Olli Lupton Date: Fri, 20 May 2022 17:30:40 +0200 Subject: [PATCH 3/3] Cleanup for merge. --- readme.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/readme.txt b/readme.txt index 4a5e25c..75c927f 100644 --- a/readme.txt +++ b/readme.txt @@ -15,5 +15,7 @@ request). Questions on how to use this model should be directed to michael.doron@mail.huji.ac.il ---- -Version 2022-05-16 migrating ProbAMPANMDA2_ratio.mod so that it supports Neuron 9.0 +Changelog +--------- +2022-05: Updated MOD files to contain valid C++ and be compatible + with the upcoming versions 8.2 and 9.0 of NEURON.