Intel xvec
Experimental C++ simd class library
Loading...
Searching...
No Matches
C++26: Mask subscripting

Access individual mask elements or select them using an index vector. More...

Functions

constexpr auto xvec::simd::basic_mask< _Bytes, _Abi >::operator[] (const vec_integral auto &indexes) const
 Select mask elements using an integral index vector.
constexpr bool xvec::simd::basic_mask< _Bytes, _Abi >::operator[] (simd_size_type pos) const &
 Return the mask element at the specified position.

Detailed Description

Access individual mask elements or select them using an index vector.

See also
https://eel.is/c++draft/simd.mask.subscr

Function Documentation

◆ operator[]() [1/2]

template<std::size_t _Bytes, typename _Abi>
auto xvec::simd::basic_mask< _Bytes, _Abi >::operator[] ( const vec_integral auto & indexes) const
inlineconstexpr

Select mask elements using an integral index vector.

Parameters
indexesThe indexes selecting mask elements.
Returns
A mask containing the selected elements.

◆ operator[]() [2/2]

template<std::size_t _Bytes, typename _Abi>
bool xvec::simd::basic_mask< _Bytes, _Abi >::operator[] ( simd_size_type pos) const &
inlineconstexpr

Return the mask element at the specified position.

Parameters
posThe element index, which must be less than size() and non-negative.