Scroll to navigation

std::experimental::simd(3) C++ Standard Libary std::experimental::simd(3)

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>;

Member types


Member type Definition
value_type T
reference implementation-defined
mask_type simd_mask<T, Abi>
abi_type Abi

Member functions


constructor constructs a simd object
(public member function)
copy_from loads from address
(public member function)
copy_to stores to address
(public member function)
operator[] accesses specified element
(public member function)
operator++ element-wise increment and decrement
operator-- (public member function)
operator!
operator~ element-wise unary operators
operator+ (public member function)
operator-
size returns the number of elements
[static] (public static member function)

Non-member functions


operator+
operator-
operator*
operator/
operator%
operator& element-wise binary operators
operator| (function)
operator^
operator<<
operator>>
operator<<
operator>>
operator+=
operator-=
operator*=
operator/=
operator%=
operator&= element-wise compound binary operators
operator|= (function)
operator^=
operator<<=
operator>>=
operator<<=
operator>>=
operator==
operator!=
operator>= element-wise relational operators
operator<= (function)
operator>
operator<

Example

2022.07.31 http://cppreference.com