Files
cppdraft_translate/cppdraft/simd/cassign.md
2025-10-25 03:02:53 +03:00

2.7 KiB

[simd.cassign]

29 Numerics library [numerics]

29.10 Data-parallel types [simd]

29.10.8 basic_vec non-member operations [simd.nonmembers]

29.10.8.2 basic_vec compound assignment [simd.cassign]

🔗

friend constexpr basic_vec& operator+=(basic_vec& lhs, const basic_vec& rhs) noexcept; friend constexpr basic_vec& operator-=(basic_vec& lhs, const basic_vec& rhs) noexcept; friend constexpr basic_vec& operator*=(basic_vec& lhs, const basic_vec& rhs) noexcept; friend constexpr basic_vec& operator/=(basic_vec& lhs, const basic_vec& rhs) noexcept; friend constexpr basic_vec& operator%=(basic_vec& lhs, const basic_vec& rhs) noexcept; friend constexpr basic_vec& operator&=(basic_vec& lhs, const basic_vec& rhs) noexcept; friend constexpr basic_vec& operator|=(basic_vec& lhs, const basic_vec& rhs) noexcept; friend constexpr basic_vec& operator^=(basic_vec& lhs, const basic_vec& rhs) noexcept; friend constexpr basic_vec& operator<<=(basic_vec& lhs, const basic_vec& rhs) noexcept; friend constexpr basic_vec& operator>>=(basic_vec& lhs, const basic_vec& rhs) noexcept;

1

#

Let op be the operator.

2

#

Constraints: requires (value_type a, value_type b) { a op b; } istrue.

3

#

Effects: These operators apply the indicated operator to lhs and rhs as an element-wise operation.

4

#

Returns: lhs.

🔗

friend constexpr basic_vec& operator<<=(basic_vec& lhs, simd-size-type n) noexcept; friend constexpr basic_vec& operator>>=(basic_vec& lhs, simd-size-type n) noexcept;

5

#

Let op be the operator.

6

#

Constraints: requires (value_type a, simd-size-type b) { aop b; } is true.

7

#

Effects: Equivalent to: return operator op (lhs, basic_vec(n));