-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unifying system for applying substitutions #256
Conversation
…ays called together
* It's not at all clear to me why value_substitution added brackets around substituted values - updated test to no longer expect that
Codecov Report
@@ Coverage Diff @@
## master #256 +/- ##
===========================================
+ Coverage 41.07% 60.07% +18.99%
===========================================
Files 46 47 +1
Lines 6283 6335 +52
===========================================
+ Hits 2581 3806 +1225
+ Misses 3702 2529 -1173
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the right thing to do. I have not looked in to the details of how you have implemented it but it looks like an entirely reasonable syntax.
I'm afraid this is another building block type feature upon which more exciting things can be built. Basically, in GeNN 4 I added the
Substitutions
class which managed 'individual' substitutions of stuff like "$(id)". However there was stillname_substitution
andvalue_substitution
calls going on all over the place for model parameters, variables etc and these were implemented with some particularly gnarly C++ I added early in my GeNN career!Having a single unified system for substituting stuff not only tidies stuff up but, in future, could allow us to do stuff like add reference counts meaning that things like #232 #47 and #55 could be addressed in a nicer way that just adding increasingly-complex if clauses around them