Repository navigation
support for calculating one indexed entry in a node instruction or instruction list, and related changes. - #71
Merged
Merged
Conversation
…struction list, and related changes.
Contributor
Author
|
@paciorek Let me know if you want to review this or if I should go ahead and merge. |
Contributor
|
I just skimmed things. A few comments:
|
Contributor
Author
|
Thanks for the comments.
|
Contributor
|
We are probably just using language differently, but |
Contributor
Author
|
Best for a discussion. |
* Steps toward support for values(nodes[i]) support * updates to back-end implementations for values(model, nodes[i])
Contributor
Author
|
Per discussion with @paciorek I am merging this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR makes substantial changes to the instruction and instruction list system and provides new methods for using singletons from within one of those.
instrList_nClassreplacesnList(instr_nClass)as the type for node lists. It holds information such as the cumulative number of nodes across the instructions it holds.RinstrList. Previously we hadRlist_Rinstr, which seems no longer needed and so is removed.instr_nClassis extended to hold precalculated information such as strides (based on the indexing ranges of the instructions, not the whole model variable) and related info for quickly determining the indexing that matches "nodes number i" within the instruction.model$calculate(nodes[i])will only exist innimble2, because it requires "keyword processing" on instances. Here we have the underlying new methods:calculate_indexed,calculateDiff_indexed,getLogProb_indexed,simulate_indexed,getParam_indexedandgetBound_indexed.model$calculate(instrList)ormodel$calculate_indexed(instrList, i)can now be compiled in an nFunction or nClass. Previously this was only feasible from nimble2. This makesnimbleModelmore fully featured and should be useful.matchDefentry in the opDefs for the compiled versions. Specifically many args namedinstrwere changed toinstrList. Uncompiled, they are polymorphic and handle either, but compiled they must be instrList objects, so I named them that.getParamandgetBound. These take aninstr, not aninstrList. ButgetParam_indexedandgetBound_indexedtake aninstrListto be fully general. I decided to just note that and move on for now.simulate"runners" (iteration functions) are now the same as forcalculateetc.There are two bug fixes:
calc_5_genericused the wrong slot range for a matrix fourth range.Tests
Other