Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

MOD-C-2-CPP: Compatibility fixed for NEURON 9.0, 8.2 and 8.1 #1

Merged
merged 2 commits into from
May 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Readme
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@ A movie of the spk.std file is seen with

nrngui hinton.hoc
p()

Changelog
---------
2022-05: Updated MOD files to contain valid C++ and be compatible with
the upcoming versions 8.2 and 9.0 of NEURON.
7 changes: 6 additions & 1 deletion halfgapm1.mod
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,20 @@ NET_RECEIVE (w) {
: with the global variable time step method.

VERBATIM
#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


FUNCTION mynormrand(mean, var) {
VERBATIM
if (_p_donotuse) {
double x = nrn_random_pick(_p_donotuse);
double x = nrn_random_pick(RANDCAST _p_donotuse);
_lmynormrand = x*_lvar + _lmean;
}else{
_lmynormrand = _lmean;
Expand Down
7 changes: 6 additions & 1 deletion halfgapspk.mod
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,20 @@ NET_RECEIVE (w) {
: with the global variable time step method.

VERBATIM
#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


FUNCTION mynormrand(mean, var) {
VERBATIM
if (_p_donotuse) {
double x = nrn_random_pick(_p_donotuse);
double x = nrn_random_pick(RANDCAST _p_donotuse);
_lmynormrand = x*_lvar + _lmean;
}else{
_lmynormrand = _lmean;
Expand Down