27 #ifdef __SYCL_DEVICE_ONLY__
29 #if defined(__NVPTX__)
36 #include <type_traits>
39 inline namespace _V1 {
43 template <
int Dimensions>
46 return id<1>(linear_id);
50 result[0] = linear_id /
r[1];
51 result[1] = linear_id %
r[1];
56 result[0] = linear_id / (
r[1] *
r[2]);
57 result[1] = (linear_id % (
r[1] *
r[2])) /
r[2];
58 result[2] = linear_id %
r[2];
64 auto local_range = g.get_local_range();
65 auto result = local_range[0];
66 for (
size_t i = 1; i < Group::dimensions; ++i)
67 result *= local_range[i];
73 #ifdef __SYCL_DEVICE_ONLY__
74 if constexpr (std::is_same_v<Group,
group<1>> ||
77 auto it = sycl::detail::Builder::getNDItem<Group::dimensions>();
78 return it.get_local_linear_id();
81 return g.get_local_linear_id();
91 template <
typename T,
typename BinaryOperation>
struct is_native_op {
101 template <
typename T,
typename BinaryOperation>
104 std::is_same_v<BinaryOperation, sycl::plus<std::remove_const_t<T>>> ||
105 std::is_same_v<BinaryOperation, sycl::plus<std::add_const_t<T>>> ||
106 std::is_same_v<BinaryOperation, sycl::plus<void>>>;
109 template <
typename T,
typename BinaryOperation>
112 std::is_same_v<BinaryOperation, sycl::multiplies<std::remove_const_t<T>>> ||
113 std::is_same_v<BinaryOperation,
115 std::is_same_v<BinaryOperation, sycl::multiplies<void>>>;
121 template <
typename T,
typename =
void>
125 template <
typename T>
127 std::integral_constant<bool, sycl::detail::is_complex<T>::value ||
128 sycl::detail::is_arithmetic<T>::value>;
130 template <
typename T>
132 : std::bool_constant<is_vec<T>::value &&
133 (is_arithmetic<T>::value ||
134 is_complex<vector_element_t<T>>::value)> {};
137 template <
typename T,
typename BinaryOperation>
141 : std::true_type::value)>;
147 template <
template <
typename>
typename F,
typename T,
int n>
158 template <
typename T>
160 template <
typename T>
168 template <
typename T,
class BinaryOperation>
169 constexpr std::enable_if_t<
175 template <
typename T,
class BinaryOperation>
176 constexpr std::enable_if_t<
177 (is_complex<T>::value && is_multiplies<T, BinaryOperation>::value), T>
182 template <
typename T,
class BinaryOperation>
184 return sycl::known_identity_v<BinaryOperation, T>;
188 template <
typename Group,
typename Ptr,
class Function>
189 Function
for_each(Group g, Ptr first, Ptr last, Function f) {
190 #ifdef __SYCL_DEVICE_ONLY__
193 for (Ptr p = first + offset; p < last; p += stride) {
203 "Group algorithms are not supported on host.");
212 template <
typename Group,
typename T,
class BinaryOperation>
213 std::enable_if_t<(is_group_v<std::decay_t<Group>> &&
214 (detail::is_scalar_arithmetic<T>::value ||
215 (detail::is_complex<T>::value &&
216 detail::is_multiplies<T, BinaryOperation>::value)) &&
221 std::is_same_v<decltype(binary_op(
x,
x)), T>,
222 "Result type of binary_op must match reduction accumulation type.");
223 #ifdef __SYCL_DEVICE_ONLY__
224 #if defined(__NVPTX__)
225 if constexpr (ext::oneapi::experimental::is_user_constructed_group_v<Group>) {
228 #if (__SYCL_CUDA_ARCH__ >= 800)
229 return detail::masked_reduction_cuda_sm80(g,
x, binary_op, MemberMask[0]);
231 return detail::masked_reduction_cuda_shfls(g,
x, binary_op, MemberMask[0]);
235 return sycl::detail::calc<__spv::GroupOperation::Reduce>(
236 g,
typename sycl::detail::GroupOpTag<T>::type(),
x, binary_op);
240 "Group algorithms are not supported on host.");
246 template <
typename Group,
typename T,
class BinaryOperation>
247 std::enable_if_t<(is_group_v<std::decay_t<Group>> &&
248 detail::is_complex<T>::value &&
249 detail::is_native_op<T, sycl::plus<T>>::value &&
250 detail::is_plus<T, BinaryOperation>::value),
253 #ifdef __SYCL_DEVICE_ONLY__
262 "Group algorithms are not supported on host.");
266 template <
typename Group,
typename T,
class BinaryOperation>
267 std::enable_if_t<(is_group_v<std::decay_t<Group>> &&
268 detail::is_vector_arithmetic_or_complex<T>::value &&
273 std::is_same_v<decltype(binary_op(
x,
x)), T>,
274 "Result type of binary_op must match reduction accumulation type.");
276 typename detail::get_scalar_binary_op<BinaryOperation>::type
286 template <
typename Group,
typename V,
typename T,
class BinaryOperation>
288 (is_group_v<std::decay_t<Group>> &&
289 (detail::is_scalar_arithmetic<V>::value || detail::is_complex<V>::value) &&
290 (detail::is_scalar_arithmetic<T>::value || detail::is_complex<T>::value) &&
292 detail::is_plus_or_multiplies_if_complex<T, BinaryOperation>::value &&
293 std::is_convertible_v<V, T>),
297 std::is_same_v<decltype(binary_op(init,
x)), T>,
298 "Result type of binary_op must match reduction accumulation type.");
299 #ifdef __SYCL_DEVICE_ONLY__
304 "Group algorithms are not supported on host.");
308 template <
typename Group,
typename V,
typename T,
class BinaryOperation>
309 std::enable_if_t<(is_group_v<std::decay_t<Group>> &&
310 detail::is_vector_arithmetic_or_complex<V>::value &&
311 detail::is_vector_arithmetic_or_complex<T>::value &&
317 std::is_same_v<decltype(binary_op(init,
x)), T>,
318 "Result type of binary_op must match reduction accumulation type.");
319 typename detail::get_scalar_binary_op<BinaryOperation>::type
321 #ifdef __SYCL_DEVICE_ONLY__
323 for (
int s = 0; s <
x.size(); ++s) {
331 "Group algorithms are not supported on host.");
336 template <
typename Group,
typename Ptr,
typename T,
class BinaryOperation>
338 (is_group_v<std::decay_t<Group>> && detail::is_pointer_v<Ptr> &&
341 detail::is_arithmetic_or_complex<T>::value &&
342 detail::is_plus_or_multiplies_if_complex<T, BinaryOperation>::value &&
345 joint_reduce(Group g, Ptr first, Ptr last, T init, BinaryOperation binary_op) {
347 std::is_same_v<decltype(binary_op(init, *first)), T>,
348 "Result type of binary_op must match reduction accumulation type.");
349 #ifdef __SYCL_DEVICE_ONLY__
350 T partial = detail::identity_for_ga_op<T, BinaryOperation>();
353 partial = binary_op(partial,
x);
360 "Group algorithms are not supported on host.");
364 template <
typename Group,
typename Ptr,
class BinaryOperation>
366 (is_group_v<std::decay_t<Group>> && detail::is_pointer_v<Ptr> &&
372 joint_reduce(Group g, Ptr first, Ptr last, BinaryOperation binary_op) {
373 #ifdef __SYCL_DEVICE_ONLY__
375 T init = detail::identity_for_ga_op<T, BinaryOperation>();
383 "Group algorithms are not supported on host.");
388 template <
typename Group>
389 std::enable_if_t<is_group_v<std::decay_t<Group>>,
bool>
391 #ifdef __SYCL_DEVICE_ONLY__
392 #if defined(__NVPTX__)
393 if constexpr (ext::oneapi::experimental::is_user_constructed_group_v<Group>) {
398 return sycl::detail::spirv::GroupAny(g, pred);
403 "Group algorithms are not supported on host.");
407 template <
typename Group,
typename T,
class Predicate>
414 template <
typename Group,
typename Ptr,
class Predicate>
415 std::enable_if_t<(is_group_v<std::decay_t<Group>> && detail::is_pointer_v<Ptr>),
418 #ifdef __SYCL_DEVICE_ONLY__
420 bool partial =
false;
429 "Group algorithms are not supported on host.");
434 template <
typename Group>
435 std::enable_if_t<is_group_v<std::decay_t<Group>>,
bool>
437 #ifdef __SYCL_DEVICE_ONLY__
438 #if defined(__NVPTX__)
439 if constexpr (ext::oneapi::experimental::is_user_constructed_group_v<Group>) {
444 return sycl::detail::spirv::GroupAll(g, pred);
449 "Group algorithms are not supported on host.");
453 template <
typename Group,
typename T,
class Predicate>
454 std::enable_if_t<is_group_v<std::decay_t<Group>>,
bool>
460 template <
typename Group,
typename Ptr,
class Predicate>
461 std::enable_if_t<(is_group_v<std::decay_t<Group>> && detail::is_pointer_v<Ptr>),
464 #ifdef __SYCL_DEVICE_ONLY__
475 "Group algorithms are not supported on host.");
480 template <
typename Group>
481 std::enable_if_t<is_group_v<std::decay_t<Group>>,
bool>
483 #ifdef __SYCL_DEVICE_ONLY__
484 #if defined(__NVPTX__)
485 if constexpr (ext::oneapi::experimental::is_user_constructed_group_v<Group>) {
490 return sycl::detail::spirv::GroupAll(g, !pred);
495 "Group algorithms are not supported on host.");
499 template <
typename Group,
typename T,
class Predicate>
500 std::enable_if_t<is_group_v<std::decay_t<Group>>,
bool>
506 template <
typename Group,
typename Ptr,
class Predicate>
507 std::enable_if_t<(is_group_v<std::decay_t<Group>> && detail::is_pointer_v<Ptr>),
510 #ifdef __SYCL_DEVICE_ONLY__
518 "Group algorithms are not supported on host.");
525 template <
typename Group,
typename T>
526 std::enable_if_t<((std::is_same_v<std::decay_t<Group>, sub_group> ||
528 std::decay_t<Group>>) &&
529 (std::is_trivially_copyable_v<T> ||
530 detail::is_vec<T>::value)),
533 #ifdef __SYCL_DEVICE_ONLY__
534 return sycl::detail::spirv::ShuffleDown(g,
x, delta);
540 "Sub-groups are not supported on host.");
547 template <
typename Group,
typename T>
548 std::enable_if_t<((std::is_same_v<std::decay_t<Group>, sub_group> ||
550 std::decay_t<Group>>) &&
551 (std::is_trivially_copyable_v<T> ||
552 detail::is_vec<T>::value)),
555 #ifdef __SYCL_DEVICE_ONLY__
556 return sycl::detail::spirv::ShuffleUp(g,
x, delta);
562 "Sub-groups are not supported on host.");
569 template <
typename Group,
typename T>
570 std::enable_if_t<((std::is_same_v<std::decay_t<Group>, sub_group> ||
572 std::decay_t<Group>>) &&
573 (std::is_trivially_copyable_v<T> ||
574 detail::is_vec<T>::value)),
577 #ifdef __SYCL_DEVICE_ONLY__
578 return sycl::detail::spirv::ShuffleXor(g,
x, mask);
584 "Sub-groups are not supported on host.");
591 template <
typename Group,
typename T>
592 std::enable_if_t<((std::is_same_v<std::decay_t<Group>, sub_group> ||
594 std::decay_t<Group>>) &&
595 (std::is_trivially_copyable_v<T> ||
596 detail::is_vec<T>::value)),
599 #ifdef __SYCL_DEVICE_ONLY__
600 return sycl::detail::spirv::Shuffle(g,
x, local_id);
606 "Sub-groups are not supported on host.");
613 template <
typename Group,
typename T>
614 std::enable_if_t<(is_group_v<std::decay_t<Group>> &&
615 (std::is_trivially_copyable_v<T> ||
616 detail::is_vec<T>::value)),
619 #ifdef __SYCL_DEVICE_ONLY__
620 #if defined(__NVPTX__)
621 if constexpr (ext::oneapi::experimental::is_user_constructed_group_v<Group>) {
627 return sycl::detail::spirv::GroupBroadcast(g,
x, local_id);
633 "Group algorithms are not supported on host.");
637 template <
typename Group,
typename T>
638 std::enable_if_t<(is_group_v<std::decay_t<Group>> &&
639 (std::is_trivially_copyable_v<T> ||
640 detail::is_vec<T>::value)),
643 #ifdef __SYCL_DEVICE_ONLY__
650 (void)linear_local_id;
652 "Group algorithms are not supported on host.");
656 template <
typename Group,
typename T>
657 std::enable_if_t<(is_group_v<std::decay_t<Group>> &&
658 (std::is_trivially_copyable_v<T> ||
659 detail::is_vec<T>::value)),
662 #ifdef __SYCL_DEVICE_ONLY__
668 "Group algorithms are not supported on host.");
676 template <
typename Group,
typename T,
class BinaryOperation>
677 std::enable_if_t<(is_group_v<std::decay_t<Group>> &&
678 (detail::is_scalar_arithmetic<T>::value ||
679 (detail::is_complex<T>::value &&
680 detail::is_multiplies<T, BinaryOperation>::value)) &&
684 static_assert(std::is_same_v<decltype(binary_op(
x,
x)), T>,
685 "Result type of binary_op must match scan accumulation type.");
686 #ifdef __SYCL_DEVICE_ONLY__
687 #if defined(__NVPTX__)
688 if constexpr (ext::oneapi::experimental::is_user_constructed_group_v<Group>) {
689 return detail::masked_scan_cuda_shfls<__spv::GroupOperation::ExclusiveScan>(
711 auto res = sycl::detail::calc<__spv::GroupOperation::ExclusiveScan>(
712 g,
typename sycl::detail::GroupOpTag<T>::type(),
x, binary_op);
713 if constexpr ((std::is_same_v<signed char, T> ||
714 std::is_same_v<signed short, T> ||
715 (std::is_signed_v<char> && std::is_same_v<char, T>)) &&
716 detail::is_max_or_min<BinaryOperation>::value) {
719 return sycl::known_identity_v<BinaryOperation, T>;
725 "Group algorithms are not supported on host.");
731 template <
typename Group,
typename T,
class BinaryOperation>
732 std::enable_if_t<(is_group_v<std::decay_t<Group>> &&
733 detail::is_complex<T>::value &&
734 detail::is_native_op<T, sycl::plus<T>>::value &&
735 detail::is_plus<T, BinaryOperation>::value),
738 #ifdef __SYCL_DEVICE_ONLY__
747 "Group algorithms are not supported on host.");
751 template <
typename Group,
typename T,
class BinaryOperation>
752 std::enable_if_t<(is_group_v<std::decay_t<Group>> &&
753 detail::is_vector_arithmetic_or_complex<T>::value &&
757 static_assert(std::is_same_v<decltype(binary_op(
x,
x)), T>,
758 "Result type of binary_op must match scan accumulation type.");
760 typename detail::get_scalar_binary_op<BinaryOperation>::type
762 for (
int s = 0; s <
x.size(); ++s) {
770 template <
typename Group,
typename V,
typename T,
class BinaryOperation>
772 (is_group_v<std::decay_t<Group>> &&
773 (detail::is_scalar_arithmetic<V>::value || detail::is_complex<V>::value) &&
774 (detail::is_scalar_arithmetic<T>::value || detail::is_complex<T>::value) &&
776 detail::is_plus_or_multiplies_if_complex<T, BinaryOperation>::value &&
777 std::is_convertible_v<V, T>),
780 static_assert(std::is_same_v<decltype(binary_op(init,
x)), T>,
781 "Result type of binary_op must match scan accumulation type.");
782 #ifdef __SYCL_DEVICE_ONLY__
783 typename Group::linear_id_type local_linear_id =
786 if (local_linear_id == 0) {
787 y = binary_op(init,
y);
790 if (local_linear_id == 0) {
797 "Group algorithms are not supported on host.");
801 template <
typename Group,
typename V,
typename T,
class BinaryOperation>
802 std::enable_if_t<(is_group_v<std::decay_t<Group>> &&
803 detail::is_vector_arithmetic_or_complex<V>::value &&
804 detail::is_vector_arithmetic_or_complex<T>::value &&
809 static_assert(std::is_same_v<decltype(binary_op(init,
x)), T>,
810 "Result type of binary_op must match scan accumulation type.");
812 typename detail::get_scalar_binary_op<BinaryOperation>::type
814 for (
int s = 0; s <
x.size(); ++s) {
821 template <
typename Group,
typename InPtr,
typename OutPtr,
typename T,
822 class BinaryOperation>
824 (is_group_v<std::decay_t<Group>> && detail::is_pointer_v<InPtr> &&
825 detail::is_pointer_v<OutPtr> &&
830 detail::is_arithmetic_or_complex<T>::value &&
832 detail::is_plus_or_multiplies_if_complex<T, BinaryOperation>::value),
835 BinaryOperation binary_op) {
836 static_assert(std::is_same_v<decltype(binary_op(init, *first)), T>,
837 "Result type of binary_op must match scan accumulation type.");
838 #ifdef __SYCL_DEVICE_ONLY__
841 ptrdiff_t N = last - first;
842 auto roundup = [=](
const ptrdiff_t &v,
843 const ptrdiff_t &divisor) -> ptrdiff_t {
844 return ((v + divisor - 1) / divisor) * divisor;
846 typename std::remove_const<typename detail::remove_pointer<InPtr>::type>::type
849 for (ptrdiff_t chunk = 0; chunk < roundup(N, stride); chunk += stride) {
850 ptrdiff_t i = chunk + offset;
867 "Group algorithms are not supported on host.");
871 template <
typename Group,
typename InPtr,
typename OutPtr,
872 class BinaryOperation>
874 (is_group_v<std::decay_t<Group>> && detail::is_pointer_v<InPtr> &&
875 detail::is_pointer_v<OutPtr> &&
880 detail::is_native_op<typename detail::remove_pointer<OutPtr>::type,
881 BinaryOperation>::value &&
884 BinaryOperation>::value),
887 BinaryOperation binary_op) {
888 static_assert(std::is_same_v<decltype(binary_op(*first, *first)),
890 "Result type of binary_op must match scan accumulation type.");
892 T init = detail::identity_for_ga_op<T, BinaryOperation>();
900 template <
typename Group,
typename T,
class BinaryOperation>
901 std::enable_if_t<(is_group_v<std::decay_t<Group>> &&
902 (detail::is_scalar_arithmetic<T>::value ||
903 (detail::is_complex<T>::value &&
904 detail::is_multiplies<T, BinaryOperation>::value)) &&
908 static_assert(std::is_same_v<decltype(binary_op(
x,
x)), T>,
909 "Result type of binary_op must match scan accumulation type.");
910 #ifdef __SYCL_DEVICE_ONLY__
911 #if defined(__NVPTX__)
912 if constexpr (ext::oneapi::experimental::is_user_constructed_group_v<Group>) {
913 return detail::masked_scan_cuda_shfls<__spv::GroupOperation::InclusiveScan>(
918 return sycl::detail::calc<__spv::GroupOperation::InclusiveScan>(
919 g,
typename sycl::detail::GroupOpTag<T>::type(),
x, binary_op);
923 "Group algorithms are not supported on host.");
927 template <
typename Group,
typename T,
class BinaryOperation>
928 std::enable_if_t<(is_group_v<std::decay_t<Group>> &&
929 detail::is_vector_arithmetic_or_complex<T>::value &&
933 static_assert(std::is_same_v<decltype(binary_op(
x,
x)), T>,
934 "Result type of binary_op must match scan accumulation type.");
936 typename detail::get_scalar_binary_op<BinaryOperation>::type
938 for (
int s = 0; s <
x.size(); ++s) {
945 template <
typename Group,
typename T,
class BinaryOperation>
946 std::enable_if_t<(is_group_v<std::decay_t<Group>> &&
947 detail::is_complex<T>::value &&
948 detail::is_native_op<T, sycl::plus<T>>::value &&
949 detail::is_plus<T, BinaryOperation>::value),
952 #ifdef __SYCL_DEVICE_ONLY__
961 "Group algorithms are not supported on host.");
967 template <
typename Group,
typename V,
class BinaryOperation,
typename T>
969 (is_group_v<std::decay_t<Group>> &&
970 (detail::is_scalar_arithmetic<V>::value || detail::is_complex<V>::value) &&
971 (detail::is_scalar_arithmetic<T>::value || detail::is_complex<T>::value) &&
973 detail::is_plus_or_multiplies_if_complex<T, BinaryOperation>::value &&
974 std::is_convertible_v<V, T>),
977 static_assert(std::is_same_v<decltype(binary_op(init,
x)), T>,
978 "Result type of binary_op must match scan accumulation type.");
979 #ifdef __SYCL_DEVICE_ONLY__
982 y = binary_op(init,
y);
988 "Group algorithms are not supported on host.");
992 template <
typename Group,
typename V,
class BinaryOperation,
typename T>
993 std::enable_if_t<(is_group_v<std::decay_t<Group>> &&
994 detail::is_vector_arithmetic_or_complex<V>::value &&
995 detail::is_vector_arithmetic_or_complex<T>::value &&
1000 static_assert(std::is_same_v<decltype(binary_op(init,
x)), T>,
1001 "Result type of binary_op must match scan accumulation type.");
1003 typename detail::get_scalar_binary_op<BinaryOperation>::type
1005 for (
int s = 0; s <
x.size(); ++s) {
1012 template <
typename Group,
typename InPtr,
typename OutPtr,
1013 class BinaryOperation,
typename T>
1015 (is_group_v<std::decay_t<Group>> && detail::is_pointer_v<InPtr> &&
1016 detail::is_pointer_v<OutPtr> &&
1021 detail::is_arithmetic_or_complex<T>::value &&
1023 detail::is_plus_or_multiplies_if_complex<T, BinaryOperation>::value),
1026 BinaryOperation binary_op, T init) {
1027 static_assert(std::is_same_v<decltype(binary_op(init, *first)), T>,
1028 "Result type of binary_op must match scan accumulation type.");
1029 #ifdef __SYCL_DEVICE_ONLY__
1032 ptrdiff_t N = last - first;
1033 auto roundup = [=](
const ptrdiff_t &v,
1034 const ptrdiff_t &divisor) -> ptrdiff_t {
1035 return ((v + divisor - 1) / divisor) * divisor;
1037 typename std::remove_const<typename detail::remove_pointer<InPtr>::type>::type
1040 for (ptrdiff_t chunk = 0; chunk < roundup(N, stride); chunk += stride) {
1041 ptrdiff_t i = chunk + offset;
1057 "Group algorithms are not supported on host.");
1061 template <
typename Group,
typename InPtr,
typename OutPtr,
1062 class BinaryOperation>
1064 (is_group_v<std::decay_t<Group>> && detail::is_pointer_v<InPtr> &&
1065 detail::is_pointer_v<OutPtr> &&
1068 detail::is_native_op<typename detail::remove_pointer<OutPtr>::type,
1069 BinaryOperation>::value &&
1072 BinaryOperation>::value),
1075 BinaryOperation binary_op) {
1076 static_assert(std::is_same_v<decltype(binary_op(*first, *first)),
1078 "Result type of binary_op must match scan accumulation type.");
1081 T init = detail::identity_for_ga_op<T, BinaryOperation>();
A unique identifier of an item in an index space.
id< Dimensions > linear_id_to_id(range< Dimensions >, size_t linear_id)
auto get_local_linear_id(Group g)
std::integral_constant< bool, std::is_same_v< BinaryOperation, sycl::multiplies< std::remove_const_t< T > >>||std::is_same_v< BinaryOperation, sycl::multiplies< std::add_const_t< T > >>||std::is_same_v< BinaryOperation, sycl::multiplies< void > >> is_multiplies
auto get_local_linear_range(Group g)
std::integral_constant< bool, std::is_same_v< BinaryOperation, sycl::plus< std::remove_const_t< T > >>||std::is_same_v< BinaryOperation, sycl::plus< std::add_const_t< T > >>||std::is_same_v< BinaryOperation, sycl::plus< void > >> is_plus
boost::mp11::mp_set_contains< TypeList, std::remove_cv_t< T > > is_contained
uint32_t IdToMaskPosition(NonUniformGroup Group, uint32_t Id)
boost::mp11::mp_list< T... > type_list
std::integral_constant< bool, sycl::detail::is_complex< T >::value||sycl::detail::is_arithmetic< T >::value > is_arithmetic_or_complex
ext::oneapi::sub_group_mask GetMask(NonUniformGroup Group)
std::integral_constant< bool,(is_complex< T >::value ?(is_plus< T, BinaryOperation >::value||is_multiplies< T, BinaryOperation >::value) :std::true_type::value)> is_plus_or_multiplies_if_complex
sycl::vec< unsigned, 4 > ExtractMask(ext::oneapi::sub_group_mask Mask)
id< 3 > linear_id_to_id(range< 3 > r, size_t linear_id)
type_list< sycl::plus< T >, sycl::bit_or< T >, sycl::bit_xor< T >, sycl::bit_and< T >, sycl::maximum< T >, sycl::minimum< T >, sycl::multiplies< T >, sycl::logical_or< T >, sycl::logical_and< T > > native_op_list
constexpr std::enable_if_t<(is_complex< T >::value &&is_plus< T, BinaryOperation >::value), T > identity_for_ga_op()
Function for_each(Group g, Ptr first, Ptr last, Function f)
constexpr bool is_user_constructed_group_v
std::enable_if_t<(is_group_v< std::decay_t< Group >> &&(std::is_trivially_copyable_v< T >||detail::is_vec< T >::value)), T > group_broadcast(Group g, T x, typename Group::id_type local_id)
std::enable_if_t<(is_group_v< std::decay_t< Group >> &&(detail::is_scalar_arithmetic< T >::value||(detail::is_complex< T >::value &&detail::is_multiplies< T, BinaryOperation >::value)) &&detail::is_native_op< T, BinaryOperation >::value), T > exclusive_scan_over_group(Group g, T x, BinaryOperation binary_op)
std::bit_and< T > bit_and
std::enable_if_t<((std::is_same_v< std::decay_t< Group >, sub_group >||sycl::ext::oneapi::experimental::is_user_constructed_group_v< std::decay_t< Group >>) &&(std::is_trivially_copyable_v< T >||detail::is_vec< T >::value)), T > shift_group_left(Group g, T x, typename Group::linear_id_type delta=1)
std::enable_if_t<(is_group_v< std::decay_t< Group >> &&detail::is_pointer_v< Ptr > &&detail::is_arithmetic_or_complex< typename detail::remove_pointer< Ptr >::type >::value &&detail::is_arithmetic_or_complex< T >::value &&detail::is_plus_or_multiplies_if_complex< T, BinaryOperation >::value &&detail::is_native_op< T, BinaryOperation >::value), T > joint_reduce(Group g, Ptr first, Ptr last, T init, BinaryOperation binary_op)
std::enable_if_t< is_group_v< std::decay_t< Group > >, bool > any_of_group(Group g, bool pred)
std::enable_if_t<((std::is_same_v< std::decay_t< Group >, sub_group >||sycl::ext::oneapi::experimental::is_user_constructed_group_v< std::decay_t< Group >>) &&(std::is_trivially_copyable_v< T >||detail::is_vec< T >::value)), T > shift_group_right(Group g, T x, typename Group::linear_id_type delta=1)
std::enable_if_t<(is_group_v< std::decay_t< Group >> &&detail::is_pointer_v< InPtr > &&detail::is_pointer_v< OutPtr > &&detail::is_arithmetic_or_complex< typename detail::remove_pointer< InPtr >::type >::value &&detail::is_arithmetic_or_complex< typename detail::remove_pointer< OutPtr >::type >::value &&detail::is_arithmetic_or_complex< T >::value &&detail::is_native_op< T, BinaryOperation >::value &&detail::is_plus_or_multiplies_if_complex< T, BinaryOperation >::value), OutPtr > joint_exclusive_scan(Group g, InPtr first, InPtr last, OutPtr result, T init, BinaryOperation binary_op)
std::multiplies< T > multiplies
std::bit_xor< T > bit_xor
std::enable_if_t<(is_group_v< std::decay_t< Group >> &&detail::is_pointer_v< InPtr > &&detail::is_pointer_v< OutPtr > &&detail::is_arithmetic_or_complex< typename detail::remove_pointer< InPtr >::type >::value &&detail::is_arithmetic_or_complex< typename detail::remove_pointer< OutPtr >::type >::value &&detail::is_arithmetic_or_complex< T >::value &&detail::is_native_op< T, BinaryOperation >::value &&detail::is_plus_or_multiplies_if_complex< T, BinaryOperation >::value), OutPtr > joint_inclusive_scan(Group g, InPtr first, InPtr last, OutPtr result, BinaryOperation binary_op, T init)
std::enable_if_t<(is_group_v< std::decay_t< Group >> &&(detail::is_scalar_arithmetic< T >::value||(detail::is_complex< T >::value &&detail::is_multiplies< T, BinaryOperation >::value)) &&detail::is_native_op< T, BinaryOperation >::value), T > reduce_over_group(Group g, T x, BinaryOperation binary_op)
std::enable_if_t<(is_group_v< std::decay_t< Group >> &&detail::is_pointer_v< Ptr >), bool > joint_any_of(Group g, Ptr first, Ptr last, Predicate pred)
std::enable_if_t<((std::is_same_v< std::decay_t< Group >, sub_group >||sycl::ext::oneapi::experimental::is_user_constructed_group_v< std::decay_t< Group >>) &&(std::is_trivially_copyable_v< T >||detail::is_vec< T >::value)), T > select_from_group(Group g, T x, typename Group::id_type local_id)
std::enable_if_t<(is_group_v< std::decay_t< Group >> &&detail::is_pointer_v< Ptr >), bool > joint_all_of(Group g, Ptr first, Ptr last, Predicate pred)
std::enable_if_t< is_group_v< std::decay_t< Group > >, bool > none_of_group(Group g, bool pred)
std::enable_if_t<(is_group_v< std::decay_t< Group >> &&(detail::is_scalar_arithmetic< T >::value||(detail::is_complex< T >::value &&detail::is_multiplies< T, BinaryOperation >::value)) &&detail::is_native_op< T, BinaryOperation >::value), T > inclusive_scan_over_group(Group g, T x, BinaryOperation binary_op)
std::error_code make_error_code(sycl::errc E) noexcept
Constructs an error code using e and sycl_category()
std::enable_if_t<((std::is_same_v< std::decay_t< Group >, sub_group >||sycl::ext::oneapi::experimental::is_user_constructed_group_v< std::decay_t< Group >>) &&(std::is_trivially_copyable_v< T >||detail::is_vec< T >::value)), T > permute_group_by_xor(Group g, T x, typename Group::linear_id_type mask)
std::enable_if_t<(is_group_v< std::decay_t< Group >> &&detail::is_pointer_v< Ptr >), bool > joint_none_of(Group g, Ptr first, Ptr last, Predicate pred)
std::enable_if_t< is_group_v< std::decay_t< Group > >, bool > all_of_group(Group g, bool pred)
static constexpr bool value
std::remove_cv_t< T > type