This repository was archived by the owner on May 18, 2019. It is now read-only.
Implement *_get_5D(...) array accessors#2846
Closed
atrosinenko wants to merge 1 commit intoOpenModelica:masterfrom
atrosinenko:type_get_5D
Closed
Implement *_get_5D(...) array accessors#2846atrosinenko wants to merge 1 commit intoOpenModelica:masterfrom atrosinenko:type_get_5D
atrosinenko wants to merge 1 commit intoOpenModelica:masterfrom
atrosinenko:type_get_5D
Conversation
Contributor
Author
|
Hmm... There are references to |
Contributor
Author
|
Adapted |
Member
|
Your patch looks good. I wonder if 6D or 7D is also needed in some other model... |
Member
|
The tests run correctly according to OpenModelica_TEST_PULL_REQUEST 2019-01-03_17-52-50. |
OpenModelica-Hudson
pushed a commit
that referenced
this pull request
Jan 3, 2019
Belonging to [master]: - #2846
Contributor
Author
|
Thanks! Meanwhile, on other low-hanging fruits: there are some timeouts like this where according to Callgrind, 60% of instructions are under |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 should technically fix the possibility to at least build models like
Buildings.HeatTransfer.Windows.BaseClasses.Examples.AbsorbedRadiationand looks similar to what already exists.I have rephrased the
getIndex_nDfunction implementation, so they should be easier to read and, possibly, faster to compute (but this highly depends on what the optimizer already does). This may interfere with some corner cases like integer overflow, but these are probably UB-like cases anyway. In case the old implementation was written in such a way for a purpose, then maybe it would be worth to write some comment like// Index = i0 * dim[1] * dim[2] * ... * dim[n] + i1 * dim[2] * ... * dim[n] + ... + i{n-1} * dim[n] + i{n}