DPC++ Runtime
Runtime libraries for oneAPI DPC++
|
|
Go to the documentation of this file.
9 #define ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
11 #ifdef ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
21 #endif // ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
23 #pragma once // Added for ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
669 #ifdef ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
670 #define _LIBCPP_STD_VER 17
671 #define _LIBCPP_COMPILER_CLANG_BASED 1
672 #define _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER 1
673 #define _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_SIMD namespace std::experimental {
674 #define _LIBCPP_END_NAMESPACE_EXPERIMENTAL_SIMD }
675 #define _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_SIMD_ABI namespace std::experimental::simd_abi {
676 #define _LIBCPP_END_NAMESPACE_EXPERIMENTAL_SIMD_ABI }
677 #define _LIBCPP_INLINE_VAR inline
678 #define _LIBCPP_PUSH_MACROS
679 #define _LIBCPP_POP_MACROS
680 #define _LIBCPP_NATIVE_SIMD_WIDTH_IN_BYTES 512 // is not really used for now for sycl::ext::oneapi::experimental::invoke_simd
683 #endif // ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
689 #ifndef ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
690 #include <experimental/__config>
691 #endif // !ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
692 #ifdef ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
694 #endif // ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
695 #include <functional>
697 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
698 # pragma GCC system_header
702 #ifndef ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
703 #include <__undef_macros>
704 #endif // !ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
709 #if _LIBCPP_STD_VER >= 17
717 template <_StorageKind __kind,
int _Np>
720 template <
class _Tp,
class _Abi>
723 template <
class _Tp,
int __num_element>
725 std::array<_Tp, __num_element> __storage_;
727 template <
class,
class>
730 template <
class,
class>
734 _Tp
__get(
size_t __index)
const noexcept {
return __storage_[__index]; }
735 void __set(
size_t __index, _Tp __val) noexcept {
736 __storage_[__index] = __val;
744 template <
class,
class>
747 template <
class,
class>
751 _Tp
__get(
size_t __index)
const noexcept {
return (&__storage_)[__index]; }
752 void __set(
size_t __index, _Tp __val) noexcept {
753 (&__storage_)[__index] = __val;
757 #ifndef _LIBCPP_HAS_NO_VECTOR_EXTENSION
760 return ((__val - 1) & __val) == 0 ? __val
768 template <
class _Tp,
size_t __
bytes>
770 #if !defined(_LIBCPP_COMPILER_CLANG_BASED)
775 #if defined(_LIBCPP_COMPILER_CLANG_BASED)
776 #define _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, _NUM_ELEMENT) \
778 struct __vec_ext_traits<_TYPE, sizeof(_TYPE) * _NUM_ELEMENT> { \
780 _TYPE __attribute__((vector_size(sizeof(_TYPE) * _NUM_ELEMENT))); \
783 #define _LIBCPP_SPECIALIZE_VEC_EXT_32(_TYPE) \
784 _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 1); \
785 _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 2); \
786 _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 3); \
787 _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 4); \
788 _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 5); \
789 _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 6); \
790 _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 7); \
791 _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 8); \
792 _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 9); \
793 _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 10); \
794 _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 11); \
795 _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 12); \
796 _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 13); \
797 _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 14); \
798 _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 15); \
799 _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 16); \
800 _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 17); \
801 _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 18); \
802 _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 19); \
803 _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 20); \
804 _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 21); \
805 _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 22); \
806 _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 23); \
807 _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 24); \
808 _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 25); \
809 _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 26); \
810 _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 27); \
811 _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 28); \
812 _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 29); \
813 _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 30); \
814 _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 31); \
815 _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 32)
835 #undef _LIBCPP_SPECIALIZE_VEC_EXT_32
836 #undef _LIBCPP_SPECIALIZE_VEC_EXT
839 template <
class _Tp,
int __num_element>
844 _StorageType __storage_;
846 template <
class,
class>
849 template <
class,
class>
853 _Tp
__get(
size_t __index)
const noexcept {
return __storage_[__index]; }
854 void __set(
size_t __index, _Tp __val) noexcept {
855 __storage_[__index] = __val;
859 #endif // _LIBCPP_HAS_NO_VECTOR_EXTENSION
861 template <
class _Vp,
class _Tp,
class _Abi>
863 static_assert(std::is_same<_Vp, _Tp>::value,
"");
865 template <
class,
class>
868 template <
class,
class>
875 : __ptr_(__ptr), __index_(__index) {}
883 operator _Vp()
const {
return __ptr_->__get(__index_); }
886 __ptr_->__set(__index_, __value);
891 return std::move(*
this) = __ptr_->__get(__index_) + 1;
895 auto __val = __ptr_->__get(__index_);
896 __ptr_->__set(__index_, __val + 1);
901 return std::move(*
this) = __ptr_->__get(__index_) - 1;
905 auto __val = __ptr_->__get(__index_);
906 __ptr_->__set(__index_, __val - 1);
911 return std::move(*
this) = __ptr_->__get(__index_) + __value;
915 return std::move(*
this) = __ptr_->__get(__index_) - __value;
919 return std::move(*
this) = __ptr_->__get(__index_) * __value;
923 return std::move(*
this) = __ptr_->__get(__index_) / __value;
927 return std::move(*
this) = __ptr_->__get(__index_) % __value;
931 return std::move(*
this) = __ptr_->__get(__index_) >> __value;
935 return std::move(*
this) = __ptr_->__get(__index_) << __value;
939 return std::move(*
this) = __ptr_->__get(__index_) & __value;
943 return std::move(*
this) = __ptr_->__get(__index_) | __value;
947 return std::move(*
this) = __ptr_->__get(__index_) ^ __value;
951 template <
class _To,
class _From>
952 constexpr decltype(_To{std::declval<_From>()},
true)
962 template <
class _From,
class _To>
963 constexpr
typename std::enable_if<std::is_arithmetic<_To>::value &&
964 std::is_arithmetic<_From>::value,
967 return __is_non_narrowing_convertible_impl<_To>(_From{});
970 template <
class _From,
class _To>
971 constexpr
typename std::enable_if<!(std::is_arithmetic<_To>::value &&
972 std::is_arithmetic<_From>::value),
983 template <
class _Tp,
class _Up,
class... _Args>
985 return static_cast<_Tp
>(__first) + __variadic_sum<_Tp>(__rest...);
995 return std::is_arithmetic<_Tp>::value && !std::is_const<_Tp>::value &&
996 !std::is_volatile<_Tp>::value && !std::is_same<_Tp, bool>::value;
1007 template <
class _Tp>
1010 template <
class _Tp>
1013 #ifndef _LIBCPP_HAS_NO_VECTOR_EXTENSION
1014 template <
class _Tp>
1018 template <
class _Tp>
1021 #endif // _LIBCPP_HAS_NO_VECTOR_EXTENSION
1026 template <
class _Tp,
class _Abi = simd_abi::compatible<_Tp>>
1028 template <
class _Tp,
class _Abi = simd_abi::compatible<_Tp>>
1037 template <
size_t _Np>
1041 template <
class _Tp>
1044 template <_StorageKind __kind,
int _Np>
1046 : std::integral_constant<bool, true> {};
1048 template <
class _Tp>
1049 struct is_simd : std::integral_constant<bool, false> {};
1051 template <
class _Tp,
class _Abi>
1052 struct is_simd<
simd<_Tp, _Abi>> : std::integral_constant<bool, true> {};
1054 template <
class _Tp>
1057 template <
class _Tp,
class _Abi>
1061 template <
class _Tp>
1066 : std::integral_constant<bool, true> {};
1070 : std::integral_constant<bool, true> {};
1072 template <
size_t _Align>
1074 : std::integral_constant<bool, true> {};
1076 template <
class _Tp>
1078 template <
class _Tp>
1080 template <
class _Tp>
1082 template <
class _Tp>
1084 template <
class _Tp,
size_t _Np>
1086 using type = simd_abi::fixed_size<_Np>;
1088 template <
class _Tp,
size_t _Np>
1091 template <
class _Tp,
class _Abi = simd_abi::compatible<_Tp>>
1094 template <
class _Tp, _StorageKind __kind,
int _Np>
1096 : std::integral_constant<size_t, _Np> {
1098 std::is_arithmetic<_Tp>::value &&
1099 !std::is_same<
typename std::remove_const<_Tp>::type,
bool>::value,
1100 "Element type should be vectorizable");
1104 template <
class _Tp,
class _Up =
typename _Tp::value_type>
1107 template <
class _Tp,
class _Abi = simd_abi::compatible<_Tp>>
1110 template <
class _Tp,
class _Up =
typename _Tp::value_type>
1114 template <
class _Tp>
1116 template <
class _Tp,
int _Np>
1120 template <
class _Tp>
1123 template <
class _Tp,
int _Np>
1127 template <
class _Tp>
1129 template <
class _Up,
class _Abi>
1133 template <
class _Tp,
class _NewAbi>
1135 template <
class _Up,
class _Abi>
1136 static typename std::enable_if<simd<_Up, _Abi>::size() ==
1142 template <
class _Tp>
1144 template <
class _Up,
class _Abi>
1145 static typename std::enable_if<
1146 __is_non_narrowing_arithmetic_convertible<_Up, _Tp>(),
1151 template <
class _Tp,
class _NewAbi>
1153 template <
class _Up,
class _Abi>
1154 static typename std::enable_if<
1155 __is_non_narrowing_arithmetic_convertible<_Up, _Tp>() &&
1161 template <
class _Tp,
class _Up,
class _Abi>
1167 template <
class _Tp,
class _Up,
class _Abi>
1173 template <
class _Tp,
class _Abi>
1177 template <
class _Tp,
class _Abi>
1181 template <
class _Tp,
size_t _Np>
1184 template <
class _Tp,
size_t _Np>
1187 template <
class _Tp,
size_t _Np>
1190 template <
class _Tp,
size_t _Np>
1193 template <
size_t... __sizes,
class _Tp,
class _Abi>
1196 template <
size_t... __sizes,
class _Tp,
class _Abi>
1197 tuple<simd_mask<_Tp, abi_for_size_t<_Tp, __sizes>>...>
1200 template <
class _SimdType,
class _Abi>
1201 array<_SimdType, simd_size<typename _SimdType::value_type, _Abi>::value /
1205 template <
class _SimdType,
class _Abi>
1206 array<_SimdType, simd_size<typename _SimdType::value_type, _Abi>::value /
1210 template <
class _Tp,
class... _Abis>
1214 template <
class _Tp,
class... _Abis>
1220 template <
class _Tp,
class _Abi>
1222 template <
class _Tp,
class _Abi>
1224 template <
class _Tp,
class _Abi>
1226 template <
class _Tp,
class _Abi>
1228 template <
class _Tp,
class _Abi>
1230 template <
class _Tp,
class _Abi>
1232 template <
class _Tp,
class _Abi>
1234 bool all_of(
bool) noexcept;
1235 bool any_of(
bool) noexcept;
1243 template <
class _MaskType,
class _Tp>
1245 template <
class _MaskType,
class _Tp>
1249 template <
class _Tp,
class _Abi>
1253 template <
class _Tp,
class _Abi>
1258 template <
class _Tp,
class _Abi>
1263 template <
class _Tp,
class _Abi>
1268 template <
class _Tp>
1271 template <
class _Tp>
1275 template <
class _Tp,
class _Abi,
class _BinaryOp = std::plus<_Tp>>
1278 template <
class _MaskType,
class _SimdType,
class _BinaryOp>
1279 typename _SimdType::value_type
1281 typename _SimdType::value_type neutral_element, _BinaryOp binary_op);
1283 template <
class _MaskType,
class _SimdType>
1284 typename _SimdType::value_type
1286 plus<typename _SimdType::value_type> binary_op = {});
1288 template <
class _MaskType,
class _SimdType>
1289 typename _SimdType::value_type
1291 multiplies<typename _SimdType::value_type> binary_op);
1293 template <
class _MaskType,
class _SimdType>
1294 typename _SimdType::value_type
1296 bit_and<typename _SimdType::value_type> binary_op);
1298 template <
class _MaskType,
class _SimdType>
1299 typename _SimdType::value_type
1301 bit_or<typename _SimdType::value_type> binary_op);
1303 template <
class _MaskType,
class _SimdType>
1304 typename _SimdType::value_type
1306 bit_xor<typename _SimdType::value_type> binary_op);
1308 template <
class _Tp,
class _Abi>
1310 template <
class _MaskType,
class _SimdType>
1311 typename _SimdType::value_type
1313 template <
class _Tp,
class _Abi>
1315 template <
class _MaskType,
class _SimdType>
1316 typename _SimdType::value_type
1320 template <
class _Tp,
class _Abi>
1323 template <
class _Tp,
class _Abi>
1326 template <
class _Tp,
class _Abi>
1330 template <
class _Tp,
class _Abi>
1336 template <
class _MaskType,
class _Tp>
1341 typename remove_const<_Tp>::type
operator-() const&&;
1342 template <class _Up, class _Flags>
1343 void copy_to(_Up*, _Flags) const&&;
1346 template <class _MaskType, class _Tp>
1351 template <
class _Up>
1353 template <
class _Up>
1354 void operator+=(_Up&&);
1355 template <
class _Up>
1356 void operator-=(_Up&&);
1357 template <
class _Up>
1358 void operator*=(_Up&&);
1359 template <
class _Up>
1360 void operator/=(_Up&&);
1361 template <
class _Up>
1362 void operator%=(_Up&&);
1363 template <
class _Up>
1364 void operator&=(_Up&&);
1365 template <
class _Up>
1366 void operator|=(_Up&&);
1367 template <
class _Up>
1368 void operator^=(_Up&&);
1369 template <
class _Up>
1370 void operator<<=(_Up&&);
1371 template <
class _Up>
1372 void operator>>=(_Up&&);
1377 template <
class _Up,
class _Flags>
1378 void copy_from(
const _Up*, _Flags);
1383 template <
class _Tp,
class _Abi>
1385 #ifdef ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1386 template <
class,
class>
friend class simd;
1387 #endif // ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1398 static constexpr
size_t size() noexcept {
1405 #ifdef ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1419 #endif // ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1422 template <
class _Up>
1423 static constexpr
bool __can_broadcast() {
1424 return (std::is_arithmetic<_Up>::value &&
1425 __is_non_narrowing_arithmetic_convertible<_Up, _Tp>()) ||
1426 (!std::is_arithmetic<_Up>::value &&
1427 std::is_convertible<_Up, _Tp>::value) ||
1428 std::is_same<
typename std::remove_const<_Up>::type,
int>::value ||
1429 (std::is_same<
typename std::remove_const<_Up>::type,
1430 unsigned int>::value &&
1431 std::is_unsigned<_Tp>::value);
1434 template <
class _Generator,
size_t... __indicies>
1435 static constexpr decltype(
1436 std::forward_as_tuple(std::declval<_Generator>()(
1437 std::integral_constant<size_t, __indicies>())...),
1439 __can_generate(
std::index_sequence<__indicies...>) {
1440 return !__variadic_sum<bool>(
1441 !__can_broadcast<decltype(std::declval<_Generator>()(
1442 std::integral_constant<size_t, __indicies>()))>()...);
1445 template <
class _Generator>
1446 static bool __can_generate(...) {
1450 template <
class _Generator,
size_t... __indicies>
1451 void __generator_init(_Generator&& __g, std::index_sequence<__indicies...>) {
1452 int __not_used[]{((*this)[__indicies] =
1453 __g(std::integral_constant<size_t, __indicies>()),
1460 #ifdef ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1461 template <
class _Up,
1462 class =
typename std::enable_if<
1464 __is_non_narrowing_arithmetic_convertible<_Up, _Tp>()>::type>
1466 __s_.__storage_ = __builtin_convertvector(__v.__s_.__storage_,
raw_storage_type);
1468 #endif // ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1469 template <
class _Up,
1470 class =
typename std::enable_if<
1472 __is_non_narrowing_arithmetic_convertible<_Up, _Tp>()>::type>
1474 for (
size_t __i = 0; __i <
size(); __i++) {
1475 (*this)[__i] =
static_cast<_Tp
>(__v[__i]);
1480 template <
class _Up,
1481 class =
typename std::enable_if<__can_broadcast<_Up>()>::type>
1483 auto __v =
static_cast<_Tp
>(__rv);
1484 for (
size_t __i = 0; __i <
size(); __i++) {
1490 template <
class _Generator,
1491 int =
typename std::enable_if<
1492 __can_generate<_Generator>(std::make_index_sequence<
size()>()),
1495 __generator_init(std::forward<_Generator>(__g),
1496 std::make_index_sequence<
size()>());
1501 class _Up,
class _Flags,
1502 class =
typename std::enable_if<__vectorizable<_Up>()>::type,
1503 class = typename
std::enable_if<is_simd_flag_type<_Flags>::value>::type>
1504 simd(const _Up* __buffer, _Flags) {
1506 for (
size_t __i = 0; __i < size(); __i++) {
1507 (*this)[__i] =
static_cast<_Tp
>(__buffer[__i]);
1512 template <
class _Up,
class _Flags>
1513 typename std::enable_if<__vectorizable<_Up>() &&
1516 *
this =
simd(__buffer, _Flags());
1520 template <
class _Up,
class _Flags>
1521 typename std::enable_if<__vectorizable<_Up>() &&
1525 for (
size_t __i = 0; __i < size(); __i++) {
1526 __buffer[__i] =
static_cast<_Up
>((*this)[__i]);
1540 mask_type operator!()
const;
1571 friend simd& operator<<=(
simd&,
int);
1572 friend simd& operator>>=(
simd&,
int);
1583 #ifdef ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1584 template <
class _Abi>
1587 template <_StorageKind _K,
int _Np>
1594 "only clang vector-based ABI is supported for now.");
1603 template <
class _Tp,
class _Abi>
1610 template <
class,
class>
1617 : __ptr_(__ptr), __index_(__index) {}
1624 operator _Vp()
const {
return (_Vp)__ptr_->__get(__index_); }
1627 __ptr_->__set(__index_, (_Tp)__value);
1632 return std::move(*
this) = ((_Vp)__ptr_->__get(__index_)) & __value;
1636 return std::move(*
this) = ((_Vp)__ptr_->__get(__index_)) | __value;
1640 return std::move(*
this) = ((_Vp)__ptr_->__get(__index_)) ^ __value;
1643 #endif // ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1646 template <
class _Tp,
class _Abi>
1649 #ifdef ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1651 #endif // ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1654 #ifdef ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1659 #endif // ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1663 #ifdef ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1664 static constexpr
size_t size() noexcept {
return simd_type::size(); }
1666 static constexpr
size_t size() noexcept;
1667 #endif // ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1672 #ifdef ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1675 for (
size_t __i = 0; __i < size(); __i++) {
1680 explicit simd_mask(value_type) noexcept;
1681 #endif // ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1684 #ifdef ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1685 template <
class _Up>
1690 template <
class _Up>
1695 template <
class _Up>
1697 #endif // ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1700 template <
class _Flags>
1704 template <
class _Flags>
1705 void copy_from(
const value_type*, _Flags);
1706 template <
class _Flags>
1707 void copy_to(value_type*, _Flags)
const;
1710 #ifdef ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1716 #endif // ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1737 #ifdef ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1742 template <
class _Up,
class _UAbi>
1744 for (
size_t __i = 0; __i < size(); __i++) {
1745 (*this)[__i] =
static_cast<element_type
>(__v[__i]);
1748 #endif // ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1751 #endif // _LIBCPP_STD_VER >= 17
simd_mask(value_type __v) noexcept
#define _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_SIMD
int find_first_set(const simd_mask< _Tp, _Abi > &)
value_type operator[](size_t __i) const
__simd_mask_reference(__simd_storage< _Tp, _Abi > *__ptr, size_t __index)
#define _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_SIMD_ABI
fixed_size_simd< _Tp, simd_size< _Tp, _Abi >::value > to_fixed_size(const simd< _Tp, _Abi > &) noexcept
__simd_reference operator=(_Vp __value) &&
static simd< _Tp, _Abi > __apply(const simd< _Up, _Abi > &__v)
#define _LIBCPP_SPECIALIZE_VEC_EXT_32(_TYPE)
value_type operator[](size_t __i) const
__simd_reference operator+=(_Vp __value) &&
__simd_reference operator++() &&
auto operator>>(const __ESIMD_DNS::simd_obj_impl< __raw_t< T1 >, N, SimdT< T1, N >> &LHS, const __ESIMD_DNS::simd_obj_impl< __raw_t< T2 >, N, SimdT< T2, N >> &RHS)
simd(const raw_storage_type &__raw_simd)
constexpr size_t max_fixed_size
constexpr bool __vectorizable()
#define _LIBCPP_END_NAMESPACE_EXPERIMENTAL_SIMD_ABI
void copy_to(_Up *, _Flags) const &&
T & operator[](std::ptrdiff_t idx) const noexcept
#define _LIBCPP_POP_MACROS
constexpr size_t simd_size_v
__simd_reference & operator=(const __simd_reference &)=delete
constexpr vector_aligned_tag vector_aligned
auto static_simd_cast(const simd< _Up, _Abi > &__v) -> decltype(__static_simd_cast_traits< _Tp >::__apply(__v))
simd< _Tp, _Abi > max(const simd< _Tp, _Abi > &, const simd< _Tp, _Abi > &) noexcept
__simd_mask_reference operator^=(_Vp __value) &&
constexpr overaligned_tag< _Np > overaligned
bool operator==(const Slab &Lhs, const Slab &Rhs)
_Tp __get(size_t __index) const noexcept
constexpr _Tp __variadic_sum()
auto operator*(const __ESIMD_DNS::simd_obj_impl< __raw_t< T1 >, N, SimdT< T1, N >> &LHS, const __ESIMD_DNS::simd_obj_impl< __raw_t< T2 >, N, SimdT< T2, N >> &RHS)
static std::enable_if< __is_non_narrowing_arithmetic_convertible< _Up, _Tp >), simd< _Tp, _Abi > >::type __apply(const simd< _Up, _Abi > &__v)
__simd_reference operator/=(_Vp __value) &&
constexpr size_t memory_alignment_v
simd(const simd< _Up, simd_abi::fixed_size< size()>> &__v)
simd_mask(const simd_mask< _Up, simd_abi::fixed_size< size()>> &__v) noexcept
_Tp hmin(const simd< _Tp, _Abi > &)
__simd_mask_reference operator&=(_Vp __value) &&
constexpr std::enable_if< std::is_arithmetic< _To >::value &&std::is_arithmetic< _From >::value, bool >::type __is_non_narrowing_arithmetic_convertible()
reference operator[](size_t __i)
__simd_reference()=delete
static constexpr size_t size() noexcept
bool operator<=(const multi_ptr< ElementType, Space, DecorateAddress > &lhs, const multi_ptr< ElementType, Space, DecorateAddress > &rhs)
__simd_mask_reference operator|=(_Vp __value) &&
bool operator>=(const multi_ptr< ElementType, Space, DecorateAddress > &lhs, const multi_ptr< ElementType, Space, DecorateAddress > &rhs)
__simd_reference operator>>=(_Vp __value) &&
_Tp hmax(const simd< _Tp, _Abi > &)
#define _LIBCPP_PUSH_MACROS
_Tp __get(size_t __index) const noexcept
bool some_of(const simd_mask< _Tp, _Abi > &) noexcept
simd_mask(const simd_mask< _Up, abi_type > &__v) noexcept
__simd_reference operator^=(_Vp __value) &&
constexpr decltype(_To{std::declval< _From >()}, true) __is_non_narrowing_convertible_impl(_From)
constexpr bool is_simd_mask_v
typename abi_for_size< _Tp, _Np >::type abi_for_size_t
__simd_reference operator<<=(_Vp __value) &&
bool none_of(const simd_mask< _Tp, _Abi > &) noexcept
__simd_reference operator|=(_Vp __value) &&
#define _LIBCPP_END_NAMESPACE_EXPERIMENTAL_SIMD
std::experimental::simd< T, simd_abi::native_fixed_size< T, N > > simd
_Tp __get(size_t __index) const noexcept
simd< _Tp, abi_for_size_t< _Tp, __variadic_sum(simd_size< _Tp, _Abis >::value...)> > concat(const simd< _Tp, _Abis > &...)
simd(const simd< _Up, _Abi > &__v)
__simd_mask_reference operator=(_Vp __value) &&
simd< _Tp, _Abi > clamp(const simd< _Tp, _Abi > &, const simd< _Tp, _Abi > &, const simd< _Tp, _Abi > &)
auto operator%(const __ESIMD_DNS::simd_obj_impl< __raw_t< T1 >, N, SimdT< T1, N >> &LHS, const __ESIMD_DNS::simd_obj_impl< __raw_t< T2 >, N, SimdT< T2, N >> &RHS)
remove_const< _Tp >::type operator-() const &&
bool all_of(const simd_mask< _Tp, _Abi > &) noexcept
static constexpr size_t size() noexcept
void __set(size_t __index, _Tp __val) noexcept
std::conditional_t< sizeof(_Tp)==1, uint8_t, std::conditional_t< sizeof(_Tp)==2, uint16_t, std::conditional_t< sizeof(_Tp)==4, uint32_t, std::conditional_t< sizeof(_Tp)==8, uint64_t, void > >> > type
tuple< simd< _Tp, abi_for_size_t< _Tp, __sizes > >... > split(const simd< _Tp, _Abi > &)
int popcount(const simd_mask< _Tp, _Abi > &) noexcept
auto operator/(const __ESIMD_DNS::simd_obj_impl< __raw_t< T1 >, N, SimdT< T1, N >> &LHS, const __ESIMD_DNS::simd_obj_impl< __raw_t< T2 >, N, SimdT< T2, N >> &RHS)
#define _LIBCPP_NATIVE_SIMD_WIDTH_IN_BYTES
auto operator|(const __ESIMD_DNS::simd_obj_impl< __raw_t< T1 >, N, SimdT< T1, N >> &LHS, const __ESIMD_DNS::simd_obj_impl< __raw_t< T2 >, N, SimdT< T2, N >> &RHS)
simd_abi::fixed_size< _Np > type
constexpr size_t __ceil_pow_of_2(size_t __val)
const_where_expression & operator=(const const_where_expression &)=delete
constexpr bool is_abi_tag_v
auto operator^(const __ESIMD_DNS::simd_obj_impl< __raw_t< T1 >, N, SimdT< T1, N >> &LHS, const __ESIMD_DNS::simd_obj_impl< __raw_t< T2 >, N, SimdT< T2, N >> &RHS)
_Tp reduce(const simd< _Tp, _Abi > &, _BinaryOp=_BinaryOp())
__simd_abi< _StorageKind::_Array, _Np > fixed_size
__simd_reference operator*=(_Vp __value) &&
auto operator+(const __ESIMD_DNS::simd_obj_impl< __raw_t< T1 >, N, SimdT< T1, N >> &LHS, const __ESIMD_DNS::simd_obj_impl< __raw_t< T2 >, N, SimdT< T2, N >> &RHS)
const_where_expression(const const_where_expression &)=delete
annotated_ptr & operator--() noexcept
constexpr element_aligned_tag element_aligned
static constexpr bfn_t operator~(bfn_t x)
bool any_of(const simd_mask< _Tp, _Abi > &) noexcept
typename __simd_storage< _Tp, _Abi >::_StorageType raw_storage_type
void __set(size_t __index, _Tp __val) noexcept
annotated_ptr & operator++() noexcept
std::enable_if< __vectorizable< _Up >) &&is_simd_flag_type< _Flags >::value >::type copy_from(const _Up *__buffer, _Flags)
__simd_reference operator&=(_Vp __value) &&
sycl::ext::oneapi::experimental::annotated_ref< T, property_list_t > reference
bool operator!=(const cache_config &lhs, const cache_config &rhs)
int find_last_set(const simd_mask< _Tp, _Abi > &)
typename std::conditional< B, T, F >::type conditional_t
detail::simd_mask_type< N > simd_mask
Represents a simd mask os size N.
auto operator&(const __ESIMD_DNS::simd_obj_impl< __raw_t< T1 >, N, SimdT< T1, N >> &LHS, const __ESIMD_DNS::simd_obj_impl< __raw_t< T2 >, N, SimdT< T2, N >> &RHS)
void __set(size_t __index, _Tp __val) noexcept
__simd_storage< _simd_mask_element_type, _Abi > * __ptr_
__simd_reference operator-=(_Vp __value) &&
__simd_reference operator%=(_Vp __value) &&
std::pair< simd< _Tp, _Abi >, simd< _Tp, _Abi > > minmax(const simd< _Tp, _Abi > &, const simd< _Tp, _Abi > &) noexcept
bool operator>(const multi_ptr< ElementType, Space, DecorateAddress > &lhs, const multi_ptr< ElementType, Space, DecorateAddress > &rhs)
__attribute__((always_inline)) auto invoke_simd(sycl
The invoke_simd free function invokes a SIMD function using all work-items in a sub_group.
reference operator[](size_t __i)
constexpr size_t __floor_pow_of_2(size_t __val)
where_expression< simd_mask< _Tp, _Abi >, simd< _Tp, _Abi > > where(const typename simd< _Tp, _Abi >::mask_type &, simd< _Tp, _Abi > &) noexcept
std::enable_if< __vectorizable< _Up >) &&is_simd_flag_type< _Flags >::value >::type copy_to(_Up *__buffer, _Flags) const
__simd_reference operator--() &&
constexpr bool is_simd_flag_type_v
std::ostream & operator<<(std::ostream &OS, const sycl::ext::intel::esimd::simd< Ty, N > &V)
native_simd< _Tp > to_native(const fixed_size_simd< _Tp, _Np > &) noexcept
simd< _Tp, _Abi > min(const simd< _Tp, _Abi > &, const simd< _Tp, _Abi > &) noexcept
simd< _Tp > to_compatible(const fixed_size_simd< _Tp, _Np > &) noexcept
auto simd_cast(const simd< _Up, _Abi > &__v) -> decltype(__simd_cast_traits< _Tp >::__apply(__v))