From Jason Turner

[simd.complex.access]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmparnas7a4/{from.md → to.md} +35 -0
tmp/tmparnas7a4/{from.md → to.md} RENAMED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### Complex accessors <a id="simd.complex.access">[[simd.complex.access]]</a>
2
+
3
+ ``` cpp
4
+ constexpr auto real() const noexcept;
5
+ constexpr auto imag() const noexcept;
6
+ ```
7
+
8
+ *Constraints:* `simd-complex<basic_vec>` is modeled.
9
+
10
+ *Returns:* An object of type
11
+ `rebind_t<typename T::value_type, basic_vec>` where the iᵗʰ element is
12
+ initialized to the result of *`cmplx-func`*`(operator[](`i`))` for all i
13
+ in the range \[`0`, `size()`), where *`cmplx-func`* is the corresponding
14
+ function from `<complex>`.
15
+
16
+ ``` cpp
17
+ template<simd-floating-point V>
18
+ constexpr void real(const V& v) noexcept;
19
+ template<simd-floating-point V>
20
+ constexpr void imag(const V& v) noexcept;
21
+ ```
22
+
23
+ *Constraints:*
24
+
25
+ - `simd-complex<basic_vec>` is modeled,
26
+ - `same_as<typename V::value_type, typename T::value_type>` is modeled,
27
+ and
28
+ - `V::size() == size()` is `true`.
29
+
30
+ *Effects:* Replaces each element of the `basic_vec` object such that the
31
+ iᵗʰ element is replaced with
32
+ `value_type(v[`i`], operator[](`i`).imag())` or
33
+ `value_type(operator[](`i`).real(), v[`i`])` for `real` and `imag`
34
+ respectively, for all i in the range \[`0`, `size()`).
35
+