2
2
<feed xmlns =" http://www.w3.org/2005/Atom" >
3
3
<title >cpprefjp - C++日本語リファレンス</title >
4
4
<link href =" https://cpprefjp.github.io" />
5
- <updated >2024-12-19T04:52:07.531371 </updated >
6
- <id >d35f6480-75bc-406d-8060-0d5dd8f5380b </id >
5
+ <updated >2024-12-19T08:00:20.169462 </updated >
6
+ <id >a2118247-a8b2-44bb-affe-3d8d2bd549c0 </id >
7
7
8
8
9
+ <entry >
10
+ <title >transposed -- linalg/tranposed: P3222R0対応(#1382)</title >
11
+ <link href =" https://cpprefjp.github.io/reference/linalg/transposed.html" />
12
+ <id >abcc16f33101ad97d56f80892f7496f956f3c43b:reference/linalg/transposed.md</id >
13
+ <updated >2024-12-19T16:56:49+09:00</updated >
14
+
15
+ <summary type =" html" >< pre>< code> diff --git a/reference/linalg/transposed.md b/reference/linalg/transposed.md
16
+ index dec56c1af..f03034f6c 100644
17
+ --- a/reference/linalg/transposed.md
18
+ +++ b/reference/linalg/transposed.md
19
+ @@ -30,6 +30,8 @@ namespace std::linalg {
20
+
21
+ - `Layout`が[`layout_left`](/reference/mdspan/layout_left.md)のとき、[`layout_right`](/reference/mdspan/layout_right.md)
22
+ - `Layout`が[`layout_right`](/reference/mdspan/layout_right.md)のとき、[`layout_left`](/reference/mdspan/layout_left.md)
23
+ +- `Layout`が[`layout_left_padded& lt;PaddingValue& gt;`](/reference/mdspan/layout_left_padded.md)のとき、[`layout_right_padded& lt;PaddingValue& gt;`](/reference/mdspan/layout_right_padded.md)
24
+ +- `Layout`が[`layout_right_padded& lt;PaddingValue& gt;`](/reference/mdspan/layout_right_padded.md)のとき、[`layout_left_padded& lt;PaddingValue& gt;`](/reference/mdspan/layout_left_padded.md)
25
+ - `Layout`が[`layout_stride`](/reference/mdspan/layout_stride.md)のとき、`layout_stride`
26
+ - `Layout`が[`layout_blas_packed`](layout_blas_packed.md)`& lt;Triangle, StorageOrder& gt;`のとき、`layout_blas_packed& lt;OppositeTriangle, OppositeStorageOrder& gt;`
27
+ - `OppositeTriangle`は[`conditional_t`](/reference/type_traits/conditional.md)`& lt;`[`is_same_v`](/reference/type_traits/is_same.md)`& lt;Triangle, upper_triangle_t& gt;, lower_triangle_t, upper_triangle_t& gt;`
28
+ @@ -48,7 +50,25 @@ namespace std::linalg {
29
+ ```
30
+ * transpose-extents[link layout_transpose/transpose-extents.md]
31
+
32
+ -- `Layout`が[`layout_stride`](/reference/mdspan/layout_stride.md)の特殊化であるとき、
33
+ +- `Layout`が[`layout_left_padded& lt;PaddingValue& gt;`](/reference/mdspan/layout_left_padded.md)であるとき、
34
+ +
35
+ + ```cpp
36
+ + R(a.data_handle(),
37
+ + ReturnMapping(transpose-extents(a.mapping().extents()), a.mapping().stride(1)),
38
+ + a.accessor())
39
+ + ```
40
+ + * transpose-extents[link layout_transpose/transpose-extents.md]
41
+ +
42
+ +- `Layout`が[`layout_right_padded& lt;PaddingValue& gt;`](/reference/mdspan/layout_right_padded.md)であるとき、
43
+ +
44
+ + ```cpp
45
+ + R(a.data_handle(),
46
+ + ReturnMapping(transpose-extents(a.mapping().extents()), a.mapping().stride(0)),
47
+ + a.accessor())
48
+ + ```
49
+ + * transpose-extents[link layout_transpose/transpose-extents.md]
50
+ +
51
+ +- `Layout`が[`layout_stride`](/reference/mdspan/layout_stride.md)であるとき、
52
+
53
+ ```cpp
54
+ R(a.data_handle(),
55
+ @@ -122,3 +142,4 @@ int main()
56
+ ## 参照
57
+ - [P1673R13 A free function linear algebra interface based on the BLAS](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p1673r13.html)
58
+ - [P1674R2: Evolving a Standard C++ Linear Algebra Library from the BLAS](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p1674r2.html)
59
+ +- [P3222R0 Fix C++26 by adding transposed special cases for P2642 layouts](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3222r0.html)
60
+ < /code>< /pre> </summary >
61
+
62
+ <author >
63
+ <name >yoh</name >
64
+
65
+ </author >
66
+ </entry >
67
+
9
68
<entry >
10
69
<title >コンパイラの実装状況 -- C++26: 2024-12 mailingの変更を記載 #1371</title >
11
70
<link href =" https://cpprefjp.github.io/implementation-status.html" />
@@ -3507,98 +3566,4 @@ C++ の標準規格は、他にも各国の規格化団体によって国際標
3507
3566
</author >
3508
3567
</entry >
3509
3568
3510
- <entry >
3511
- <title >gcd -- gcd, lcmの実装例 : 仕様に合わせて絶対値をとるよう修正</title >
3512
- <link href =" https://cpprefjp.github.io/reference/numeric/gcd.html" />
3513
- <id >5cc3b9e41da3334156c0090b216b916c8804af7c:reference/numeric/gcd.md</id >
3514
- <updated >2024-12-18T22:28:05+09:00</updated >
3515
-
3516
- <summary type =" html" >< pre>< code> diff --git a/reference/numeric/gcd.md b/reference/numeric/gcd.md
3517
- index 5bf7c51aa..3a5754232 100644
3518
- --- a/reference/numeric/gcd.md
3519
- +++ b/reference/numeric/gcd.md
3520
- @@ -176,14 +176,19 @@ constexpr std::common_type_t& lt;M, N& gt; gcd(M m, N n) {
3521
- if (m == 0 & amp;& amp; n == 0) {
3522
- return 0;
3523
- }
3524
- - while (m != 0 & amp;& amp; n != 0) {
3525
- - if (m & gt; n) {
3526
- - m %= n;
3527
- +
3528
- + auto mm = abs(m);
3529
- + auto nn = abs(n);
3530
- + while (mm != 0 & amp;& amp; nn != 0) {
3531
- + if (mm & gt; nn) {
3532
- + mm %= nn;
3533
- }
3534
- else {
3535
- - n %= m;
3536
- + nn %= mm;
3537
- }
3538
- }
3539
- - return m & lt; n ? n : m;
3540
- + return mm & lt; nn ? nn : mm;
3541
- }
3542
- ```
3543
- +* abs[link /reference/cstdlib/abs.md]
3544
- +
3545
- < /code>< /pre> </summary >
3546
-
3547
- <author >
3548
- <name >Akira Takahashi</name >
3549
-
3550
- </author >
3551
- </entry >
3552
-
3553
- <entry >
3554
- <title >lcm -- gcd, lcmの実装例 : 仕様に合わせて絶対値をとるよう修正</title >
3555
- <link href =" https://cpprefjp.github.io/reference/numeric/lcm.html" />
3556
- <id >5cc3b9e41da3334156c0090b216b916c8804af7c:reference/numeric/lcm.md</id >
3557
- <updated >2024-12-18T22:28:05+09:00</updated >
3558
-
3559
- <summary type =" html" >< pre>< code> diff --git a/reference/numeric/lcm.md b/reference/numeric/lcm.md
3560
- index cdea96876..fbab46a02 100644
3561
- --- a/reference/numeric/lcm.md
3562
- +++ b/reference/numeric/lcm.md
3563
- @@ -178,19 +178,24 @@ constexpr std::common_type_t& lt;M, N& gt; gcd(M m, N n) {
3564
- if (m == 0 & amp;& amp; n == 0) {
3565
- return 0;
3566
- }
3567
- - while (m != 0 & amp;& amp; n != 0) {
3568
- - if (m & gt; n) {
3569
- - m %= n;
3570
- +
3571
- + auto mm = abs(m);
3572
- + auto nn = abs(n);
3573
- + while (mm != 0 & amp;& amp; nn != 0) {
3574
- + if (mm & gt; nn) {
3575
- + mm %= nn;
3576
- }
3577
- else {
3578
- - n %= m;
3579
- + nn %= mm;
3580
- }
3581
- }
3582
- - return m & lt; n ? n : m;
3583
- + return mm & lt; nn ? nn : mm;
3584
- }
3585
-
3586
- template & lt;class M, class N& gt;
3587
- constexpr std::common_type_t& lt;M, N& gt; lcm(M m, N n) {
3588
- - return m / gcd(m, n) * n;
3589
- + return abs(m) / gcd(m, n) * abs(n);
3590
- }
3591
- -```
3592
- \ No newline at end of file
3593
- +```
3594
- +* abs[link /reference/cstdlib/abs.md]
3595
- +
3596
- < /code>< /pre> </summary >
3597
-
3598
- <author >
3599
- <name >Akira Takahashi</name >
3600
-
3601
- </author >
3602
- </entry >
3603
-
3604
3569
</feed >
0 commit comments