Skip to content

Commit 57d3663

Browse files
committed
Update P/R for 4315 following LWG telecon review
1 parent 5fac3bb commit 57d3663

File tree

1 file changed

+98
-3
lines changed

1 file changed

+98
-3
lines changed

xml/issue4315.xml

Lines changed: 98 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ presumes that relaxing this <i>Constraint</i> and fixing the above two issues
3737
later would be a non-breaking change. If that is <em>not</em> the case, then
3838
I would suggest removing the two functions entirely.
3939
</p>
40-
</discussion>
41-
42-
<resolution>
40+
<superseded>
4341
<p>
4442
This wording is relative to <paper num="N5014"/>.
4543
</p>
@@ -124,6 +122,103 @@ sum use `Scalar`'s precision or greater.
124122
</li>
125123

126124
</ol>
125+
</superseded>
126+
127+
<note>LWG telecon 2025-10-10; Fix proposed resolution after review</note>
128+
<p>
129+
Use <i>Mandates</i>: for the new requirements, because we plan to change
130+
this later so want to make it ill-formed, not something that is statically
131+
checkable as part of the API.
132+
</p>
133+
134+
</discussion>
135+
136+
<resolution>
137+
<p>
138+
This wording is relative to <paper num="N5014"/>.
139+
</p>
140+
141+
<blockquote class="note">
142+
<p>
143+
[<i>Drafting note:</i> As a drive-by fix the proposed wording adds a missing closing parentheses in
144+
<sref ref="[linalg.algs.blas1.nrm2]"/> p2.]
145+
</p>
146+
</blockquote>
147+
148+
<ol>
149+
150+
<li><p>Modify <sref ref="[linalg.algs.blas1.nrm2]"/> as indicated:</p>
151+
152+
<blockquote>
153+
<pre>
154+
template&lt;<i>in-vector</i> InVec, class Scalar&gt;
155+
Scalar vector_two_norm(InVec v, Scalar init);
156+
template&lt;class ExecutionPolicy, <i>in-vector</i> InVec, class Scalar&gt;
157+
Scalar vector_two_norm(ExecutionPolicy&amp;&amp; exec, InVec v, Scalar init);
158+
</pre>
159+
<blockquote>
160+
<p>
161+
-1- [<i>Note 1</i>: [&hellip;] &mdash; <i>end note</i>]
162+
<p/>
163+
-2- <i>Mandates</i>:
164+
<ins>`InVec::value_type` and `Scalar` are either a floating-point type, or
165+
a specialization of `complex`.</ins>
166+
Let `a` be <tt><i>abs-if-needed</i>(declval&lt;typename InVec::value_type&gt;())</tt>.
167+
Then, <tt>decltype(init + a * a<ins>)</ins></tt> is convertible to `Scalar`.
168+
<p/>
169+
-3- <i>Returns</i>: The square root of the sum of the square of `init` and the squares of the
170+
absolute values of the elements of `v`.
171+
<p/>
172+
[<i>Note 2</i>: For `init` equal to zero, this is the Euclidean norm (also called 2-norm) of the vector
173+
`v`. &mdash; <i>end note</i>]
174+
<p/>
175+
-4- <i>Remarks</i>: If <del>`InVec::value_type`, and `Scalar` are all floating-point types or specializations of `complex`,
176+
and if</del> `Scalar` has higher precision than `InVec::value_type`, then intermediate terms in the sum use
177+
`Scalar`'s precision or greater.
178+
<p/>
179+
[<i>Note 3</i>: An implementation of this function for floating-point types `T` can use the `scaled_sum_of_squares`
180+
result `from vector_sum_of_squares(x, {.scaling_factor=1.0, .scaled_sum_of_squares=init})`. &mdash; <i>end note</i>]
181+
</p>
182+
</blockquote>
183+
</blockquote>
184+
185+
</li>
186+
187+
<li><p>Modify <sref ref="[linalg.algs.blas1.matfrobnorm]"/> as indicated:</p>
188+
189+
<blockquote>
190+
<pre>
191+
template&lt;<i>in-matrix</i> InMat, class Scalar&gt;
192+
Scalar matrix_frob_norm(InMat A, Scalar init);
193+
template&lt;class ExecutionPolicy, <i>in-matrix</i> InMat, class Scalar&gt;
194+
Scalar matrix_frob_norm(ExecutionPolicy&amp;&amp; exec, InMat A, Scalar init);
195+
</pre>
196+
<blockquote>
197+
<p>
198+
-2- <i>Mandates</i>:
199+
<ins>`InVec::value_type` and `Scalar` are either a floating-point type, or
200+
a specialization of `complex`.</ins>
201+
Let `a` be <tt><i>abs-if-needed</i>(declval&lt;typename InMat::value_type&gt;())</tt>.
202+
Then, <tt>decltype(init + a * a)</tt> is convertible to `Scalar`.
203+
<p/>
204+
-3- <i>Returns</i>: The square root of the sum of squares of `init` and the absolute values
205+
of the elements of `A`.
206+
<p/>
207+
[<i>Note 2</i>: For `init` equal to zero, this is the Frobenius norm of the matrix `A`. &mdash; <i>end note</i>]
208+
<p/>
209+
-4- <i>Remarks</i>: If <del>`InMat::value_type` and `Scalar` are all floating-point types or specializations of
210+
`complex`, and if</del> `Scalar` has higher precision than `InMat::value_type`, then intermediate terms in the
211+
sum use `Scalar`'s precision or greater.
212+
</p>
213+
<blockquote><pre>
214+
</pre></blockquote>
215+
</blockquote>
216+
</blockquote>
217+
218+
</li>
219+
220+
</ol>
221+
127222
</resolution>
128223

129224
</issue>

0 commit comments

Comments
 (0)