-
-
Notifications
You must be signed in to change notification settings - Fork 193
Cleaning up linear access functions #2245
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
Comments
I already added testing to expression testing framework. Although varmat functions are not tested using it (yet?).
The simple option is to replace loops with expressions. The faster option is to have both row-major and col-major loops and pick depending if more expressions are row or col major. |
Oh is that testing 2x2 matrices and the gradients and stuff? I remember merging the block tests, but I assumed that was more a compile thing.
So this should be our go to? And then we add |
It is actually a simple test on 1x1 matrices, but if it compiles it should work.
I will try to prepare a general framework that will pick row/col loops depending on expressions. Although it is not that high on my todo. Maybe in a week or so. |
The reason I asked about the 2x2 is that I didn't find the problem with the I could imagine in the test framework we take every function that takes a matrix of size NxN as input, build an (N + 1)x(N + 1) matrix that holds it, and then do the test on the |
Now that we're exposing expressions in the language, we need to clean up functions that depend on linear access in Eigen types.
Specifically, with a simple Eigen type like
Eigen::MatrixXd
, it is possible to instead of looping over ij like so:to just do:
This was convenient because the same thing worked with matrices, vectors, row vectors.
Now that we have expressions and maps and such we need to be more careful.
There have been two pulls addressing issues like this so far, #2205 and #2223
I made this issue so we would vaguely have a place to discuss:
And and I do not want to stall #2223 unnecessarily to try to fix everything in one go.
Current Version:
v3.4.0
The text was updated successfully, but these errors were encountered: