std::experimental::simd(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

std::experimental::simd(3) πŸ’…

Manual name folded in near the top: C++ Standard Libary (typo and all β€” that’s literally the manual name from the header, bestie). This page is all about std::experimental::simd, and it’s giving highkey iconic data-parallel energy. 🫢

NAME

std::experimental::simd β€” std::experimental::simd

Synopsis

Defined in header <experimental/simd> ✨

template< class T, class Abi = simd_abi::compatible<T> >
(parallelism TS v2)
class simd;

The class template simd is a data-parallel type. The width of a given simd instantiation is a constant expression, determined by the template parameters.

An ABI tag is a type in the simd_abi namespace that indicates a choice of size and binary representation for objects of data-parallel type.

Template parameters

  • T β€” element type; an arithmetic type other than bool
  • Abi β€” tag type used to determine the number of elements and storage

Helper alias templates

template< class T, int N >
using fixed_size_simd = std::experimental::simd<T,
std::experimental::simd_abi::fixed_size<N>>;
template< class T >
using native_simd = std::experimental::simd<T,
std::experimental::simd_abi::native<T>>;

Member types

  • value_type β€” T
  • reference β€” implementation-defined
  • mask_type β€” simd_mask<T, Abi>
  • abi_type β€” Abi

Member functions

  • constructor β€” constructs a simd object (parallelism TS v2) (public member function)
  • copy_from β€” loads simd elements from contiguous memory (parallelism TS v2) (public member function)
  • copy_to β€” stores simd elements to contiguous memory (parallelism TS v2) (public member function)
  • operator[] β€” accesses specified element (parallelism TS v2) (public member function)
  • operator++, operator-- β€” element-wise increment and decrement (parallelism TS v2) (public member function)
  • operator!, operator~, operator+, operator- β€” element-wise unary operators (parallelism TS v2) (public member function)
  • size β€” returns the width / number of elements [static] (parallelism TS v2) (public static member function)

Non-member functions

  • operator+, operator-, operator*, operator/, operator%, operator&, operator|, operator^, operator<<, operator>> β€” element-wise binary operators (function) (parallelism TS v2)
  • operator+=, operator-=, operator*=, operator/=, operator%=, operator&=, operator|=, operator^=, operator<<=, operator>>= β€” element-wise compound binary operators (function) (parallelism TS v2)
  • operator==, operator!=, operator>=, operator<=, operator>, operator< β€” element-wise relational operators (function) (parallelism TS v2)

Example

This section is incomplete.

Reason: no example.

(Not me leaving you on read β€” that’s literally what the page says 😭)

See also

  • simd_mask β€” data-parallel type with the element type bool (parallelism TS v2) (class template)
  • valarray β€” numeric arrays, array masks and array slices (class template)

Category

  • Todo no example

Source/version: http://cppreference.com Β· date: 2024.06.10 Β· page: std::experimental::simd(3) β€” bye bestie, go slay your data-parallel era πŸ’–βœ¨

πŸ“¦ where this page comes from