Skip to content

Replace VERBATIM blocks for RNGs with new RANDOM constructs#5

Merged
pramodk merged 2 commits into
masterfrom
pramodk/use-random-var
Feb 8, 2024
Merged

Replace VERBATIM blocks for RNGs with new RANDOM constructs#5
pramodk merged 2 commits into
masterfrom
pramodk/use-random-var

Conversation

@pramodk

@pramodk pramodk commented Jan 15, 2024

Copy link
Copy Markdown
Contributor
  • all 3 mod files are updated to use RANDOM variables
  • remove VERBATIM blocks and extra functions/procedures
  • update HOC files to directly set sequence for RNG variables

CI_BRANCHES:NMODL_BRANCH=hines/nmodlrandom-simplified,NEURON_BRANCH=hines/nmodlrandom-simplified,

 * all 3 mod files are updated to use RANDOM variables
 * remove VERBATIM blocks and extra functions/procedures
 * update HOC files to directly set sequence for RNG variables

@nrnhines nrnhines left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. The RANDOM statement certainly results in pleasing simplifications to the mod file. It seems that VECTOR would be of similar benefit and could follow the same pattern (i.e. vecname could be the first arg to a set of vector_...(vecname, ...) functions. And at the interpreter could associate via mechinst.vecname(HocVector). I suppose a few edge details would have to be worked out)

@pramodk

pramodk commented Jan 16, 2024

Copy link
Copy Markdown
Contributor Author

The RANDOM statement certainly results in pleasing simplifications to the mod file.

Certainly! It's a very good feeling to write the RNGs in this new way!

It seems that VECTOR would be of similar benefit and could follow the same pattern

Agree!

@pramodk pramodk marked this pull request as ready for review January 27, 2024 15:33
@pramodk pramodk merged commit 2313db9 into master Feb 8, 2024
@pramodk pramodk deleted the pramodk/use-random-var branch February 8, 2024 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants