#include <algorithm>
#include <array>
#include <cstddef>
#include <cstdint>
#include <functional>
Go to the source code of this file.
Macros | |
#define | ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD |
#define | _LIBCPP_STD_VER 17 |
#define | _LIBCPP_COMPILER_CLANG_BASED 1 |
#define | _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER 1 |
#define | _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_SIMD namespace std::experimental { |
#define | _LIBCPP_END_NAMESPACE_EXPERIMENTAL_SIMD } |
#define | _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_SIMD_ABI namespace std::experimental::simd_abi { |
#define | _LIBCPP_END_NAMESPACE_EXPERIMENTAL_SIMD_ABI } |
#define | _LIBCPP_INLINE_VAR inline |
#define | _LIBCPP_PUSH_MACROS |
#define | _LIBCPP_POP_MACROS |
#define | _LIBCPP_NATIVE_SIMD_WIDTH_IN_BYTES 512 |
#define | _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, _NUM_ELEMENT) |
#define | _LIBCPP_SPECIALIZE_VEC_EXT_32(_TYPE) |
Typedefs | |
using | scalar = __simd_abi< _StorageKind::_Scalar, 1 > |
template<int _Np> | |
using | fixed_size = __simd_abi< _StorageKind::_Array, _Np > |
template<class _Tp > | |
using | compatible = fixed_size< 16/sizeof(_Tp)> |
template<class _Tp > | |
using | native = __simd_abi< _StorageKind::_VecExt, _LIBCPP_NATIVE_SIMD_WIDTH_IN_BYTES/sizeof(_Tp)> |
template<class _Tp , size_t _Np> | |
using | abi_for_size_t = typename abi_for_size< _Tp, _Np >::type |
template<class _Tp > | |
using | native_simd = simd< _Tp, simd_abi::native< _Tp > > |
template<class _Tp , int _Np> | |
using | fixed_size_simd = simd< _Tp, simd_abi::fixed_size< _Np > > |
template<class _Tp > | |
using | native_simd_mask = simd_mask< _Tp, simd_abi::native< _Tp > > |
template<class _Tp , int _Np> | |
using | fixed_size_simd_mask = simd_mask< _Tp, simd_abi::fixed_size< _Np > > |
Enumerations | |
enum class | _StorageKind { _Scalar , _Array , _VecExt } |
Functions | |
constexpr size_t | __floor_pow_of_2 (size_t __val) |
constexpr size_t | __ceil_pow_of_2 (size_t __val) |
_LIBCPP_SPECIALIZE_VEC_EXT_32 (char) | |
_LIBCPP_SPECIALIZE_VEC_EXT_32 (char16_t) | |
_LIBCPP_SPECIALIZE_VEC_EXT_32 (char32_t) | |
_LIBCPP_SPECIALIZE_VEC_EXT_32 (wchar_t) | |
_LIBCPP_SPECIALIZE_VEC_EXT_32 (signed char) | |
_LIBCPP_SPECIALIZE_VEC_EXT_32 (signed short) | |
_LIBCPP_SPECIALIZE_VEC_EXT_32 (signed int) | |
_LIBCPP_SPECIALIZE_VEC_EXT_32 (signed long) | |
_LIBCPP_SPECIALIZE_VEC_EXT_32 (signed long long) | |
_LIBCPP_SPECIALIZE_VEC_EXT_32 (unsigned char) | |
_LIBCPP_SPECIALIZE_VEC_EXT_32 (unsigned short) | |
_LIBCPP_SPECIALIZE_VEC_EXT_32 (unsigned int) | |
_LIBCPP_SPECIALIZE_VEC_EXT_32 (unsigned long) | |
_LIBCPP_SPECIALIZE_VEC_EXT_32 (unsigned long long) | |
_LIBCPP_SPECIALIZE_VEC_EXT_32 (float) | |
_LIBCPP_SPECIALIZE_VEC_EXT_32 (double) | |
_LIBCPP_SPECIALIZE_VEC_EXT_32 (long double) | |
template<class _To , class _From > | |
constexpr decltype(_To{std::declval< _From >()}, true) | __is_non_narrowing_convertible_impl (_From) |
template<class _To > | |
constexpr bool | __is_non_narrowing_convertible_impl (...) |
template<class _From , class _To > | |
constexpr std::enable_if_t< std::is_arithmetic_v< _To > &&std::is_arithmetic_v< _From >, bool > | __is_non_narrowing_arithmetic_convertible () |
template<class _From , class _To > | |
constexpr std::enable_if_t<!(std::is_arithmetic_v< _To > &&std::is_arithmetic_v< _From >), bool > | __is_non_narrowing_arithmetic_convertible () |
template<class _Tp > | |
constexpr _Tp | __variadic_sum () |
template<class _Tp , class _Up , class... _Args> | |
constexpr _Tp | __variadic_sum (_Up __first, _Args... __rest) |
template<class _Tp > | |
constexpr bool | __vectorizable () |
template<class _Tp , class _Up , class _Abi > | |
auto | simd_cast (const simd< _Up, _Abi > &__v) -> decltype(__simd_cast_traits< _Tp >::__apply(__v)) |
template<class _Tp , class _Up , class _Abi > | |
auto | static_simd_cast (const simd< _Up, _Abi > &__v) -> decltype(__static_simd_cast_traits< _Tp >::__apply(__v)) |
template<class _Tp , class _Abi > | |
fixed_size_simd< _Tp, simd_size< _Tp, _Abi >::value > | to_fixed_size (const simd< _Tp, _Abi > &) noexcept |
template<class _Tp , class _Abi > | |
fixed_size_simd_mask< _Tp, simd_size< _Tp, _Abi >::value > | to_fixed_size (const simd_mask< _Tp, _Abi > &) noexcept |
template<class _Tp , size_t _Np> | |
native_simd< _Tp > | to_native (const fixed_size_simd< _Tp, _Np > &) noexcept |
template<class _Tp , size_t _Np> | |
native_simd_mask< _Tp > | to_native (const fixed_size_simd_mask< _Tp, _Np > &) noexcept |
template<class _Tp , size_t _Np> | |
simd< _Tp > | to_compatible (const fixed_size_simd< _Tp, _Np > &) noexcept |
template<class _Tp , size_t _Np> | |
simd_mask< _Tp > | to_compatible (const fixed_size_simd_mask< _Tp, _Np > &) noexcept |
template<size_t... __sizes, class _Tp , class _Abi > | |
tuple< simd< _Tp, abi_for_size_t< _Tp, __sizes > >... > | split (const simd< _Tp, _Abi > &) |
template<size_t... __sizes, class _Tp , class _Abi > | |
tuple< simd_mask< _Tp, abi_for_size_t< _Tp, __sizes > >... > | split (const simd_mask< _Tp, _Abi > &) |
template<class _SimdType , class _Abi > | |
array< _SimdType, simd_size< typename _SimdType::value_type, _Abi >::value/_SimdType::size()> | split (const simd< typename _SimdType::value_type, _Abi > &) |
template<class _SimdType , class _Abi > | |
array< _SimdType, simd_size< typename _SimdType::value_type, _Abi >::value/_SimdType::size()> | split (const simd_mask< typename _SimdType::value_type, _Abi > &) |
template<class _Tp , class... _Abis> | |
simd< _Tp, abi_for_size_t< _Tp, __variadic_sum(simd_size< _Tp, _Abis >::value...)> > | concat (const simd< _Tp, _Abis > &...) |
template<class _Tp , class... _Abis> | |
simd_mask< _Tp, abi_for_size_t< _Tp, __variadic_sum(simd_size< _Tp, _Abis >::value...)> > | concat (const simd_mask< _Tp, _Abis > &...) |
template<class _Tp , class _Abi > | |
bool | all_of (const simd_mask< _Tp, _Abi > &) noexcept |
template<class _Tp , class _Abi > | |
bool | any_of (const simd_mask< _Tp, _Abi > &) noexcept |
template<class _Tp , class _Abi > | |
bool | none_of (const simd_mask< _Tp, _Abi > &) noexcept |
template<class _Tp , class _Abi > | |
bool | some_of (const simd_mask< _Tp, _Abi > &) noexcept |
template<class _Tp , class _Abi > | |
int | popcount (const simd_mask< _Tp, _Abi > &) noexcept |
template<class _Tp , class _Abi > | |
int | find_first_set (const simd_mask< _Tp, _Abi > &) |
template<class _Tp , class _Abi > | |
int | find_last_set (const simd_mask< _Tp, _Abi > &) |
bool | all_of (bool) noexcept |
bool | any_of (bool) noexcept |
bool | none_of (bool) noexcept |
bool | some_of (bool) noexcept |
int | popcount (bool) noexcept |
int | find_first_set (bool) noexcept |
int | find_last_set (bool) noexcept |
template<class _Tp , class _Abi > | |
where_expression< simd_mask< _Tp, _Abi >, simd< _Tp, _Abi > > | where (const typename simd< _Tp, _Abi >::mask_type &, simd< _Tp, _Abi > &) noexcept |
template<class _Tp , class _Abi > | |
const_where_expression< simd_mask< _Tp, _Abi >, const simd< _Tp, _Abi > > | where (const typename simd< _Tp, _Abi >::mask_type &, const simd< _Tp, _Abi > &) noexcept |
template<class _Tp , class _Abi > | |
where_expression< simd_mask< _Tp, _Abi >, simd_mask< _Tp, _Abi > > | where (const typename __nodeduce< simd_mask< _Tp, _Abi >>::type &, simd_mask< _Tp, _Abi > &) noexcept |
template<class _Tp , class _Abi > | |
const_where_expression< simd_mask< _Tp, _Abi >, const simd_mask< _Tp, _Abi > > | where (const typename __nodeduce< simd_mask< _Tp, _Abi >>::type &, const simd_mask< _Tp, _Abi > &) noexcept |
template<class _Tp > | |
where_expression< bool, _Tp > | where (bool, _Tp &) noexcept |
template<class _Tp > | |
const_where_expression< bool, const _Tp > | where (bool, const _Tp &) noexcept |
template<class _Tp , class _Abi , class _BinaryOp = std::plus<_Tp>> | |
_Tp | reduce (const simd< _Tp, _Abi > &, _BinaryOp=_BinaryOp()) |
template<class _MaskType , class _SimdType , class _BinaryOp > | |
_SimdType::value_type | reduce (const const_where_expression< _MaskType, _SimdType > &, typename _SimdType::value_type neutral_element, _BinaryOp binary_op) |
template<class _MaskType , class _SimdType > | |
_SimdType::value_type | reduce (const const_where_expression< _MaskType, _SimdType > &, plus< typename _SimdType::value_type > binary_op={}) |
template<class _MaskType , class _SimdType > | |
_SimdType::value_type | reduce (const const_where_expression< _MaskType, _SimdType > &, multiplies< typename _SimdType::value_type > binary_op) |
template<class _MaskType , class _SimdType > | |
_SimdType::value_type | reduce (const const_where_expression< _MaskType, _SimdType > &, bit_and< typename _SimdType::value_type > binary_op) |
template<class _MaskType , class _SimdType > | |
_SimdType::value_type | reduce (const const_where_expression< _MaskType, _SimdType > &, bit_or< typename _SimdType::value_type > binary_op) |
template<class _MaskType , class _SimdType > | |
_SimdType::value_type | reduce (const const_where_expression< _MaskType, _SimdType > &, bit_xor< typename _SimdType::value_type > binary_op) |
template<class _Tp , class _Abi > | |
_Tp | hmin (const simd< _Tp, _Abi > &) |
template<class _MaskType , class _SimdType > | |
_SimdType::value_type | hmin (const const_where_expression< _MaskType, _SimdType > &) |
template<class _Tp , class _Abi > | |
_Tp | hmax (const simd< _Tp, _Abi > &) |
template<class _MaskType , class _SimdType > | |
_SimdType::value_type | hmax (const const_where_expression< _MaskType, _SimdType > &) |
template<class _Tp , class _Abi > | |
simd< _Tp, _Abi > (min)(const simd< _Tp | |
template<class _Tp , class _Abi > | |
simd< _Tp, _Abi > (max)(const simd< _Tp | |
template<class _Tp , class _Abi > | |
std::pair< simd< _Tp, _Abi >, simd< _Tp, _Abi > > | minmax (const simd< _Tp, _Abi > &, const simd< _Tp, _Abi > &) noexcept |
template<class _Tp , class _Abi > | |
simd< _Tp, _Abi > | clamp (const simd< _Tp, _Abi > &, const simd< _Tp, _Abi > &, const simd< _Tp, _Abi > &) |
Variables | |
template<class _Tp > | |
constexpr size_t | max_fixed_size = 32 |
constexpr element_aligned_tag | element_aligned {} |
constexpr vector_aligned_tag | vector_aligned {} |
template<size_t _Np> | |
constexpr overaligned_tag< _Np > | overaligned {} |
template<class _Tp > | |
constexpr bool | is_abi_tag_v = is_abi_tag<_Tp>::value |
template<class _Tp > | |
constexpr bool | is_simd_v = is_simd<_Tp>::value |
template<class _Tp > | |
constexpr bool | is_simd_mask_v = is_simd_mask<_Tp>::value |
template<class _Tp > | |
constexpr bool | is_simd_flag_type_v = is_simd_flag_type<_Tp>::value |
template<class _Tp , class _Abi = simd_abi::compatible<_Tp>> | |
constexpr size_t | simd_size_v = simd_size<_Tp, _Abi>::value |
template<class _Tp , class _Up = typename _Tp::value_type> | |
constexpr size_t | memory_alignment_v = memory_alignment<_Tp, _Up>::value |
_Abi const simd< _Tp, _Abi > & | noexcept |
#define _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_SIMD namespace std::experimental { |
#define _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_SIMD_ABI namespace std::experimental::simd_abi { |
#define _LIBCPP_SPECIALIZE_VEC_EXT | ( | _TYPE, | |
_NUM_ELEMENT | |||
) |
using abi_for_size_t = typename abi_for_size<_Tp, _Np>::type |
using compatible = fixed_size<16 / sizeof(_Tp)> |
using fixed_size = __simd_abi<_StorageKind::_Array, _Np> |
using fixed_size_simd = simd<_Tp, simd_abi::fixed_size<_Np> > |
using fixed_size_simd_mask = simd_mask<_Tp, simd_abi::fixed_size<_Np> > |
using native = __simd_abi<_StorageKind::_VecExt, _LIBCPP_NATIVE_SIMD_WIDTH_IN_BYTES / sizeof(_Tp)> |
using native_simd = simd<_Tp, simd_abi::native<_Tp> > |
using native_simd_mask = simd_mask<_Tp, simd_abi::native<_Tp> > |
using scalar = __simd_abi<_StorageKind::_Scalar, 1> |
|
strong |
|
constexpr |
Definition at line 764 of file simd.hpp.
References __floor_pow_of_2().
|
constexpr |
Definition at line 759 of file simd.hpp.
Referenced by __ceil_pow_of_2().
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
_LIBCPP_SPECIALIZE_VEC_EXT_32 | ( | char | ) |
_LIBCPP_SPECIALIZE_VEC_EXT_32 | ( | char16_t | ) |
_LIBCPP_SPECIALIZE_VEC_EXT_32 | ( | char32_t | ) |
_LIBCPP_SPECIALIZE_VEC_EXT_32 | ( | double | ) |
_LIBCPP_SPECIALIZE_VEC_EXT_32 | ( | float | ) |
_LIBCPP_SPECIALIZE_VEC_EXT_32 | ( | long double | ) |
_LIBCPP_SPECIALIZE_VEC_EXT_32 | ( | signed char | ) |
_LIBCPP_SPECIALIZE_VEC_EXT_32 | ( | signed int | ) |
_LIBCPP_SPECIALIZE_VEC_EXT_32 | ( | signed long long | ) |
_LIBCPP_SPECIALIZE_VEC_EXT_32 | ( | signed long | ) |
_LIBCPP_SPECIALIZE_VEC_EXT_32 | ( | signed short | ) |
_LIBCPP_SPECIALIZE_VEC_EXT_32 | ( | unsigned char | ) |
_LIBCPP_SPECIALIZE_VEC_EXT_32 | ( | unsigned int | ) |
_LIBCPP_SPECIALIZE_VEC_EXT_32 | ( | unsigned long long | ) |
_LIBCPP_SPECIALIZE_VEC_EXT_32 | ( | unsigned long | ) |
_LIBCPP_SPECIALIZE_VEC_EXT_32 | ( | unsigned short | ) |
_LIBCPP_SPECIALIZE_VEC_EXT_32 | ( | wchar_t | ) |
|
noexcept |
|
noexcept |
Referenced by sycl::_V1::detail::appendCompileOptionsFromImage(), sycl::_V1::detail::Scheduler::areEventsSafeForSchedulerBypass(), sycl::_V1::detail::checkAllDevicesAreInContext(), sycl::_V1::detail::checkAllDevicesHaveAspect(), sycl::_V1::detail::checkImageValueRange(), sycl::_V1::detail::deviceIsAllowed(), sycl::_V1::queue::ext_oneapi_submit_barrier(), sycl::_V1::detail::has_kernel_bundle_impl(), sycl::_V1::detail::kernel_bundle_impl::kernel_bundle_impl(), and sycl::_V1::detail::kernel_bundle_impl::native_specialization_constant().
|
noexcept |
|
noexcept |
Referenced by sycl::_V1::detail::ProgramManager::addImages(), sycl::_V1::detail::usm::alignedAllocHost(), sycl::_V1::detail::ods_target_list::backendCompatible(), sycl::_V1::detail::device_image_impl::compatible_with_device(), sycl::_V1::detail::Scheduler::GraphBuilder::completeFusion(), sycl::_V1::detail::kernel_bundle_impl::contains_specialization_constants(), sycl::_V1::context::context(), sycl::_V1::detail::ProgramManager::getSYCLDeviceImagesWithCompatibleState(), sycl::_V1::detail::device_impl::has(), sycl::_V1::detail::kernel_bundle_impl::has_kernel(), sycl::_V1::detail::kernel_bundle_impl::has_specialization_constant(), sycl::_V1::detail::ProgramManager::hasCompatibleImage(), and sycl::_V1::detail::kernel_bundle_impl::is_specialization_constant_set().
simd<_Tp, _Abi> clamp | ( | const simd< _Tp, _Abi > & | , |
const simd< _Tp, _Abi > & | , | ||
const simd< _Tp, _Abi > & | |||
) |
simd<_Tp, abi_for_size_t<_Tp, __variadic_sum(simd_size<_Tp, _Abis>::value...)> > concat | ( | const simd< _Tp, _Abis > & | ... | ) |
simd_mask<_Tp, abi_for_size_t<_Tp, __variadic_sum(simd_size<_Tp, _Abis>::value...)> > concat | ( | const simd_mask< _Tp, _Abis > & | ... | ) |
|
noexcept |
int find_first_set | ( | const simd_mask< _Tp, _Abi > & | ) |
|
noexcept |
int find_last_set | ( | const simd_mask< _Tp, _Abi > & | ) |
_SimdType::value_type hmax | ( | const const_where_expression< _MaskType, _SimdType > & | ) |
_Tp hmax | ( | const simd< _Tp, _Abi > & | ) |
_SimdType::value_type hmin | ( | const const_where_expression< _MaskType, _SimdType > & | ) |
_Tp hmin | ( | const simd< _Tp, _Abi > & | ) |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
_SimdType::value_type reduce | ( | const const_where_expression< _MaskType, _SimdType > & | , |
bit_and< typename _SimdType::value_type > | binary_op | ||
) |
_SimdType::value_type reduce | ( | const const_where_expression< _MaskType, _SimdType > & | , |
bit_or< typename _SimdType::value_type > | binary_op | ||
) |
_SimdType::value_type reduce | ( | const const_where_expression< _MaskType, _SimdType > & | , |
bit_xor< typename _SimdType::value_type > | binary_op | ||
) |
_SimdType::value_type reduce | ( | const const_where_expression< _MaskType, _SimdType > & | , |
multiplies< typename _SimdType::value_type > | binary_op | ||
) |
_SimdType::value_type reduce | ( | const const_where_expression< _MaskType, _SimdType > & | , |
plus< typename _SimdType::value_type > | binary_op = {} |
||
) |
_SimdType::value_type reduce | ( | const const_where_expression< _MaskType, _SimdType > & | , |
typename _SimdType::value_type | neutral_element, | ||
_BinaryOp | binary_op | ||
) |
_Tp reduce | ( | const simd< _Tp, _Abi > & | , |
_BinaryOp | = _BinaryOp() |
||
) |
simd< _Tp, _Abi > | ( | max | ) | const |
simd< _Tp, _Abi > | ( | min | ) | const |
auto simd_cast | ( | const simd< _Up, _Abi > & | __v | ) | -> decltype(__simd_cast_traits<_Tp>::__apply(__v)) |
Definition at line 1165 of file simd.hpp.
References __simd_cast_traits< _Tp >::__apply().
|
noexcept |
|
noexcept |
tuple<simd<_Tp, abi_for_size_t<_Tp, __sizes> >...> split | ( | const simd< _Tp, _Abi > & | ) |
array<_SimdType, simd_size<typename _SimdType::value_type, _Abi>::value / _SimdType::size()> split | ( | const simd< typename _SimdType::value_type, _Abi > & | ) |
tuple<simd_mask<_Tp, abi_for_size_t<_Tp, __sizes> >...> split | ( | const simd_mask< _Tp, _Abi > & | ) |
array<_SimdType, simd_size<typename _SimdType::value_type, _Abi>::value / _SimdType::size()> split | ( | const simd_mask< typename _SimdType::value_type, _Abi > & | ) |
auto static_simd_cast | ( | const simd< _Up, _Abi > & | __v | ) | -> decltype(__static_simd_cast_traits<_Tp>::__apply(__v)) |
Definition at line 1171 of file simd.hpp.
References __static_simd_cast_traits< _Tp >::__apply().
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |