Skip to content

Commit

Permalink
linalg/conjugated: R3050R2対応(#1383)
Browse files Browse the repository at this point in the history
  • Loading branch information
yohhoy committed Dec 19, 2024
1 parent abcc16f commit 9e72237
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions reference/linalg/conjugated.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,16 @@ namespace std::linalg {
## 戻り値
- `Accessor`が[`conjugated_accessor`](conjugated_accessor.md)の特殊化のとき、説明用の型`A`を[`remove_cvref_t`](/reference/type_traits/remove_cvref.md)`<decltype(a.accessor().nested_accessor())>`として、
説明用の型`A`を下記の通りとする。
- `Accessor`が[`conjugated_accessor`](conjugated_accessor.md)の特殊化のとき、[`remove_cvref_t`](/reference/type_traits/remove_cvref.md)`<decltype(a.accessor().nested_accessor())>`
- [`remove_cvref_t`](/reference/type_traits/remove_cvref.md)`<ElementType>`が算術型のとき、`Accessor`
- [`remove_cvref_t`](/reference/type_traits/remove_cvref.md)`<ElementType>`と等価な型`T`となる任意の部分式`E`に対して、宣言`template<class T> conj(const T&) = delete;`を含むコンテキストでオーバーロード解決が行わた結果`conj(E)`が有効な式ではないとき、`Accessor`
- そうでなければ、[`conjugated_accessor<Accessor>`](conjugated_accessor.md)
戻り値は下記の通り。
- `Accessor`が[`conjugated_accessor`](conjugated_accessor.md)の特殊化のとき、
```cpp
mdspan<typename A::element_type, Extents, Layout, A>(
a.data_handle(), a.mapping(), a.accessor().nested_accessor())
Expand All @@ -32,8 +40,9 @@ namespace std::linalg {
* Extents[link /reference/mdspan/extents.md]
* Layout[link /reference/mdspan/LayoutMappingPolicy.md]
- そうではないとき、説明用の型`A`を[`conjugated_accessor`](conjugated_accessor.md)`<Accessor>`として、
- [`remove_cvref_t`](/reference/type_traits/remove_cvref.md)`<ElementType>`が算術型のとき、`a`
- [`remove_cvref_t`](/reference/type_traits/remove_cvref.md)`<ElementType>`と等価な型`T`となる任意の部分式`E`に対して、宣言`template<class T> conj(const T&) = delete;`を含むコンテキストでオーバーロード解決が行わた結果`conj(E)`が有効な式ではないとき、`a`
- そうではないとき、
```cpp
mdspan<typename A::element_type, Extents, Layout, A>(
a.data_handle(), a.mapping(), conjugated_accessor(a.accessor()))
Expand Down Expand Up @@ -89,3 +98,4 @@ int main()
## 参照
- [P1673R13 A free function linear algebra interface based on the BLAS](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p1673r13.html)
- [P1674R2: Evolving a Standard C++ Linear Algebra Library from the BLAS](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p1674r2.html)
- [P3050R2 Fix C++26 by optimizing linalg::conjugated for noncomplex value types](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3050r2.html)

0 comments on commit 9e72237

Please sign in to comment.