-
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 P3222 and P3050 #268
Conversation
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 would prefer if you did not mix in the refactor/fixes with the implementation of the new feature.
transposed
for P2642 layouts; fix layout_transposetransposed
for P2642 layouts; implement P3050; fix layout_transpose and conjugated_accessor
Hi @dalg24 ! Thanks for your review!
It's actually impossible to pass the repository's automated premerge tests without the fixes, as the build fails. Each commit is atomic (it builds and passes tests locally) and can be examined separately. |
Can't you open another PR with the fixes only? |
There are lots of fixes. They are separated into different commits. The current state of the repo is broken; it fails to build. |
85e298d
to
6aa1fd5
Compare
@dalg24 Per your request, I've created PR #269 that only fixes the build and Standard conformance issues, without adding new features. This PR is rebased atop PR #269, because (as mentioned before) this repository's build is currently broken, so it's impossible to pass check-in tests without the build fixes. Please merge PR #269 first. |
transposed
for P2642 layouts; implement P3050; fix layout_transpose and conjugated_accessortransposed
for P2642 layouts; implement P3050 (conjugated
for non-arithmetic, non-(custom complex) types)
transposed
for P2642 layouts; implement P3050 (conjugated
for non-arithmetic, non-(custom complex) types)transposed
for P2642 layouts; implement P3050
6aa1fd5
to
4791e71
Compare
transposed
for P2642 layouts; implement P3050Fix conjugated for non-arithmetic, non-(custom complex) types. A type T is "custom complex" if conj(T) is ADL-findable.
4791e71
to
72a4a21
Compare
* Implement P3222, which adds special cases to transposed for layout_left_padded and layout_right_padded (the layouts added to the C++ Standard by P2642, which was voted into the C++ Working Draft) * Protect implementation of P3222 with new CMake option LINALG_FIX_TRANSPOSED_FOR_PADDED_LAYOUTS. It is currently OFF by default.
72a4a21
to
1c07a8d
Compare
This completes our implementation of P3050R2 ("Fix C++26 by optimizing linalg::conjugated for noncomplex value types"). * Protect implementation of P3050 with new CMake option LINALG_FIX_CONJUGATED_FOR_NONCOMPLEX. It is currently OFF by default. * Fix tests to account for the element_type of the result of conjugated not necessarily being const any more.
@crtrott @dalg24 This PR is ready to review. Changes as of today:
|
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.
This looks good. I am not 100% sure I like the approach for the conjugated thing but its anyway protected so I am good.
Other than small comment on scope of #ifdef + fix request in P3050 spec (add return type to deleted conj) looks fine to me. |
@crtrott wrote:
Just to clarify: P3050 is an optimization that simplifies the implementation. It needs some way to tell if a number type is not complex. It can be conservative about that test, because it's only an optimization. Implementations can always optimize internally by specializing on known This is different than P3371R1. As we discussed yesterday, P3371R1 changes Hermitian rank-1 and rank-k updates to constrain |
P3050 adds the special case for arithmetic types to conjugated, so protect that special case with the appropriate macro. Also, fix and improve tests.
Implement P3222R0 ("Add
transposed
special cases for P2642 layouts"). The corresponding paper PR is ORNL/cpp-proposals-pub#448. Add tests for previously supported cases and the new cases.Implement P3050R2 ("Optimize
linalg::conjugated
for noncomplex value types") and add tests. That is, fixconjugated
for non-arithmetic, non-(custom complex) types. A typeT
is "custom complex" ifconj(T)
is ADL-findable.Each of these papers has a separate CMake option, which is documented in CMakeLists.txt. Both options default to
OFF
(not implemented) for now.Fixes #267 .