-
Notifications
You must be signed in to change notification settings - Fork 22
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
Implement P3371 #293
base: main
Are you sure you want to change the base?
Implement P3371 #293
Conversation
This is for the implementation of P3371. It's OFF by default. Nothing currently uses the macro.
Change existing hermitian_matrix_rank_1_update overloads to be overwriting instead of unconditionally updating, and add updating hermitian_matrix_rank_1_update overloads. Guard changes with the appropriate macro, which by default is NOT defined. Add lots of tests to ensure coverage of all cases. Tests pass whether or not P3371 support is enabled.
Change existing symmetric_matrix_rank_1_update overloads to be overwriting instead of unconditionally updating, and add updating symmetric_matrix_rank_1_update overloads. Guard changes with the appropriate macro, which by default is NOT defined. Add lots of tests to ensure coverage of all cases. Tests pass whether or not P3371 support is enabled.
One could imagine 3 ways to make sure alpha is real: 1. constrain alpha to be a noncomplex number type, 2. impose a precondition that alpha has zero imaginary part, or 3. set alpha to _`real-if-needed`_`(alpha)`. This commit implements Option (3). This has the advantage of working just like how linalg makes the diagonal real.
The function wasn't tested before. If the option to enable P3371's changes is enabled, the new tests don't build.
Change existing matrix_rank_1_update overloads to be overwriting instead of unconditionally updating, and add updating matrix_rank_1_update overloads. Guard changes with the appropriate macro, which by default is NOT defined. Add lots of tests to ensure coverage of all cases. Tests pass whether or not P3371 support is enabled.
Change existing matrix_rank_1_update_c overloads to be overwriting instead of unconditionally updating, and add updating matrix_rank_1_update_c overloads. Guard changes with the appropriate macro, which by default is NOT defined. Add lots of tests to ensure coverage of all cases. Tests pass whether or not P3371 support is enabled.
|
…mplementation and testing for rank 2k
Looked through rank_1 implementations - looks ok |
That's totally on me -- I was prioritizing "passes the tests" over "code makes sense" ; - ) . |
matrix_rank_1_update
matrix_rank_1_update_c
symmetric_matrix_rank_1_update
hermitian_matrix_rank_1_update
symmetric_matrix_rank_2_update
hermitian_matrix_rank_2_update
symmetric_matrix_rank_k_update
hermitian_matrix_rank_k_update
symmetric_matrix_rank_2k_update
hermitian_matrix_rank_2k_update