tmp/tmpd1ziqlpg/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,131 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Overview <a id="simd.overview">[[simd.overview]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
namespace std::simd {
|
| 5 |
+
template<class T, class Abi> class basic_vec {
|
| 6 |
+
public:
|
| 7 |
+
using value_type = T;
|
| 8 |
+
using mask_type = basic_mask<sizeof(T), Abi>;
|
| 9 |
+
using abi_type = Abi;
|
| 10 |
+
using iterator = simd-iterator<basic_vec>;
|
| 11 |
+
using const_iterator = simd-iterator<const basic_vec>;
|
| 12 |
+
|
| 13 |
+
constexpr iterator begin() noexcept { return {*this, 0}; }
|
| 14 |
+
constexpr const_iterator begin() const noexcept { return {*this, 0}; }
|
| 15 |
+
constexpr const_iterator cbegin() const noexcept { return {*this, 0}; }
|
| 16 |
+
constexpr default_sentinel_t end() const noexcept { return {}; }
|
| 17 |
+
constexpr default_sentinel_t cend() const noexcept { return {}; }
|
| 18 |
+
|
| 19 |
+
static constexpr integral_constant<simd-size-type, simd-size-v<T, Abi>> size {};
|
| 20 |
+
|
| 21 |
+
constexpr basic_vec() noexcept = default;
|
| 22 |
+
|
| 23 |
+
// [simd.ctor], basic_vec constructors
|
| 24 |
+
template<class U>
|
| 25 |
+
constexpr explicit(see below) basic_vec(U&& value) noexcept;
|
| 26 |
+
template<class U, class UAbi>
|
| 27 |
+
constexpr explicit(see below) basic_vec(const basic_vec<U, UAbi>&) noexcept;
|
| 28 |
+
template<class G>
|
| 29 |
+
constexpr explicit basic_vec(G&& gen);
|
| 30 |
+
template<class R, class... Flags>
|
| 31 |
+
constexpr basic_vec(R&& range, flags<Flags...> = {});
|
| 32 |
+
template<class R, class... Flags>
|
| 33 |
+
constexpr basic_vec(R&& range, const mask_type& mask, flags<Flags...> = {});
|
| 34 |
+
template<simd-floating-point V>
|
| 35 |
+
constexpr explicit(see below) basic_vec(const V& reals, const V& imags = {}) noexcept;
|
| 36 |
+
|
| 37 |
+
// [simd.subscr], basic_vec subscript operators
|
| 38 |
+
constexpr value_type operator[](simd-size-type) const;
|
| 39 |
+
template<simd-integral I>
|
| 40 |
+
constexpr resize_t<I::size(), basic_vec> operator[](const I& indices) const;
|
| 41 |
+
|
| 42 |
+
// [simd.complex.access], basic_vec complex accessors
|
| 43 |
+
constexpr auto real() const noexcept;
|
| 44 |
+
constexpr auto imag() const noexcept;
|
| 45 |
+
template<simd-floating-point V>
|
| 46 |
+
constexpr void real(const V& v) noexcept;
|
| 47 |
+
template<simd-floating-point V>
|
| 48 |
+
constexpr void imag(const V& v) noexcept;
|
| 49 |
+
|
| 50 |
+
// [simd.unary], basic_vec unary operators
|
| 51 |
+
constexpr basic_vec& operator++() noexcept;
|
| 52 |
+
constexpr basic_vec operator++(int) noexcept;
|
| 53 |
+
constexpr basic_vec& operator--() noexcept;
|
| 54 |
+
constexpr basic_vec operator--(int) noexcept;
|
| 55 |
+
constexpr mask_type operator!() const noexcept;
|
| 56 |
+
constexpr basic_vec operator~() const noexcept;
|
| 57 |
+
constexpr basic_vec operator+() const noexcept;
|
| 58 |
+
constexpr basic_vec operator-() const noexcept;
|
| 59 |
+
|
| 60 |
+
// [simd.binary], basic_vec binary operators
|
| 61 |
+
friend constexpr basic_vec operator+(const basic_vec&, const basic_vec&) noexcept;
|
| 62 |
+
friend constexpr basic_vec operator-(const basic_vec&, const basic_vec&) noexcept;
|
| 63 |
+
friend constexpr basic_vec operator*(const basic_vec&, const basic_vec&) noexcept;
|
| 64 |
+
friend constexpr basic_vec operator/(const basic_vec&, const basic_vec&) noexcept;
|
| 65 |
+
friend constexpr basic_vec operator%(const basic_vec&, const basic_vec&) noexcept;
|
| 66 |
+
friend constexpr basic_vec operator&(const basic_vec&, const basic_vec&) noexcept;
|
| 67 |
+
friend constexpr basic_vec operator|(const basic_vec&, const basic_vec&) noexcept;
|
| 68 |
+
friend constexpr basic_vec operator^(const basic_vec&, const basic_vec&) noexcept;
|
| 69 |
+
friend constexpr basic_vec operator<<(const basic_vec&, const basic_vec&) noexcept;
|
| 70 |
+
friend constexpr basic_vec operator>>(const basic_vec&, const basic_vec&) noexcept;
|
| 71 |
+
friend constexpr basic_vec operator<<(const basic_vec&, simd-size-type) noexcept;
|
| 72 |
+
friend constexpr basic_vec operator>>(const basic_vec&, simd-size-type) noexcept;
|
| 73 |
+
|
| 74 |
+
// [simd.cassign], basic_vec compound assignment
|
| 75 |
+
friend constexpr basic_vec& operator+=(basic_vec&, const basic_vec&) noexcept;
|
| 76 |
+
friend constexpr basic_vec& operator-=(basic_vec&, const basic_vec&) noexcept;
|
| 77 |
+
friend constexpr basic_vec& operator*=(basic_vec&, const basic_vec&) noexcept;
|
| 78 |
+
friend constexpr basic_vec& operator/=(basic_vec&, const basic_vec&) noexcept;
|
| 79 |
+
friend constexpr basic_vec& operator%=(basic_vec&, const basic_vec&) noexcept;
|
| 80 |
+
friend constexpr basic_vec& operator&=(basic_vec&, const basic_vec&) noexcept;
|
| 81 |
+
friend constexpr basic_vec& operator|=(basic_vec&, const basic_vec&) noexcept;
|
| 82 |
+
friend constexpr basic_vec& operator^=(basic_vec&, const basic_vec&) noexcept;
|
| 83 |
+
friend constexpr basic_vec& operator<<=(basic_vec&, const basic_vec&) noexcept;
|
| 84 |
+
friend constexpr basic_vec& operator>>=(basic_vec&, const basic_vec&) noexcept;
|
| 85 |
+
friend constexpr basic_vec& operator<<=(basic_vec&, simd-size-type) noexcept;
|
| 86 |
+
friend constexpr basic_vec& operator>>=(basic_vec&, simd-size-type) noexcept;
|
| 87 |
+
|
| 88 |
+
// [simd.comparison], basic_vec compare operators
|
| 89 |
+
friend constexpr mask_type operator==(const basic_vec&, const basic_vec&) noexcept;
|
| 90 |
+
friend constexpr mask_type operator!=(const basic_vec&, const basic_vec&) noexcept;
|
| 91 |
+
friend constexpr mask_type operator>=(const basic_vec&, const basic_vec&) noexcept;
|
| 92 |
+
friend constexpr mask_type operator<=(const basic_vec&, const basic_vec&) noexcept;
|
| 93 |
+
friend constexpr mask_type operator>(const basic_vec&, const basic_vec&) noexcept;
|
| 94 |
+
friend constexpr mask_type operator<(const basic_vec&, const basic_vec&) noexcept;
|
| 95 |
+
|
| 96 |
+
// [simd.cond], basic_vec exposition only conditional operators
|
| 97 |
+
friend constexpr basic_vec simd-select-impl( // exposition only
|
| 98 |
+
const mask_type&, const basic_vec&, const basic_vec&) noexcept;
|
| 99 |
+
};
|
| 100 |
+
|
| 101 |
+
template<class R, class... Ts>
|
| 102 |
+
basic_vec(R&& r, Ts...) -> see below;
|
| 103 |
+
}
|
| 104 |
+
```
|
| 105 |
+
|
| 106 |
+
Every specialization of `basic_vec` is a complete type. The
|
| 107 |
+
specialization of `basic_vec<T, Abi>` is
|
| 108 |
+
|
| 109 |
+
- enabled, if `T` is a vectorizable type, and there exists value `N` in
|
| 110 |
+
the range \[`1`, `64`\], such that `Abi` is `deduce-abi-t<T, N>`,
|
| 111 |
+
- otherwise, disabled, if `T` is not a vectorizable type,
|
| 112 |
+
- otherwise, it is *implementation-defined* if such a specialization is
|
| 113 |
+
enabled.
|
| 114 |
+
|
| 115 |
+
If `basic_vec<T, Abi>` is disabled, then the specialization has a
|
| 116 |
+
deleted default constructor, deleted destructor, deleted copy
|
| 117 |
+
constructor, and deleted copy assignment. In addition only the
|
| 118 |
+
`value_type`, `abi_type`, and `mask_type` members are present.
|
| 119 |
+
|
| 120 |
+
If `basic_vec<T, Abi>` is enabled, then `basic_vec<T, Abi>` is trivially
|
| 121 |
+
copyable, default-initialization of an object of such a type
|
| 122 |
+
default-initializes all elements, and value-initialization
|
| 123 |
+
value-initializes all elements [[dcl.init.general]].
|
| 124 |
+
|
| 125 |
+
*Recommended practice:* Implementations should support implicit
|
| 126 |
+
conversions between specializations of `basic_vec` and appropriate
|
| 127 |
+
*implementation-defined* types.
|
| 128 |
+
|
| 129 |
+
[*Note 1*: Appropriate types are non-standard vector types which are
|
| 130 |
+
available in the implementation. — *end note*]
|
| 131 |
+
|