BlueBrain / nmodl

Code Generation Framework For NEURON MODeling Language
https://bluebrain.github.io/nmodl/
Apache License 2.0
53 stars 15 forks source link

Consistently use `_lmc` and references. #1309

Closed 1uc closed 3 months ago

1uc commented 3 months ago

Frequently _lmr is passed by pointer, which requires printing:

  foo(&_lmr, ...);

the & is annoying, because it prevents us from using get_arg_str. It also sometimes leads us to do:

  auto * _ml = &_lmr;

which is bad, because it's not a Memb_list.

In a second step we rename _lmr to _lmc which is short for mechanism_cache which is better since the _range part can also be _instance.

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 35.29412% with 11 lines in your changes missing coverage. Please review.

Project coverage is 85.57%. Comparing base (c5ecfea) to head (84417c8).

Files Patch % Lines
src/codegen/codegen_neuron_cpp_visitor.cpp 35.29% 11 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1309 +/- ## ========================================== + Coverage 85.54% 85.57% +0.02% ========================================== Files 178 178 Lines 13415 13410 -5 ========================================== - Hits 11476 11475 -1 + Misses 1939 1935 -4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

bbpbuildbot commented 3 months ago

Logfiles from GitLab pipeline #216114 (:white_check_mark:) have been uploaded here!

Status and direct links:

JCGoran commented 3 months ago

_lmc which is short for mechanism_cache

What's the meaning of the leading _l again?

1uc commented 3 months ago

In nocmodl it's local. Feel free to change it if it bothers you. Prefixing with _ help avoid clashes, in NMODL, it's a bit murky since, we rarely print variables just plain, usually it's inst.{}.