Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

Consistently use _lmc and references.#1309

Merged
1uc merged 3 commits into
masterfrom
1uc/unify-naming
Jun 12, 2024
Merged

Consistently use _lmc and references.#1309
1uc merged 3 commits into
masterfrom
1uc/unify-naming

Conversation

@1uc

@1uc 1uc commented Jun 11, 2024

Copy link
Copy Markdown
Collaborator

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.

1uc added 3 commits June 11, 2024 09:13
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`.
bbpadministrator pushed a commit to BlueBrain/nmodl-references that referenced this pull request Jun 11, 2024
@codecov

codecov Bot commented Jun 11, 2024

Copy link
Copy Markdown

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 ⚠️
Additional details and impacted files
@@            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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bbpbuildbot

Copy link
Copy Markdown
Collaborator

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

Status and direct links:

@1uc 1uc marked this pull request as ready for review June 11, 2024 08:45
@1uc 1uc requested review from JCGoran and pramodk June 11, 2024 08:45
@JCGoran

JCGoran commented Jun 11, 2024

Copy link
Copy Markdown
Contributor

_lmc which is short for mechanism_cache

What's the meaning of the leading _l again?

@1uc

1uc commented Jun 12, 2024

Copy link
Copy Markdown
Collaborator Author

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.{}.

@1uc 1uc merged commit 13550d7 into master Jun 12, 2024
@1uc 1uc deleted the 1uc/unify-naming branch June 12, 2024 08:12
JCGoran pushed a commit to neuronsimulator/nrn that referenced this pull request Mar 12, 2025
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`.

* Rename '_lmr' to '_lmc'.

NMODL Repo SHA: BlueBrain/nmodl@13550d7
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants