-
Notifications
You must be signed in to change notification settings - Fork 85
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
Switch u layout #480
Merged
Merged
Switch u layout #480
Changes from 7 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
e1bc88f
switch u layout for lsim
albheim 9c23ecf
Update src/timeresp.jl
albheim 7c80632
More updates, one error in test_timeresp
albheim 47264cf
Fix tests
albheim ad98b33
Change to AbstractVecOrMat
albheim 4c2566d
Catch CuArray in matrix conversion
albheim f4eef18
General zero vectors for x0 to support GPUs
albheim dfa7918
Update src/timeresp.jl
albheim a77de03
Update src/timeresp.jl
albheim ef24346
Move f outside lsim
albheim a238dc7
Merge branch 'switch_u_layout' of https://github.com/JuliaControl/Con…
albheim 9dc5097
Remove GPU compatible x0, save for later
albheim ebab7f4
Fix doctest
albheim 9236684
add kwargs
albheim 1c4ef6e
Remove variable and generalize type
albheim File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
Hmm. Is this how we want it?
I guess this is the best way wrt memory layout, but it does seem quite confusing and inconsistent with the order that would be natural for e.g., freqfresp, where we would have the frequency index last.
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.
I thought this is what we said for the first two arguments, and the last one made sense to me to leave based on how it was accessed. What would the other alternative be, nx x nu x lt?
Currently freqresp has the frequency index in the first dimension if I'm not mistaken, why would it be the most natural to have it last?
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.
Also,
Float64
should probably be made generic?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.
freqresp
probably needs a change corresponding to the one in this PR to place frequency in the last dimension, since a single call toevalfr
generates a matrixny x nu
of frequency responses at a single frequency.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.
One can always use
PermutedDimsArray
in the end to shape the array the way we want without copying. The user can then, if they choose, callcopy
on it to obtain a regular array, or use thePermutedDimsArray
like it was a regular arrayThere 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.
PermutedDimsArray
seems like a reasonable fix.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.
Would probably be better to avoid introducing
lt
, consider just usinglength(t)
or possibly call itnt
instead.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.
Seem reasonable, copied the way used in impulse.
I switched to using
length(t)
instead.