P3050R2: LEWG review 2024-08-27 and 2024-09-03
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
Research direction
Start by reading the issue's summary of the unfinished LEWG review of P3050R2, including the discussion of noncomplex types, ADL-found conj, and a possible replacement for std::conj. There are no files or tests named. Done would require a recorded decision or a clearly defined follow-up proposal, neither of which is specified here.
Written by the indexing model from the issue text.
Description
LEWG review of P3050R2
LEWG started reviewing P3050R2 (Fix C++26 by optimizing linalg::conjugated for noncomplex value types) on 2024-08-27 but didn't finish.
Summary of LEWG's 2024-08-27 discussion
Definition of a (non)complex number type
P3050 follows [linalg], specifically conj-if-needed(E), which is defined as
- ADL-found
conj(E)if type ofEis not an arithmetic type, else E.
conj already is not ADL-findable for double, etc., which is what we want anyway.
Custom real types and conj
What happens if a user defines conj for their custom real type?
Results will be mathematically correct if user defined it mathematically correctly.
-
Best case: return type same as input type:
custom_real conj(const custom_real&)- Avoids mixed-type computations if all matrices and vectors are
custom_real
- Avoids mixed-type computations if all matrices and vectors are
-
Worst case: user imitates
std::conjby definingcustom_complex<custom_real> conj(custom_real)-
Code may fail to compile if user did not define the right mixed arithmetic operators and/or implicit conversions (but that's the user's fault; they did ask for
conjugate_transposed(A)) -
Users are already outside the space of typical std::linalg optimizations. Best they can expect is
std::execution::par_unseq. -
Users may have custom linear algebra algorithms and may use them with
std::linalg::conjugatedand/orstd::linalg::conjugate_transposed, though.
-
Consider a follow-on proposal to deprecate and replace std::conj
I am not bothered if users write a custom real number type and they define ADL-findable
conjto return the custom complex of their real type because that’s weird.... The existing behavior of the Standard is broken. Anyone who works with complex numbers hates this.
-
Consider a follow-on proposal to deprecate
std::conjand define a newstd::conjugatemore rationally -
Should this wait for language support for customization points?
- Dominant language
- HTML
- Stars
- 29
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ORNL/cpp-proposals-pub
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
ORNL/cpp-proposals-pub#394 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
ORNL/cpp-proposals-pub#393 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
ORNL/cpp-proposals-pub#297 ·
-
P3242: LWG ReviewOpen
Difficulty 4/5 3-5 days Newbie friendliness 35/100
ORNL/cpp-proposals-pub#484 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
ORNL/cpp-proposals-pub#483 · 2 comments ·
All issues in ORNL/cpp-proposals-pub
Similar issues
-
compiler-rt:asan
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
llvm/llvm-project#242921 ·
Maintainers usually reply within 1 day
-
Client codegen: an import repeated in an impl file is emitted twice, and the browser rejects the modulePossibly taken @MalithaPrabhashana claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
jaseci-labs/jac#10756 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
area:interp bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
yidika-lab/yidika#80 ·
Maintainers usually reply within 1 day