std::experi...::operator--(3)
π
std::experi...::operator--(3) π
okay so this page is from the C++ Standard Libary manual, bestie β no cap, that spelling is literally in the original, and we keep it. The page title is std::experi...::operator--(3), and the header repeats that title again; consider it folded in with a little bow π. This is highkey the page for the increment/decrement operators on std::experimental::simd, and it's giving parallelism TS v2 energy β¨.
π¦ NAME π¦
std::experimental::simd::operator++,std::experimental::simd::operator-- β that's the NAME line, periodt. The page repeats it exactly: std::experimental::simd::operator++,std::experimental::simd::operator--. π
β¨ Synopsis β¨
simd& operator++() noexcept; (1) (parallelism TS v2)
simd operator++( int ) noexcept; (2) (parallelism TS v2)
simd& operator--() noexcept; (3) (parallelism TS v2)
simd operator--( int ) noexcept; (4) (parallelism TS v2)
It applies the increment or decrement operator on each element of the simd. π«Ά
(1)β increments all values in thesimdby1and returns a reference to itself.(2)β increments all values in thesimdby1and returns a copy of itself before the operation.(3)β decrements all values in thesimdby1and returns a reference to itself.(4)β decrements all values in thesimdby1and returns a copy of itself before the operation.
π Example π
// Run this code
#include <cstddef>
#include <experimental/simd>
#include <iostream>
namespace stdx = std::experimental;
void print(auto rem, auto const& a)
{
std::cout << rem << ": ";
for (std::size_t i{}; i != std::size(a); ++i)
std::cout << a[i] << ' ';
std::cout << '\n';
}
int main()
{
stdx::native_simd<int> p = -2;
print('p', p);
++p;
print('p', p);
auto q = p--;
print('p', p);
print('q', q);
}
π Possible output: π
p: -2 -2 -2 -2
p: -1 -1 -1 -1
p: -2 -2 -2 -2
q: -1 -1 -1 -1
π That's the whole page, bestie! Cute sign-off with the footer tea: sourcehttp://cppreference.com, version/date2024.06.10, pagestd::experi...::operator--(3). Mwah π β¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms