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;
857 #ifdef ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
858 const _StorageType&
data() const noexcept {
return __storage_; }
862 #endif // _LIBCPP_HAS_NO_VECTOR_EXTENSION
864 template <
class _Vp,
class _Tp,
class _Abi>
866 static_assert(std::is_same_v<_Vp, _Tp>,
"");
868 template <
class,
class>
871 template <
class,
class>
878 : __ptr_(__ptr), __index_(__index) {}
886 operator _Vp()
const {
return __ptr_->__get(__index_); }
889 __ptr_->__set(__index_, __value);
894 return std::move(*
this) = __ptr_->__get(__index_) + 1;
898 auto __val = __ptr_->__get(__index_);
899 __ptr_->__set(__index_, __val + 1);
904 return std::move(*
this) = __ptr_->__get(__index_) - 1;
908 auto __val = __ptr_->__get(__index_);
909 __ptr_->__set(__index_, __val - 1);
914 return std::move(*
this) = __ptr_->__get(__index_) + __value;
918 return std::move(*
this) = __ptr_->__get(__index_) - __value;
922 return std::move(*
this) = __ptr_->__get(__index_) * __value;
926 return std::move(*
this) = __ptr_->__get(__index_) / __value;
930 return std::move(*
this) = __ptr_->__get(__index_) % __value;
934 return std::move(*
this) = __ptr_->__get(__index_) >> __value;
938 return std::move(*
this) = __ptr_->__get(__index_) << __value;
942 return std::move(*
this) = __ptr_->__get(__index_) & __value;
946 return std::move(*
this) = __ptr_->__get(__index_) | __value;
950 return std::move(*
this) = __ptr_->__get(__index_) ^ __value;
954 template <
class _To,
class _From>
955 constexpr decltype(_To{std::declval<_From>()},
true)
965 template <
class _From,
class _To>
966 constexpr std::enable_if_t<std::is_arithmetic_v<_To> &&
967 std::is_arithmetic_v<_From>,
970 return __is_non_narrowing_convertible_impl<_To>(_From{});
973 template <
class _From,
class _To>
974 constexpr std::enable_if_t<!(std::is_arithmetic_v<_To> &&
975 std::is_arithmetic_v<_From>),
986 template <
class _Tp,
class _Up,
class... _Args>
988 return static_cast<_Tp
>(__first) + __variadic_sum<_Tp>(__rest...);
998 return std::is_arithmetic_v<_Tp> && !std::is_const_v<_Tp> &&
999 !std::is_volatile_v<_Tp> && !std::is_same_v<_Tp, bool>;
1010 template <
class _Tp>
1013 template <
class _Tp>
1016 #ifndef _LIBCPP_HAS_NO_VECTOR_EXTENSION
1017 template <
class _Tp>
1021 template <
class _Tp>
1024 #endif // _LIBCPP_HAS_NO_VECTOR_EXTENSION
1029 template <
class _Tp,
class _Abi = simd_abi::compatible<_Tp>>
1031 template <
class _Tp,
class _Abi = simd_abi::compatible<_Tp>>
1040 template <
size_t _Np>
1044 template <
class _Tp>
1047 template <_StorageKind __kind,
int _Np>
1049 : std::integral_constant<bool, true> {};
1051 template <
class _Tp>
1052 struct is_simd : std::integral_constant<bool, false> {};
1054 template <
class _Tp,
class _Abi>
1055 struct is_simd<
simd<_Tp, _Abi>> : std::integral_constant<bool, true> {};
1057 template <
class _Tp>
1060 template <
class _Tp,
class _Abi>
1064 template <
class _Tp>
1069 : std::integral_constant<bool, true> {};
1073 : std::integral_constant<bool, true> {};
1075 template <
size_t _Align>
1077 : std::integral_constant<bool, true> {};
1079 template <
class _Tp>
1081 template <
class _Tp>
1083 template <
class _Tp>
1085 template <
class _Tp>
1087 template <
class _Tp,
size_t _Np>
1089 using type = simd_abi::fixed_size<_Np>;
1091 template <
class _Tp,
size_t _Np>
1094 template <
class _Tp,
class _Abi = simd_abi::compatible<_Tp>>
1097 template <
class _Tp, _StorageKind __kind,
int _Np>
1099 : std::integral_constant<size_t, _Np> {
1101 std::is_arithmetic_v<_Tp> &&
1102 !std::is_same_v<std::remove_const_t<_Tp>,
bool>,
1103 "Element type should be vectorizable");
1107 template <
class _Tp,
class _Up =
typename _Tp::value_type>
1110 template <
class _Tp,
class _Abi = simd_abi::compatible<_Tp>>
1113 template <
class _Tp,
class _Up =
typename _Tp::value_type>
1117 template <
class _Tp>
1119 template <
class _Tp,
int _Np>
1123 template <
class _Tp>
1126 template <
class _Tp,
int _Np>
1130 template <
class _Tp>
1132 template <
class _Up,
class _Abi>
1136 template <
class _Tp,
class _NewAbi>
1138 template <
class _Up,
class _Abi>
1139 static std::enable_if_t<simd<_Up, _Abi>::size() ==
1145 template <
class _Tp>
1147 template <
class _Up,
class _Abi>
1148 static std::enable_if_t<
1149 __is_non_narrowing_arithmetic_convertible<_Up, _Tp>(),
1154 template <
class _Tp,
class _NewAbi>
1156 template <
class _Up,
class _Abi>
1157 static std::enable_if_t<
1158 __is_non_narrowing_arithmetic_convertible<_Up, _Tp>() &&
1164 template <
class _Tp,
class _Up,
class _Abi>
1170 template <
class _Tp,
class _Up,
class _Abi>
1176 template <
class _Tp,
class _Abi>
1180 template <
class _Tp,
class _Abi>
1184 template <
class _Tp,
size_t _Np>
1187 template <
class _Tp,
size_t _Np>
1190 template <
class _Tp,
size_t _Np>
1193 template <
class _Tp,
size_t _Np>
1196 template <
size_t... __sizes,
class _Tp,
class _Abi>
1199 template <
size_t... __sizes,
class _Tp,
class _Abi>
1200 tuple<simd_mask<_Tp, abi_for_size_t<_Tp, __sizes>>...>
1203 template <
class _SimdType,
class _Abi>
1204 array<_SimdType, simd_size<typename _SimdType::value_type, _Abi>::value /
1208 template <
class _SimdType,
class _Abi>
1209 array<_SimdType, simd_size<typename _SimdType::value_type, _Abi>::value /
1213 template <
class _Tp,
class... _Abis>
1217 template <
class _Tp,
class... _Abis>
1223 template <
class _Tp,
class _Abi>
1225 template <
class _Tp,
class _Abi>
1227 template <
class _Tp,
class _Abi>
1229 template <
class _Tp,
class _Abi>
1231 template <
class _Tp,
class _Abi>
1233 template <
class _Tp,
class _Abi>
1235 template <
class _Tp,
class _Abi>
1237 bool all_of(
bool) noexcept;
1238 bool any_of(
bool) noexcept;
1246 template <
class _MaskType,
class _Tp>
1248 template <
class _MaskType,
class _Tp>
1252 template <
class _Tp,
class _Abi>
1256 template <
class _Tp,
class _Abi>
1261 template <
class _Tp,
class _Abi>
1266 template <
class _Tp,
class _Abi>
1271 template <
class _Tp>
1274 template <
class _Tp>
1278 template <
class _Tp,
class _Abi,
class _BinaryOp = std::plus<_Tp>>
1281 template <
class _MaskType,
class _SimdType,
class _BinaryOp>
1282 typename _SimdType::value_type
1284 typename _SimdType::value_type neutral_element, _BinaryOp binary_op);
1286 template <
class _MaskType,
class _SimdType>
1287 typename _SimdType::value_type
1289 plus<typename _SimdType::value_type> binary_op = {});
1291 template <
class _MaskType,
class _SimdType>
1292 typename _SimdType::value_type
1294 multiplies<typename _SimdType::value_type> binary_op);
1296 template <
class _MaskType,
class _SimdType>
1297 typename _SimdType::value_type
1299 bit_and<typename _SimdType::value_type> binary_op);
1301 template <
class _MaskType,
class _SimdType>
1302 typename _SimdType::value_type
1304 bit_or<typename _SimdType::value_type> binary_op);
1306 template <
class _MaskType,
class _SimdType>
1307 typename _SimdType::value_type
1309 bit_xor<typename _SimdType::value_type> binary_op);
1311 template <
class _Tp,
class _Abi>
1313 template <
class _MaskType,
class _SimdType>
1314 typename _SimdType::value_type
1316 template <
class _Tp,
class _Abi>
1318 template <
class _MaskType,
class _SimdType>
1319 typename _SimdType::value_type
1323 template <
class _Tp,
class _Abi>
1326 template <
class _Tp,
class _Abi>
1329 template <
class _Tp,
class _Abi>
1333 template <
class _Tp,
class _Abi>
1339 template <
class _MaskType,
class _Tp>
1345 template <class _Up, class _Flags>
1346 void copy_to(_Up*, _Flags) const&&;
1349 template <class _MaskType, class _Tp>
1354 template <
class _Up>
1356 template <
class _Up>
1358 template <
class _Up>
1360 template <
class _Up>
1361 void operator*=(_Up&&);
1362 template <
class _Up>
1363 void operator/=(_Up&&);
1364 template <
class _Up>
1365 void operator%=(_Up&&);
1366 template <
class _Up>
1367 void operator&=(_Up&&);
1368 template <
class _Up>
1369 void operator|=(_Up&&);
1370 template <
class _Up>
1371 void operator^=(_Up&&);
1372 template <
class _Up>
1373 void operator<<=(_Up&&);
1374 template <
class _Up>
1375 void operator>>=(_Up&&);
1380 template <
class _Up,
class _Flags>
1381 void copy_from(
const _Up*, _Flags);
1386 template <
class _Tp,
class _Abi>
1388 #ifdef ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1389 template <
class,
class>
friend class simd;
1390 #endif // ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1401 static constexpr
size_t size() noexcept {
1408 #ifdef ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1422 #endif // ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1425 template <
class _Up>
1426 static constexpr
bool __can_broadcast() {
1427 return (std::is_arithmetic_v<_Up> &&
1428 __is_non_narrowing_arithmetic_convertible<_Up, _Tp>()) ||
1429 (!std::is_arithmetic_v<_Up> &&
1430 std::is_convertible_v<_Up, _Tp>) ||
1431 std::is_same_v<std::remove_const_t<_Up>,
int> ||
1432 (std::is_same_v<std::remove_const_t<_Up>,
1434 std::is_unsigned_v<_Tp>);
1437 template <
class _Generator,
size_t... __indicies>
1438 static constexpr decltype(
1439 std::forward_as_tuple(std::declval<_Generator>()(
1440 std::integral_constant<size_t, __indicies>())...),
1442 __can_generate(
std::index_sequence<__indicies...>) {
1443 return !__variadic_sum<bool>(
1444 !__can_broadcast<decltype(std::declval<_Generator>()(
1445 std::integral_constant<size_t, __indicies>()))>()...);
1448 template <
class _Generator>
1449 static bool __can_generate(...) {
1453 template <
class _Generator,
size_t... __indicies>
1454 void __generator_init(_Generator&& __g, std::index_sequence<__indicies...>) {
1455 int __not_used[]{((*this)[__indicies] =
1456 __g(std::integral_constant<size_t, __indicies>()),
1463 #ifdef ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1464 template <
class _Up,
1465 class = std::enable_if_t<
1467 __is_non_narrowing_arithmetic_convertible<_Up, _Tp>()>>
1469 __s_.__storage_ = __builtin_convertvector(__v.__s_.__storage_,
raw_storage_type);
1471 #endif // ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1472 template <
class _Up,
1473 class = std::enable_if_t<
1475 __is_non_narrowing_arithmetic_convertible<_Up, _Tp>()>>
1477 for (
size_t __i = 0; __i <
size(); __i++) {
1478 (*this)[__i] =
static_cast<_Tp
>(__v[__i]);
1483 template <
class _Up,
1484 class = std::enable_if_t<__can_broadcast<_Up>()>>
1486 auto __v =
static_cast<_Tp
>(__rv);
1487 for (
size_t __i = 0; __i <
size(); __i++) {
1493 template <
class _Generator,
1494 int = std::enable_if_t<
1495 __can_generate<_Generator>(std::make_index_sequence<
size()>()),
1498 __generator_init(std::forward<_Generator>(__g),
1499 std::make_index_sequence<
size()>());
1504 class _Up,
class _Flags,
1505 class = std::enable_if_t<__vectorizable<_Up>()>,
1507 simd(const _Up* __buffer, _Flags) {
1509 for (
size_t __i = 0; __i < size(); __i++) {
1510 (*this)[__i] =
static_cast<_Tp
>(__buffer[__i]);
1515 template <
class _Up,
class _Flags>
1516 std::enable_if_t<__vectorizable<_Up>() &&
1519 *
this =
simd(__buffer, _Flags());
1523 template <
class _Up,
class _Flags>
1524 std::enable_if_t<__vectorizable<_Up>() &&
1528 for (
size_t __i = 0; __i < size(); __i++) {
1529 __buffer[__i] =
static_cast<_Up
>((*this)[__i]);
1543 mask_type operator!()
const;
1574 friend simd& operator<<=(
simd&,
int);
1575 friend simd& operator>>=(
simd&,
int);
1580 friend mask_type operator>=(
const simd&,
const simd&);
1581 friend mask_type operator<=(
const simd&,
const simd&);
1582 friend mask_type operator>(
const simd&,
const simd&);
1586 #ifdef ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1587 template <
class _Abi>
1590 template <_StorageKind _K,
int _Np>
1597 "only clang vector-based ABI is supported for now.");
1599 std::conditional_t<
sizeof(_Tp) == 1, uint8_t,
1600 std::conditional_t<
sizeof(_Tp) == 2, uint16_t,
1601 std::conditional_t<
sizeof(_Tp) == 4, uint32_t,
1602 std::conditional_t<
sizeof(_Tp) == 8, uint64_t,
void>>>>;
1606 template <
class _Tp,
class _Abi>
1613 template <
class,
class>
1620 : __ptr_(__ptr), __index_(__index) {}
1627 operator _Vp()
const {
return (
_Vp)__ptr_->__get(__index_); }
1630 __ptr_->__set(__index_, (_Tp)__value);
1635 return std::move(*
this) = ((
_Vp)__ptr_->__get(__index_)) & __value;
1639 return std::move(*
this) = ((
_Vp)__ptr_->__get(__index_)) | __value;
1643 return std::move(*
this) = ((
_Vp)__ptr_->__get(__index_)) ^ __value;
1646 #endif // ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1649 template <
class _Tp,
class _Abi>
1652 #ifdef ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1654 #endif // ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1657 #ifdef ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1662 #endif // ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1666 #ifdef ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1667 static constexpr
size_t size() noexcept {
return simd_type::size(); }
1669 static constexpr
size_t size() noexcept;
1670 #endif // ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1672 #ifdef ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1673 const auto&
data() const noexcept {
return __s_.data(); }
1679 #ifdef ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1682 for (
size_t __i = 0; __i < size(); __i++) {
1687 explicit simd_mask(value_type) noexcept;
1688 #endif // ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1691 #ifdef ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1692 template <
class _Up>
1697 template <
class _Up>
1702 template <
class _Up>
1704 #endif // ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1707 template <
class _Flags>
1711 template <
class _Flags>
1712 void copy_from(
const value_type*, _Flags);
1713 template <
class _Flags>
1714 void copy_to(value_type*, _Flags)
const;
1717 #ifdef ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1723 #endif // ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1744 #ifdef ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1749 template <
class _Up,
class _UAbi>
1751 for (
size_t __i = 0; __i < size(); __i++) {
1755 #endif // ENABLE_SYCL_EXT_ONEAPI_INVOKE_SIMD
1758 #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
sycl::ext::oneapi::experimental::annotated_ref< T, typename unpack< filtered_properties >::type > reference
__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)
static constexpr bfn_t operator~(bfn_t x)
bool operator==(const cache_config &lhs, const cache_config &rhs)
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
multi_ptr & operator-=(difference_type r)
__simd_reference & operator=(const __simd_reference &)=delete
const _StorageType & data() const noexcept
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
_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)
__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 > &)
const auto & data() const noexcept
__simd_mask_reference operator&=(_Vp __value) &&
reference operator[](size_t __i)
std::enable_if_t< __vectorizable< _Up >) &&is_simd_flag_type< _Flags >::value > copy_from(const _Up *__buffer, _Flags)
__simd_reference()=delete
static constexpr size_t size() noexcept
__simd_mask_reference operator|=(_Vp __value) &&
__simd_reference operator>>=(_Vp __value) &&
_Tp hmax(const simd< _Tp, _Abi > &)
constexpr std::enable_if_t< std::is_arithmetic_v< _To > &&std::is_arithmetic_v< _From >, bool > __is_non_narrowing_arithmetic_convertible()
#define _LIBCPP_PUSH_MACROS
_Tp __get(size_t __index) const noexcept
bool some_of(const simd_mask< _Tp, _Abi > &) noexcept
multi_ptr & operator+=(difference_type r)
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) &&
std::enable_if_t< __vectorizable< _Up >) &&is_simd_flag_type< _Flags >::value > copy_to(_Up *__buffer, _Flags) const
#define _LIBCPP_END_NAMESPACE_EXPERIMENTAL_SIMD
std::experimental::simd< T, simd_abi::native_fixed_size< T, N > > simd
std::conditional_t< std::is_same_v< ElementType, half >, sycl::detail::half_impl::BIsRepresentationT, ElementType > element_type
_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)
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
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
__simd_reference operator&=(_Vp __value) &&
bool operator!=(const cache_config &lhs, const cache_config &rhs)
int find_last_set(const simd_mask< _Tp, _Abi > &)
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) &&
static std::enable_if_t< __is_non_narrowing_arithmetic_convertible< _Up, _Tp >), simd< _Tp, _Abi > > __apply(const simd< _Up, _Abi > &__v)
remove_const_t< _Tp > operator-() const &&
std::pair< simd< _Tp, _Abi >, simd< _Tp, _Abi > > minmax(const simd< _Tp, _Abi > &, const simd< _Tp, _Abi > &) noexcept
__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
__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))