-
-
Notifications
You must be signed in to change notification settings - Fork 183
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
operands_and_partials refactor #547
Merged
Merged
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
74464c8
Refactor scalar_type and value_type
seantalts d09a3a2
Don't need consts here.
seantalts 0f63e72
Temp - multivariate working, needs fvar
seantalts c927e44
Temp2 - show Rob. Started getting everything working for fwd mode, ne…
seantalts a9cc0b3
Get fwd/mat test passing.
seantalts c341d7a
Get fvar/scal test working
seantalts cc99757
Fix mixed mode
seantalts 9361833
more fixes for mixed mode
seantalts 7116fb2
Adding a temporary test to hunt down seg fault
7e343b9
Fix segfault by initializing partials for fvar<var> etc
seantalts 6d94a24
Merge branch 'develop' of github.com:stan-dev/math into ops_partials
seantalts 2eeb9e6
Get all the unit tests passing with the new API
seantalts 2366e49
Replace OperandsAndPartials uses; remove it and VectorView
seantalts 52761b9
cpplint
seantalts 61dae11
Merge branch 'develop' of github.com:stan-dev/math into cleanup/546-o…
seantalts 739c3fd
Fix includes.
seantalts a7bfeb1
Fix mixed mode tests. Remove unused tests.
seantalts d249fa0
Add test for return_type
seantalts 8c196ed
Merge branch 'develop' of github.com:stan-dev/math into cleanup/546-o…
seantalts 56ebec5
Add doc
seantalts f4bdc5e
Merge branch 'develop' of https://github.com/stan-dev/math into clean…
seantalts 2c4d302
Fix broadcast_array test to use new fvar ctor
seantalts 848b3c3
Address Bob's comments.
seantalts 27907f4
Merge branch 'cleanup/546-operands-partials' of github.com:stan-dev/m…
seantalts c2b5b2f
Fix whitespace errors introduced by _
seantalts f18697e
Fix last missing _
seantalts 3ef7cdc
Address Dan's pull request comments
seantalts fcbcbb8
Add mixed mode multivariate test
seantalts 2dece4d
Fix mixed multivariate operands_and_partials
seantalts 1afac1b
Fix cpplint error.
seantalts 65f894d
Don't need container view anymore -
seantalts b0b7329
Fix multivariate mixed tests
seantalts eaa147b
New test for creating zero matrices and vectors
seantalts e1d06bd
Use friendship to hide edge internals from stan::math namespace.
seantalts 3b0e04c
Switch from a 'detail' namespace to 'internal'
seantalts a0e7d1f
Deal with empty operands_ appropriately.
seantalts 03aecb0
Fix cpplint
seantalts 9044360
Unlikely.
seantalts e71f0d5
Fix doc up a bit, more doxygen
seantalts 4131e23
[ci-skip] Start addressing Bob's comments; sync
seantalts f904dc0
Refactor to avoid using inheritance for clarity's sake
seantalts be58571
Get rid of ViewElt
seantalts f9863b8
Need ViewElt still for arithmetic primitive edges
seantalts ae81a2e
cpplint
seantalts 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
Deal with empty operands_ appropriately.
- Loading branch information
commit a0e7d1f65be8799848b9637bacdc931cb9c104c2
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
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.
BUG: This relies on
operands_
to have a size greater or equal to 1. I'm not sure how this is going to behave whenoperands_
is size 0.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.
When does that happen?
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.
It happens when
ops
is 0 length. That could be anEigen::Matrix<var, -1, -1>
with either rows == 0 or columns == 0.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.
Instead of fixing the code, please doc that this will break if
operands_
is of size 0. In our current use cases, this isn't possible, but I can imagine use cases in the future where this will be a problem.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.
Can we just use the following to avoid the problem?
I agree that this will never happen with our current usage. I don't think the switch overhead will be that high here. We could even go with
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 did basically this (though I think it was called
unlikely
).